Skip to content

Commit 5028e8f

Browse files
authored
Merge pull request #189 from OpenBrickProtocolFoundation/improve_installer
CI: refactor the installer
2 parents cdd6514 + 37a18fd commit 5028e8f

File tree

11 files changed

+57
-39
lines changed

11 files changed

+57
-39
lines changed

.github/workflows/installer.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ jobs:
3030
run: |
3131
pip install meson
3232
33-
- name: Configure
34-
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dbuild_installer=true
35-
36-
- name: Build
37-
run: meson compile -C build
38-
3933
- name: Download EnVar plugin for NSIS
4034
uses: carlosperate/download-file-action@v2
4135
with:
@@ -46,8 +40,13 @@ jobs:
4640
- name: Extract EnVar plugin
4741
run: 7z x "-oC:/Program Files (x86)/NSIS" "${{ github.workspace }}/envar_plugin.zip"
4842

49-
- name: Build installer (Windows)
43+
- name: Configure
44+
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dbuild_installer=true
45+
46+
- name: Build installer
5047
run: |
48+
meson compile -C build
49+
meson install -C build --tags runtime --destdir "dynamic_libraries"
5150
meson compile -C build windows_installer
5251
5352
- name: Upload artifacts - Windows

meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ project(
99
'strip': true,
1010
'cpp_std': ['c++23', 'c++latest', 'vc++latest', 'c++20'],
1111
'b_ndebug': 'if-release',
12-
1312
},
1413
version: '0.5.6',
1514
)

platforms/build-android.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ for INDEX in "${ARCH_KEYS_INDEX[@]}"; do
264264

265265
# fix an compile time error since openssl 3.1.0 >
266266
# see https://github.com/android/ndk/issues/1992
267+
# see https://github.com/openssl/openssl/pull/22181
267268
# Apply patch that fixes the armcap instruction
268269

269270
# sed -e '/[.]hidden.*OPENSSL_armcap_P/d; /[.]extern.*OPENSSL_armcap_P/ {p; s/extern/hidden/ }' -i -- crypto/*arm*pl crypto/*/asm/*arm*pl

src/executables/meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ if build_application
8383
'-DPROJECT_SOURCE_DIR='
8484
+ meson.project_source_root(),
8585
'-DPROJECT_BUILD_DIR=' + meson.project_build_root(),
86+
'-DDYNAMIC_LIBRARIES_DIR='
87+
+ (
88+
meson.project_build_root() / 'dynamic_libraries' / get_option('bindir')
89+
),
8690
nsis_script,
8791
],
8892
depends: [oopetris_exe, oopetris_recordings_utility_exe],
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/meson.build b/meson.build
2+
index 728eea8..221edf9 100644
3+
--- a/meson.build
4+
+++ b/meson.build
5+
@@ -153,6 +153,7 @@ sdl2_image_lib = library(
6+
objc_args: full_library_args,
7+
dependencies: deps,
8+
gnu_symbol_visibility: 'hidden',
9+
+ install: true
10+
)
11+
12+
depinc = include_directories('.')

subprojects/packagefiles/discord_game_sdk/cpp/meson.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ discord_lib_c = c.find_library(
9393

9494
if discord_lib_c.found()
9595
lib_deps += discord_lib_c
96+
97+
if c.get_id() == 'msvc'
98+
99+
install_data(
100+
meson.project_source_root() / lib_dir / lib_name,
101+
install_dir: get_option('bindir'),
102+
)
103+
endif
104+
96105
else
97106
lib_deps += c.find_library(
98107
lib_name,

subprojects/sdl2_image.wrap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ patch_hash = 1741274f30b5b88299b2588a498a54a4203861ec1fa64c3bf99b359a6b618354
99
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_image_2.6.3-2/SDL2_image-2.6.3.tar.gz
1010
wrapdb_version = 2.6.3-2
1111

12+
# TODO: remove once this is merged inot the wrapdb
13+
# see https://github.com/mesonbuild/wrapdb/pull/1737
14+
diff_files = SDL2_image-2.6.3_install.diff
15+
1216
[provide]
1317
sdl2_image = sdl2_image_dep

subprojects/sdl2_mixer.wrap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ directory = SDL2_mixer-2.6.2
33
source_url = https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.6.2.tar.gz
44
source_filename = SDL2_mixer-2.6.2.tar.gz
55
source_hash = 8cdea810366decba3c33d32b8071bccd1c309b2499a54946d92b48e6922aa371
6-
patch_filename = sdl2_mixer_2.6.2-3_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_mixer_2.6.2-3/get_patch
8-
patch_hash = 194dcf9e025a864e0209ad290d1fca23f4fe058ae70d4ecdc342113cea0a48fb
9-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_mixer_2.6.2-3/SDL2_mixer-2.6.2.tar.gz
10-
wrapdb_version = 2.6.2-3
6+
patch_filename = sdl2_mixer_2.6.2-4_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_mixer_2.6.2-4/get_patch
8+
patch_hash = 127025fa0666dd3ea66fb7c334182c393a748fb78810c6a44cdc1a85d619d934
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_mixer_2.6.2-4/SDL2_mixer-2.6.2.tar.gz
10+
wrapdb_version = 2.6.2-4
1111

1212
[provide]
1313
sdl2_mixer = sdl2_mixer_dep

subprojects/sdl2_ttf.wrap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ directory = SDL2_ttf-2.20.1
33
source_url = https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.20.1.tar.gz
44
source_filename = SDL2_ttf-2.20.1.tar.gz
55
source_hash = 78cdad51f3cc3ada6932b1bb6e914b33798ab970a1e817763f22ddbfd97d0c57
6-
patch_filename = sdl2_ttf_2.20.1-3_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_ttf_2.20.1-3/get_patch
8-
patch_hash = dcbe819e2731c9546c29b766ba1803301a565cf7f07e6133dc2499195f47cf04
9-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_ttf_2.20.1-3/SDL2_ttf-2.20.1.tar.gz
10-
wrapdb_version = 2.20.1-3
6+
patch_filename = sdl2_ttf_2.20.1-4_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_ttf_2.20.1-4/get_patch
8+
patch_hash = 44311aba31c9d5a3366101e5afd439a1d95e64d2079e9d5487e4d0790b6858f1
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_ttf_2.20.1-4/SDL2_ttf-2.20.1.tar.gz
10+
wrapdb_version = 2.20.1-4
1111

1212
[provide]
1313
sdl2_ttf = sdl2_ttf_dep

tools/install/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ if build_application
55
install_subdir(
66
meson.project_source_root() / 'assets',
77
install_dir: 'share/oopetris',
8+
install_tag: 'assets',
89
exclude_files: ['oopetris.desktop.in', 'OOPetris.svg', 'recordings.magic'],
910
exclude_directories: ['icon'],
1011
)
@@ -38,13 +39,15 @@ if build_application
3839
input: [oopetris_magic_file, magic_file],
3940
output: 'magic',
4041
install_dir: magic_dir,
42+
install_tag: 'other',
4143
)
4244

4345
else
4446

4547
install_data(
4648
oopetris_magic_file,
4749
install_dir: magic_dir,
50+
install_tag: 'other',
4851
rename: ['magic'],
4952
)
5053

@@ -57,6 +60,7 @@ if build_application
5760
configuration: conf,
5861
install: true,
5962
install_dir: datadir / 'applications',
63+
install_tag: 'other',
6064
)
6165

6266
logos = [
@@ -80,6 +84,7 @@ if build_application
8084
install_data(
8185
meson.project_source_root() / 'assets' / 'icon' / logo,
8286
install_dir: datadir / 'icons' / 'hicolor' / name / 'apps',
87+
install_tag: 'assets',
8388
rename: [app_name + '.' + ext],
8489
)
8590
endforeach

0 commit comments

Comments
 (0)