-
Notifications
You must be signed in to change notification settings - Fork 6
/
dist.ps1
44 lines (30 loc) · 2.87 KB
/
dist.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
#!/usr/build/env pwsh
param (
[string]$Destination = "dist"
)
if (!(Test-Path -path $Destination)) { New-Item $Destination -ItemType "Directory" }
$ArcDistDir = "$(Resolve-Path $Destination)"
$ArcBuildDir = "build/win-x64/ArcSDK/"
$ArcSrcDir = Resolve-Path "ArcSDK"
if (!(Test-Path -path $ArcBuildDir)) { New-Item $ArcBuildDir -ItemType "Directory" }
if (!(Test-Path -path $ArcDistDir)) { New-Item $ArcDistDir -ItemType "Directory" }
if ($IsWindows)
{
Push-Location $ArcBuildDir
cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release $ArcSrcDir
cmake --build . --config=Release
Pop-Location
Copy-Item -Path $ArcBuildDir/Release/ArcSDK.dll -Destination $ArcDistDir
}
dotnet publish -r win8-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:DebugType=None -p:DebugSymbols=false --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -c Release -o build/win-x64 GiganticEmu.Launcher/GiganticEmu.Launcher.csproj
Copy-Item -Path build/win-x64/GiganticEmu.Launcher.exe -Destination $Destination/MistforgeLauncher.exe
dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:DebugType=None -p:DebugSymbols=false --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -c Release -o build/linux-x64 GiganticEmu.Launcher/GiganticEmu.Launcher.csproj
Copy-Item -Path build/linux-x64/GiganticEmu.Launcher -Destination $Destination/MistforgeLauncher
dotnet publish -r win-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:DebugType=None -p:DebugSymbols=false --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -c Release -o build/win-x64 GiganticEmu.Agent/GiganticEmu.Agent.csproj
Copy-Item -Path build/win-x64/GiganticEmu.Agent.exe -Destination $Destination/GiganticEmu.Agent.exe
dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=false -p:DebugType=None -p:DebugSymbols=false --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -c Release -o build/linux-x64 GiganticEmu.Agent/GiganticEmu.Agent.csproj
Copy-Item -Path build/linux-x64/GiganticEmu.Agent -Destination $Destination/GiganticEmu.Agent
dotnet publish -r win-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:DebugType=None -p:DebugSymbols=false --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -c Release -o build/win-x64 GiganticEmu.ModdingToolkit/GiganticEmu.ModdingToolkit.csproj
Copy-Item -Path build/win-x64/GiganticEmu.ModdingToolkit.exe -Destination $Destination/GiganticEmu.ModdingToolkit.exe
dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=false -p:DebugType=None -p:DebugSymbols=false --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -c Release -o build/linux-x64 GiganticEmu.ModdingToolkit/GiganticEmu.ModdingToolkit.csproj
Copy-Item -Path build/linux-x64/GiganticEmu.ModdingToolkit -Destination $Destination/GiganticEmu.ModdingToolkit