Reduce Windows DLL dependencies and package release 0.2.1
This commit is contained in:
1 parent
fc0edd433f
commit
efaf16de18
17 files changed
+153
-21
No files matched your search
@@ -32,13 +32,11 @@ foreach ($name in @('Avalonia','Flutter')) {
|
||||
if ($LASTEXITCODE) { throw "$name build failed" }
|
||||
}
|
||||
$source=Join-Path $root "bin/$folder"
|
||||
if ($name -eq 'Flutter') {
|
||||
$crt=Get-ChildItem "$env:ProgramFiles/Microsoft Visual Studio/2022/*/VC/Redist/MSVC/*/x64/Microsoft.VC143.CRT" -Directory -ErrorAction SilentlyContinue | Sort-Object FullName -Descending | Select-Object -First 1
|
||||
if ($crt) { Copy-Item -Path (Join-Path $crt.FullName '*.dll') -Destination $source -Force }
|
||||
foreach ($runtime in @('msvcp140.dll','vcruntime140.dll','vcruntime140_1.dll')) {
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $source $runtime))) { throw "Missing redistributable C++ runtime: $runtime" }
|
||||
}
|
||||
}
|
||||
$crt=Get-ChildItem "$env:ProgramFiles/Microsoft Visual Studio/2022/*/VC/Redist/MSVC/*/x64/Microsoft.VC143.CRT" -Directory -ErrorAction SilentlyContinue | Sort-Object FullName -Descending | Select-Object -First 1
|
||||
$crtArgs=@((Join-Path $PSScriptRoot 'check-windows-crt.py'),$source)
|
||||
if ($crt) { $crtArgs+=@('--runtime-dir',$crt.FullName) }
|
||||
& python @crtArgs
|
||||
if ($LASTEXITCODE) { throw 'Unresolved C++ runtime dependency in release payload' }
|
||||
& (Join-Path $PSScriptRoot 'copy-windows-usb-driver.ps1') -Destination $source
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $source 'ads-usb.exe'))) { Copy-Item -LiteralPath (Join-Path $root 'bin/ads-usb.exe') -Destination $source }
|
||||
foreach ($file in @($exe,'adsctl.exe','ads-agent.exe','ads-client.exe','tools/scrcpy/adb.exe','tools/scrcpy/scrcpy.exe')) {
|
||||
|
||||
Reference in new issue
Block a user