diff --git a/build.ps1 b/build.ps1 index 6413e02..fcd88cb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -100,6 +100,10 @@ function updateToGameVersion function copyDependencies { $thirdpartyDir = "$PSScriptRoot\ThirdParty" + if (Test-Path "$thirdpartyDir\*.dll") + { + return + } if (!$installDir) { @@ -112,12 +116,8 @@ function copyDependencies $depsDir = "$installDir\RimWorldWin64_Data\Managed" Write-Host "Copying dependencies from installation directory" if (!(Test-Path $thirdpartyDir)) { mkdir $thirdpartyDir | Out-Null } - - & robocopy /mir $depsDir $thirdpartyDir "Unity*.dll" "Assembly-CSharp.dll" - if ($LASTEXITCODE -gt 4) - { - throw "Sync of RimWorld DLLs failed" - } + Copy-Item -Force "$depsDir\Unity*.dll" "$thirdpartyDir\" + Copy-Item -Force "$depsDir\Assembly-CSharp.dll" "$thirdpartyDir\" } function doPreBuild @@ -135,14 +135,19 @@ function doPostBuild $targetDir = "$(getProjectDir)\bin\Release" $targetPath = "$targetDir\$targetName.dll" - $gameVersion = - - $distAssemblyDir = "$distTargetDir\v$(getGameVersion)\Assemblies" + $distAssemblyDir = "$distTargetDir\$(getGameVersion)\Assemblies" mkdir $distAssemblyDir | Out-Null Copy-Item -Recurse -Force "$PSScriptRoot\mod-structure\*" $distTargetDir Copy-Item -Force $targetPath $distAssemblyDir + $modStructureAssemblyLocation = "$PSScriptRoot\mod-structure\$(getGameVersion)\Assemblies" + if (!(Test-Path $modStructureAssemblyLocation)) + { + mkdir $modStructureAssemblyLocation | Out-Null + } + Copy-Item -Force $targetPath $modStructureAssemblyLocation + Write-Host "Creating distro package" $content = Get-Content -Raw $assemblyInfoFile if (!($content -match '"(\d+\.\d+\.\d+\.\d+)"')) diff --git a/mod-structure/.gitignore b/mod-structure/.gitignore new file mode 100644 index 0000000..984791f --- /dev/null +++ b/mod-structure/.gitignore @@ -0,0 +1 @@ +!*.dll diff --git a/mod-structure/v1.1/Assemblies/AvoidFriendlyFire.dll b/mod-structure/1.1/Assemblies/AvoidFriendlyFire.dll similarity index 100% rename from mod-structure/v1.1/Assemblies/AvoidFriendlyFire.dll rename to mod-structure/1.1/Assemblies/AvoidFriendlyFire.dll diff --git a/mod-structure/1.2/Assemblies/AvoidFriendlyFire.dll b/mod-structure/1.2/Assemblies/AvoidFriendlyFire.dll new file mode 100644 index 0000000..d680724 Binary files /dev/null and b/mod-structure/1.2/Assemblies/AvoidFriendlyFire.dll differ diff --git a/mod-structure/1.3/Assemblies/AvoidFriendlyFire.dll b/mod-structure/1.3/Assemblies/AvoidFriendlyFire.dll new file mode 100644 index 0000000..46bbe40 Binary files /dev/null and b/mod-structure/1.3/Assemblies/AvoidFriendlyFire.dll differ diff --git a/mod-structure/About/About.xml b/mod-structure/About/About.xml index 3308b42..36cc6c0 100644 --- a/mod-structure/About/About.xml +++ b/mod-structure/About/About.xml @@ -9,6 +9,7 @@