diff --git a/.github/scripts/build_msi.ps1 b/.github/scripts/build_msi.ps1 index 0cb642b7..a5b1b86a 100644 --- a/.github/scripts/build_msi.ps1 +++ b/.github/scripts/build_msi.ps1 @@ -43,28 +43,12 @@ copy ".\.github\resources\MSI Template.wxs" ".\" & $Candle -dAppName=""$env:blt_name"" -dAppVersion=""$env:build_version"" -dAppVendor=""$env:blt_vendor"" -dAppUpgradeCode=""$env:blt_upgradecode"" -dAppDescription=""$env:blt_description"" -dAppVendorFolder=""$env:blt_vendor_folder"" -dAppIcon=""$env:blt_icon"" -nologo *.wxs -ext WixUIExtension -ext WixFirewallExtension -arch x64 #Compile MSI +Write-Output "Light Command: $Light -b Beat Link Trigger -nologo *.wixobj -out ""$env:artifact_name"" -ext WixUIExtension -ext WixFirewallExtension" -function Printable([string] $s) { - $Matcher = - { - param($m) - - $x = $m.Groups[0].Value - $c = [int]($x.ToCharArray())[0] - switch ($c) - { - 9 { '\t' } - 13 { '\r' } - 10 { '\n' } - 92 { '\\' } - Default { "\$c" } - } - } - return ([regex]'[^ -~\\]').Replace($s, $Matcher) +Try { + & $Light -b "Beat Link Trigger" -nologo "*.wixobj" -out ""$env:artifact_name"" -ext WixUIExtension -ext WixFirewallExtension +} +Catch { + Write-Output "Light threw an error, will try something different" + & $Light -b "Beat Link Trigger" -nologo "*.wixobj" -out $env:artifact_name -ext WixUIExtension -ext WixFirewallExtension } - -$CurrentWorkingDir = (Get-Location).Path -$LightOutFile = $CurrentWorkingDir+"\"+$env:artifact_name -Write-Output (Printable $LightOutFile) -Write-Output "Compile MSI: -out $LightOutFile" -& $Light -b "Beat Link Trigger" -nologo "*.wixobj" -out ""$LightOutFile"" -ext WixUIExtension -ext WixFirewallExtension