Add tiff_compression build option

This commit is contained in:
kramo
2023-10-13 16:58:08 +02:00
parent 3a052b6367
commit 82ff5b3b46
4 changed files with 12 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ APP_ID = "@APP_ID@"
VERSION = "@VERSION@"
PREFIX = "@PREFIX@"
PROFILE = "@PROFILE@"
TIFF_COMPRESSION = "@TIFF_COMPRESSION@"
SPEC_VERSION = 1.5 # The version of the game_id.json spec
schema = Gio.Settings.new(APP_ID)

View File

@@ -74,7 +74,7 @@ def convert_cover(
tmp_path,
compression="tiff_adobe_deflate"
if shared.schema.get_boolean("high-quality-images")
else "webp",
else shared.TIFF_COMPRESSION,
)
except UnidentifiedImageError:
try:

View File

@@ -31,6 +31,7 @@ conf.set('APP_ID', app_id)
conf.set('PREFIX', prefix)
conf.set('VERSION', meson.project_version())
conf.set('PROFILE', profile)
conf.set('TIFF_COMPRESSION', get_option('tiff_compression'))
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)
conf.set('libexecdir', libexecdir)

View File

@@ -7,3 +7,12 @@ option(
],
value: 'release'
)
option(
'tiff_compression',
type: 'combo',
choices: [
'webp',
'jpeg',
],
value: 'webp'
)