Compare commits

...

2 Commits

Author SHA1 Message Date
t0stiman bd9ee968f5 no powershell 2025-02-03 16:55:52 +01:00
t0stiman 83839c6e8e remove DLLs RR no longer uses 2024-07-23 14:14:58 +02:00
4 changed files with 8 additions and 48 deletions

View File

@ -1,12 +1,14 @@
<Project>
<PropertyGroup>
<RrInstallDir>D:\Programs\Railroader</RrInstallDir>
<UnityInstallDir>D:\Programs\Unity\2021.3.33f1\Editor</UnityInstallDir>
<RrInstallDir>/mnt/Data/SteamLibrary/steamapps/common/Railroader</RrInstallDir>
<ReferencePath>
$(RrInstallDir)\Railroader_Data\Managed\;
$(RrInstallDir)\Railroader_Data\Managed\UnityModManager\;
$(UnityInstallDir)\Data\Managed\
$(RrInstallDir)/Railroader_Data/Managed/;
$(RrInstallDir)/Railroader_Data/Managed/UnityModManager/;
</ReferencePath>
<AssemblySearchPaths>$(AssemblySearchPaths);$(ReferencePath);</AssemblySearchPaths>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<!-- Copy to game folder -->
<Copy SourceFiles="$(TargetPath);../README.md;../info.json;../LICENSE" DestinationFolder="$(RrInstallDir)/Mods/doot" />
</Target>
</Project>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<LangVersion>latest</LangVersion>
<LangVersion>10</LangVersion>
<WarningsAsErrors>CS8600;CS8602;CS8603</WarningsAsErrors>
<PackageId>doot</PackageId>
<RootNamespace>doot</RootNamespace>
@ -14,7 +14,6 @@
<!-- Railroader -->
<Reference Include="Assembly-CSharp" />
<Reference Include="Definition" />
<Reference Include="Ops" />
<!-- Unity -->
<Reference Include="Unity.Analytics.DataPrivacy" />
@ -95,9 +94,7 @@
<Reference Include="UnityEngine.TilemapModule" />
<Reference Include="UnityEngine.UI" />
<Reference Include="UnityEngine.UIElementsModule" />
<Reference Include="UnityEngine.UIElementsNativeModule" />
<Reference Include="UnityEngine.UIModule" />
<Reference Include="UnityEngine.UNETModule" />
<Reference Include="UnityEngine.UmbraModule" />
<Reference Include="UnityEngine.UnityAnalyticsCommonModule" />
<Reference Include="UnityEngine.UnityAnalyticsModule" />
@ -134,14 +131,4 @@
<Publicize Include="Assembly-CSharp" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<!-- Copy to build folder -->
<Copy SourceFiles="$(TargetPath)" DestinationFolder="../build/" />
<!-- Package after Release build -->
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="powershell -executionpolicy bypass ../package.ps1 -NoArchive -OutputDirectory 'D:\Programs\Railroader\Mods'" />
<!-- Linux -->
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="pwsh -Command &quot;(../package.ps1)&quot;" />
</Target>
</Project>

View File

@ -1,29 +0,0 @@
param (
[switch]$NoArchive,
[string]$OutputDirectory = $PSScriptRoot
)
Set-Location "$PSScriptRoot"
$FilesToInclude = "info.json","build/*","LICENSE","README.md"
$modInfo = Get-Content -Raw -Path "info.json" | ConvertFrom-Json
$modId = $modInfo.Id
$modVersion = $modInfo.Version
$DistDir = "$OutputDirectory/dist"
if ($NoArchive) {
$ZipWorkDir = "$OutputDirectory"
} else {
$ZipWorkDir = "$DistDir/tmp"
}
$ZipOutDir = "$ZipWorkDir/$modId"
New-Item "$ZipOutDir" -ItemType Directory -Force
Copy-Item -Force -Path $FilesToInclude -Destination "$ZipOutDir"
Copy-Item -Force -Path "assetbundles/dootbundle" -Destination "$ZipOutDir"
if (!$NoArchive)
{
$FILE_NAME = "$DistDir/${modId}_v$modVersion.zip"
Compress-Archive -Update -CompressionLevel Fastest -Path "$ZipOutDir/*" -DestinationPath "$FILE_NAME"
}