horrible hack to allow for both building the splash image and generating gir in cross-builds --- a/meson.build +++ b/meson.build @@ -1964,6 +1964,19 @@ endif if meson.can_run_host_binaries() and have_gobject_introspection + if meson.is_cross_build() + native_gimp_exe = find_program([gimpconsole_exe_name, gimpmain_exe_name], + native: true, required: false) + native_gimp_run_env=environment() + native_gimp_run_env.set('GIMP_GLOBAL_BUILD_ROOT', meson.global_build_root()) + native_gimp_run_env.set('GIMP_GLOBAL_SOURCE_ROOT', meson.global_source_root()) + if get_option('debug-self-in-build') + native_gimp_run_env.set('GIMP_DEBUG_SELF', '1') + endif + native_gimp_run_env.set('GIMP_SELF_IN_BUILD', native_gimp_exe.full_path()) + native_gimp_exe_depends = [native_gimp_exe] + endif + if enable_console_bin gimp_real_exe = gimpconsole_exe else --- a/gimp-data/images/meson.build +++ b/gimp-data/images/meson.build @@ -1,18 +1,34 @@ ## Splash Image and Welcome Dialog ## -splash = custom_target('gimp-splash.png', - input : [ 'export-splash.py' ], - output: [ 'gimp-splash.png', ], - depends: [ gimp_exe_depends ], - command: [ gimp_exe, '-nidfs', - files('gimp-splash.xcf.xz'), - '--batch-interpreter', 'python-fu-eval', - '-b', '-', '--quit'], - feed: true, - build_by_default: true, - env: gimp_run_env, - install_dir: gimpdatadir / 'images', - install: true) +if not meson.is_cross_build() + splash = custom_target('gimp-splash.png', + input : [ 'export-splash.py' ], + output: [ 'gimp-splash.png', ], + depends: [ gimp_exe_depends ], + command: [ gimp_exe, '-nidfs', + files('gimp-splash.xcf.xz'), + '--batch-interpreter', 'python-fu-eval', + '-b', '-', '--quit'], + feed: true, + build_by_default: true, + env: gimp_run_env, + install_dir: gimpdatadir / 'images', + install: true) +else + splash = custom_target('gimp-splash.png', + input : [ 'export-splash.py' ], + output: [ 'gimp-splash.png', ], + depends: [], + command: [ gimp_exe, '-nidfs', + files('gimp-splash.xcf.xz'), + '--batch-interpreter', 'python-fu-eval', + '-b', '-', '--quit'], + feed: true, + build_by_default: true, + env: native_gimp_run_env, + install_dir: gimpdatadir / 'images', + install: true) +endif ## Windows Installer's Splash Image and Intro Banner ##