diff --git a/build/windows/installer/3_dist-gimp-inno.ps1 b/build/windows/installer/3_dist-gimp-inno.ps1 index de824ab536..b932f9baae 100644 --- a/build/windows/installer/3_dist-gimp-inno.ps1 +++ b/build/windows/installer/3_dist-gimp-inno.ps1 @@ -33,8 +33,10 @@ if (-not $GITLAB_CI) #if (-not (Get-Command "python" -ErrorAction SilentlyContinue) -or "$(Get-Command "python" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source)" -like '*WindowsApps*') # { Invoke-Expression ((Get-Content build\windows\1_build-deps-msys2.ps1 | Select-String 'MSYS_ROOT\)' -Context 0,12) -replace '> ','') - $env:PATH = "$MSYS_ROOT/usr/bin;" + $env:PATH - Invoke-Expression ((Get-Content .gitlab-ci.yml | Select-String 'win_environ\[' -Context 0,7) -replace '> ','' -replace '- ','') + #Need to install python modules (see lang\fix_msg.py) + $env:MSYS_ROOT = "$MSYS_ROOT" + #Needed to run python + $env:PATH = "$MSYS_ROOT/$MSYSTEM_PREFIX/bin;" + $env:PATH # } diff --git a/build/windows/installer/lang/fix_msg.py b/build/windows/installer/lang/fix_msg.py index 42cf502d98..e3968938bd 100644 --- a/build/windows/installer/lang/fix_msg.py +++ b/build/windows/installer/lang/fix_msg.py @@ -13,7 +13,7 @@ except ImportError: subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'charset_normalizer']) else: MINGW_PACKAGE_PREFIX = "mingw-w64-clang-aarch64" if platform.machine() == "ARM64" else "mingw-w64-clang-x86_64" - subprocess.check_call(['powershell', 'pacman', '--noconfirm', '-S', '--needed', f"{MINGW_PACKAGE_PREFIX}-python-charset-normalizer"]) + subprocess.check_call(['powershell', os.getenv("MSYS_ROOT") + '/usr/bin/pacman', '--noconfirm', '-S', '--needed', f"{MINGW_PACKAGE_PREFIX}-python-charset-normalizer"]) finally: from charset_normalizer import detect