app*, docs, tools: -Denable-default-bin=enabled will also install a gimp-major binary.

On Windows, it will basically be a copy of the main binaries. On other
OSes, it will be symlinks.
This will help for Windows installers where we want to use major version
only in registry and we need a binary named appropriately for this
apparently.

As for the "major" version, I will in fact use the next major when minor
is 99 (also called API major version), not that it will matter much very
soon!
This commit is contained in:
Jehan 2024-11-03 22:47:21 +01:00
parent cac4c094e6
commit 9c226d5e77
4 changed files with 74 additions and 32 deletions

View file

@ -26,11 +26,17 @@ gimp_debug_tool = executable('gimp-debug-tool' + exec_ver,
if enable_default_bin if enable_default_bin
if not platform_windows if not platform_windows
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''), install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_debug_tool.full_path()), pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir install_dir: gimp_debug_tool_dir)
) install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir)
else else
meson.add_install_script('sh', '-c', 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'))) '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')))
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, '-@0@.exe'.format(api_version_major))))
endif endif
endif endif

View file

@ -232,22 +232,34 @@ gimpmain_exe = executable(gimpmain_exe_name,
if enable_default_bin if enable_default_bin
if not platform_windows if not platform_windows
install_symlink(fs.name(gimpmain_exe.full_path()).replace(exec_ver, ''), install_symlink(fs.name(gimpmain_exe.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimpmain_exe.full_path()), pointing_to: fs.name(gimpmain_exe.full_path()),
install_dir: get_option('bindir') install_dir: get_option('bindir'))
) install_symlink(fs.name(gimpmain_exe.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
pointing_to: fs.name(gimpmain_exe.full_path()),
install_dir: get_option('bindir'))
else else
meson.add_install_script('sh', '-c', 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'))) 'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format(gimpmain_exe.full_path(),
fs.name(gimpmain_exe.name()).replace(exec_ver, '.exe')))
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, '-@0@.exe'.format(api_version_major))))
endif endif
if enable_console_bin if enable_console_bin
if not platform_windows if not platform_windows
install_symlink(fs.name(gimpconsole_exe.full_path()).replace(exec_ver, ''), install_symlink(fs.name(gimpconsole_exe.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimpconsole_exe.full_path()), pointing_to: fs.name(gimpconsole_exe.full_path()),
install_dir: get_option('bindir') install_dir: get_option('bindir'))
) install_symlink(fs.name(gimpconsole_exe.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
pointing_to: fs.name(gimpconsole_exe.full_path()),
install_dir: get_option('bindir'))
else else
meson.add_install_script('sh', '-c', 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'))) 'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format(gimpconsole_exe.full_path(),
fs.name(gimpconsole_exe.name()).replace(exec_ver, '.exe')))
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, '-@0@.exe'.format(api_version_major))))
endif endif
endif endif
endif endif

View file

@ -42,21 +42,32 @@ install_man(man_files)
if enable_default_bin and not platform_windows 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')
) install_symlink('gimptool-@0@.1'.format(api_version_major),
pointing_to: 'gimptool-' + gimp_app_version + '.1',
install_dir: get_option('mandir') + '/man1')
install_symlink('gimprc.5', install_symlink('gimprc.5',
pointing_to: 'gimprc-' + gimp_app_version + '.5', pointing_to: 'gimprc-' + gimp_app_version + '.5',
install_dir: get_option('mandir') + '/man5' install_dir: get_option('mandir') + '/man5')
) install_symlink('gimprc-@0@.5'.format(api_version_major),
pointing_to: 'gimprc-' + gimp_app_version + '.5',
install_dir: get_option('mandir') + '/man5')
if enable_console_bin if enable_console_bin
install_symlink('gimp-console.1', install_symlink('gimp-console.1',
pointing_to: 'gimp-console-' + gimp_app_version + '.1', pointing_to: 'gimp-console-' + gimp_app_version + '.1',
install_dir: get_option('mandir') + '/man1' install_dir: get_option('mandir') + '/man1')
) install_symlink('gimp-console-@0@.1'.format(api_version_major),
pointing_to: 'gimp-console-' + gimp_app_version + '.1',
install_dir: get_option('mandir') + '/man1')
endif endif
install_symlink('gimp.1', install_symlink('gimp.1',
pointing_to: 'gimp-' + gimp_app_version + '.1', pointing_to: 'gimp-' + gimp_app_version + '.1',
install_dir: get_option('mandir') + '/man1' install_dir: get_option('mandir') + '/man1')
) install_symlink('gimp-@0@.1'.format(api_version_major),
pointing_to: 'gimp-' + gimp_app_version + '.1',
install_dir: get_option('mandir') + '/man1')
endif endif

View file

@ -48,18 +48,31 @@ endif
if enable_default_bin if enable_default_bin
if not platform_windows if not platform_windows
install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, ''), install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimptool.full_path()), pointing_to: fs.name(gimptool.full_path()),
install_dir: get_option('bindir') install_dir: get_option('bindir'))
) install_symlink(fs.name(gimptool.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
pointing_to: fs.name(gimptool.full_path()),
install_dir: get_option('bindir'))
install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, ''), install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_test_clipboard.full_path()), pointing_to: fs.name(gimp_test_clipboard.full_path()),
install_dir: get_option('bindir') install_dir: get_option('bindir'))
) install_symlink(fs.name(gimp_test_clipboard.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
pointing_to: fs.name(gimp_test_clipboard.full_path()),
install_dir: get_option('bindir'))
else else
meson.add_install_script('sh', '-c', 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'))) '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', 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'))) 'cp -f "@0@" "$MESON_INSTALL_DESTDIR_PREFIX/bin/@1@"'.format(gimptool.full_path(),
fs.name(gimptool.name()).replace(exec_ver, '-@0@.exe'.format(api_version_major))))
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')))
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, '-@0@.exe'.format(api_version_major))))
endif endif
endif endif