mirror of https://github.com/GNOME/gimp.git
build/windows: Move Store assets generation to gimp-data
gimp-data is the correct place, along with the installer assets.
This commit is contained in:
parent
1a70eba570
commit
a2bd501cee
|
@ -1,28 +1,17 @@
|
|||
From dfd4f599b80883a649175dd76a2f2ea71388cc18 Mon Sep 17 00:00:00 2001
|
||||
From: Bruno Lopes <brunolopesdsilv@outlook.com>
|
||||
Date: Sun, 21 Apr 2024 20:22:35 -0300
|
||||
From 2132a18096b6a85d79cf3fdf778882fd3b81816b Mon Sep 17 00:00:00 2001
|
||||
From: Bruno <brunvonlope@outlook.com>
|
||||
Date: Tue, 4 Jun 2024 10:14:06 -0300
|
||||
Subject: [PATCH] images/logo: Use reverse DNS naming
|
||||
|
||||
---
|
||||
images/logo/meson.build | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
images/logo/meson.build | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/images/logo/meson.build b/images/logo/meson.build
|
||||
index 394a9a3..8af98eb 100644
|
||||
index 692bbe4..413d46f 100644
|
||||
--- a/images/logo/meson.build
|
||||
+++ b/images/logo/meson.build
|
||||
@@ -57,21 +57,21 @@ desktop_sizes = [
|
||||
foreach size : desktop_sizes
|
||||
sizedir = size + 'x' + size
|
||||
installdir = get_option('datadir') / 'icons' / 'hicolor' / sizedir / 'apps'
|
||||
- app_icon = custom_target('gimp' + sizedir + '.png',
|
||||
+ app_icon = custom_target('org.gimp.GIMP' + sizedir + '.png',
|
||||
input : 'gimp-logo.svg',
|
||||
- output: 'gimp' + sizedir + '.png',
|
||||
+ output: 'org.gimp.GIMP' + sizedir + '.png',
|
||||
command: [
|
||||
colorsvg2png, '@INPUT@', '@OUTPUT@', size,
|
||||
],
|
||||
@@ -73,12 +73,12 @@ foreach size : desktop_sizes
|
||||
build_by_default: true,
|
||||
install: false)
|
||||
meson.add_install_script('sh', '-c',
|
||||
|
@ -35,8 +24,8 @@ index 394a9a3..8af98eb 100644
|
|||
- rename: 'gimp.svg')
|
||||
+ rename: 'org.gimp.GIMP.svg')
|
||||
|
||||
## gimp.ico and fileicon.ico (Windows) ##
|
||||
|
||||
################################################################################
|
||||
--
|
||||
2.44.0.windows.1
|
||||
2.45.0.windows.1
|
||||
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
input1_path = '@TOP_SRCDIR@/gimp-data/images/logo/fileicon-base.svg'
|
||||
input2_path = '@TOP_SRCDIR@/gimp-data/images/logo/gimp-logo-shadow.svg'
|
||||
output_path = '@OUTPUT@'
|
||||
procedure = Gimp.get_pdb().lookup_procedure("file-svg-load")
|
||||
config = procedure.create_config()
|
||||
size = @LOGO_DIM@
|
||||
config.set_property("file", Gio.file_new_for_path(input1_path))
|
||||
config.set_property("width", size)
|
||||
config.set_property("height", size)
|
||||
Gimp.Procedure.run(procedure, config)
|
||||
v = Gimp.Procedure.run(procedure, config)
|
||||
|
||||
if v.index(0) != Gimp.PDBStatusType.SUCCESS:
|
||||
sys.exit(os.EX_SOFTWARE)
|
||||
|
||||
image = v.index(1)
|
||||
|
||||
config.set_property("file", Gio.file_new_for_path(input2_path))
|
||||
wilber_size = size * 7 / 8
|
||||
config.set_property("width", wilber_size)
|
||||
config.set_property("height", wilber_size)
|
||||
Gimp.Procedure.run(procedure, config)
|
||||
v = Gimp.Procedure.run(procedure, config)
|
||||
|
||||
if v.index(0) != Gimp.PDBStatusType.SUCCESS:
|
||||
sys.exit(os.EX_SOFTWARE)
|
||||
|
||||
tmp_image = v.index(1)
|
||||
drawables = tmp_image.list_selected_drawables()
|
||||
layer2 = Gimp.Layer.new_from_drawable (drawables[0], image)
|
||||
image.insert_layer(layer2, None, 0)
|
||||
layer2.set_offsets(0, (size - wilber_size) * 5 / 6)
|
||||
tmp_image.delete()
|
||||
|
||||
image.merge_down(layer2, Gimp.MergeType.CLIP_TO_IMAGE)
|
||||
|
||||
procedure = Gimp.get_pdb().lookup_procedure("file-png-export")
|
||||
config = procedure.create_config()
|
||||
drawables = image.list_selected_drawables()
|
||||
# Needed otherwise it doesn't save the proper size because of bug #8855.
|
||||
drawables[0].resize_to_image_size()
|
||||
config.set_property("image", image)
|
||||
config.set_property("file", Gio.file_new_for_path(output_path))
|
||||
Gimp.Procedure.run(procedure, config)
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
input_path = '@INPUT@'
|
||||
output_path = '@OUTPUT@'
|
||||
procedure = Gimp.get_pdb().lookup_procedure("file-svg-load")
|
||||
config = procedure.create_config()
|
||||
config.set_property("file", Gio.file_new_for_path(input_path))
|
||||
config.set_property("width", @LOGO_DIM@)
|
||||
config.set_property("height", @LOGO_DIM@)
|
||||
Gimp.Procedure.run(procedure, config)
|
||||
v = Gimp.Procedure.run(procedure, config)
|
||||
|
||||
if v.index(0) != Gimp.PDBStatusType.SUCCESS:
|
||||
sys.exit(os.EX_SOFTWARE)
|
||||
|
||||
image = v.index(1)
|
||||
image.resize(@IMG_WIDTH@, @IMG_HEIGHT@, (@IMG_WIDTH@-@LOGO_DIM@)/2, (@IMG_HEIGHT@-@LOGO_DIM@)/2)
|
||||
|
||||
procedure = Gimp.get_pdb().lookup_procedure("file-png-export")
|
||||
config = procedure.create_config()
|
||||
drawables = image.list_selected_drawables()
|
||||
# Needed otherwise it doesn't save the proper size because of bug #8855.
|
||||
drawables[0].resize_to_image_size()
|
||||
config.set_property("image", image)
|
||||
config.set_property("file", Gio.file_new_for_path(output_path))
|
||||
Gimp.Procedure.run(procedure, config)
|
|
@ -1,310 +0,0 @@
|
|||
scales = [
|
||||
'100',
|
||||
'125',
|
||||
'150',
|
||||
'200',
|
||||
'400',
|
||||
]
|
||||
|
||||
sizes = [
|
||||
'16',
|
||||
'20',
|
||||
'24',
|
||||
'30',
|
||||
'32',
|
||||
'36',
|
||||
'40',
|
||||
'48',
|
||||
'60',
|
||||
'64',
|
||||
'72',
|
||||
'80',
|
||||
'96',
|
||||
'128',
|
||||
'256',
|
||||
]
|
||||
|
||||
|
||||
# UNIVERSAL ICONS (INTRODUCED SINCE WINDOWS 8)
|
||||
wilber_path = meson.project_source_root() / 'gimp-data/images/logo/' + 'gimp-logo' + '.svg'
|
||||
|
||||
## Generate AppList (aka Square44x44Logo) icon
|
||||
foreach scale : scales
|
||||
if scale == '100'
|
||||
icon_name = 'AppList.png'
|
||||
else
|
||||
icon_name = 'AppList.scale-' + scale + '.png'
|
||||
endif
|
||||
scale_int = scale.to_int()
|
||||
size = 44 * scale_int / 100
|
||||
size_str = size.to_string()
|
||||
custom_target(icon_name,
|
||||
input : [ wilber_path ],
|
||||
output: [ icon_name ],
|
||||
command: [
|
||||
colorsvg2png, '@INPUT@', '@OUTPUT@', size_str,
|
||||
],
|
||||
build_by_default: true,
|
||||
)
|
||||
endforeach
|
||||
|
||||
foreach size : sizes
|
||||
icon_name = 'AppList.targetsize-' + size + '.png'
|
||||
custom_target(icon_name,
|
||||
input : [ wilber_path ],
|
||||
output: [ icon_name ],
|
||||
command: [
|
||||
colorsvg2png, '@INPUT@', '@OUTPUT@', size,
|
||||
],
|
||||
build_by_default: true,
|
||||
)
|
||||
|
||||
icon_name = 'AppList.targetsize-' + size + '_altform-unplated.png'
|
||||
custom_target(icon_name,
|
||||
input : [ wilber_path ],
|
||||
output: [ icon_name ],
|
||||
command: [
|
||||
colorsvg2png, '@INPUT@', '@OUTPUT@', size,
|
||||
],
|
||||
build_by_default: true,
|
||||
)
|
||||
|
||||
icon_name = 'AppList.targetsize-' + size + '_altform-lightunplated.png'
|
||||
custom_target(icon_name,
|
||||
input : [ wilber_path ],
|
||||
output: [ icon_name ],
|
||||
command: [
|
||||
colorsvg2png, '@INPUT@', '@OUTPUT@', size,
|
||||
],
|
||||
build_by_default: true,
|
||||
)
|
||||
endforeach
|
||||
|
||||
|
||||
## Generate StoreLogo icon
|
||||
foreach scale : scales
|
||||
if scale == '100'
|
||||
icon_name = 'StoreLogo.png'
|
||||
else
|
||||
icon_name = 'StoreLogo.scale-' + scale + '.png'
|
||||
endif
|
||||
scale_int = scale.to_int()
|
||||
size = 50 * scale_int / 100
|
||||
size_str = size.to_string()
|
||||
custom_target(icon_name,
|
||||
input : [ wilber_path ],
|
||||
output: [ icon_name ],
|
||||
command: [
|
||||
colorsvg2png, '@INPUT@', '@OUTPUT@', size_str,
|
||||
],
|
||||
build_by_default: true,
|
||||
)
|
||||
endforeach
|
||||
|
||||
|
||||
# LIMBO ICONS (DISCONTINUED IN WINDOWS 11 BUT MICROSOFT OBLIES DEVS TO SHIP)
|
||||
wilber_path = meson.project_source_root() / 'gimp-data/images/logo/' + 'gimp-logo-shadow' + '.svg'
|
||||
|
||||
## Generate MedTile (aka Square150x150Logo) icon
|
||||
## (The wilber size should be 32% of the icon height)
|
||||
foreach scale : scales
|
||||
icon_name = 'MedTile.scale-' + scale + '.png'
|
||||
|
||||
scale_int = scale.to_int()
|
||||
size = 150 * scale_int / 100
|
||||
size_str = size.to_string()
|
||||
|
||||
dim_size = 48 * scale_int / 100
|
||||
dim_str = dim_size.to_string()
|
||||
|
||||
gen_tile_conf = configuration_data()
|
||||
gen_tile_conf.set('INPUT', wilber_path)
|
||||
gen_tile_conf.set('OUTPUT', meson.current_build_dir() / icon_name)
|
||||
gen_tile_conf.set('IMG_WIDTH', size_str)
|
||||
gen_tile_conf.set('IMG_HEIGHT', size_str)
|
||||
gen_tile_conf.set('LOGO_DIM', dim_str)
|
||||
gen_medtile_py = configure_file(input : 'gen-tile.py.in',
|
||||
output : 'gen-medtile-' + scale + '.py',
|
||||
configuration : gen_tile_conf)
|
||||
|
||||
med_tile = custom_target(icon_name,
|
||||
input : [ gen_medtile_py ],
|
||||
depend_files: [ wilber_path ],
|
||||
depends: [ gimp_exe_depends ],
|
||||
output: [ icon_name ],
|
||||
command: [ gimp_exe, '-nidfs',
|
||||
'--batch-interpreter', 'python-fu-eval',
|
||||
'-b', '-', '--quit'],
|
||||
feed: true,
|
||||
build_by_default: true,
|
||||
env: gimp_run_env)
|
||||
endforeach
|
||||
|
||||
|
||||
# LEGACY ICONS (DISCONTINUED IN WINDOWS 11)
|
||||
|
||||
## Generate SmallTile (aka Square71x71Logo) icon
|
||||
## (The wilber size should be 50% of the icon height)
|
||||
foreach scale : scales
|
||||
icon_name = 'SmallTile.scale-' + scale + '.png'
|
||||
|
||||
scale_int = scale.to_int()
|
||||
size = 71 * scale_int / 100
|
||||
size_str = size.to_string()
|
||||
|
||||
dim_size = 36 * scale_int / 100
|
||||
dim_str = dim_size.to_string()
|
||||
|
||||
gen_tile_conf = configuration_data()
|
||||
gen_tile_conf.set('INPUT', wilber_path)
|
||||
gen_tile_conf.set('OUTPUT', meson.current_build_dir() / icon_name)
|
||||
gen_tile_conf.set('IMG_WIDTH', size_str)
|
||||
gen_tile_conf.set('IMG_HEIGHT', size_str)
|
||||
gen_tile_conf.set('LOGO_DIM', dim_str)
|
||||
gen_smalltile_py = configure_file(input : 'gen-tile.py.in',
|
||||
output : 'gen-smalltile-' + scale + '.py',
|
||||
configuration : gen_tile_conf)
|
||||
|
||||
small_tile = custom_target(icon_name,
|
||||
input : [ gen_smalltile_py ],
|
||||
depend_files: [ wilber_path ],
|
||||
depends: [ gimp_exe_depends ],
|
||||
output: [ icon_name ],
|
||||
command: [ gimp_exe, '-nidfs',
|
||||
'--batch-interpreter', 'python-fu-eval',
|
||||
'-b', '-', '--quit'],
|
||||
feed: true,
|
||||
build_by_default: true,
|
||||
env: gimp_run_env)
|
||||
endforeach
|
||||
|
||||
|
||||
## Generate LargeTile (aka Square310x310Logo) icon
|
||||
## (The wilber size should be 34% of the icon height)
|
||||
foreach scale : scales
|
||||
icon_name = 'LargeTile.scale-' + scale + '.png'
|
||||
|
||||
scale_int = scale.to_int()
|
||||
size = 310 * scale_int / 100
|
||||
size_str = size.to_string()
|
||||
|
||||
dim_size = 105 * scale_int / 100
|
||||
dim_str = dim_size.to_string()
|
||||
|
||||
gen_tile_conf = configuration_data()
|
||||
gen_tile_conf.set('INPUT', wilber_path)
|
||||
gen_tile_conf.set('OUTPUT', meson.current_build_dir() / icon_name)
|
||||
gen_tile_conf.set('IMG_WIDTH', size_str)
|
||||
gen_tile_conf.set('IMG_HEIGHT', size_str)
|
||||
gen_tile_conf.set('LOGO_DIM', dim_str)
|
||||
gen_largetile_py = configure_file(input : 'gen-tile.py.in',
|
||||
output : 'gen-largetile-' + scale + '.py',
|
||||
configuration : gen_tile_conf)
|
||||
|
||||
large_tile = custom_target(icon_name,
|
||||
input : [ gen_largetile_py ],
|
||||
depend_files: [ wilber_path ],
|
||||
depends: [ gimp_exe_depends ],
|
||||
output: [ icon_name ],
|
||||
command: [ gimp_exe, '-nidfs',
|
||||
'--batch-interpreter', 'python-fu-eval',
|
||||
'-b', '-', '--quit'],
|
||||
feed: true,
|
||||
build_by_default: true,
|
||||
env: gimp_run_env)
|
||||
endforeach
|
||||
|
||||
|
||||
## Generate WideTile (aka Wide310x150Logo) icon
|
||||
## (The wilber size should be 32% of the icon height)
|
||||
foreach scale : scales
|
||||
icon_name = 'WideTile.scale-' + scale + '.png'
|
||||
|
||||
scale_int = scale.to_int()
|
||||
w_size = 310 * scale_int / 100
|
||||
w_size_str = w_size.to_string()
|
||||
|
||||
h_size = 150 * scale_int / 100
|
||||
h_size_str = h_size.to_string()
|
||||
|
||||
dim_size = 48 * scale_int / 100
|
||||
dim_str = dim_size.to_string()
|
||||
|
||||
gen_tile_conf = configuration_data()
|
||||
gen_tile_conf.set('INPUT', wilber_path)
|
||||
gen_tile_conf.set('OUTPUT', meson.current_build_dir() / icon_name)
|
||||
gen_tile_conf.set('IMG_WIDTH', w_size_str)
|
||||
gen_tile_conf.set('IMG_HEIGHT', h_size_str)
|
||||
gen_tile_conf.set('LOGO_DIM', dim_str)
|
||||
gen_widetile_py = configure_file(input : 'gen-tile.py.in',
|
||||
output : 'gen-widetile-' + scale + '.py',
|
||||
configuration : gen_tile_conf)
|
||||
|
||||
wide_tile = custom_target(icon_name,
|
||||
input : [ gen_widetile_py ],
|
||||
depend_files: [ wilber_path ],
|
||||
depends: [ gimp_exe_depends ],
|
||||
output: [ icon_name ],
|
||||
command: [ gimp_exe, '-nidfs',
|
||||
'--batch-interpreter', 'python-fu-eval',
|
||||
'-b', '-', '--quit'],
|
||||
feed: true,
|
||||
build_by_default: true,
|
||||
env: gimp_run_env)
|
||||
endforeach
|
||||
|
||||
|
||||
# OTHER ASSETS
|
||||
|
||||
## fileicon icon (for XCF and other filetypes)
|
||||
fileicon_path = meson.project_source_root() / 'gimp-data/images/logo/' / 'fileicon-base' + '.svg'
|
||||
foreach scale : scales
|
||||
if scale == '100'
|
||||
icon_name = 'fileicon.png'
|
||||
else
|
||||
icon_name = 'fileicon.scale-' + scale + '.png'
|
||||
endif
|
||||
scale_int = scale.to_int()
|
||||
size = 44 * scale_int / 100
|
||||
size_str = size.to_string()
|
||||
conf = configuration_data()
|
||||
conf.set('TOP_SRCDIR', meson.project_source_root())
|
||||
conf.set('OUTPUT', meson.current_build_dir() / icon_name)
|
||||
conf.set('LOGO_DIM', size_str)
|
||||
gen_fileicon_py = configure_file(input : 'gen-fileicon-png.py.in',
|
||||
output : 'gen-fileicon-png-' + size_str + '.py',
|
||||
configuration : conf)
|
||||
custom_target(icon_name,
|
||||
input : [ gen_fileicon_py ],
|
||||
depend_files: [ wilber_path, fileicon_path ],
|
||||
depends: [ gimp_exe_depends ],
|
||||
output: [ icon_name ],
|
||||
command: [ gimp_exe, '-nidfs',
|
||||
'--batch-interpreter', 'python-fu-eval',
|
||||
'-b', '-', '--quit'],
|
||||
feed: true,
|
||||
build_by_default: true,
|
||||
env: gimp_run_env)
|
||||
endforeach
|
||||
|
||||
foreach size : sizes
|
||||
icon_name = 'fileicon.targetsize-' + size + '.png'
|
||||
conf = configuration_data()
|
||||
conf.set('TOP_SRCDIR', meson.project_source_root())
|
||||
conf.set('OUTPUT', meson.current_build_dir() / icon_name)
|
||||
conf.set('LOGO_DIM', size)
|
||||
gen_fileicon_py = configure_file(input : 'gen-fileicon-png.py.in',
|
||||
output : 'gen-fileicon-png-' + size + '.py',
|
||||
configuration : conf)
|
||||
custom_target(icon_name,
|
||||
input : [ gen_fileicon_py ],
|
||||
depend_files: [ wilber_path, fileicon_path ],
|
||||
depends: [ gimp_exe_depends ],
|
||||
output: [ icon_name ],
|
||||
command: [ gimp_exe, '-nidfs',
|
||||
'--batch-interpreter', 'python-fu-eval',
|
||||
'-b', '-', '--quit'],
|
||||
feed: true,
|
||||
build_by_default: true,
|
||||
env: gimp_run_env)
|
||||
endforeach
|
|
@ -1 +1 @@
|
|||
Subproject commit 6ec558cab0a2631d2200667df9bd30c92d1efab4
|
||||
Subproject commit 5ef20f5a581fc067b6f9ffaaf9924cf3712058be
|
|
@ -1957,11 +1957,6 @@ if get_option('windows-installer')
|
|||
subdir('build/windows/installer/lang')
|
||||
endif
|
||||
|
||||
# Microsoft Store icons for .msixupload and/or .msixbundle
|
||||
if get_option('ms-store')
|
||||
subdir('build/windows/store/Assets')
|
||||
endif
|
||||
|
||||
pkgconfig.generate(libgimp,
|
||||
filebase: 'gimp-' + gimp_api_version,
|
||||
name: prettyname,
|
||||
|
|
Loading…
Reference in New Issue