-
Notifications
You must be signed in to change notification settings - Fork 30
/
pack.ps1
24 lines (20 loc) · 1.13 KB
/
pack.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Packs FVim for Windows platforms
param([string[]]$plat=("win7-x64","win-x64","win-arm64"))
#param([string[]]$plat=("win7-x64","win-x64","linux-x64","osx-x64"))
New-Item -ItemType Directory -Force -Name publish -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force bin\ -ErrorAction SilentlyContinue
Remove-Item publish\*
foreach($i in $plat) {
dotnet publish -f net6.0 -c Release --self-contained -r $i fvim.fsproj
if ($i -eq "win-x64") {
# replace the coreclr hosting exe with an icon-patched one
Copy-Item lib/fvim-win10.exe bin/Release/net6.0/$i/publish/FVim.exe
# Avalonia 0.10.0-preview6 fix: manually copy ANGLE from win7-x64
Copy-Item ~/.nuget/packages/avalonia.angle.windows.natives/2.1.0.2020091801/runtimes/win7-x64/native/av_libglesv2.dll bin/Release/net6.0/$i/publish/
} elseif ($i -eq "win7-x64") {
Copy-Item lib/fvim-win7.exe bin/Release/net6.0/$i/publish/FVim.exe
} elseif ($i -eq "win-arm64") {
Copy-Item lib/fvim-win10-arm64.exe bin/Release/net6.0/$i/publish/FVim.exe
}
Compress-Archive -Path bin/Release/net6.0/$i/publish/* -DestinationPath publish/fvim-$i.zip -Force
}