обновил лаунчер под новую версию веба
This commit is contained in:
@@ -52,6 +52,7 @@ param(
|
||||
[string]$DartCommand = 'dart',
|
||||
[string]$InnoSetupCommand,
|
||||
[string]$OpenSslCommand,
|
||||
[string]$VcRuntimePath,
|
||||
[switch]$SkipChecks,
|
||||
[switch]$DryRun,
|
||||
[switch]$Force
|
||||
@@ -519,6 +520,27 @@ try {
|
||||
"--dart-define=MOONWELL_APPCAST_URL=$AppcastUrl"
|
||||
)
|
||||
|
||||
Write-Step 'Bundling the x64 Visual C++ runtime'
|
||||
if ([string]::IsNullOrWhiteSpace($VcRuntimePath)) {
|
||||
$vswherePath = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
|
||||
$vsInstall = (& $vswherePath -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath).Trim()
|
||||
if ($LASTEXITCODE -ne 0 -or -not $vsInstall) {
|
||||
throw 'Visual Studio C++ runtime was not found; pass -VcRuntimePath.'
|
||||
}
|
||||
$redistVersion = Get-ChildItem -LiteralPath (Join-Path $vsInstall 'VC\Redist\MSVC') -Directory |
|
||||
Where-Object { $_.Name -match '^\d+\.\d+\.\d+$' } |
|
||||
Sort-Object { [version]$_.Name } -Descending | Select-Object -First 1
|
||||
$VcRuntimePath = Join-Path $redistVersion.FullName 'x64\Microsoft.VC143.CRT'
|
||||
}
|
||||
foreach ($requiredDll in @('msvcp140.dll', 'vcruntime140.dll', 'vcruntime140_1.dll')) {
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $VcRuntimePath $requiredDll) -PathType Leaf)) {
|
||||
throw "The x64 Visual C++ redistributable $requiredDll was not found."
|
||||
}
|
||||
}
|
||||
Get-ChildItem -LiteralPath $VcRuntimePath -Filter '*.dll' -File | ForEach-Object {
|
||||
Copy-Item -LiteralPath $_.FullName -Destination 'build\windows\x64\runner\Release'
|
||||
}
|
||||
|
||||
Write-Step 'Building the Inno Setup installer'
|
||||
Invoke-RequiredCommand -Command $innoSetup -Arguments @(
|
||||
"/DMyAppVersion=$version",
|
||||
|
||||
Reference in New Issue
Block a user