include x86 vc redist dlls #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Windows | |
on: | |
push: | |
branches: | |
- master | |
- mgrr | |
- gh-actions | |
jobs: | |
flutter-build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Download assets | |
run: | | |
$url = "https://github.com/ArthurHeitmann/F-SERVO/releases/download/assetsV0.7.0%2Bmgrr/assets.7z" | |
$output = "${{ runner.temp }}\assets.7z" | |
Invoke-WebRequest -Uri $url -OutFile $output | |
- name: Extract assets | |
shell: cmd | |
run: 7z x ${{ runner.temp }}/assets.7z -o.\assets | |
- name: Download and install visual c++ redistributable | |
run: | | |
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "${{ runner.temp }}\vc_redist.x64.exe" | |
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x86.exe" -OutFile "${{ runner.temp }}\vc_redist.x86.exe" | |
${{ runner.temp }}\vc_redist.x64.exe /quiet /install | |
${{ runner.temp }}\vc_redist.x86.exe /quiet /install | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.22.2' | |
- name: Get Packages | |
run: flutter pub get | |
- name: Build Release | |
run: flutter build windows --release | |
- name: Copy dlls | |
run: | | |
$dlls_names = @('vcruntime140_1.dll', 'msvcp140.dll', 'vcruntime140.dll') | |
$destination1 = "build\windows\x64\runner\Release" | |
$destination2 = "build\windows\x64\runner\Release\data\flutter_assets\assets\bins\vgmStream" | |
foreach ($dll in $dlls_names) { | |
Copy-Item -Path "C:\Windows\System32\$dll" -Destination $destination1 -Force | |
} | |
Copy-Item -Path "C:\Windows\SysWOW64\vcruntime140.dll" -Destination $destination2 -Force | |
- name: Archive Release | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows | |
path: build/windows/x64/runner/Release |