-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathBuildEvents.targets
29 lines (25 loc) · 1.09 KB
/
BuildEvents.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PreBuildEvent>
if not exist "$(Dependencies)" (
mkdir "$(Dependencies)"
Echo "$(SolutionDir)nstrip.exe" -p -cg -cg-exclude-events "$(ManagedDir)" "$(Dependencies)"
"$(SolutionDir)nstrip.exe" -p -cg -cg-exclude-events "$(ManagedDir)" "$(Dependencies)" > nul
)
if exist "$(ProjectDir)mod_$(Configuration).json" (
copy "$(ProjectDir)mod_$(Configuration).json" "$(OutputPath)mod.json" /y
) else if exist "$(ProjectDir)mod.json" (
copy "$(ProjectDir)mod.json" "$(OutputPath)mod.json" /y
)
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
mkdir "$(SolutionDir)..\QModZips\$(GameName)"
powershell Compress-Archive -Path '$(TargetDir)' -DestinationPath '$(SolutionDir)..\QModZips\$(GameName)\$(ProjectName)$(Configuration).zip' -Force
mkdir "$(GameDir)\QMods\$(ProjectName)"
xcopy "$(TargetDir)$(TargetFileName)" "$(GameDir)\QMods\$(ProjectName)\" /Y /I
</PostBuildEvent>
</PropertyGroup>
</Project>