Skip to content

Instantly share code, notes, and snippets.

@TomByrne
Last active February 6, 2019 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TomByrne/785d540bbb9da22dd983bf54d904ffc9 to your computer and use it in GitHub Desktop.
Save TomByrne/785d540bbb9da22dd983bf54d904ffc9 to your computer and use it in GitHub Desktop.
Haxe / Wix / Ubuntu Dockerfile
FROM syedhassaanahmed/wix-node
USER root
RUN mkdir /home/wix/src
WORKDIR /home/wix/src
# Haxe environment variables
ENV HAXEURL https://github.com/HaxeFoundation/haxe/releases/download/4.0.0-rc.1/haxe-4.0.0-rc.1-linux64.tar.gz
ENV HAXEPATH /root/haxe
ENV HAXE_STD_PATH $HAXEPATH/std/
ENV PATH $HAXEPATH:$PATH
# Neko environment variables
ENV NEKOURL https://github.com/HaxeFoundation/neko/releases/download/v2-2-0/neko-2.2.0-linux64.tar.gz
ENV NEKOPATH /root/neko
ENV LD_LIBRARY_PATH $NEKOPATH
ENV PATH $NEKOPATH:$PATH
# Download Neko
RUN mkdir $NEKOPATH
RUN wget -O - $NEKOURL | tar -xzf - --strip=1 -C $NEKOPATH
# Download Haxe
RUN mkdir $HAXEPATH
RUN wget -O - $HAXEURL | tar -xzf - --strip=1 -C $HAXEPATH
# Setup haxelib
RUN mkdir /root/haxelib
RUN echo /root/haxelib > /root/.haxelib
RUN cp /root/.haxelib /etc/
# Everything below here is project specific
# Copy project files into container
COPY . .
# Install NPM libs
RUN npm install
#Install Haxelibs (intentionally doing this before updating Haxe)
RUN haxelib --always --quiet install libs.hxml
# Setup Lime (adds it to command line and install hxcpp)
RUN haxelib run lime setup -y
#Build App
RUN npm run do_my_build
@TomByrne
Copy link
Author

TomByrne commented Feb 5, 2019

When packaging a Haxe app into a Windows installer, the Wix toolkit offers a ton of flexibility.
Unfortunately Wix is Windows only, so the syedhassaanahmed/wix-node base image gets it working in Ubunu (using Wine).
At the time of writing, Haxe 4 isn't available in the PPA app repository, so I'm manually downloading Haxe/Neko.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment