better installer and portable mode
This commit is contained in:
parent
ada55faf13
commit
53a02cc7da
6 changed files with 97 additions and 79 deletions
32
build.sh
32
build.sh
|
|
@ -15,37 +15,21 @@ fi
|
|||
|
||||
rm -rf build/dist
|
||||
mkdir -p build/dist/PLWL
|
||||
cp -r node_modules/electron/dist build/dist/PLWL/electron
|
||||
cp -r node_modules/electron/dist build/dist/PLWL/olcxja.plwl
|
||||
mv build/dist/PLWL/olcxja.plwl/electron build/dist/PLWL/olcxja.plwl/olcxja.plwl
|
||||
chmod +x build/dist/PLWL/olcxja.plwl/olcxja.plwl
|
||||
|
||||
# 2. Pack the app payload (code + renderer + bundled files) into app.asar.
|
||||
STAGE=build/dist/.app-stage
|
||||
mkdir -p "$STAGE"
|
||||
cp -r src renderer files package.json "$STAGE/"
|
||||
npx asar pack "$STAGE" build/dist/PLWL/electron/resources/app.asar
|
||||
npx asar pack "$STAGE" build/dist/PLWL/olcxja.plwl/resources/app.asar
|
||||
rm -rf "$STAGE"
|
||||
|
||||
# 3. Launcher, desktop entry and installer.
|
||||
cat > build/dist/PLWL/plwl << 'EOF'
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
exec ./electron/electron . "$@"
|
||||
EOF
|
||||
chmod +x build/dist/PLWL/plwl
|
||||
|
||||
cat > build/dist/PLWL/plwl.desktop << 'EOF'
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=PLWL
|
||||
Comment=Portable Linux Wine Launcher
|
||||
Exec=plwl
|
||||
Icon=plwl
|
||||
Terminal=false
|
||||
Categories=Game;
|
||||
EOF
|
||||
|
||||
cp tools/install.sh build/dist/PLWL/install.sh
|
||||
chmod +x build/dist/PLWL/install.sh
|
||||
# 3. Icon, installer and portable-shortcut helper.
|
||||
cp renderer/plwl.png build/dist/PLWL/olcxja.plwl.png
|
||||
cp tools/install.sh tools/createshortcut.sh build/dist/PLWL/
|
||||
chmod +x build/dist/PLWL/install.sh build/dist/PLWL/createshortcut.sh
|
||||
|
||||
# 4. Tarball.
|
||||
mkdir -p build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue