1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

gitlab-ci, build/windows: Fix broken env after 5ccc5252

This commit is contained in:
Bruno Lopes
2025-09-15 19:21:45 -03:00
parent 5ccc525281
commit c72e36c6a2
3 changed files with 11 additions and 11 deletions

View File

@@ -548,11 +548,11 @@ gimp-snap:
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
- Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):win_environ[collapsed=true]$([char]13)$([char]27)[0KPreparing build environment"
## Build-time vars
- $env:PKG_CONFIG_PATH = "$env:GIMP_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$env:GIMP_PREFIX/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
## Runtime vars
- $env:PATH = "$env:GIMP_PREFIX/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$env:GIMP_PREFIX/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
- $env:PATH = "$GIMP_PREFIX/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
- Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):win_environ$([char]13)$([char]27)[0K"
deps-win:

View File

@@ -45,9 +45,9 @@ Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):d
$GIMP_DIR = $PWD
Set-Location ${GIMP_DIR}${PARENT_DIR}
if (-not $env:GIMP_PREFIX)
if (-not $GIMP_PREFIX)
{
$env:GIMP_PREFIX = "$PWD\_install"
$GIMP_PREFIX = "$PWD\_install"
}
Invoke-Expression ((Get-Content $GIMP_DIR\.gitlab-ci.yml | Select-String 'win_environ\[' -Context 0,7) -replace '> ','' -replace '- ','')
@@ -91,14 +91,14 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt
if ((Test-Path meson.build -Type Leaf) -and -not (Test-Path CMakeLists.txt -Type Leaf))
{
#Add-Content meson.build "meson.add_install_script(find_program('$("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py'))"
meson setup _build-$env:MSYSTEM_PREFIX -Dprefix="$env:GIMP_PREFIX" $PKGCONF_RELOCATABLE_OPTION `
meson setup _build-$env:MSYSTEM_PREFIX -Dprefix="$GIMP_PREFIX" $PKGCONF_RELOCATABLE_OPTION `
-Dbuildtype=debugoptimized -Dc_args='-fansi-escape-codes -gcodeview' -Dcpp_args='-fansi-escape-codes -gcodeview' -Dc_link_args='-Wl,--pdb=' -Dcpp_link_args='-Wl,--pdb=' `
$(if ($branch -like '-*') { $branch } elseif ($patches -like '-*') { $patches } else { $options });
}
elseif (Test-Path CMakeLists.txt -Type Leaf)
{
Add-Content CMakeLists.txt "install(CODE `"execute_process(COMMAND `${Python3_EXECUTABLE`} $("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py`)`")"
cmake -G Ninja -B _build-$env:MSYSTEM_PREFIX -DCMAKE_INSTALL_PREFIX="$env:GIMP_PREFIX" `
cmake -G Ninja -B _build-$env:MSYSTEM_PREFIX -DCMAKE_INSTALL_PREFIX="$GIMP_PREFIX" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_COLOR_DIAGNOSTICS=ON -DCMAKE_C_FLAGS='-gcodeview' -DCMAKE_CXX_FLAGS='-gcodeview' -DCMAKE_EXE_LINKER_FLAGS='-Wl,--pdb=' -DCMAKE_SHARED_LINKER_FLAGS='-Wl,--pdb=' -DCMAKE_MODULE_LINKER_FLAGS='-Wl,--pdb=' `
$(if ($branch -like '-*') { $branch } elseif ($patches -like '-*') { $patches } else { $options });
}

View File

@@ -30,10 +30,10 @@ if ($GITLAB_CI)
# Prepare env
if (-not $env:GIMP_PREFIX)
if (-not $GIMP_PREFIX)
{
#FIXME:'gimpenv' have buggy code about Windows paths. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12284
$env:GIMP_PREFIX = "$PWD\..\_install".Replace('\', '/')
$GIMP_PREFIX = "$PWD\..\_install".Replace('\', '/')
}
Invoke-Expression ((Get-Content .gitlab-ci.yml | Select-String 'win_environ\[' -Context 0,7) -replace '> ','' -replace '- ','')
@@ -43,7 +43,7 @@ Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0)
if (-not (Test-Path _build-$env:MSYSTEM_PREFIX\build.ninja -Type Leaf))
{
#FIXME: There is no GJS for Windows. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/5891
meson setup _build-$env:MSYSTEM_PREFIX -Dprefix="$env:GIMP_PREFIX" $NON_RELOCATABLE_OPTION `
meson setup _build-$env:MSYSTEM_PREFIX -Dprefix="$GIMP_PREFIX" $NON_RELOCATABLE_OPTION `
$INSTALLER_OPTION $STORE_OPTION $PKGCONF_RELOCATABLE_OPTION `
-Denable-default-bin=enabled -Dbuild-id='org.gimp.GIMP_official';
if ("$LASTEXITCODE" -gt '0') { exit 1 }