Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use VcRedist module install script to fix CI #1258

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/release-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,9 @@ jobs:
New-Item -ItemType Directory -Force -Path $vcredist_dir | Out-Null

# Install and copy VcRedist
Install-Module -Name VcRedist
Import-Module -Name VcRedist
$temp_dir = "$env:TEMP\VcRedist"
Install-VcRedist -VcList (Get-VcList | Save-VcRedist -Path $temp_dir) -Silent
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://vcredist.com/install.ps1'))

Write-Host "Copying DLL files..."
Copy-Item C:\Windows\System32\vcruntime140.dll -Destination $vcredist_dir -Force
Expand All @@ -478,8 +477,6 @@ jobs:
throw "No DLLs found in target directory!"
}

Remove-Item -Path $temp_dir -Recurse -Force

- name: Build
uses: tauri-apps/[email protected]
env:
Expand Down Expand Up @@ -760,10 +757,9 @@ jobs:
New-Item -ItemType Directory -Force -Path $vcredist_dir | Out-Null

# Install and copy VcRedist
Install-Module -Name VcRedist
Import-Module -Name VcRedist
$temp_dir = "$env:TEMP\VcRedist"
Install-VcRedist -VcList (Get-VcList | Save-VcRedist -Path $temp_dir) -Silent
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://vcredist.com/install.ps1'))

Write-Host "Copying DLL files..."
Get-ChildItem -Path $temp_dir -Recurse -Filter "*.dll" | ForEach-Object {
Expand All @@ -778,8 +774,6 @@ jobs:
throw "No DLLs found in target directory!"
}

Remove-Item -Path $temp_dir -Recurse -Force

- name: Build
uses: tauri-apps/[email protected]
env:
Expand Down
6 changes: 3 additions & 3 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ try {
powershell -c "irm bun.sh/install.ps1|iex"

# Install Visual Studio Redistributables to avoid any ort issues
Install-Module -Name VcRedist
Import-Module -Name VcRedist
Install-VcRedist -VcList (Get-VcList | Save-VcRedist -Path "$env:TEMP\VcRedist") -Silent
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://vcredist.com/install.ps1'))

Write-Host @"

Expand Down
Loading