-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
71 lines (48 loc) · 2.31 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
dotnet restore
Write-Output ""
Write-Output "Building Plugin"
Write-Output ""
dotnet publish Wheel-Addon -c Release -o ./temp/plugin/
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
mkdir ./build/plugin
Remove-Item ./build/plugin/* -Recurse -Force
Move-Item ./temp/plugin/Wheel-Addon.dll ./build/plugin/Wheel-Addon.dll
Move-Item ./temp/plugin/Wheel-Addon.pdb ./build/plugin/Wheel-Addon.pdb
Move-Item ./temp/plugin/Wheel-Addon.Lib.dll ./build/plugin/Wheel-Addon.Lib.dll
Move-Item ./temp/plugin/Wheel-Addon.Lib.pdb ./build/plugin/Wheel-Addon.Lib.pdb
Move-Item ./temp/plugin/OTD.Backport.Parsers.dll ./build/plugin/OTD.Backport.Parsers.dll
Move-Item ./temp/plugin/Newtonsoft.Json.dll ./build/plugin/Newtonsoft.Json.dll
Move-Item ./temp/plugin/StreamJsonRpc.dll ./build/plugin/StreamJsonRpc.dll
Remove-Item ./temp/plugin -Recurse -Force
7z a -r ./build/plugin/Wheel-Addon.zip ./build/plugin/*
Write-Output ""
Write-Output "Building UX"
Write-Output ""
dotnet publish Wheel-Addon.UX.Desktop -c Release -r win-x64 --self-contained='false' -o ./build/UX/win-x64
dotnet publish Wheel-Addon.UX.Desktop -c Release -r win-x86 --self-contained='false' -o ./build/UX/win-x86
dotnet publish Wheel-Addon.UX.Desktop -c Release -r win-arm64 --self-contained='false' -o ./build/UX/win-arm64
dotnet publish Wheel-Addon.UX.Desktop -c Release -r linux-x64 --self-contained='false' -o ./build/UX/linux-x64
dotnet publish Wheel-Addon.UX.Desktop -c Release -r linux-arm64 --self-contained='false' -o ./build/UX/linux-arm64
dotnet publish Wheel-Addon.UX.Desktop -c Release -r osx-x64 --self-contained='false' -o ./build/UX/osx-x64
dotnet publish Wheel-Addon.UX.Desktop -c Release -r osx-arm64 --self-contained='false' -o ./build/UX/osx-arm64
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Output ""
Write-Output "Building Installer"
Write-Output ""
dotnet publish Wheel-Addon.Installer -c Release -o ./temp/installer/
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
mkdir ./build/installer
Remove-Item ./build/installer/* -Recurse -Force
Move-Item ./temp/installer/Wheel-Addon.Installer.dll ./build/installer/Wheel-Addon.Installer.dll
# zip the installer
Compress-Archive -Path ./build/installer/* -DestinationPath ./build/installer/Wheel-Addon.Installer.zip
Remove-Item ./temp -Recurse -Force
Write-Output ""
Write-Output "Done"
Write-Output ""