Merge branch 'feature/postbuild' into develop

This commit is contained in:
Codename
2019-09-07 21:07:22 +02:00
5 changed files with 192 additions and 41 deletions

View File

@@ -19,6 +19,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="gtanetwork.api" Version="0.3.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.0">
<PrivateAssets>all</PrivateAssets>
@@ -40,7 +41,7 @@
<HintPath>..\..\bridge\runtime\Bootstrapper.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(ConfigurationName)' != 'ServerBuild'">
<Exec Command="powershell.exe -executionpolicy bypass .\Scripts\moveItems.ps1 -outDir $(OutDir) -outFile $(TargetFileName)" />
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(ConfigurationName)' != 'ServerBuild' AND '$(OS)' == 'Windows_NT'">
<Exec Command="powershell -NonInteractive -ExecutionPolicy ByPass -File ..\postbuild.ps1 -buildDirectory $(OutDir) -buildFilename $(TargetFileName)" LogStandardErrorAsError="True" />
</Target>
</Project>

View File

@@ -1,38 +0,0 @@
# Verschiebt die Dateien aus dem Output-Verzeichnis in den resources Ordner
param (
[string]$outDir,
[string]$outFile
)
$rootPath = "$PSScriptRoot\.."
$outputPath = "$rootPath\$outDir"
$bridgePath = "$rootPath\..\..\bridge\"
$resourcePath = "$bridgePath\resources\reallife-gamemode"
$runtimePath = "$bridgePath\runtime"
# Pruefen, ob Output-Pfad existiert
if(!(Test-Path $outputPath))
{
$absoluteOutputPath = Resolve-Path $outputPath
Write-Host "Output Folder ($absoluteOutputPath) does not exist."
Exit 0
}
# Pruefen, ob resources-Pfad existiert
# Wenn NEIN => erstellen
if(!(Test-Path $resourcePath))
{
Write-Host "Creating 'reallife-gamemode' resources directory"
New-Item -ItemType Directory -Path $resourcePath | Out-Null
}
# Gamemode und Meta-Datei verschieben
Copy-Item "$outputPath\$outFile" "$resourcePath\" -Force
Copy-Item "$outputPath\meta.xml" "$resourcePath\" -Force
# Abhaengige DLLs in runtime Ordner verschieben
Copy-Item "$outputPath\*.dll" "$runtimePath\" -Exclude "ReallifeGamemode.Server.dll"