mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
build, data: moving splash image to gimp-data repository.
- Splash images will now be stored from gimp-data. - The installer BMP image scripts also move in the same time. - We don't need devel and non-devel variants of the BMP images in InnoSetup scripts since the images are generated from the actual splash.
This commit is contained in:
@@ -270,13 +270,8 @@ Name: "{autodesktop}\GIMP {#ICON_VERSION}"; Filename: "{app}\bin\gimp-{#MAJOR}.{
|
||||
[Files]
|
||||
;setup files
|
||||
Source: "windows-installer-intro-small.bmp"; Flags: dontcopy
|
||||
#ifndef DEVEL
|
||||
Source: "installsplash.bmp"; Flags: dontcopy
|
||||
Source: "installsplash_small.bmp"; Flags: dontcopy
|
||||
#else
|
||||
Source: "installsplash-devel.bmp"; Destname: "installsplash.bmp"; Flags: dontcopy
|
||||
Source: "installsplash_small-devel.bmp"; Destname: "installsplash_small.bmp"; Flags: dontcopy
|
||||
#endif
|
||||
|
||||
#ifndef NOFILES
|
||||
;Required neutral components (minimal install)
|
||||
|
@@ -1,41 +0,0 @@
|
||||
subdir('lang')
|
||||
|
||||
source_splash=meson.project_source_root() + '/data/images/gimp-splash.png'
|
||||
|
||||
# make GIMP runnable without being installed.
|
||||
env=environment()
|
||||
|
||||
menu_paths=meson.project_build_root() / 'menus:' + meson.project_source_root() / 'menus'
|
||||
env.set('GIMP_TESTING_MENUS_PATH', menu_paths)
|
||||
|
||||
env.set('GIMP_TESTING_PLUGINDIRS', meson.project_build_root() / 'plug-ins:')
|
||||
env.append('GIMP_TESTING_PLUGINDIRS', meson.project_build_root() / 'plug-ins/python')
|
||||
env.append('GIMP_TESTING_PLUGINDIRS', meson.project_build_root() / 'plug-ins/common/test-plug-ins/')
|
||||
|
||||
env.prepend('GI_TYPELIB_PATH', meson.project_build_root() / 'libgimp')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimp')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimpbase')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimpcolor')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimpconfig')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimpmath')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimpmodule')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimpthumb')
|
||||
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libgimpwidgets')
|
||||
|
||||
if enable_console_bin
|
||||
gimp_exe=gimpconsole_exe
|
||||
else
|
||||
gimp_exe=gimpmain_exe
|
||||
endif
|
||||
|
||||
installsplash = custom_target('installsplash-devel.bmp',
|
||||
input : [ 'splash2installer.py' ],
|
||||
depend_files: [ source_splash ],
|
||||
output: [ 'installsplash-devel.bmp', ],
|
||||
command: [ gimp_exe, '-nidfs', source_splash,
|
||||
'--batch-interpreter', 'python-fu-eval',
|
||||
'-b', '-', '--quit'],
|
||||
feed: true,
|
||||
build_by_default: true,
|
||||
env: env
|
||||
)
|
@@ -1,41 +0,0 @@
|
||||
gi.require_version('Gegl', '0.4')
|
||||
from gi.repository import Gegl
|
||||
|
||||
image = Gimp.list_images()[0]
|
||||
procedure = Gimp.get_pdb().lookup_procedure("file-bmp-save")
|
||||
config = procedure.create_config()
|
||||
|
||||
def export_scaled_img(image, target_width, target_height, export_path):
|
||||
img = image.duplicate()
|
||||
w = img.get_width()
|
||||
h = img.get_height()
|
||||
new_width = target_width
|
||||
new_height = target_height
|
||||
offx = 0
|
||||
offy = 0
|
||||
if w / target_width * target_height < h:
|
||||
new_width = target_height / h * w
|
||||
offx = (target_width - new_width) / 2
|
||||
else:
|
||||
new_height = target_width / w * h
|
||||
offy = (target_height - new_height) / 2
|
||||
img.scale(new_width, new_height)
|
||||
img.resize(target_width, target_height, offx, offy)
|
||||
# XXX: should we rather use the average color as border?
|
||||
black = Gegl.Color.new("black")
|
||||
Gimp.context_set_background(black)
|
||||
drawables = img.list_selected_drawables()
|
||||
for d in drawables:
|
||||
d.resize_to_image_size()
|
||||
|
||||
config.set_property("image", img)
|
||||
config.set_property("num-drawables", len(drawables))
|
||||
config.set_property("drawables", Gimp.ObjectArray.new(Gimp.Drawable, drawables, False))
|
||||
config.set_property("file", Gio.file_new_for_path(export_path))
|
||||
Gimp.Procedure.run(procedure, config)
|
||||
|
||||
# These sizes are pretty much hardcoded, and in particular the ratio matters in
|
||||
# InnoSetup. Or so am I told. XXX
|
||||
export_scaled_img(image, 994, 692, 'build/windows/installer/installsplash-devel.bmp')
|
||||
export_scaled_img(image, 497, 360, 'build/windows/installer/installsplash_small-devel.bmp')
|
||||
export_scaled_img(image, 1160, 803, 'build/windows/installer/installsplash_big-devel.bmp')
|
@@ -1,7 +1,6 @@
|
||||
gimp_logo_dir = meson.current_source_dir()
|
||||
|
||||
images = [
|
||||
'gimp-splash.png',
|
||||
'wilber.png',
|
||||
]
|
||||
images += stable ? 'gimp-logo.png' : 'gimp-devel-logo.png'
|
||||
|
Submodule gimp-data updated: c364adb888...be37d3fee9
13
meson.build
13
meson.build
@@ -1821,13 +1821,7 @@ subdir('etc')
|
||||
subdir('menus')
|
||||
subdir('themes')
|
||||
|
||||
if enable_console_bin
|
||||
gimp_exe_name=gimpconsole_exe_name
|
||||
else
|
||||
gimp_exe_name=gimpmain_exe_name
|
||||
endif
|
||||
|
||||
# gimp-data submodule
|
||||
# gimp-data submodule part 1
|
||||
subdir('gimp-data')
|
||||
|
||||
# Libraries (order here is important!)
|
||||
@@ -1846,6 +1840,9 @@ subdir('plug-ins')
|
||||
subdir('app')
|
||||
subdir('app-tools')
|
||||
|
||||
# gimp-data submodule part 2
|
||||
subdir('gimp-data/images/')
|
||||
|
||||
# Unit testing
|
||||
subdir('libgimp/tests')
|
||||
|
||||
@@ -1856,7 +1853,7 @@ subdir('devel-docs')
|
||||
# Windows installer
|
||||
if get_option('windows-installer')
|
||||
subdir('po-windows-installer')
|
||||
subdir('build/windows/installer')
|
||||
subdir('build/windows/installer/lang')
|
||||
endif
|
||||
|
||||
pkgconfig.generate(libgimp,
|
||||
|
Reference in New Issue
Block a user