build, extensions, plug-ins: Add support to MSVC's resource compiler too

This allows us to support both rc.exe (MSVC) and windres.exe (GNU)
This commit is contained in:
Bruno Lopes 2025-11-28 18:20:18 -03:00
parent 8663be0712
commit 452f9a3951
No known key found for this signature in database
40 changed files with 102 additions and 131 deletions

View file

@ -166,9 +166,8 @@ if platform_windows
console_rc_file = windows.compile_resources( console_rc_file = windows.compile_resources(
gimp_app_console_rc, gimp_app_console_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(console_rc_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', console_rc_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(console_rc_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', console_rc_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,
@ -184,9 +183,8 @@ if platform_windows
gui_rc_file = windows.compile_resources( gui_rc_file = windows.compile_resources(
gimp_app_rc, gimp_app_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(gui_rc_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', gui_rc_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(gui_rc_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', gui_rc_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -63,5 +63,5 @@ BEGIN
END END
#include "winuser.h" #include "winuser.h"
1 ICON QUOTE(TOP_SRCDIR) "/gimp-data/images/logo/plug-ins.ico" 1 ICON "gimp-data/images/logo/plug-ins.ico"
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST QUOTE(TOP_SRCDIR) "/build/windows/gimp.manifest" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "build/windows/gimp.manifest"

View file

@ -64,7 +64,7 @@ BEGIN
END END
#include "winuser.h" #include "winuser.h"
1 ICON QUOTE(TOP_SRCDIR) "/gimp-data/images/logo/gimp.ico" 1 ICON "gimp-data/images/logo/gimp.ico"
2 ICON QUOTE(TOP_SRCDIR) "/gimp-data/images/logo/fileicon-xcf.ico" 2 ICON "gimp-data/images/logo/fileicon-xcf.ico"
3 ICON QUOTE(TOP_SRCDIR) "/gimp-data/images/logo/fileicon.ico" 3 ICON "gimp-data/images/logo/fileicon.ico"
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST QUOTE(TOP_SRCDIR) "/build/windows/gimp.manifest" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "build/windows/gimp.manifest"

View file

@ -1,7 +1,7 @@
# C version # C version
extension_name = 'org.gimp.extension.goat-exercises' extension_name = 'org.gimp.extension.goat-exercises'
plug_in_name = 'goat-exercise' plugin_name = 'goat-exercise'
plugin_sources = [ plugin_sources = [
'goat-exercise-c.c', 'goat-exercise-c.c',
@ -11,9 +11,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plug_in_name + '-c.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'-c.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plug_in_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,
@ -21,7 +20,7 @@ if platform_windows
) )
endif endif
exe = executable(plug_in_name + '-c', exe = executable(plugin_name + '-c',
plugin_sources, plugin_sources,
dependencies: [ dependencies: [
libgimpui_dep, libgimpui_dep,

View file

@ -200,6 +200,16 @@ if platform_windows
# AC_CHECK_PROG(ms_librarian, lib.exe, yes, no) # AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
# AM_CONDITIONAL(MS_LIB_AVAILABLE, test "x$ms_librarian" = xyes) # AM_CONDITIONAL(MS_LIB_AVAILABLE, test "x$ms_librarian" = xyes)
# compiler_args += '-Wl,--large-address-aware' # compiler_args += '-Wl,--large-address-aware'
if cc.get_argument_syntax() == 'msvc'
# MSVC's rc.exe style: /DKey=Value'
rc_define_flag = []
rc_define_fmt = '/D@0@=@1@'
else
# GNU's windres.exe style: --define Key="Value"
rc_define_flag = ['--define']
rc_define_fmt = '@0@="@1@"'
endif
endif endif
# on OSX ObjC and C sources are mixed so adding objc to the linkflags # on OSX ObjC and C sources are mixed so adding objc to the linkflags

View file

@ -211,9 +211,8 @@ foreach plugin : common_plugins_list
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
plugin_rc, plugin_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -21,9 +21,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -16,9 +16,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -12,9 +12,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -10,9 +10,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -10,9 +10,8 @@ if cfitsio_dep.found()
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -10,9 +10,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -12,9 +12,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -12,9 +12,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -14,9 +14,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -15,9 +15,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -23,9 +23,8 @@ foreach plugin_name : file_raw_exes
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
plugin_rc, plugin_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -10,9 +10,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -12,9 +12,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -14,9 +14,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -9,9 +9,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -12,9 +12,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -12,9 +12,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -32,9 +32,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -30,9 +30,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -11,9 +11,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -18,9 +18,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -14,9 +14,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -16,9 +16,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -72,9 +72,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -17,9 +17,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -16,9 +16,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -18,9 +18,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
plugin_rc, plugin_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,
@ -59,9 +58,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
plugin_rc, plugin_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -42,9 +42,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -18,9 +18,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -14,9 +14,8 @@ if not meson.is_cross_build()
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
plugin_rc, plugin_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(executable_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', executable_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(executable_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', executable_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -17,7 +17,7 @@ if not stable or not release or gimp_version.endswith('+git')
endif endif
executable_name = 'script-fu' plugin_name = 'script-fu'
# script-fu.c registers registers many PDB procs in the PDB. # script-fu.c registers registers many PDB procs in the PDB.
# Several source files implement the PDB procedures of type PLUGIN, of similar names. # Several source files implement the PDB procedures of type PLUGIN, of similar names.
@ -37,9 +37,8 @@ if not meson.is_cross_build()
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
plugin_rc, plugin_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(executable_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(executable_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,
@ -70,7 +69,7 @@ if not meson.is_cross_build()
# libscriptfu is installed to standard place; no rpath necessary # libscriptfu is installed to standard place; no rpath necessary
plugin_exe = executable(executable_name, plugin_exe = executable(plugin_name,
plugin_sources, plugin_sources,
dependencies: [ dependencies: [
libgimpui_dep, libgimpui_dep,
@ -86,6 +85,6 @@ if not meson.is_cross_build()
link_with : [libscriptfuconsole, libscriptfu ], link_with : [libscriptfuconsole, libscriptfu ],
win_subsystem: 'windows', win_subsystem: 'windows',
install: true, install: true,
install_dir: gimpplugindir / 'plug-ins' / executable_name) install_dir: gimpplugindir / 'plug-ins' / plugin_name)
plugin_executables += [plugin_exe.full_path()] plugin_executables += [plugin_exe.full_path()]
endif endif

View file

@ -1,7 +1,7 @@
scriptfuInclude = include_directories('..') scriptfuInclude = include_directories('..')
executable_name = 'script-fu-server' plugin_name = 'script-fu-server'
plugin_sourcecode = [ plugin_sourcecode = [
'script-fu-server.c', 'script-fu-server.c',
@ -14,9 +14,8 @@ if not meson.is_cross_build()
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
plugin_rc, plugin_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(executable_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(executable_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,
@ -30,7 +29,7 @@ if not meson.is_cross_build()
# Note the server rolls its own log, no need for a different G_LOG_DOMAIN # Note the server rolls its own log, no need for a different G_LOG_DOMAIN
plugin_exe = executable(executable_name, plugin_exe = executable(plugin_name,
plugin_sources, plugin_sources,
dependencies: [ dependencies: [
libgimpui_dep, libgimpui_dep,
@ -46,5 +45,5 @@ if not meson.is_cross_build()
link_with : libscriptfu, link_with : libscriptfu,
win_subsystem: 'windows', win_subsystem: 'windows',
install: true, install: true,
install_dir: gimpplugindir / 'plug-ins' / executable_name) install_dir: gimpplugindir / 'plug-ins' / plugin_name)
endif endif

View file

@ -16,9 +16,8 @@ if platform_windows
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,

View file

@ -15,9 +15,8 @@ plugin_sources = plugin_sourcecode
plugin_sources += windows.compile_resources( plugin_sources += windows.compile_resources(
gimp_plugins_rc, gimp_plugins_rc,
args: [ args: [
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'), rc_define_flag, rc_define_fmt.format('ORIGINALFILENAME_STR', plugin_name+'.exe'),
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name), rc_define_flag, rc_define_fmt.format('INTERNALNAME_STR', plugin_name),
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
], ],
include_directories: [ include_directories: [
rootInclude, appInclude, rootInclude, appInclude,