Make the Windows resources customisable at build time

Ported from original mkxp-zr commit by Riley Pierce.
This commit is contained in:
Splendide Imaginarius 2023-10-25 23:04:49 +00:00
parent d6d1d9699e
commit 77d05ed600
3 changed files with 7 additions and 2 deletions

2
.gitignore vendored
View file

@ -8,6 +8,8 @@
mkxp
xxd+
/res
/build
/builddir

View file

@ -125,9 +125,10 @@ global_include_dirs += include_directories('src', 'binding')
rpath = ''
if host_system == 'windows'
subdir('windows')
windows_resource_directory = get_option('windows_resource_directory')
subdir(windows_resource_directory)
global_sources += windows_resources
global_include_dirs += include_directories('windows')
global_include_dirs += include_directories(windows_resource_directory)
else
subdir('linux')
rpath = '$ORIGIN/lib'

View file

@ -11,6 +11,8 @@ option('use_miniffi', type: 'boolean', value: true, description: 'Enable MiniFFI
option('enable-https', type: 'boolean', value: true, description: 'Support HTTPS for get/post requests. Requires OpenSSL.')
option('workdir_current', type: 'boolean', value: false, description: 'Keep current directory on startup')
option('windows_resource_directory', type: 'string', value: 'windows', description: 'Path to Windows EXE resource directory')
option('static_executable', type: 'boolean', value: true, description: 'Build a static executable (Windows-only)')
option('appimagekit_path', type: 'string', value: '', description: 'Path to AppImageTool, used for building AppImages')
option('appimage', type: 'boolean', value: false, description: 'Whether to install to an AppImage or just copy everything')