@@ -4,15 +4,15 @@ runtime-version: "23.08"
4
4
base : org.electronjs.Electron2.BaseApp
5
5
base-version : " 23.08"
6
6
sdk : org.freedesktop.Sdk
7
- command : launcher-args .sh
7
+ command : run .sh
8
8
sdk-extensions :
9
- - org.freedesktop.Sdk.Extension.node18
9
+ - org.freedesktop.Sdk.Extension.node20
10
10
build-options :
11
- append_path : " /usr/lib/sdk/node18 /bin"
11
+ append_path : " /usr/lib/sdk/node20 /bin"
12
12
cflags : -O2 -g
13
13
cxxflags : -O2 -g
14
14
env :
15
- npm_config_nodedir : /usr/lib/sdk/node18
15
+ npm_config_nodedir : /usr/lib/sdk/node20
16
16
npm_config_offline : ' true'
17
17
NPM_CONFIG_LOGLEVEL : info
18
18
XDG_CACHE_HOME : /run/build/spring-launcher/flatpak-node/cache
@@ -24,81 +24,91 @@ finish-args:
24
24
- --socket=pulseaudio
25
25
- --device=dri
26
26
- --share=network
27
- - --env=PATH=/usr/bin:/app/bin:/usr/lib/sdk/node18/bin
27
+ - --env=PATH=/usr/bin:/app/bin:/usr/lib/sdk/node20/bin
28
+ - --filesystem=xdg-run/app/com.discordapp.Discord:create
29
+ cleanup :
30
+ - ' /chobby'
28
31
modules :
32
+ - name : chobby
33
+ buildsystem : simple
34
+ build-commands :
35
+ sources :
36
+ - type : git
37
+ url : https://github.com/beyond-all-reason/BYAR-Chobby
38
+ commit : eece9ffed260ff110ec2cc31fac25c4daf7a9c51
39
+ # We do full clone to make sure PACKAGE_VERSION is computed correctly.
40
+ disable-shallow-clone : true
41
+ build-commands :
42
+ - |
43
+ mkdir -p /app/chobby
44
+ echo "1.$(git rev-list --count HEAD).0" > /app/chobby/PACKAGE_VERSION
45
+ cp -r dist_cfg /app/chobby
46
+ cp -r build /app/chobby
29
47
- name : spring-launcher
30
48
buildsystem : simple
31
49
build-commands :
32
50
# First steps from https://github.com/beyond-all-reason/BYAR-Chobby/blob/master/.github/workflows/launcher.yml
33
51
# GitHub Action step: Patch launcher with dist_cfg
34
52
- |
35
- cp -r BYAR-Chobby/ dist_cfg/* launcher/ src/
53
+ cp -r /app/chobby/ dist_cfg/* src/
36
54
for dir in bin files build; do
37
- mkdir -p launcher/ $dir
38
- if [ -d launcher/ src/$dir/ ]; then
39
- mv launcher/ src/$dir/* launcher/ $dir/
40
- rm -rf launcher/ src/$dir
55
+ mkdir -p $dir
56
+ if [ -d src/$dir/ ]; then
57
+ mv src/$dir/* $dir/
58
+ rm -rf src/$dir
41
59
fi
42
60
done
43
61
# GitHub Action step: Make package.json
44
62
- |
45
- cd BYAR-Chobby
46
- export PACKAGE_VERSION=1.$(git rev-list --count HEAD).0
63
+ export PACKAGE_VERSION=$(cat /app/chobby/PACKAGE_VERSION)
47
64
echo "Making build for version: $PACKAGE_VERSION"
48
- node build/make_package_json.js ../launcher/ package.json dist_cfg/config.json $GITHUB_REPOSITORY $PACKAGE_VERSION
65
+ node /app/chobby/ build/make_package_json.js package.json /app/chobby/ dist_cfg/config.json $GITHUB_REPOSITORY $PACKAGE_VERSION
49
66
50
67
# For flatpak we don't want to build AppImage, but unpacked
51
68
- |
52
- cd launcher
53
69
jq '.build.linux.target="dir"' <<<$(<package.json) > package.json
70
+ jq '.build.files+=["!flatpak-node/**"]' <<<$(<package.json) > package.json
54
71
cat package.json
55
72
# Install all packages, use `--ignore-scripts`, so electron does not make a postinstall request
56
73
- |
57
- cd launcher
58
- npm ci --offline --ignore-scripts --cache=/run/build/spring-launcher/flatpak-node/npm-cache/
74
+ npm ci --ignore-scripts
59
75
# Build electron app
60
76
- |
61
77
. flatpak-node/electron-builder-arch-args.sh
62
- cd launcher
63
- node_modules/.bin/electron-builder -- $ELECTRON_BUILDER_ARCH_ARGS --linux --dir --project /run/build/spring-launcher/launcher
78
+ node_modules/.bin/electron-builder -- $ELECTRON_BUILDER_ARCH_ARGS --linux --dir
64
79
# Install application in destination folder
65
80
- |
66
- cp -a launcher/dist/linux*unpacked /app/main
67
- install -Dm755 -t /app/bin/ launcher-args.sh
81
+ cp -a dist/linux*unpacked /app/main
82
+ sources :
83
+ - type : git
84
+ url : https://github.com/beyond-all-reason/spring-launcher
85
+ commit : 2c0a6e17b50ab04ea592c53963c571e5ccb071ba
86
+ # This generated-sources.json from npm generator *really* wants that source is in the top directory
87
+ # and not in some sub directory, that's why there is a bunch of complexity with moving files around etc
88
+ - generated-sources.json
89
+ build-options :
90
+ env :
91
+ XDG_CACHE_HOME : /run/build/spring-launcher/flatpak-node/cache
92
+ npm_config_cache : /run/build/spring-launcher/flatpak-node/npm-cache
93
+ npm_config_nodedir : /usr/lib/sdk/node20
94
+ npm_config_offline : ' true'
95
+ - name : main
96
+ buildsystem : simple
97
+ build-commands :
98
+ - |
68
99
install -Dm755 -t /app/bin/ run.sh
69
- install -Dm644 BYAR-Chobby /dist_cfg/build/icon.png /app/share/icons/hicolor/128x128/apps/info.beyondallreason.bar.png
100
+ install -Dm644 /app/chobby /dist_cfg/build/icon.png /app/share/icons/hicolor/128x128/apps/info.beyondallreason.bar.png
70
101
install -Dm644 info.beyondallreason.bar.desktop /app/share/applications/info.beyondallreason.bar.desktop
71
102
install -Dm644 info.beyondallreason.bar.appdata.xml /app/share/metainfo/info.beyondallreason.bar.appdata.xml
72
103
# Copy addr2line to bin so that engine can execute it to generate stacktrace
73
104
- |
74
105
cp /usr/bin/addr2line /app/bin
75
- cp /lib/x86_64-linux-gnu/libbfd-2.41.so /app/lib
76
- cp /usr/lib/x86_64-linux-gnu/libsframe.so.1 /app/lib
106
+ cp /lib/x86_64-linux-gnu/libbfd* /app/lib
107
+ cp /usr/lib/x86_64-linux-gnu/libsframe* /app/lib
77
108
sources :
78
- - type : git
79
- url : https://github.com/beyond-all-reason/BYAR-Chobby
80
- commit : bbad0ab7c5ccbc207754449c47c65db4da436009
81
- dest : BYAR-Chobby
82
- # We do full clone to make sure PACKAGE_VERSION is computed correctly.
83
- disable-shallow-clone : true
84
- - type : git
85
- url : https://github.com/beyond-all-reason/spring-launcher
86
- commit : 6792caf2ede73f3f601a0ab7fbb4fb38c96fbb40
87
- dest : launcher
88
109
- type : file
89
110
path : info.beyondallreason.bar.desktop
90
111
- type : file
91
112
path : info.beyondallreason.bar.appdata.xml
92
- - generated-sources.json
93
113
- type : file
94
- path : launcher-args.sh
95
- - type : script
96
- dest-filename : run.sh
97
- commands :
98
- - zypak-wrapper.sh /app/main/beyond-all-reason "$@"
99
- build-options :
100
- env :
101
- XDG_CACHE_HOME : /run/build/spring-launcher/flatpak-node/cache
102
- npm_config_cache : /run/build/spring-launcher/flatpak-node/npm-cache
103
- npm_config_nodedir : /usr/lib/sdk/node18
104
- npm_config_offline : ' true'
114
+ path : run.sh
0 commit comments