1 parent
35ef0c59e4
commit
67fba6c7e2
1 file changed
+1
-7
@@ -114,9 +114,6 @@ jobs:
|
||||
if (-not [Environment]::Is64BitOperatingSystem) { throw 'Windows x64 is required' }
|
||||
$vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
|
||||
$vs = & $vswhere -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
||||
if ($LASTEXITCODE -ne 0 -or -not $vs) { throw 'Visual Studio C++ x64 tools not found' }
|
||||
Import-Module (Join-Path $vs 'Common7\Tools\Microsoft.VisualStudio.DevShell.dll')
|
||||
Enter-VsDevShell -VsInstallPath $vs -SkipAutomaticLocation -DevCmdArguments '-arch=x64 -host_arch=x64'
|
||||
$nsis = Get-Command makensis.exe -ErrorAction SilentlyContinue
|
||||
if (-not $nsis) {
|
||||
$nsisDir = Join-Path ${env:ProgramFiles(x86)} 'NSIS'
|
||||
@@ -128,13 +125,10 @@ jobs:
|
||||
$dist = Join-Path $env:RUNNER_TEMP ('release-windows-' + [guid]::NewGuid())
|
||||
$env:CARGO_TARGET_DIR = Join-Path $env:RUNNER_TEMP ('build-windows-' + [guid]::NewGuid())
|
||||
New-Item -ItemType Directory -Path $dist | Out-Null
|
||||
cargo build --locked --release --target x86_64-pc-windows-msvc --features vendored-lua,curl/static-curl
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
cargo build --release --target x86_64-pc-windows-msvc --features vendored-lua,curl/static-curl
|
||||
$binary = Join-Path $env:CARGO_TARGET_DIR 'x86_64-pc-windows-msvc\release\rusty-path-of-building.exe'
|
||||
& $binary --version
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
$imports = & dumpbin.exe /DEPENDENTS $binary
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
$dlls = @($imports | ForEach-Object { if ($_ -match '^\s+([\w.-]+\.dll)\s*$') { $Matches[1].ToLowerInvariant() } })
|
||||
if ($dlls.Count -eq 0) { throw 'Could not inspect PE imports' }
|
||||
# API sets are virtual system DLLs. Other imports must resolve without the build tools.
|
||||
|
||||
Reference in new issue
Block a user