Cleanup meson symlinks

More elegant solution to avoid platform-dependent executable extension detection
This commit is contained in:
Hanabishi 2022-08-31 13:10:13 +00:00 committed by Jehan
parent 08b7de3b13
commit 358ba0991f
5 changed files with 21 additions and 21 deletions

View File

@ -5,7 +5,7 @@ else
endif
gimp_debug_tool = executable('gimp-debug-tool-' + gimp_app_version,
gimp_debug_tool = executable('gimp-debug-tool' + exec_ver,
'gimp-debug-tool.c',
include_directories: rootInclude,
dependencies: [
@ -24,8 +24,8 @@ gimp_debug_tool = executable('gimp-debug-tool-' + gimp_app_version,
)
if enable_default_bin and meson.version().version_compare('>=0.61.0')
install_symlink('gimp-debug-tool' + exec_ext,
pointing_to: 'gimp-debug-tool-' + gimp_app_version + exec_ext,
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir
)
endif

View File

@ -183,7 +183,7 @@ else
endif
if enable_console_bin
gimpconsole_exe = executable('gimp-console-'+gimp_app_version,
gimpconsole_exe = executable('gimp-console' + exec_ver,
'main.c',
libapp_sources,
console_rc_file,
@ -201,7 +201,7 @@ if enable_console_bin
)
endif
gimpmain_exe = executable('gimp-'+gimp_app_version,
gimpmain_exe = executable('gimp' + exec_ver,
'main.c',
libapp_sources,
gui_rc_file,
@ -219,13 +219,13 @@ gimpmain_exe = executable('gimp-'+gimp_app_version,
)
if enable_default_bin and meson.version().version_compare('>=0.61.0')
install_symlink('gimp' + exec_ext,
pointing_to: 'gimp-' + gimp_app_version + exec_ext,
install_symlink(fs.name(gimpmain_exe.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimpmain_exe.full_path()),
install_dir: get_option('bindir')
)
if enable_console_bin
install_symlink('gimp-console' + exec_ext,
pointing_to: 'gimp-console-' + gimp_app_version + exec_ext,
install_symlink(fs.name(gimpconsole_exe.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimpconsole_exe.full_path()),
install_dir: get_option('bindir')
)
endif

View File

@ -87,12 +87,13 @@ i18n = import('i18n')
gnome = import('gnome')
pythonmod = import('python')
simd = import('unstable-simd')
fs = import('fs')
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
prefix = get_option('prefix')
buildtype = get_option('buildtype')
exec_ext = ''
exec_ver = '-' + gimp_app_version
compiler_args = []
linker_args = []
@ -146,7 +147,6 @@ endif
if platform_windows
windows = import('windows')
exec_ext = '.exe'
# AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
# AM_CONDITIONAL(MS_LIB_AVAILABLE, test "x$ms_librarian" = xyes)
# compiler_args += '-Wl,--large-address-aware'

View File

@ -1,7 +1,7 @@
scriptfuInclude = include_directories('..')
executable_name = 'gimp-script-fu-interpreter-' + gimp_api_version
executable_name = 'gimp-script-fu-interpreter' + exec_ver
plugin_sources = [
'script-fu-interpreter.c',
@ -25,7 +25,7 @@ endif
# !!! Installs as a usual binary say to /usr/bin, unlike extension-script-fu
# GIMP queries scripts with shebangs, which invokes gimp-script-fu-interpreter-3.0.
executable(executable_name,
script_fu_interpreter = executable(executable_name,
plugin_sources,
dependencies: [
libgimpui_dep,
@ -42,8 +42,8 @@ executable(executable_name,
)
if enable_default_bin and meson.version().version_compare('>=0.61.0')
install_symlink('gimp-script-fu-interpreter' + exec_ext,
pointing_to: executable_name + exec_ext,
install_symlink(fs.name(script_fu_interpreter.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(script_fu_interpreter.full_path()),
install_dir: get_option('bindir')
)
endif

View File

@ -6,7 +6,7 @@ if platform_windows
endif
gimptool = executable('gimptool-' + gimp_app_version,
gimptool = executable('gimptool' + exec_ver,
'gimptool.c',
include_directories: rootInclude,
dependencies: [
@ -21,7 +21,7 @@ gimptool = executable('gimptool-' + gimp_app_version,
install: true,
)
executable('gimp-test-clipboard-' + gimp_app_version,
gimp_test_clipboard = executable('gimp-test-clipboard' + exec_ver,
'gimp-test-clipboard.c',
include_directories: rootInclude,
dependencies: [
@ -31,12 +31,12 @@ executable('gimp-test-clipboard-' + gimp_app_version,
)
if enable_default_bin and meson.version().version_compare('>=0.61.0')
install_symlink('gimptool' + exec_ext,
pointing_to: 'gimptool-' + gimp_app_version + exec_ext,
install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimptool.full_path()),
install_dir: get_option('bindir')
)
install_symlink('gimp-test-clipboard' + exec_ext,
pointing_to: 'gimp-test-clipboard-' + gimp_app_version + exec_ext,
install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_test_clipboard.full_path()),
install_dir: get_option('bindir')
)
endif