0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00

Build Quotes & Specify Encoding of License

This commit is contained in:
Refringe 2024-03-05 22:21:53 -05:00
parent 6334a20bcf
commit f614378ff6
No known key found for this signature in database
GPG Key ID: DA8524051241DD36

View File

@ -8,37 +8,24 @@ $managedFolder = "..\Build\EscapeFromTarkov_Data\Managed"
$projReleaseFolder = ".\bin\Release\net471" $projReleaseFolder = ".\bin\Release\net471"
$licenseFile = "..\..\LICENSE.md" $licenseFile = "..\..\LICENSE.md"
Write-Host "--------------- Cleaning Output Build Folder ---------------"
# Delete build folder and contents to make sure it's clean # Delete build folder and contents to make sure it's clean
if (Test-Path $buildFolder) { Remove-Item -Path $buildFolder -Recurse -Force } if (Test-Path "$buildFolder") { Remove-Item -Path "$buildFolder" -Recurse -Force }
Write-Host "--------------- Done Cleaning Output Build Folder ---------------"
Write-Host "--------------- Creating Output Build Folders ---------------"
# Create build folder and subfolders if they don't exist # Create build folder and subfolders if they don't exist
$foldersToCreate = @($buildFolder, $bepinexFolder, $bepinexPatchFolder, $bepinexPluginFolder, $bepinexSptFolder, $eftDataFolder, $managedFolder) $foldersToCreate = @("$buildFolder", "$bepinexFolder", "$bepinexPatchFolder", "$bepinexPluginFolder", "$bepinexSptFolder", "$eftDataFolder", "$managedFolder")
foreach ($folder in $foldersToCreate) { foreach ($folder in $foldersToCreate) {
if (-not (Test-Path $folder)) { New-Item -Path $folder -ItemType Directory } if (-not (Test-Path "$folder")) { New-Item -Path "$folder" -ItemType Directory }
} }
Write-Host "--------------- Done Creating Output Build Folders ---------------" # Move DLLs from project's bin-release folder to the build folder
Write-Host "--------------- Moving DLLs to $buildFolder ---------------" Copy-Item "$projReleaseFolder\Aki.Common.dll" -Destination "$managedFolder"
Copy-Item "$projReleaseFolder\Aki.Reflection.dll" -Destination "$managedFolder"
# Move DLLs from project's bin\Release folder to the build folder Copy-Item "$projReleaseFolder\aki_PrePatch.dll" -Destination "$bepinexPatchFolder"
Copy-Item "$projReleaseFolder\Aki.Common.dll" -Destination $managedFolder Copy-Item "$projReleaseFolder\aki-core.dll" -Destination "$bepinexSptFolder"
Copy-Item "$projReleaseFolder\Aki.Reflection.dll" -Destination $managedFolder Copy-Item "$projReleaseFolder\aki-custom.dll" -Destination "$bepinexSptFolder"
Copy-Item "$projReleaseFolder\aki_PrePatch.dll" -Destination $bepinexPatchFolder Copy-Item "$projReleaseFolder\aki-debugging.dll" -Destination "$bepinexSptFolder"
Copy-Item "$projReleaseFolder\aki-core.dll" -Destination $bepinexSptFolder Copy-Item "$projReleaseFolder\aki-singleplayer.dll" -Destination "$bepinexSptFolder"
Copy-Item "$projReleaseFolder\aki-custom.dll" -Destination $bepinexSptFolder
Copy-Item "$projReleaseFolder\aki-debugging.dll" -Destination $bepinexSptFolder
Copy-Item "$projReleaseFolder\aki-singleplayer.dll" -Destination $bepinexSptFolder
# If any new DLLs need to be copied, add here # If any new DLLs need to be copied, add here
Write-Host "--------------- Done Moving DLLs to $buildFolder ---------------"
Write-Host "--------------- Writing License File ---------------"
# Write the contents of the license file to a txt # Write the contents of the license file to a txt
Get-Content $licenseFile | Out-File "$buildFolder\LICENSE-Modules.txt" Get-Content "$licenseFile" | Out-File "$buildFolder\LICENSE-Modules.txt" -Encoding UTF8
Write-Host "--------------- Done Writing License File ---------------"