-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild_release_windows.sh
executable file
·53 lines (42 loc) · 2 KB
/
build_release_windows.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
echo "Run this with Administrator privileges because the last step needs it."
sleep 3
echo "0) make sure all changes are committed"
diff=$(git diff | wc -l)
if [ $diff -gt 0 ]; then
echo "You have diff"
exit 1
fi
echo "1) make sure devtools are set to false in src/main.js"
if grep "devTools: true" src/main.js; then
echo "devTools: true found in src/main.js"
exit 2
fi
echo "2) make sure you've incremented the version number in package.json AND package-lock.json"
read yes
echo "3) Cleaning up old build..."
rm -rf .webpack
rm -rf dist
rm -rf out
# dont include linux binaries in Windows build
rm -rf vnc-software/tigervnc-linux-x86_64
if [ ! -d "vnc-software/uvnc-windows" ]; then
echo "vnc-software/uvnc-windows not found, running vnc-software/download_generic.sh"
./vnc-software/download_generic.sh "uvnc-windows.zip" "uvnc-windows" "https://uvnc.com/component/jdownloads/send/0-/470-ultravnc-1-4-6-zip.html" "3afe90cf4f287ff066649225223d9950221ddfd273e5f4805c2f6fde39a5df83" "ultravnc.conf" "uvnc-windows/x64/UltraVNC.ini"
fi
# first make sure the correct files are packaged with electron-forge:
echo "4) Packaging with: electron-forge package"
./node_modules/.bin/electron-forge package -p win32 -a x64
echo "5) Building release binaries with: electron-builder --win nsis portable msi zip"
# NOTE: Building for Windows on Linux doesn't seem to work, see:
# https://github.com/electron/electron/issues/1075
# https://github.com/electron-userland/electron-builder/issues/844
# https://github.com/electron-userland/electron-builder/issues/5254
#
# Building for Windows on Linux also requires wine32, see https://www.electron.build/multi-platform-build so something like:
# dpkg --add-architecture i386 && apt-get update && apt-get install wine32
# And then:
#./node_modules/.bin/electron-builder --win nsis portable msi zip
# Execute on a Windows machine (as Administrator, otherwise symlink permission errors):
export DEBUG=electron-builder
node_modules\\.bin\\electron-builder --win nsis portable msi zip