diff --git a/data/environ/default.env.in b/data/environ/default.env similarity index 85% rename from data/environ/default.env.in rename to data/environ/default.env index 4277fb6178..6b8a67ea8b 100644 --- a/data/environ/default.env.in +++ b/data/environ/default.env @@ -1,4 +1,2 @@ # Example entry in files like these # FOOPATH=/path/to/foo/stuff - -@BIN_PATH@ \ No newline at end of file diff --git a/data/environ/meson.build b/data/environ/meson.build index b9f24d67ea..a1569068bb 100644 --- a/data/environ/meson.build +++ b/data/environ/meson.build @@ -1,33 +1,30 @@ #.env files read by gimp_environ_table_load_env_file in gimpenvirontable.c -environ_config = configuration_data() -if platform_windows and relocatable_bundle - 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_data( + 'default.env', 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', +if relocatable_bundle or platform_windows and not meson.is_cross_build() + pygimp_config = configuration_data() + if relocatable_bundle + pygimp_config.set('DONTWRITEBYTECODE_SETTING', 'PYTHONDONTWRITEBYTECODE=1') + else + pygimp_config.set('DONTWRITEBYTECODE_SETTING', '') + endif + if platform_windows + pygimp_config.set('HIGHDPI_SETTING', '__COMPAT_LAYER=HIGHDPIAWARE') + else + pygimp_config.set('HIGHDPI_SETTING', '') + endif + + configure_file( + input : 'pygimp.env.in', + output: 'pygimp.env', + configuration: pygimp_config, + install: true, install_dir: gimpplugindir / 'environ', ) endif diff --git a/data/environ/pygimp.env b/data/environ/pygimp.env deleted file mode 100644 index 3572a9e88c..0000000000 --- a/data/environ/pygimp.env +++ /dev/null @@ -1,2 +0,0 @@ -__COMPAT_LAYER=HIGHDPIAWARE -PYTHONDONTWRITEBYTECODE=1 diff --git a/data/environ/pygimp.env.in b/data/environ/pygimp.env.in new file mode 100644 index 0000000000..fdd3aa44f9 --- /dev/null +++ b/data/environ/pygimp.env.in @@ -0,0 +1,2 @@ +@DONTWRITEBYTECODE_SETTING@ +@HIGHDPI_SETTING@ \ No newline at end of file diff --git a/data/environ/python.env b/data/environ/python.env deleted file mode 100644 index b68fc0d2b1..0000000000 --- a/data/environ/python.env +++ /dev/null @@ -1 +0,0 @@ -: GI_TYPELIB_PATH=${gimp_installation_dir}/lib/girepository-1.0/