data: Generate .env files at build time

These files has been generated by the installer scripts for historical reasons.
Now that we have full-blown local builds and the upcoming MS Store version,
this pervasive pratice can't continue since it creates disparity between builds.
This commit is contained in:
Bruno Lopes 2024-03-14 20:12:47 -03:00
parent 094ae8eec3
commit 975c1891ae
3 changed files with 31 additions and 3 deletions

View File

@ -1,2 +1,4 @@
# Example entry in files like these
# FOOPATH=/path/to/foo/stuff
@BIN_PATH@

View File

@ -1,5 +1,30 @@
install_data(
'default.env',
'python.env',
environ_config = configuration_data()
if platform_windows
environ_config.set('BIN_PATH', 'PATH=${gimp_installation_dir}\\bin')
else
environ_config.set('BIN_PATH', '')
endif
configure_file(
input : 'default.env.in',
output: 'default.env',
configuration: environ_config,
install: true,
install_dir: gimpplugindir / 'environ',
)
if not meson.is_cross_build() and python.found()
install_data(
'python.env',
install_dir: gimpplugindir / 'environ',
)
endif
if platform_windows and not meson.is_cross_build() and python.found()
install_data(
'pygimp.env',
install_dir: gimpplugindir / 'environ',
)
endif

1
data/environ/pygimp.env Normal file
View File

@ -0,0 +1 @@
__COMPAT_LAYER=HIGHDPIAWARE