0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 06:10:45 -05:00
launcher/project/build.ps1

23 lines
1002 B
PowerShell
Raw Normal View History

$buildFolder = "..\Build"
2024-05-21 20:15:19 +01:00
$SPTDataFolder = "..\Build\SPT_Data"
$launcherExeFolder = "..\SPT.Launcher\bin\Release\net8.0\win-x64\publish"
$launcherAssetFolder = "..\SPT.Launcher\SPT_Data"
$licenseFile = "..\..\LICENSE.md"
# Delete build folder and contents to ensure it's clean
if (Test-Path "$buildFolder") { Remove-Item -Path "$buildFolder" -Recurse -Force }
# Create build folder and subfolders
2024-05-21 20:15:19 +01:00
$foldersToCreate = @("$buildFolder", "$SPTDataFolder")
foreach ($folder in $foldersToCreate) {
if (-not (Test-Path "$folder")) { New-Item -Path "$folder" -ItemType Directory }
}
# Move built files to the build folder
2024-05-21 20:15:19 +01:00
Copy-Item -Path "$launcherExeFolder\SPT.Launcher.exe" -Destination "$buildFolder" -Force
2024-03-06 18:03:37 -05:00
Copy-Item -Path "$launcherAssetFolder" -Destination "$buildFolder" -Recurse -Force
# If any new DLLs need to be copied, add here
# Write the contents of the license file to a txt in the build folder
Get-Content "$licenseFile" | Out-File "$buildFolder\LICENSE-Launcher.txt" -Encoding UTF8