Skip to content

Commit 44ecbf3

Browse files
committed
ci: refactor the installer
use the meson tagged install feature, to install all(not atm) neeeded dynamic libraraies some shipped wraps don't support this yet, so this needs to be patched
1 parent cdd6514 commit 44ecbf3

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
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

src/executables/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ if build_application
8383
'-DPROJECT_SOURCE_DIR='
8484
+ meson.project_source_root(),
8585
'-DPROJECT_BUILD_DIR=' + meson.project_build_root(),
86+
'-DDYNAMIC_LIBRARIES_DIR=' + (meson.project_build_root() / 'dynamic_libraries' / get_option('bindir')),
8687
nsis_script,
8788
],
8889
depends: [oopetris_exe, oopetris_recordings_utility_exe],

tools/installer/setup.nsi

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
!error "PROJECT_BUILD_DIR not specified"
1919
!endif
2020

21+
!ifndef DYNAMIC_LIBRARIES_DIR
22+
!error "DYNAMIC_LIBRARIES_DIR not specified"
23+
!endif
24+
2125
!ifndef NAME
2226
!error "NAME not specified"
2327
!endif
@@ -125,26 +129,13 @@ Section "Core App" CoreApp
125129
; install dynamic libraries
126130
SetOutPath "$INSTDIR"
127131

128-
; install oopetris-* core libraries
129-
File "${PROJECT_BUILD_DIR}\src\libs\core\oopetris_core-0.dll"
130-
File "${PROJECT_BUILD_DIR}\src\libs\recordings\oopetris_recordings-0.dll"
131-
File "${PROJECT_BUILD_DIR}\src\oopetris_graphics-0.dll"
132+
; install all dyanmic libraries
133+
File /r "${DYNAMIC_LIBRARIES_DIR}\*.dll"
132134

133-
; install subprojects / external libraries
134-
File "${PROJECT_BUILD_DIR}\subprojects\SDL2-2.30.6\SDL2-6.dll"
135-
File "${PROJECT_BUILD_DIR}\subprojects\fmt-11.0.2\fmt.dll"
135+
; TODO: this need to be installed automatically
136136
File "${PROJECT_BUILD_DIR}\subprojects\SDL2_ttf-2.20.1\sdl2_ttf.dll"
137-
File "${PROJECT_BUILD_DIR}\subprojects\freetype-2.13.3\freetype-6.dll"
138137
File "${PROJECT_BUILD_DIR}\subprojects\SDL2_image-2.6.3\sdl2image.dll"
139-
File "${PROJECT_BUILD_DIR}\subprojects\libpng-1.6.44\png16-16.dll"
140138
File "${PROJECT_BUILD_DIR}\subprojects\SDL2_mixer-2.6.2\sdl2mixer.dll"
141-
File "${PROJECT_BUILD_DIR}\subprojects\libvorbis-1.3.7\lib\vorbisfile-3.dll"
142-
File "${PROJECT_BUILD_DIR}\subprojects\libvorbis-1.3.7\lib\vorbis-0.dll"
143-
File "${PROJECT_BUILD_DIR}\subprojects\libogg-1.3.5\src\ogg.dll"
144-
File "${PROJECT_BUILD_DIR}\subprojects\flac-1.4.3\src\libFLAC\FLAC-8.dll"
145-
File "${PROJECT_BUILD_DIR}\subprojects\openssl-3.0.8\crypto.dll"
146-
File "${PROJECT_BUILD_DIR}\subprojects\openssl-3.0.8\ssl.dll"
147-
File "${PROJECT_BUILD_DIR}\subprojects\nativefiledialog-extended-1.2.1\src\nativefiledialog-extended.dll"
148139
File "${PROJECT_SOURCE_DIR}\subprojects\discord_game_sdk-3.2.1\lib\x86_64\discord_game_sdk.dll"
149140

150141
; install default settings (DO NOT Override)

0 commit comments

Comments
 (0)