-
-
Save hackash/4c3c15151c2ba658d2b4f00cf463d711 to your computer and use it in GitHub Desktop.
Workaround for System.Exception at Squirrel.Utility.CreateZipFromDirectory on macOS Big Sur when building windows installer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From ubuntu:latest | |
WORKDIR ~ | |
# Without interactive dialogue | |
ARG DEBIAN_FRONTEND=noninteractive | |
# Install required packages | |
RUN apt-get update | |
RUN apt-get install -y wget gnupg2 software-properties-common git apt-utils vim dirmngr apt-transport-https ca-certificates | |
# Installing NVM, NodeJS and NPM | |
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | |
ENV NODE_VERSION=11 | |
RUN . $HOME/.nvm/nvm.sh && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default | |
# Install Wine from WineHQ Repository | |
RUN dpkg --add-architecture i386 | |
RUN wget -qO- https://dl.winehq.org/wine-builds/Release.key | apt-key add - | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv F987672F | |
RUN apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' | |
RUN apt-get update | |
RUN apt-get install -y --install-recommends winehq-stable | |
# Installing mono | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
RUN sh -c 'echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" > /etc/apt/sources.list.d/mono-official-stable.list' | |
RUN apt-get update | |
RUN apt-get install -y mono-complete | |
RUN PROJECT_DIR=/root/project | |
WORKDIR $PROJECT_DIR |
Man, thank you very much. Very helpful 👍
This was very helpful. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pull the docker image from the docker hub. It is available publically.
docker pull hackash/electron-windows-build
In your terminal, navigate to the project root directory, remove
node_modules
andpackage-lock.json
to avoid node version conflicts inside the container.docker run -it --rm -v ${PWD}:/project hackash/electron-windows-build
This will spin up a container and map the current folder with the /project path in the container. Once in, type npm install to install the package and your build command
Once finished, just type exit to exit and destroy the container. Note that I left nvm inside in case you need a different node version. I am using 11 currently. That’s why it will be the default version of the node when you enter the container.