diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml index a7b8dd816..7eb34ed81 100644 --- a/.github/workflows/release-app.yml +++ b/.github/workflows/release-app.yml @@ -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 @@ -478,8 +477,6 @@ jobs: throw "No DLLs found in target directory!" } - Remove-Item -Path $temp_dir -Recurse -Force - - name: Build uses: tauri-apps/tauri-action@v0.5.17 env: @@ -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 { @@ -778,8 +774,6 @@ jobs: throw "No DLLs found in target directory!" } - Remove-Item -Path $temp_dir -Recurse -Force - - name: Build uses: tauri-apps/tauri-action@v0.5.17 env: diff --git a/install.ps1 b/install.ps1 index d579cc78d..9353051a7 100644 --- a/install.ps1 +++ b/install.ps1 @@ -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 @"