Skip to content

Commit f18fdc4

Browse files
Tweak build_release_* scripts
1 parent 1ee117a commit f18fdc4

File tree

2 files changed

+50
-16
lines changed

2 files changed

+50
-16
lines changed

build_release_linux.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,21 @@ read yes
1616
echo "3) Cleaning up old build..."
1717
rm -rf .webpack/
1818
rm -rf dist/
19+
# Don't include Windows VNC binaries on Linux
20+
rm -rf vnc-software/uvnc-windows/
1921

2022
# If you run it in dev mode first with:
2123
# npm run start
2224
# Then the app tries to connect to localhost:3000 instead of packaging the actual files when building with:
2325
#./node_modules/.bin/electron-builder
2426

2527
# Therefore, first make sure the correct files are packaged with electron-forge:
26-
echo "4) Running: electron-forge package"
27-
./node_modules/.bin/electron-forge package
28+
echo "4) Packaging with: electron-forge package -p linux -a x64"
29+
./node_modules/.bin/electron-forge package -p linux -a x64
2830

2931
# NOTE: Don't use prepackage because the electron-builder will not add the tigervnc/ folder:
3032
#./node_modules/.bin/electron-builder --prepackaged out/peerviewer-linux-x64/ -l appimage
31-
echo "5) Running electron-builder --linux appimage zip deb snap rpm"
33+
echo "5) Building release binaries with: electron-builder --linux appimage deb snap rpm tar.gz"
3234
export DEBUG=electron-builder
3335
./node_modules/.bin/electron-builder --linux appimage deb snap rpm tar.gz
3436

35-
# Building for Windows on Linux doesn't seem to work, see:
36-
# https://github.com/electron/electron/issues/1075
37-
# https://github.com/electron-userland/electron-builder/issues/844
38-
# https://github.com/electron-userland/electron-builder/issues/5254
39-
#
40-
# It also requires wine32, see https://www.electron.build/multi-platform-build so something like:
41-
# dpkg --add-architecture i386 && apt-get update && apt-get install wine32
42-
#./node_modules/.bin/electron-builder --win nsis portable msi zip
43-
#
44-
# To build for Windows, execute on a Windows machine (as Administrator, otherwise symlink permission errors):
45-
# node_modules\\.bin\\electron-builder --win nsis portable msi zip
46-
47-

build_release_windows.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/sh
2+
3+
echo "Run this with Administrator privileges because the last step needs it."
4+
sleep 3
5+
6+
echo "0) make sure all changes are committed"
7+
diff=$(git diff | wc -l)
8+
if [ $diff -gt 0 ]; then
9+
echo "You have diff"
10+
exit 1
11+
fi
12+
13+
echo "1) make sure devtools are set to false in src/main.js"
14+
read yes
15+
16+
echo "2) make sure you've incremented the version number in package.json"
17+
read yes
18+
19+
echo "3) Cleaning up old build..."
20+
rm -rf .webpack/
21+
rm -rf dist/
22+
# dont include linux binaries in Windows build
23+
rm -rf vnc-software/tigervnc-linux-x86_64/
24+
25+
# first make sure the correct files are packaged with electron-forge:
26+
echo "4) Packaging with: electron-forge package"
27+
./node_modules/.bin/electron-forge package -p win32 -a x64
28+
29+
echo "5) Building release binaries with: electron-builder --win nsis portable msi zip"
30+
# NOTE: Building for Windows on Linux doesn't seem to work, see:
31+
# https://github.com/electron/electron/issues/1075
32+
# https://github.com/electron-userland/electron-builder/issues/844
33+
# https://github.com/electron-userland/electron-builder/issues/5254
34+
#
35+
# Building for Windows on Linux also requires wine32, see https://www.electron.build/multi-platform-build so something like:
36+
# dpkg --add-architecture i386 && apt-get update && apt-get install wine32
37+
# And then:
38+
#./node_modules/.bin/electron-builder --win nsis portable msi zip
39+
40+
# Execute on a Windows machine (as Administrator, otherwise symlink permission errors):
41+
export DEBUG=electron-builder
42+
node_modules\\.bin\\electron-builder --win nsis portable msi zip
43+
44+
45+

0 commit comments

Comments
 (0)