mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
build, plug-ins: Generate *associations.list automatically at build-time
This is way easier to maintain and creates a bigger list of associations by following the libraries that GIMP links (but does not work with more complex code like file-gegl). Also helps with https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/issues/3
This commit is contained in:
parent
3693f90aca
commit
2ce3c604e2
43 changed files with 236 additions and 161 deletions
|
@ -508,6 +508,7 @@ gimp-win:
|
||||||
- _build-$MSYSTEM_PREFIX/done-dll.list
|
- _build-$MSYSTEM_PREFIX/done-dll.list
|
||||||
# Needed by dist-installer-weekly and dist-store-weekly
|
# Needed by dist-installer-weekly and dist-store-weekly
|
||||||
- _build-$MSYSTEM_PREFIX/config.h
|
- _build-$MSYSTEM_PREFIX/config.h
|
||||||
|
- _build-$MSYSTEM_PREFIX/plug-ins/file_associations.list
|
||||||
- _build-$MSYSTEM_PREFIX/build/windows/installer/
|
- _build-$MSYSTEM_PREFIX/build/windows/installer/
|
||||||
- _build-$MSYSTEM_PREFIX/build/windows/store/
|
- _build-$MSYSTEM_PREFIX/build/windows/store/
|
||||||
expire_in: 2 days
|
expire_in: 2 days
|
||||||
|
|
|
@ -463,7 +463,7 @@ Root: HKA; Subkey: "Software\RegisteredApplications"; ValueType: string; ValueNa
|
||||||
#if Copy(FileLine,1,1)=="#" || FileLine==""
|
#if Copy(FileLine,1,1)=="#" || FileLine==""
|
||||||
//skip comments and empty lines
|
//skip comments and empty lines
|
||||||
#else
|
#else
|
||||||
#pragma message "Processing data_associations.list: " + FileLine
|
#pragma message "Processing file_associations.list: " + FileLine
|
||||||
Root: HKA; Subkey: "Software\Classes\.{#FileLine}\OpenWithProgids"; ValueType: string; ValueName: "GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}"; ValueData: ""; Flags: uninsdeletevalue
|
Root: HKA; Subkey: "Software\Classes\.{#FileLine}\OpenWithProgids"; ValueType: string; ValueName: "GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}"; ValueData: ""; Flags: uninsdeletevalue
|
||||||
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}"; ValueType: string; ValueName: ""; ValueData: "GIMP {#CUSTOM_GIMP_VERSION} {#UpperCase(FileLine)}"; Flags: uninsdeletekey
|
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}"; ValueType: string; ValueName: ""; ValueData: "GIMP {#CUSTOM_GIMP_VERSION} {#UpperCase(FileLine)}"; Flags: uninsdeletekey
|
||||||
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe,2"
|
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe,2"
|
||||||
|
@ -474,7 +474,7 @@ Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities\FileAssocia
|
||||||
#endif
|
#endif
|
||||||
#endsub
|
#endsub
|
||||||
#define FileHandle
|
#define FileHandle
|
||||||
#for {FileHandle = FileOpen(AddBackslash(SourcePath)+"data_associations.list"); \
|
#for {FileHandle = FileOpen(AddBackslash(BUILD_DIR)+"plug-ins\file_associations.list"); \
|
||||||
FileHandle && !FileEof(FileHandle); FileLine = FileRead(FileHandle)} \
|
FileHandle && !FileEof(FileHandle); FileLine = FileRead(FileHandle)} \
|
||||||
ProcessAssociation
|
ProcessAssociation
|
||||||
#if FileHandle
|
#if FileHandle
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
ani
|
|
||||||
avif
|
|
||||||
bmp
|
|
||||||
dds
|
|
||||||
g3
|
|
||||||
cel
|
|
||||||
cur
|
|
||||||
dcm
|
|
||||||
dcx
|
|
||||||
dicom
|
|
||||||
exr
|
|
||||||
gif
|
|
||||||
heif
|
|
||||||
heic
|
|
||||||
hej2
|
|
||||||
icns
|
|
||||||
jp2
|
|
||||||
j2k
|
|
||||||
j2c
|
|
||||||
jpc
|
|
||||||
jxl
|
|
||||||
pcx
|
|
||||||
pcc
|
|
||||||
pdf
|
|
||||||
png
|
|
||||||
pnm
|
|
||||||
ppm
|
|
||||||
pgm
|
|
||||||
pbm
|
|
||||||
pfm
|
|
||||||
pam
|
|
||||||
ps
|
|
||||||
eps
|
|
||||||
psp
|
|
||||||
tub
|
|
||||||
pspimage
|
|
||||||
im1
|
|
||||||
im8
|
|
||||||
im24
|
|
||||||
im32
|
|
||||||
rs
|
|
||||||
ras
|
|
||||||
svg
|
|
||||||
tga
|
|
||||||
vda
|
|
||||||
icb
|
|
||||||
vst
|
|
||||||
tif
|
|
||||||
tiff
|
|
||||||
webp
|
|
||||||
wmf
|
|
||||||
apm
|
|
||||||
xpm
|
|
||||||
xwd
|
|
||||||
fit
|
|
||||||
fits
|
|
||||||
fli
|
|
||||||
flc
|
|
||||||
jpg
|
|
||||||
jpeg
|
|
||||||
jpe
|
|
||||||
psd
|
|
||||||
sgi
|
|
||||||
rgb
|
|
||||||
rgba
|
|
||||||
bw
|
|
||||||
icon
|
|
||||||
pix
|
|
||||||
matte
|
|
||||||
mask
|
|
||||||
alpha
|
|
||||||
als
|
|
||||||
xbm
|
|
||||||
ora
|
|
||||||
qoi
|
|
||||||
wbmp
|
|
||||||
acbm
|
|
||||||
iff
|
|
||||||
ilbm
|
|
||||||
lbm
|
|
|
@ -241,8 +241,8 @@ foreach ($bundle in $supported_archs)
|
||||||
Foreach-Object {$_ -replace "@CHANNEL_SUFFIX@","$channel_suffix"} | Foreach-Object {$_ -replace "@MUTEX_SUFFIX@","$mutex_suffix"} |
|
Foreach-Object {$_ -replace "@CHANNEL_SUFFIX@","$channel_suffix"} | Foreach-Object {$_ -replace "@MUTEX_SUFFIX@","$mutex_suffix"} |
|
||||||
Set-Content $msix_arch\AppxManifest.xml
|
Set-Content $msix_arch\AppxManifest.xml
|
||||||
### Match supported filetypes
|
### Match supported filetypes
|
||||||
$file_types = Get-Content 'build\windows\installer\data_associations.list' | Foreach-Object {" <uap:FileType>." + $_} |
|
$file_types = Get-Content "$build_dir\plug-ins\file_associations.list" | Foreach-Object {" <uap:FileType>." + $_} |
|
||||||
Foreach-Object {$_ + "</uap:FileType>"} | Where-Object {$_ -notmatch 'xcf'}
|
Foreach-Object {$_ + "</uap:FileType>"} | Where-Object {$_ -notmatch 'xcf'}
|
||||||
(Get-Content $msix_arch\AppxManifest.xml) | Foreach-Object {$_ -replace "@FILE_TYPES@","$file_types"} |
|
(Get-Content $msix_arch\AppxManifest.xml) | Foreach-Object {$_ -replace "@FILE_TYPES@","$file_types"} |
|
||||||
Set-Content $msix_arch\AppxManifest.xml
|
Set-Content $msix_arch\AppxManifest.xml
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,12 @@ huffman = custom_target('huffman.h',
|
||||||
command: [gen_huffman, '@OUTPUT@'],
|
command: [gen_huffman, '@OUTPUT@'],
|
||||||
)
|
)
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'bmp-load.c',
|
'bmp-load.c',
|
||||||
'bmp-export.c',
|
'bmp-export.c',
|
||||||
'bmp.c',
|
'bmp.c',
|
||||||
huffman,
|
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode + huffman
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
plugin_name = 'file-dds'
|
plugin_name = 'file-dds'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'bc7.c',
|
'bc7.c',
|
||||||
'dds.c',
|
'dds.c',
|
||||||
'ddsread.c',
|
'ddsread.c',
|
||||||
|
@ -10,6 +10,7 @@ plugin_sources = [
|
||||||
'misc.c',
|
'misc.c',
|
||||||
'formats.c',
|
'formats.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -2,10 +2,11 @@ if openexr.found()
|
||||||
|
|
||||||
plugin_name = 'file-exr'
|
plugin_name = 'file-exr'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'file-exr.c',
|
'file-exr.c',
|
||||||
'openexr-wrapper.cc',
|
'openexr-wrapper.cc',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
plugin_name = 'file-faxg3'
|
plugin_name = 'file-faxg3'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'faxg3.c',
|
'faxg3.c',
|
||||||
'g3.c',
|
'g3.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
if cfitsio_dep.found()
|
if cfitsio_dep.found()
|
||||||
plugin_name = 'file-fits'
|
plugin_name = 'file-fits'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'fits.c',
|
'fits.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
plugin_name = 'file-fli'
|
plugin_name = 'file-fli'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'fli-gimp.c',
|
'fli-gimp.c',
|
||||||
'fli.c',
|
'fli.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
plugin_name = 'file-icns'
|
plugin_name = 'file-icns'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'file-icns-data.c',
|
'file-icns-data.c',
|
||||||
'file-icns-load.c',
|
'file-icns-load.c',
|
||||||
'file-icns-export.c',
|
'file-icns-export.c',
|
||||||
'file-icns.c',
|
'file-icns.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
plugin_name = 'file-ico'
|
plugin_name = 'file-ico'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'ico-dialog.c',
|
'ico-dialog.c',
|
||||||
'ico-load.c',
|
'ico-load.c',
|
||||||
'ico-export.c',
|
'ico-export.c',
|
||||||
'ico.c',
|
'ico.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
plugin_name = 'file-jpeg'
|
plugin_name = 'file-jpeg'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'jpeg-icc.c',
|
'jpeg-icc.c',
|
||||||
'jpeg-load.c',
|
'jpeg-load.c',
|
||||||
'jpeg-quality.c',
|
'jpeg-quality.c',
|
||||||
|
@ -8,6 +8,7 @@ plugin_sources = [
|
||||||
'jpeg-settings.c',
|
'jpeg-settings.c',
|
||||||
'jpeg.c',
|
'jpeg.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
plugin_name = 'file-psd'
|
plugin_name = 'file-psd'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'psd-image-res-load.c',
|
'psd-image-res-load.c',
|
||||||
'psd-layer-res-load.c',
|
'psd-layer-res-load.c',
|
||||||
'psd-load.c',
|
'psd-load.c',
|
||||||
|
@ -9,6 +9,7 @@ plugin_sources = [
|
||||||
'psd-util.c',
|
'psd-util.c',
|
||||||
'psd.c',
|
'psd.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -8,10 +8,11 @@ file_raw_exes = [
|
||||||
|
|
||||||
foreach plugin_name : file_raw_exes
|
foreach plugin_name : file_raw_exes
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
plugin_name +'.c',
|
plugin_name +'.c',
|
||||||
'file-raw-utils.c',
|
'file-raw-utils.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_rc = configure_file(
|
plugin_rc = configure_file(
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
plugin_name = 'file-sgi'
|
plugin_name = 'file-sgi'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'sgi-lib.c',
|
'sgi-lib.c',
|
||||||
'sgi.c',
|
'sgi.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
plugin_name = 'file-tiff'
|
plugin_name = 'file-tiff'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'file-tiff-io.c',
|
'file-tiff-io.c',
|
||||||
'file-tiff-export.c',
|
'file-tiff-export.c',
|
||||||
'file-tiff.c',
|
'file-tiff.c',
|
||||||
'file-tiff-load.c',
|
'file-tiff-load.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -2,12 +2,13 @@ if webp_found
|
||||||
|
|
||||||
plugin_name = 'file-webp'
|
plugin_name = 'file-webp'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'file-webp-dialog.c',
|
'file-webp-dialog.c',
|
||||||
'file-webp-load.c',
|
'file-webp-load.c',
|
||||||
'file-webp-export.c',
|
'file-webp-export.c',
|
||||||
'file-webp.c',
|
'file-webp.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
plugin_name = 'flame'
|
plugin_name = 'flame'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'cmap.c',
|
'cmap.c',
|
||||||
'flame.c',
|
'flame.c',
|
||||||
'libifs.c',
|
'libifs.c',
|
||||||
'rect.c',
|
'rect.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -2,10 +2,11 @@ subdir('examples')
|
||||||
|
|
||||||
plugin_name = 'fractal-explorer'
|
plugin_name = 'fractal-explorer'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'fractal-explorer-dialogs.c',
|
'fractal-explorer-dialogs.c',
|
||||||
'fractal-explorer.c',
|
'fractal-explorer.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
45
plug-ins/generate_associations.py
Normal file
45
plug-ins/generate_associations.py
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
associations = set()
|
||||||
|
|
||||||
|
#Read file loading plug-ins sourcecode
|
||||||
|
source_files = sys.argv[2:]
|
||||||
|
for source_file in source_files:
|
||||||
|
try:
|
||||||
|
with open(source_file, 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
except Exception as e:
|
||||||
|
sys.stderr.write(f"(WARNING): Unable to open file {source_file}: {e}\n")
|
||||||
|
continue
|
||||||
|
|
||||||
|
#Parse extensions declared in the sourcecode
|
||||||
|
source_file_ext = os.path.splitext(source_file)[1].lower()
|
||||||
|
if source_file_ext == '.c':
|
||||||
|
if "LOAD_PROC" not in content and "load_procedure" not in content:
|
||||||
|
continue
|
||||||
|
regex = (r'gimp_file_procedure_set_extensions\s*'
|
||||||
|
r'\(\s*GIMP_FILE_PROCEDURE\s*\(\s*procedure\s*\)\s*,\s*"([^"]+)"')
|
||||||
|
elif source_file_ext == '.py':
|
||||||
|
if "LoadProcedure" not in content:
|
||||||
|
continue
|
||||||
|
regex = r'procedure\.set_extensions\s*\(\s*"([^"]+)"\s*\)'
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
for match in re.findall(regex, content, re.DOTALL):
|
||||||
|
#(Take care of extensions separated by commas)
|
||||||
|
for extension in match.split(','):
|
||||||
|
trimmed = extension.strip()
|
||||||
|
if trimmed:
|
||||||
|
associations.add(trimmed)
|
||||||
|
|
||||||
|
#Create list of associations with the parsed extensions
|
||||||
|
output_file = sys.argv[1]
|
||||||
|
try:
|
||||||
|
with open(output_file, 'w', encoding='utf-8') as outf:
|
||||||
|
outf.writelines(f"{assoc}\n" for assoc in sorted(associations))
|
||||||
|
except Exception as e:
|
||||||
|
sys.stderr.write(f"(ERROR): When writing output file {output_file}: {e}\n")
|
||||||
|
sys.exit(1)
|
|
@ -3,7 +3,7 @@ subdir('images')
|
||||||
|
|
||||||
plugin_name = 'gfig'
|
plugin_name = 'gfig'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'gfig-arc.c',
|
'gfig-arc.c',
|
||||||
'gfig-bezier.c',
|
'gfig-bezier.c',
|
||||||
'gfig-circle.c',
|
'gfig-circle.c',
|
||||||
|
@ -20,8 +20,8 @@ plugin_sources = [
|
||||||
'gfig-star.c',
|
'gfig-star.c',
|
||||||
'gfig-style.c',
|
'gfig-style.c',
|
||||||
'gfig.c',
|
'gfig.c',
|
||||||
gfig_icon_sources,
|
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode + gfig_icon_sources
|
||||||
|
|
||||||
plugin_sources += gnome.compile_resources(
|
plugin_sources += gnome.compile_resources(
|
||||||
'gfig-menus',
|
'gfig-menus',
|
||||||
|
|
|
@ -4,7 +4,7 @@ subdir('Presets')
|
||||||
|
|
||||||
plugin_name = 'gimpressionist'
|
plugin_name = 'gimpressionist'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'brush.c',
|
'brush.c',
|
||||||
'color.c',
|
'color.c',
|
||||||
'general.c',
|
'general.c',
|
||||||
|
@ -24,6 +24,7 @@ plugin_sources = [
|
||||||
'sizemap.c',
|
'sizemap.c',
|
||||||
'utils.c',
|
'utils.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -2,9 +2,10 @@ subdir('flares')
|
||||||
|
|
||||||
plugin_name = 'gradient-flare'
|
plugin_name = 'gradient-flare'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'gradient-flare.c',
|
'gradient-flare.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -2,11 +2,12 @@ if get_option('webkit-unmaintained')
|
||||||
|
|
||||||
plugin_name = 'help-browser'
|
plugin_name = 'help-browser'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'dialog.c',
|
'dialog.c',
|
||||||
'help-browser.c',
|
'help-browser.c',
|
||||||
'uri.c',
|
'uri.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
plugin_sources += gnome.compile_resources(
|
plugin_sources += gnome.compile_resources(
|
||||||
'help-menus',
|
'help-menus',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
plugin_name = 'help'
|
plugin_name = 'help'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
# 'gimp-help-lookup.c',
|
# 'gimp-help-lookup.c',
|
||||||
'gimphelp.c',
|
'gimphelp.c',
|
||||||
'gimphelpdomain.c',
|
'gimphelpdomain.c',
|
||||||
|
@ -8,6 +8,7 @@ plugin_sources = [
|
||||||
'gimphelplocale.c',
|
'gimphelplocale.c',
|
||||||
'gimphelpprogress.c',
|
'gimphelpprogress.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
plugin_name = 'ifs-compose'
|
plugin_name = 'ifs-compose'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'ifs-compose-storage.c',
|
'ifs-compose-storage.c',
|
||||||
'ifs-compose-utils.c',
|
'ifs-compose-utils.c',
|
||||||
'ifs-compose.c',
|
'ifs-compose.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
plugin_sources += gnome.compile_resources(
|
plugin_sources += gnome.compile_resources(
|
||||||
'ifs-menus',
|
'ifs-menus',
|
||||||
|
|
|
@ -2,7 +2,7 @@ subdir('images')
|
||||||
|
|
||||||
plugin_name = 'imagemap'
|
plugin_name = 'imagemap'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'imap_about.c',
|
'imap_about.c',
|
||||||
'imap_browse.c',
|
'imap_browse.c',
|
||||||
'imap_circle.c',
|
'imap_circle.c',
|
||||||
|
@ -60,8 +60,8 @@ plugin_sources = [
|
||||||
'imap_string.c',
|
'imap_string.c',
|
||||||
'imap_taglist.c',
|
'imap_taglist.c',
|
||||||
'imap_ui_grid.c',
|
'imap_ui_grid.c',
|
||||||
imagemap_icon_sources,
|
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode + imagemap_icon_sources
|
||||||
|
|
||||||
plugin_sources += gnome.compile_resources(
|
plugin_sources += gnome.compile_resources(
|
||||||
'imagemap-menus',
|
'imagemap-menus',
|
||||||
|
|
|
@ -2,7 +2,7 @@ subdir('images')
|
||||||
|
|
||||||
plugin_name = 'lighting'
|
plugin_name = 'lighting'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'lighting-apply.c',
|
'lighting-apply.c',
|
||||||
'lighting-icons.c',
|
'lighting-icons.c',
|
||||||
'lighting-image.c',
|
'lighting-image.c',
|
||||||
|
@ -10,8 +10,8 @@ plugin_sources = [
|
||||||
'lighting-preview.c',
|
'lighting-preview.c',
|
||||||
'lighting-shade.c',
|
'lighting-shade.c',
|
||||||
'lighting-ui.c',
|
'lighting-ui.c',
|
||||||
lighting_icon_sources,
|
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode + lighting_icon_sources
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
plugin_name = 'map-object'
|
plugin_name = 'map-object'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'arcball.c',
|
'arcball.c',
|
||||||
'map-object-apply.c',
|
'map-object-apply.c',
|
||||||
'map-object-icons.c',
|
'map-object-icons.c',
|
||||||
|
@ -9,8 +9,8 @@ plugin_sources = [
|
||||||
'map-object-preview.c',
|
'map-object-preview.c',
|
||||||
'map-object-shade.c',
|
'map-object-shade.c',
|
||||||
'map-object-ui.c',
|
'map-object-ui.c',
|
||||||
lighting_icon_sources,
|
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode + lighting_icon_sources
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,34 +1,113 @@
|
||||||
subdir('common')
|
subdir('common')
|
||||||
subdir('file-bmp')
|
|
||||||
subdir('file-dds')
|
if get_option('windows-installer') or get_option('ms-store')
|
||||||
subdir('file-exr')
|
all_plugins_sources = []
|
||||||
subdir('file-faxg3')
|
foreach plugin : common_plugins_list
|
||||||
subdir('file-fits')
|
if plugin.get('name').startswith('file-') and plugin.get('name') != 'file-desktop-link' and plugin.get('name') != 'file-lnk'
|
||||||
subdir('file-fli')
|
all_plugins_sources += [ meson.current_source_dir() / 'common' / plugin.get('name') + '.c' ]
|
||||||
subdir('file-icns')
|
endif
|
||||||
subdir('file-ico')
|
endforeach
|
||||||
subdir('file-jpeg')
|
endif
|
||||||
subdir('file-psd')
|
|
||||||
subdir('file-raw')
|
|
||||||
subdir('file-sgi')
|
complex_plugins_list = [
|
||||||
subdir('file-tiff')
|
{ 'name': 'file-bmp', },
|
||||||
subdir('file-webp')
|
{ 'name': 'file-dds', },
|
||||||
subdir('flame')
|
{ 'name': 'file-faxg3', },
|
||||||
subdir('fractal-explorer')
|
{ 'name': 'file-fli', },
|
||||||
subdir('gfig')
|
{ 'name': 'file-icns', },
|
||||||
subdir('gimpressionist')
|
{ 'name': 'file-ico', },
|
||||||
subdir('gradient-flare')
|
{ 'name': 'file-jpeg', },
|
||||||
subdir('help')
|
{ 'name': 'file-psd', },
|
||||||
subdir('help-browser')
|
{ 'name': 'file-raw', },
|
||||||
subdir('ifs-compose')
|
{ 'name': 'file-sgi', },
|
||||||
subdir('imagemap')
|
{ 'name': 'file-tiff', },
|
||||||
subdir('lighting')
|
{ 'name': 'flame', },
|
||||||
subdir('map-object')
|
{ 'name': 'fractal-explorer', },
|
||||||
subdir('metadata')
|
{ 'name': 'gfig', },
|
||||||
subdir('pagecurl')
|
{ 'name': 'gimpressionist', },
|
||||||
subdir('print')
|
{ 'name': 'gradient-flare', },
|
||||||
|
{ 'name': 'help', },
|
||||||
|
{ 'name': 'ifs-compose', },
|
||||||
|
{ 'name': 'imagemap', },
|
||||||
|
{ 'name': 'lighting', },
|
||||||
|
{ 'name': 'map-object', },
|
||||||
|
{ 'name': 'metadata', },
|
||||||
|
{ 'name': 'pagecurl', },
|
||||||
|
{ 'name': 'print', },
|
||||||
|
{ 'name': 'screenshot', },
|
||||||
|
{ 'name': 'script-fu', },
|
||||||
|
{ 'name': 'selection-to-path', }
|
||||||
|
]
|
||||||
|
|
||||||
|
if openexr.found()
|
||||||
|
complex_plugins_list += {
|
||||||
|
'name': 'file-exr',
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cfitsio_dep.found()
|
||||||
|
complex_plugins_list += {
|
||||||
|
'name': 'file-fits',
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if webp_found
|
||||||
|
complex_plugins_list += {
|
||||||
|
'name': 'file-webp',
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('webkit-unmaintained')
|
||||||
|
complex_plugins_list += {
|
||||||
|
'name': 'help-browser',
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if platform_windows and host_cpu_family == 'x86'
|
||||||
|
complex_plugins_list += {
|
||||||
|
'name': 'twain',
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
|
foreach plugin : complex_plugins_list
|
||||||
|
subdir(plugin.get('name'))
|
||||||
|
if get_option('windows-installer') or get_option('ms-store')
|
||||||
|
foreach sourcecode : plugin_sourcecode
|
||||||
|
if plugin.get('name').startswith('file-')
|
||||||
|
#.ico files are handled in a special way by installer and msix scripts
|
||||||
|
if plugin.get('name') == 'file-ico' and platform_windows
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
all_plugins_sources += [ meson.current_source_dir() / plugin.get('name') / sourcecode ]
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
|
||||||
subdir('python')
|
subdir('python')
|
||||||
subdir('screenshot')
|
|
||||||
subdir('script-fu')
|
#if get_option('windows-installer') or get_option('ms-store')
|
||||||
subdir('selection-to-path')
|
# foreach plugin : python_plugins
|
||||||
subdir('twain')
|
# if plugin.get('name').startswith('file-')
|
||||||
|
# all_plugins_sources += [ meson.current_source_dir() / python/ plugin.get('name') + '.py' ]
|
||||||
|
# endif
|
||||||
|
# endforeach
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
if get_option('windows-installer') or get_option('ms-store')
|
||||||
|
#List of file associations dynamically created with the plugins lists above
|
||||||
|
custom_target('file_associations',
|
||||||
|
input : all_plugins_sources,
|
||||||
|
output : 'file_associations.list',
|
||||||
|
command : [
|
||||||
|
python,
|
||||||
|
meson.current_source_dir() / 'generate_associations.py',
|
||||||
|
'@OUTPUT@'
|
||||||
|
] + all_plugins_sources,
|
||||||
|
build_by_default: true
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
|
|
||||||
plugin_name = 'metadata-editor'
|
plugin_name = 'metadata-editor'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'metadata-editor.c',
|
'metadata-editor.c',
|
||||||
'metadata-impexp.c',
|
'metadata-impexp.c',
|
||||||
'metadata-tags.c',
|
'metadata-tags.c',
|
||||||
'metadata-xml.c',
|
'metadata-xml.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_rc = configure_file(
|
plugin_rc = configure_file(
|
||||||
|
@ -42,10 +43,11 @@ plugin_executables += [plugin_exe.full_path()]
|
||||||
|
|
||||||
plugin_name = 'metadata-viewer'
|
plugin_name = 'metadata-viewer'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'metadata-viewer.c',
|
'metadata-viewer.c',
|
||||||
'metadata-tags.c',
|
'metadata-tags.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_rc = configure_file(
|
plugin_rc = configure_file(
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
plugin_name = 'pagecurl'
|
plugin_name = 'pagecurl'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'pagecurl.c',
|
'pagecurl.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
pagecurl_icons_images = [
|
pagecurl_icons_images = [
|
||||||
'curl0.png',
|
'curl0.png',
|
||||||
|
|
|
@ -3,7 +3,7 @@ if have_print
|
||||||
|
|
||||||
plugin_name = 'print'
|
plugin_name = 'print'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'print-draw-page.c',
|
'print-draw-page.c',
|
||||||
'print-page-layout.c',
|
'print-page-layout.c',
|
||||||
'print-page-setup.c',
|
'print-page-setup.c',
|
||||||
|
@ -12,6 +12,7 @@ plugin_sources = [
|
||||||
'print-utils.c',
|
'print-utils.c',
|
||||||
'print.c',
|
'print.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
plugins = [
|
python_plugins = [
|
||||||
{ 'name': 'colorxhtml' },
|
{ 'name': 'colorxhtml' },
|
||||||
{ 'name': 'file-openraster' },
|
{ 'name': 'file-openraster' },
|
||||||
{ 'name': 'foggify' },
|
{ 'name': 'foggify' },
|
||||||
|
@ -13,7 +13,7 @@ plugins = [
|
||||||
]
|
]
|
||||||
|
|
||||||
if not stable or not release
|
if not stable or not release
|
||||||
plugins += [
|
python_plugins += [
|
||||||
{ 'name': 'test-dialog' },
|
{ 'name': 'test-dialog' },
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
@ -21,7 +21,7 @@ endif
|
||||||
subdir('python-console')
|
subdir('python-console')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|
||||||
foreach plugin : plugins
|
foreach plugin : python_plugins
|
||||||
name = plugin.get('name')
|
name = plugin.get('name')
|
||||||
srcs = plugin.get('srcs', [name + '.py'])
|
srcs = plugin.get('srcs', [name + '.py'])
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
plugins += {
|
python_plugins += {
|
||||||
'name': 'python-console',
|
'name': 'python-console',
|
||||||
'srcs': [ 'python-console/pyconsole.py', 'python-console/python-console.py' ],
|
'srcs': [ 'python-console/pyconsole.py', 'python-console/python-console.py' ],
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
if not stable or not release or gimp_version.endswith('+git') or get_option('file-plug-ins-test')
|
if not stable or not release or gimp_version.endswith('+git') or get_option('file-plug-ins-test')
|
||||||
|
|
||||||
# This does not get installed for releases
|
# This does not get installed for releases
|
||||||
plugins += {
|
python_plugins += {
|
||||||
'name': 'test-file-plug-ins',
|
'name': 'test-file-plug-ins',
|
||||||
'srcs': [
|
'srcs': [
|
||||||
# modules
|
# modules
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
plugin_name = 'screenshot'
|
plugin_name = 'screenshot'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'screenshot-freedesktop.c',
|
'screenshot-freedesktop.c',
|
||||||
'screenshot-osx.c',
|
'screenshot-osx.c',
|
||||||
'screenshot-win32.c',
|
'screenshot-win32.c',
|
||||||
'screenshot-x11.c',
|
'screenshot-x11.c',
|
||||||
'screenshot.c',
|
'screenshot.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
screenshot_icons_images = [
|
screenshot_icons_images = [
|
||||||
'screenshot-icon.png',
|
'screenshot-icon.png',
|
||||||
|
|
|
@ -3,10 +3,11 @@ scriptfuInclude = include_directories('..')
|
||||||
|
|
||||||
executable_name = 'gimp-script-fu-interpreter-' + gimp_api_version
|
executable_name = 'gimp-script-fu-interpreter-' + gimp_api_version
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'script-fu-interpreter.c',
|
'script-fu-interpreter.c',
|
||||||
'script-fu-interpreter-plugin.c',
|
'script-fu-interpreter-plugin.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if not meson.is_cross_build()
|
if not meson.is_cross_build()
|
||||||
if platform_windows
|
if platform_windows
|
||||||
|
|
|
@ -23,13 +23,14 @@ executable_name = 'script-fu'
|
||||||
# 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.
|
||||||
# script-fu.c also implements PDB procedure of type EXTENSION "extension-script-fu"
|
# script-fu.c also implements PDB procedure of type EXTENSION "extension-script-fu"
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'script-fu-eval.c',
|
'script-fu-eval.c',
|
||||||
'script-fu-text-console.c',
|
'script-fu-text-console.c',
|
||||||
'script-fu-refresh.c',
|
'script-fu-refresh.c',
|
||||||
|
|
||||||
'script-fu.c',
|
'script-fu.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if not meson.is_cross_build()
|
if not meson.is_cross_build()
|
||||||
if platform_windows
|
if platform_windows
|
||||||
|
|
|
@ -3,10 +3,11 @@ scriptfuInclude = include_directories('..')
|
||||||
|
|
||||||
executable_name = 'script-fu-server'
|
executable_name = 'script-fu-server'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'script-fu-server.c',
|
'script-fu-server.c',
|
||||||
'script-fu-server-plugin.c',
|
'script-fu-server-plugin.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if not meson.is_cross_build()
|
if not meson.is_cross_build()
|
||||||
if platform_windows
|
if platform_windows
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
plugin_name = 'selection-to-path'
|
plugin_name = 'selection-to-path'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'curve.c',
|
'curve.c',
|
||||||
'edge.c',
|
'edge.c',
|
||||||
'fit.c',
|
'fit.c',
|
||||||
|
@ -10,6 +10,7 @@ plugin_sources = [
|
||||||
'spline.c',
|
'spline.c',
|
||||||
'vector.c',
|
'vector.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
if platform_windows
|
if platform_windows
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
|
|
|
@ -4,12 +4,13 @@ endif
|
||||||
|
|
||||||
plugin_name = 'twain'
|
plugin_name = 'twain'
|
||||||
|
|
||||||
plugin_sources = [
|
plugin_sourcecode = [
|
||||||
'tw_func.c',
|
'tw_func.c',
|
||||||
'tw_util.c',
|
'tw_util.c',
|
||||||
'tw_win.c',
|
'tw_win.c',
|
||||||
'twain.c',
|
'twain.c',
|
||||||
]
|
]
|
||||||
|
plugin_sources = plugin_sourcecode
|
||||||
|
|
||||||
plugin_sources += windows.compile_resources(
|
plugin_sources += windows.compile_resources(
|
||||||
gimp_plugins_rc,
|
gimp_plugins_rc,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue