From c5c0617c8924d580b02bfc659f35d0a669e5d15c Mon Sep 17 00:00:00 2001 From: stffabi Date: Tue, 8 Mar 2022 10:35:16 +0100 Subject: [PATCH] [v2, nsis] Seems like `/` as path separator works only for some directives in a cross platform way (#1227) Especially the File directive seems not to work with a `/` on Windows. Whereas `\` works for all directives and on all platforms. So the `\` in NSIS can be used also on Linux and MacOS. --- .../build/windows/installer/project.nsi | 16 ++++++++-------- .../build/windows/installer/wails_tools.nsh | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/v2/pkg/buildassets/build/windows/installer/project.nsi b/v2/pkg/buildassets/build/windows/installer/project.nsi index 15abde335..3b1588e0c 100644 --- a/v2/pkg/buildassets/build/windows/installer/project.nsi +++ b/v2/pkg/buildassets/build/windows/installer/project.nsi @@ -11,11 +11,11 @@ Unicode true ## > wails build --target windows/amd64 --nsis ## Then you can call makensis on this file with specifying the path to your binary: ## For a AMD64 only installer: -## > makensis -DARG_WAILS_AMD64_BINARY=../../bin/app.exe +## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app.exe ## For a ARM64 only installer: -## > makensis -DARG_WAILS_ARM64_BINARY=../../bin/app.exe +## > makensis -DARG_WAILS_ARM64_BINARY=..\..\bin\app.exe ## For a installer with both architectures: -## > makensis -DARG_WAILS_AMD64_BINARY=../../bin/app-amd64.exe -DARG_WAILS_ARM64_BINARY=../../bin/app-arm64.exe +## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe #### ## The following information is taken from the ProjectInfo file, but they can be overwritten here. #### @@ -47,14 +47,14 @@ VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}" !include "MUI.nsh" -!define MUI_ICON "../icon.ico" -!define MUI_UNICON "../icon.ico" -# !define MUI_WELCOMEFINISHPAGE_BITMAP "resources/leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314 +!define MUI_ICON "..\icon.ico" +!define MUI_UNICON "..\icon.ico" +# !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314 !define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps !define MUI_ABORTWARNING # This will warn the user if they exit from the installer. !insertmacro MUI_PAGE_WELCOME # Welcome to the installer page. -# !insertmacro MUI_PAGE_LICENSE "resources/eula.txt" # Adds a EULA page to the installer +# !insertmacro MUI_PAGE_LICENSE "resources\eula.txt" # Adds a EULA page to the installer !insertmacro MUI_PAGE_DIRECTORY # In which folder install page. !insertmacro MUI_PAGE_INSTFILES # Installing page. !insertmacro MUI_PAGE_FINISH # Finished installation page. @@ -68,7 +68,7 @@ VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}" #!finalize 'signtool --file "%1"' Name "${INFO_PRODUCTNAME}" -OutFile "../../bin/${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file. +OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file. InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder). ShowInstDetails show # This will always show the installation details. diff --git a/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh b/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh index c06ed2bbb..66dc209a3 100644 --- a/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh +++ b/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh @@ -163,7 +163,7 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}" InitPluginsDir CreateDirectory "$pluginsdir\webview2bootstrapper" SetOutPath "$pluginsdir\webview2bootstrapper" - File "tmp/MicrosoftEdgeWebview2Setup.exe" + File "tmp\MicrosoftEdgeWebview2Setup.exe" ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install' SetDetailsPrint both