[gimp/meson: 126/128] Add support for windows .rc files
- From: Félix Piédallu <fpiedallu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/meson: 126/128] Add support for windows .rc files
- Date: Mon, 12 Feb 2018 13:50:25 +0000 (UTC)
commit 8eca03112c1408d6bc2d9605003ddd6dc337756d
Author: Félix Piédallu <felix piedallu me>
Date: Fri Feb 2 14:33:58 2018 +0100
Add support for windows .rc files
app/meson.build | 30 +++++++++++++++++++++++-
meson.build | 1 +
plug-ins/common/meson.build | 17 ++++++++++++-
plug-ins/file-bmp/meson.build | 11 +++++---
plug-ins/file-exr/meson.build | 17 ++++++++++++-
plug-ins/file-faxg3/meson.build | 17 ++++++++++++-
plug-ins/file-fits/meson.build | 17 ++++++++++++-
plug-ins/file-fli/meson.build | 17 ++++++++++++-
plug-ins/file-ico/meson.build | 17 ++++++++++++-
plug-ins/file-jpeg/meson.build | 17 ++++++++++++-
plug-ins/file-psd/meson.build | 17 ++++++++++++-
plug-ins/file-raw/meson.build | 21 ++++++++++++++---
plug-ins/file-sgi/meson.build | 17 ++++++++++++-
plug-ins/file-tiff/meson.build | 17 ++++++++++++-
plug-ins/file-webp/meson.build | 17 ++++++++++++-
plug-ins/flame/meson.build | 17 ++++++++++++-
plug-ins/fractal-explorer/meson.build | 17 +++++++++++++-
plug-ins/gfig/meson.build | 17 +++++++++++++-
plug-ins/gimpressionist/meson.build | 17 +++++++++++++-
plug-ins/gradient-flare/meson.build | 18 +++++++++++++-
plug-ins/help-browser/meson.build | 17 ++++++++++++-
plug-ins/help/meson.build | 17 ++++++++++++-
plug-ins/ifs-compose/meson.build | 17 ++++++++++++-
plug-ins/imagemap/meson.build | 18 +++++++++++++-
plug-ins/lighting/meson.build | 18 +++++++++++++-
plug-ins/map-object/meson.build | 17 ++++++++++++-
plug-ins/metadata/meson.build | 35 +++++++++++++++++++++++++---
plug-ins/pagecurl/meson.build | 26 +++++++++++++++-----
plug-ins/print/meson.build | 38 +++++++++++++++++++++---------
plug-ins/screenshot/meson.build | 2 +-
plug-ins/script-fu/meson.build | 17 +++++++++++++-
plug-ins/selection-to-path/meson.build | 16 ++++++++++++-
plug-ins/twain/meson.build | 39 +++++++++++++------------------
33 files changed, 513 insertions(+), 100 deletions(-)
---
diff --git a/app/meson.build b/app/meson.build
index d2c9143..9448045 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -136,8 +136,21 @@ app_deps = [
# Executables
+rc_name = 'gimp-'+ app_version
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_app_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(rc_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(rc_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
gimpconsole_exe = executable('gimp-console-'+app_version,
- libapp_sources + [ 'main.c' ],
+ libapp_sources + [ 'main.c', rc_file, ],
c_args: app_cflags + [ '-DGIMP_CONSOLE_COMPILATION', ],
include_directories: [ rootInclude, ],
dependencies: app_deps,
@@ -145,8 +158,21 @@ gimpconsole_exe = executable('gimp-console-'+app_version,
install: true,
)
+rc_name = 'gimp-console-'+ app_version
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_app_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(rc_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(rc_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
gimpmain_exe = executable('gimp-'+app_version,
- libapp_sources + [ 'main.c' ],
+ libapp_sources + [ 'main.c', rc_file, ],
c_args: app_cflags + [ ],
include_directories: [ rootInclude, ],
dependencies: app_deps,
diff --git a/meson.build b/meson.build
index 448a46d..9c2c424 100644
--- a/meson.build
+++ b/meson.build
@@ -836,6 +836,7 @@ add_project_arguments(
)
rootInclude = include_directories('.')
+appInclude = include_directories('app')
################################################################################
# Subdirs
diff --git a/plug-ins/common/meson.build b/plug-ins/common/meson.build
index 91e5901..6fe873d 100644
--- a/plug-ins/common/meson.build
+++ b/plug-ins/common/meson.build
@@ -1,4 +1,3 @@
-# TODO common.rc.o
common_exes_list = [
[
@@ -481,8 +480,22 @@ foreach exe : common_exes_list
exe_sources = exe[1]
exe_deps = exe[2]
+ plugin_name = 'file-exr'
+
+ rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(exe_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(exe_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+ ) : []
+
executable(exe_name,
- exe_sources,
+ [ exe_sources, rc_file ],
include_directories: [ rootInclude, ],
link_with : [
libgimp,
diff --git a/plug-ins/file-bmp/meson.build b/plug-ins/file-bmp/meson.build
index 10780c6..9c308ab 100644
--- a/plug-ins/file-bmp/meson.build
+++ b/plug-ins/file-bmp/meson.build
@@ -1,15 +1,18 @@
+plugin_name = 'file-bmp'
+
rc_file = platform_win32 ? windows.compile_resources(
gimp_plugins_rc,
args: [
-
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
],
include_directories: [
-
+ appInclude,
],
) : []
-
-file_bmp = executable('file-bmp',
+executable(plugin_name,
[
'bmp-load.c',
'bmp-save.c',
diff --git a/plug-ins/file-exr/meson.build b/plug-ins/file-exr/meson.build
index 26ede2c..bbf784f 100644
--- a/plug-ins/file-exr/meson.build
+++ b/plug-ins/file-exr/meson.build
@@ -1,11 +1,24 @@
if openexr.found()
-# TODO file-exr.rc.o
+plugin_name = 'file-exr'
-file_exr = executable('file-exr',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'file-exr.c',
'openexr-wrapper.cc',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-faxg3/meson.build b/plug-ins/file-faxg3/meson.build
index 9e7a8b6..7eaba32 100644
--- a/plug-ins/file-faxg3/meson.build
+++ b/plug-ins/file-faxg3/meson.build
@@ -1,9 +1,22 @@
-# TODO file-faxg3.rc.o
+plugin_name = 'file-faxg3'
-file_faxg3 = executable('file-faxg3',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'faxg3.c',
'g3.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-fits/meson.build b/plug-ins/file-fits/meson.build
index 1cc8481..c6a3a35 100644
--- a/plug-ins/file-fits/meson.build
+++ b/plug-ins/file-fits/meson.build
@@ -1,9 +1,22 @@
-# TODO file-fits.rc.o
+plugin_name = 'file-fits'
-file_fits = executable('file-fits',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'fits-io.c',
'fits.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-fli/meson.build b/plug-ins/file-fli/meson.build
index 51201aa..205d552 100644
--- a/plug-ins/file-fli/meson.build
+++ b/plug-ins/file-fli/meson.build
@@ -1,9 +1,22 @@
-# TODO file-fli.rc.o
+plugin_name = 'file-fli'
-file_fli = executable('file-fli',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'fli-gimp.c',
'fli.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-ico/meson.build b/plug-ins/file-ico/meson.build
index d02a35d..10ddfd1 100644
--- a/plug-ins/file-ico/meson.build
+++ b/plug-ins/file-ico/meson.build
@@ -1,11 +1,24 @@
-# TODO file-ico.rc.o
+plugin_name = 'file-ico'
-file_ico = executable('file-ico',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'ico-dialog.c',
'ico-load.c',
'ico-save.c',
'ico.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-jpeg/meson.build b/plug-ins/file-jpeg/meson.build
index a8c985d..07adb0e 100644
--- a/plug-ins/file-jpeg/meson.build
+++ b/plug-ins/file-jpeg/meson.build
@@ -1,6 +1,18 @@
-# TODO file-jpeg.rc.o
+plugin_name = 'file-jpeg'
-file_jpeg = executable('file-jpeg',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'jpeg-icc.c',
'jpeg-load.c',
@@ -8,6 +20,7 @@ file_jpeg = executable('file-jpeg',
'jpeg-save.c',
'jpeg-settings.c',
'jpeg.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-psd/meson.build b/plug-ins/file-psd/meson.build
index b962f70..8b0635c 100644
--- a/plug-ins/file-psd/meson.build
+++ b/plug-ins/file-psd/meson.build
@@ -1,6 +1,18 @@
-# TODO file-psd.rc.o
+plugin_name = 'file-psd'
-file_psd = executable('file-psd',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'psd-image-res-load.c',
'psd-layer-res-load.c',
@@ -9,6 +21,7 @@ file_psd = executable('file-psd',
'psd-thumb-load.c',
'psd-util.c',
'psd.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-raw/meson.build b/plug-ins/file-raw/meson.build
index d269ffb..0522ec5 100644
--- a/plug-ins/file-raw/meson.build
+++ b/plug-ins/file-raw/meson.build
@@ -1,4 +1,3 @@
-# TODO file-raw.rc.o
file_raw_exes = [
'file-darktable',
@@ -6,11 +5,25 @@ file_raw_exes = [
'file-rawtherapee',
]
-foreach file_raw_exename : file_raw_exes
- file_raw = executable(file_raw_exename,
+foreach plugin_name : file_raw_exes
+
+ rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+ ) : []
+
+ executable(plugin_name,
[
- file_raw_exename +'.c',
+ plugin_name +'.c',
'file-raw-utils.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-sgi/meson.build b/plug-ins/file-sgi/meson.build
index 5f64c3a..7445b79 100644
--- a/plug-ins/file-sgi/meson.build
+++ b/plug-ins/file-sgi/meson.build
@@ -1,9 +1,22 @@
-# TODO file-sgi.rc.o
+plugin_name = 'file-sgi'
-file_sgi = executable('file-sgi',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'sgi-lib.c',
'sgi.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-tiff/meson.build b/plug-ins/file-tiff/meson.build
index d336a1e..86d23a1 100644
--- a/plug-ins/file-tiff/meson.build
+++ b/plug-ins/file-tiff/meson.build
@@ -1,11 +1,24 @@
-# TODO file-tiff.rc.o
+plugin_name = 'file-tiff'
-file_tiff = executable('file-tiff',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'file-tiff-io.c',
'file-tiff-save.c',
'file-tiff.c',
'file-tiff-load.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/file-webp/meson.build b/plug-ins/file-webp/meson.build
index 2ed6482..1a578f2 100644
--- a/plug-ins/file-webp/meson.build
+++ b/plug-ins/file-webp/meson.build
@@ -1,13 +1,26 @@
if webp.found()
-# TODO file-webp.rc.o
+plugin_name = 'file-webp'
-file_webp = executable('file-webp',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'file-webp-dialog.c',
'file-webp-load.c',
'file-webp-save.c',
'file-webp.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/flame/meson.build b/plug-ins/flame/meson.build
index 77dfdf0..7950361 100644
--- a/plug-ins/flame/meson.build
+++ b/plug-ins/flame/meson.build
@@ -1,11 +1,24 @@
-# TODO flame.rc.o
+plugin_name = 'flame'
-flame = executable('flame',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'cmap.c',
'flame.c',
'libifs.c',
'rect.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/fractal-explorer/meson.build b/plug-ins/fractal-explorer/meson.build
index e03e469..967f921 100644
--- a/plug-ins/fractal-explorer/meson.build
+++ b/plug-ins/fractal-explorer/meson.build
@@ -1,9 +1,24 @@
subdir('examples')
-fractal_explorer = executable('fractal-explorer',
+plugin_name = 'fractal-explorer'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'fractal-explorer-dialogs.c',
'fractal-explorer.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/gfig/meson.build b/plug-ins/gfig/meson.build
index 4192866..bb10a41 100644
--- a/plug-ins/gfig/meson.build
+++ b/plug-ins/gfig/meson.build
@@ -1,7 +1,21 @@
subdir('gfig-examples')
subdir('images')
-gfig = executable('gfig',
+plugin_name = 'gfig'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'gfig-arc.c',
'gfig-bezier.c',
@@ -20,6 +34,7 @@ gfig = executable('gfig',
'gfig-style.c',
'gfig.c',
stock_pixbufs_h,
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/gimpressionist/meson.build b/plug-ins/gimpressionist/meson.build
index db59485..1979943 100644
--- a/plug-ins/gimpressionist/meson.build
+++ b/plug-ins/gimpressionist/meson.build
@@ -2,7 +2,21 @@ subdir('Brushes')
subdir('Paper')
subdir('Presets')
-gimpressionist = executable('gimpressionist',
+plugin_name = 'gimpressionist'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'brush.c',
'color.c',
@@ -22,6 +36,7 @@ gimpressionist = executable('gimpressionist',
'size.c',
'sizemap.c',
'utils.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/gradient-flare/meson.build b/plug-ins/gradient-flare/meson.build
index d5f6f4f..a4d369d 100644
--- a/plug-ins/gradient-flare/meson.build
+++ b/plug-ins/gradient-flare/meson.build
@@ -1,9 +1,23 @@
-# TODO gradient-flare.rc.o
subdir('flares')
-gradient_flare = executable('gradient-flare',
+plugin_name = 'gradient-flare'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'gradient-flare.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/help-browser/meson.build b/plug-ins/help-browser/meson.build
index 1d4d530..96437d0 100644
--- a/plug-ins/help-browser/meson.build
+++ b/plug-ins/help-browser/meson.build
@@ -1,14 +1,27 @@
if webkit.found()
-# TODO help-browser.rc.o
+plugin_name = 'help-browser'
-help_browser = executable('help-browser',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'dialog.c',
'gimpthrobber.c',
'gimpthrobberaction.c',
'help-browser.c',
'uri.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/help/meson.build b/plug-ins/help/meson.build
index 0d81e6d..d849956 100644
--- a/plug-ins/help/meson.build
+++ b/plug-ins/help/meson.build
@@ -1,6 +1,18 @@
-# TODO help.rc.o
+plugin_name = 'help'
-help = executable('help',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'gimp-help-lookup.c',
'gimphelp.c',
@@ -8,6 +20,7 @@ help = executable('help',
'gimphelpitem.c',
'gimphelplocale.c',
'gimphelpprogress.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/ifs-compose/meson.build b/plug-ins/ifs-compose/meson.build
index dbec2a0..8d80435 100644
--- a/plug-ins/ifs-compose/meson.build
+++ b/plug-ins/ifs-compose/meson.build
@@ -1,10 +1,23 @@
-# TODO ifs-compose.rc.o
+plugin_name = 'ifs-compose'
-ifs_compose = executable('ifs-compose',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'ifs-compose-storage.c',
'ifs-compose-utils.c',
'ifs-compose.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/imagemap/meson.build b/plug-ins/imagemap/meson.build
index e3fcfcb..7b6ed22 100644
--- a/plug-ins/imagemap/meson.build
+++ b/plug-ins/imagemap/meson.build
@@ -1,7 +1,20 @@
subdir('images')
-# TODO imagemap.rc.o
-imagemap = executable('imagemap',
+plugin_name = 'imagemap'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'imap_about.c',
'imap_browse.c',
@@ -67,6 +80,7 @@ imagemap = executable('imagemap',
'imap_table.c',
'imap_taglist.c',
imap_stock_pixbuf_h,
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/lighting/meson.build b/plug-ins/lighting/meson.build
index bb9a43a..2b637d4 100644
--- a/plug-ins/lighting/meson.build
+++ b/plug-ins/lighting/meson.build
@@ -1,7 +1,20 @@
-# TODO lighting.rc.o
subdir('images')
-lighting = executable('lighting',
+plugin_name = 'lighting'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'lighting-apply.c',
'lighting-image.c',
@@ -11,6 +24,7 @@ lighting = executable('lighting',
'lighting-stock.c',
'lighting-ui.c',
stock_pixbufs_h,
+ rc_file,
],
include_directories: [ rootInclude, include_directories('.'), ],
dependencies: [
diff --git a/plug-ins/map-object/meson.build b/plug-ins/map-object/meson.build
index 9ac9c46..2382738 100644
--- a/plug-ins/map-object/meson.build
+++ b/plug-ins/map-object/meson.build
@@ -1,6 +1,18 @@
-# TODO map-object.rc.o
+plugin_name = 'map-object'
-map_object = executable('map-object',
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'arcball.c',
'map-object-apply.c',
@@ -10,6 +22,7 @@ map_object = executable('map-object',
'map-object-shade.c',
'map-object-stock.c',
'map-object-ui.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/metadata/meson.build b/plug-ins/metadata/meson.build
index 1747744..bd23427 100644
--- a/plug-ins/metadata/meson.build
+++ b/plug-ins/metadata/meson.build
@@ -1,11 +1,24 @@
-# TODO metadata-editor.rc.o
-# TODO metadata-viewer.rc.o
-metadata_editor = executable('metadata-editor',
+plugin_name = 'metadata-editor'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'metadata-editor.c',
'metadata-impexp.c',
'metadata-xml.c',
+ rc_file,
],
include_directories: [ rootInclude, ],
dependencies: [
@@ -24,7 +37,21 @@ metadata_editor = executable('metadata-editor',
install_dir: join_paths(gimpplugindir, 'plug-ins'),
)
-metadata_viewer = executable('metadata-viewer',
+plugin_name = 'metadata-viewer'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
[
'metadata-viewer.c',
],
diff --git a/plug-ins/pagecurl/meson.build b/plug-ins/pagecurl/meson.build
index cb76005..55fc8c8 100644
--- a/plug-ins/pagecurl/meson.build
+++ b/plug-ins/pagecurl/meson.build
@@ -1,3 +1,5 @@
+plugin_name = 'pagecurl'
+
pagecurl_icons_images = [
'curl0.png',
'curl1.png',
@@ -31,14 +33,24 @@ pagecurl_icons_sources = gnome.compile_resources(
)
-plugin_pagecurl_sources = [
- 'pagecurl.c',
- pagecurl_icons_sources,
-]
-# TODO pagecurl.rc.o
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
-pagecurl = executable('pagecurl',
- plugin_pagecurl_sources,
+executable(plugin_name,
+ [
+ 'pagecurl.c',
+ pagecurl_icons_sources,
+ rc_file,
+ ],
include_directories: [ rootInclude, ],
dependencies: [
gtk2, gegl, math,
diff --git a/plug-ins/print/meson.build b/plug-ins/print/meson.build
index a6fe867..e9cd6c4 100644
--- a/plug-ins/print/meson.build
+++ b/plug-ins/print/meson.build
@@ -1,17 +1,31 @@
if have_print
-plugin_print_sources = [
- 'print-draw-page.c',
- 'print-page-layout.c',
- 'print-page-setup.c',
- 'print-preview.c',
- 'print-settings.c',
- 'print-utils.c',
- 'print.c',
-]
-# TODO print.rc.o
-print = executable('print',
- plugin_print_sources,
+
+plugin_name = 'print'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
+executable(plugin_name,
+ [
+ 'print-draw-page.c',
+ 'print-page-layout.c',
+ 'print-page-setup.c',
+ 'print-preview.c',
+ 'print-settings.c',
+ 'print-utils.c',
+ 'print.c',
+ rc_file,
+ ],
include_directories: [ rootInclude, ],
dependencies: [
gtk2, gegl,
diff --git a/plug-ins/screenshot/meson.build b/plug-ins/screenshot/meson.build
index a6043a0..1263615 100644
--- a/plug-ins/screenshot/meson.build
+++ b/plug-ins/screenshot/meson.build
@@ -6,9 +6,9 @@ plugin_screenshot_sources = [
'screenshot-kwin.c',
'screenshot-osx.c',
'screenshot-win32.c',
- # 'screenshot-win32.rc',
'screenshot-x11.c',
'screenshot.c',
+ platform_win32 ? windows.compile_resources('screenshot-win32.rc') : [],
]
screenshot = executable('screenshot',
diff --git a/plug-ins/script-fu/meson.build b/plug-ins/script-fu/meson.build
index 8ec3d79..13b2a9b 100644
--- a/plug-ins/script-fu/meson.build
+++ b/plug-ins/script-fu/meson.build
@@ -6,6 +6,20 @@ subdir('tinyscheme')
subdir('ftx')
subdir('scripts')
+plugin_name = 'script-fu'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
plugin_scriptfu_sources = [
'scheme-wrapper.c',
'script-fu-console.c',
@@ -18,11 +32,12 @@ plugin_scriptfu_sources = [
'script-fu-text-console.c',
'script-fu-utils.c',
'script-fu.c',
+ rc_file,
]
winsock = platform_win32 ? cc.find_library('ws2_32') : []
-scriptfu = executable('script-fu',
+executable(plugin_name,
plugin_scriptfu_sources,
include_directories: [ rootInclude, ],
dependencies: [
diff --git a/plug-ins/selection-to-path/meson.build b/plug-ins/selection-to-path/meson.build
index 0b96b3d..49eb822 100644
--- a/plug-ins/selection-to-path/meson.build
+++ b/plug-ins/selection-to-path/meson.build
@@ -1,3 +1,16 @@
+plugin_name = 'selection-to-path'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
plugin_selection_to_path_sources = [
'curve.c',
@@ -9,6 +22,7 @@ plugin_selection_to_path_sources = [
'selection-to-path.c',
'spline.c',
'vector.c',
+ rc_file
]
plugin_selection_to_path_link = [
libgimp,
@@ -23,7 +37,7 @@ plugin_selection_to_path_deps = [
gegl, gtk2, math,
]
-selection_to_path = executable('selection-to-path',
+selection_to_path = executable(plugin_name,
plugin_selection_to_path_sources,
include_directories: [ rootInclude, ],
link_with: plugin_selection_to_path_link,
diff --git a/plug-ins/twain/meson.build b/plug-ins/twain/meson.build
index f8f1e0a..55a287e 100644
--- a/plug-ins/twain/meson.build
+++ b/plug-ins/twain/meson.build
@@ -1,36 +1,29 @@
if platform_win32
+plugin_name = 'twain'
+
+rc_file = platform_win32 ? windows.compile_resources(
+ gimp_plugins_rc,
+ args: [
+ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+ '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
+ '--define', 'TOP_SRCDIR="@0@"' .format(meson.source_root()),
+ ],
+ include_directories: [
+ appInclude,
+ ],
+) : []
+
# Win32 specific
plugin_twain_sources = [
'tw_func.c',
'tw_util.c',
'tw_win.c',
'twain.c',
+ rc_file,
]
-# if HAVE_WINDRES
-# GIMPPLUGINRC = $(top_builddir)/build/windows/gimp-plug-ins.rc
-#
-# # `windres` seems a very stupid tool and it breaks with double shlashes
-# # in parameter paths. Strengthen the rule a little.
-#
-# twain_rc_name = 'twain.rc'
-# twain_rc = custom_target(twain_rc_name + '.o',
-# input : [],
-# output: [ twain_rc_name + '.o', ],
-# command: [
-# '$(WINDRES)',
-# '--define', 'ORIGINALFILENAME_STR="$*$(EXEEXT)"'
-# '--define', 'INTERNALNAME_STR="$*"'
-# '--define', 'TOP_SRCDIR="`echo $(top_srcdir) | sed 's*//*/*'`"'
-# '-I"`echo', '$(top_srcdir)/app | sed 's%/\+%/%'`"'
-# '-I"`echo', '$(top_builddir)/app | sed 's%/\+%/%'`"'
-# '$(GIMPPLUGINRC) $@
-# ],
-# )
-#
-# endif
-twain = executable('twain',
+twain = executable(plugin_name,
plugin_twain_sources,
include_directories: [ rootInclude, ],
dependencies: [
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]