build, plug-ins: Bundle and distribute correct python*.exe

According to Jernej and my searches pythonw.exe should be used for stable
releases and python.exe for unstable as commented in the changed files.
This commit is contained in:
Bruno 2024-11-18 15:50:23 -03:00
parent a7a10be70f
commit de3cf104e3
No known key found for this signature in database
4 changed files with 24 additions and 10 deletions

View File

@ -208,7 +208,13 @@ if [ "$CI_JOB_NAME" != 'gimp-win-x64-cross' ]; then
#bundle "$MSYS_PREFIX" lib/lua
#bundle "$MSYS_PREFIX" share/lua
bundle "$MSYS_PREFIX" bin/python*.exe
if [ "$GIMP_UNSTABLE" ]; then
#python.exe is prefered in unstable versions because of error output
bundle "$MSYS_PREFIX" bin/python.exe
else
#pythonw.exe is prefered in stable releases because it works silently
bundle "$MSYS_PREFIX" bin/pythonw.exe
fi
bundle "$MSYS_PREFIX" lib/python*
clean "$GIMP_DISTRIB" lib/python*/*.pyc
else

View File

@ -1470,10 +1470,12 @@ begin
InterpFile := ExpandConstant('{app}\lib\gimp\{#GIMP_API_VERSION}\interpreters\pygimp.interp');
DebugMsg('PrepareInterp','Writing interpreter file for gimp-python: ' + InterpFile);
#ifdef GIMP_UNSTABLE
#define PYTHON="python.exe"
#if Defined(GIMP_UNSTABLE) && GIMP_UNSTABLE != ""
//python.exe is prefered in unstable versions because of error output
#define PYTHON="python.exe"
#else
#define PYTHON="pythonw.exe"
//pythonw.exe is prefered in stable releases because it works silently
#define PYTHON="pythonw.exe"
#endif
InterpContent := 'python=' + ExpandConstant('{app}\bin\{#PYTHON}') + #10 +

View File

@ -37,10 +37,16 @@ foreach plugin : plugins
endforeach
endforeach
# Fallback fix to the problem of non-configured interpreters
# Fallback fix to the problem of non-configured interpreters (needed by MSIX)
if platform_windows and not meson.is_cross_build() and python.found()
python_config = configuration_data()
python_config.set('PYTHON_PATH', '')
if not stable
#python.exe is prefered in unstable versions because of error output
python_config.set('PYTHON_EXE', 'python.exe')
else
#pythonw.exe is prefered in stable releases because it works silently
python_config.set('PYTHON_EXE', 'pythonw.exe')
endif
configure_file(input : 'pygimp.interp.in',
output: 'pygimp.interp',

View File

@ -1,5 +1,5 @@
python=@PYTHON_PATH@python.exe
python3=@PYTHON_PATH@python.exe
/usr/bin/python=@PYTHON_PATH@python.exe
/usr/bin/python3=@PYTHON_PATH@python.exe
python=@PYTHON_EXE@
python3=@PYTHON_EXE@
/usr/bin/python=@PYTHON_EXE@
/usr/bin/python3=@PYTHON_EXE@
:Python:E::py::python3: