From 32ff46aa4f7bb826780760371be8ce879e5cbda6 Mon Sep 17 00:00:00 2001 From: Max Gaukler Date: Fri, 5 Sep 2025 19:38:33 +0200 Subject: [PATCH] Fix Windows compile dependency installation Fix two issues with the instructions on how to install build dependencies for Windows: 1) DotNet is not found by the script because `winget` does not reload the path Fixed upstream, see https://github.com/microsoft/winget-cli/issues/222 , but people may still use the old winget version. Therefore, we apply a workaround. 2) Shell command formating is wrong in the documentation --- buildtools/windows-deps-install-wix4.ps1 | 3 ++- doc/building/windows.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/buildtools/windows-deps-install-wix4.ps1 b/buildtools/windows-deps-install-wix4.ps1 index bdc0d2e5c3..21dbbc1394 100644 --- a/buildtools/windows-deps-install-wix4.ps1 +++ b/buildtools/windows-deps-install-wix4.ps1 @@ -20,5 +20,6 @@ if (-not $MSYS) { # install WiX in a path where MSYS finds it $WIXPATH = $MSYS + "\usr\local\bin\" $Env:DOTNET_CLI_TELEMETRY_OPTOUT = "1" -dotnet tool install wix --version 4.0.4 --tool-path $WIXPATH +# Note: we use an explicit path to dotnet.exe because PATH is not reloaded by winget after the installation +& "$Env:ProgramFiles\dotnet\dotnet" tool install wix --version 4.0.4 --tool-path $WIXPATH & "$WIXPATH\wix" extension add --global WixToolset.UI.wixext/4.0.4 diff --git a/doc/building/windows.md b/doc/building/windows.md index c744e206d5..4debda5b6b 100644 --- a/doc/building/windows.md +++ b/doc/building/windows.md @@ -149,7 +149,7 @@ For older versions before 1.5.0, or if you do not want the automatic installatio 1. Close the MSYS2 **MSYS** shell. 2. **Read carefully:** Start an MSYS2 **UCRT64** (!!!) shell from the start menu (or launch "ucrt64.exe" in the installation directory). Using the right shell type is important for ensuring that the correct dependencies are installed. 3. **Double-check:** The shell window must show "**UCRT64**" in purple text. If it shows "MSYS" then you have the wrong shell, please go back. - 4. Execute the command `curl [https://gitlab.com/inkscape/inkscape/-/raw/master/buildtools/msys2installdeps.sh](https://gitlab.com/inkscape/inkscape/-/raw/master/buildtools/msys2installdeps.sh) | bash` + 4. Execute the command `curl https://gitlab.com/inkscape/inkscape/-/raw/master/buildtools/msys2installdeps.sh | bash` (The command downloads and runs the script [msys2installdeps.sh](https://gitlab.com/inkscape/inkscape/blob/master/buildtools/msys2installdeps.sh). Alternatively, you can copy-paste the script into the console or download it, change to the folder containing the file and type `./msys2installdeps.sh`. If you already have a copy of the Inkscape source it should also be included in the "buildtools" folder.) 5. Relax and take a break, as this may take some time (a few minutes at best, but it can take significantly longer if you have a slow internet connection or the server load is high). * **Step 3** - Install dependencies for creating the installer packages (.EXE, .MSI, .7Z) This step is optional. -- GitLab