From 119d18d699f62f94f7a2d4baef463080b37041fc Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 8 May 2025 11:07:37 +0200 Subject: [PATCH] [skip ci] cleanup --- dist/win/build.ps1 | 14 ++++++++++---- dist/win/bundle/bundleWithWinfsp.wxs | 11 +++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dist/win/build.ps1 b/dist/win/build.ps1 index dc820d0eb..cf5c0a043 100644 --- a/dist/win/build.ps1 +++ b/dist/win/build.ps1 @@ -18,12 +18,12 @@ $ProgressPreference = 'SilentlyContinue' # disables Invoke-WebRequest's progress # check preconditions if ((Get-Command "git" -ErrorAction SilentlyContinue) -eq $null) { - Write-Host "Unable to find git.exe in your PATH (try: choco install git)" + Write-Error "Unable to find git.exe in your PATH (try: choco install git)" exit 1 } if ((Get-Command "mvn" -ErrorAction SilentlyContinue) -eq $null) { - Write-Host "Unable to find mvn.cmd in your PATH (try: choco install maven)" + Write-Error "Unable to find mvn.cmd in your PATH (try: choco install maven)" exit 1 } if ((Get-Command 'wix' -ErrorAction SilentlyContinue) -eq $null) @@ -104,7 +104,7 @@ if ((& "$Env:JAVA_HOME\bin\jlink" --help | Select-String -Pattern "Linking from --no-header-files ` --no-man-pages ` --strip-debug ` - --compress "zip-0" #do not compress to have improved msi compression + --compress "zip-0" #do not compress and use msi compression $appPath = ".\$AppName" if ($clean -and (Test-Path -Path $appPath)) { @@ -190,6 +190,12 @@ $Env:JP_WIXHELPER_DIR = "." --about-url $AboutUrl ` --file-associations resources/FAvaultFile.properties +if ($LASTEXITCODE -ne 0) { + Write-Error "jpackage MSI failed with exit code $LASTEXITCODE" + return 1; +} + + #Create RTF license for bundle &mvn -B -f $buildDir/../../pom.xml license:add-third-party "-Djavafx.platform=win" ` "-Dlicense.thirdPartyFilename=license.rtf" ` @@ -211,7 +217,7 @@ Write-Output "Downloading ${winfspUninstaller}..." Invoke-WebRequest $winfspUninstaller -OutFile ".\bundle\resources\winfsp-uninstaller.exe" # redirects are followed by default # copy MSI to bundle resources -Copy-Item ".\installer\$AppName-*.msi" -Destination ".\bundle\resources\$AppName.msi" +Copy-Item ".\installer\$AppName-*.msi" -Destination ".\bundle\resources\$AppName.msi" -Force # create bundle including winfsp & wix build ` diff --git a/dist/win/bundle/bundleWithWinfsp.wxs b/dist/win/bundle/bundleWithWinfsp.wxs index 00d9b9ccb..1c9e7da20 100644 --- a/dist/win/bundle/bundleWithWinfsp.wxs +++ b/dist/win/bundle/bundleWithWinfsp.wxs @@ -1,12 +1,19 @@  - + -