mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Issue #4053: Add "*default_bin" support on Windows and enable it
Almost every program have a non-versioned .exe on Windows. MSYS2 does this too.
This commit is contained in:
parent
29bb5b3608
commit
fb5474ae4d
7 changed files with 47 additions and 28 deletions
|
@ -23,9 +23,14 @@ gimp_debug_tool = executable('gimp-debug-tool' + exec_ver,
|
||||||
install_dir: gimp_debug_tool_dir
|
install_dir: gimp_debug_tool_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
if enable_default_bin and meson.version().version_compare('>=0.61.0')
|
if enable_default_bin
|
||||||
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
|
if not platform_windows
|
||||||
pointing_to: fs.name(gimp_debug_tool.full_path()),
|
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
|
||||||
install_dir: gimp_debug_tool_dir
|
pointing_to: fs.name(gimp_debug_tool.full_path()),
|
||||||
)
|
install_dir: gimp_debug_tool_dir
|
||||||
|
)
|
||||||
|
else
|
||||||
|
meson.add_install_script('sh', '-c',
|
||||||
|
'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format((gimp_debug_tool.full_path()), fs.name(gimp_debug_tool.name()).replace(exec_ver, '.exe')))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -229,15 +229,25 @@ gimpmain_exe = executable(gimpmain_exe_name,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
if enable_default_bin and meson.version().version_compare('>=0.61.0')
|
if enable_default_bin
|
||||||
install_symlink(fs.name(gimpmain_exe.full_path()).replace(exec_ver, ''),
|
if not platform_windows
|
||||||
pointing_to: fs.name(gimpmain_exe.full_path()),
|
install_symlink(fs.name(gimpmain_exe.full_path()).replace(exec_ver, ''),
|
||||||
install_dir: get_option('bindir')
|
pointing_to: fs.name(gimpmain_exe.full_path()),
|
||||||
)
|
|
||||||
if enable_console_bin
|
|
||||||
install_symlink(fs.name(gimpconsole_exe.full_path()).replace(exec_ver, ''),
|
|
||||||
pointing_to: fs.name(gimpconsole_exe.full_path()),
|
|
||||||
install_dir: get_option('bindir')
|
install_dir: get_option('bindir')
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
meson.add_install_script('sh', '-c',
|
||||||
|
'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format((gimpmain_exe.full_path()), fs.name(gimpmain_exe.name()).replace(exec_ver, '.exe')))
|
||||||
|
endif
|
||||||
|
if enable_console_bin
|
||||||
|
if not platform_windows
|
||||||
|
install_symlink(fs.name(gimpconsole_exe.full_path()).replace(exec_ver, ''),
|
||||||
|
pointing_to: fs.name(gimpconsole_exe.full_path()),
|
||||||
|
install_dir: get_option('bindir')
|
||||||
|
)
|
||||||
|
else
|
||||||
|
meson.add_install_script('sh', '-c',
|
||||||
|
'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format((gimpconsole_exe.full_path()), fs.name(gimpconsole_exe.name()).replace(exec_ver, '.exe')))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -53,6 +53,7 @@ if [ ! -f "_build${ARTIFACTS_SUFFIX}/build.ninja" ]; then
|
||||||
-Ddirectx-sdk-dir="${MSYSTEM_PREFIX}" \
|
-Ddirectx-sdk-dir="${MSYSTEM_PREFIX}" \
|
||||||
-Dwindows-installer=true \
|
-Dwindows-installer=true \
|
||||||
-Dms-store=true \
|
-Dms-store=true \
|
||||||
|
-Denable-default-bin=enabled \
|
||||||
-Dbuild-id=org.gimp.GIMP_official $MESON_OPTIONS
|
-Dbuild-id=org.gimp.GIMP_official $MESON_OPTIONS
|
||||||
else
|
else
|
||||||
cd "_build${ARTIFACTS_SUFFIX}"
|
cd "_build${ARTIFACTS_SUFFIX}"
|
||||||
|
|
|
@ -40,7 +40,7 @@ man_files += configure_file(
|
||||||
|
|
||||||
install_man(man_files)
|
install_man(man_files)
|
||||||
|
|
||||||
if enable_default_bin and meson.version().version_compare('>=0.61.0')
|
if enable_default_bin and not platform_windows
|
||||||
install_symlink('gimptool.1',
|
install_symlink('gimptool.1',
|
||||||
pointing_to: 'gimptool-' + gimp_app_version + '.1',
|
pointing_to: 'gimptool-' + gimp_app_version + '.1',
|
||||||
install_dir: get_option('mandir') + '/man1'
|
install_dir: get_option('mandir') + '/man1'
|
||||||
|
|
|
@ -1306,10 +1306,6 @@ endif
|
||||||
|
|
||||||
enable_console_bin = get_option('enable-console-bin')
|
enable_console_bin = get_option('enable-console-bin')
|
||||||
|
|
||||||
if enable_default_bin and meson.version().version_compare('<0.61.0')
|
|
||||||
error('"enable-default-bin" build option requires meson 0.61 or later. Please disable the option or update meson.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Possibly change default gimpdir from $XDG_CONFIG_HOME/GIMP/gimp_user_version
|
# Possibly change default gimpdir from $XDG_CONFIG_HOME/GIMP/gimp_user_version
|
||||||
gimpdir = get_option('gimpdir')
|
gimpdir = get_option('gimpdir')
|
||||||
if gimpdir == ''
|
if gimpdir == ''
|
||||||
|
|
|
@ -32,7 +32,7 @@ option('libbacktrace', type: 'boolean', value: true, description: 'Build wi
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
option('enable-default-bin',type: 'feature', value: 'auto', description: 'Install unversioned symlinks pointing to versioned executables')
|
option('enable-default-bin',type: 'feature', value: 'auto', description: 'Install unversioned symlinks pointing to versioned executables (on UNIX) or unversioned duplicates (on Windows)')
|
||||||
option('aa', type: 'feature', value: 'auto', description: 'AA plugin')
|
option('aa', type: 'feature', value: 'auto', description: 'AA plugin')
|
||||||
option('alsa', type: 'feature', value: 'auto', description: 'Alsa support in midi input controller')
|
option('alsa', type: 'feature', value: 'auto', description: 'Alsa support in midi input controller')
|
||||||
option('appdata-test', type: 'feature', value: 'auto', description: 'Validate the appdata file')
|
option('appdata-test', type: 'feature', value: 'auto', description: 'Validate the appdata file')
|
||||||
|
|
|
@ -30,15 +30,22 @@ gimp_test_clipboard = executable('gimp-test-clipboard' + exec_ver,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
if enable_default_bin and meson.version().version_compare('>=0.61.0')
|
if enable_default_bin
|
||||||
install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, ''),
|
if not platform_windows
|
||||||
pointing_to: fs.name(gimptool.full_path()),
|
install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, ''),
|
||||||
install_dir: get_option('bindir')
|
pointing_to: fs.name(gimptool.full_path()),
|
||||||
)
|
install_dir: get_option('bindir')
|
||||||
install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, ''),
|
)
|
||||||
pointing_to: fs.name(gimp_test_clipboard.full_path()),
|
install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, ''),
|
||||||
install_dir: get_option('bindir')
|
pointing_to: fs.name(gimp_test_clipboard.full_path()),
|
||||||
)
|
install_dir: get_option('bindir')
|
||||||
|
)
|
||||||
|
else
|
||||||
|
meson.add_install_script('sh', '-c',
|
||||||
|
'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format((gimptool.full_path()), fs.name(gimptool.name()).replace(exec_ver, '.exe')))
|
||||||
|
meson.add_install_script('sh', '-c',
|
||||||
|
'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format((gimp_test_clipboard.full_path()), fs.name(gimp_test_clipboard.name()).replace(exec_ver, '.exe')))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
executable('kernelgen',
|
executable('kernelgen',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue