-
Notifications
You must be signed in to change notification settings - Fork 1
/
PostBuildEvents.targets
25 lines (21 loc) · 984 Bytes
/
PostBuildEvents.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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PostBuildEvent>
if not "$(Configuration)" == "SN2" (
mkdir "$(ModFolder)\$(TargetName)"
copy /Y "$(TargetPath)" "$(ModFolder)\$(TargetName)"
powershell "$(SolutionDir)JsonGameReplace.ps1" -JsonFile "$(ProjectDir)\mod.json" -Config "$(GameName)"
copy /Y "$(ProjectDir)\mod.json" "$(GameDir)\QMods\$(TargetName)\mod.json"
)
if "$(Configuration)" == "SN2" (
mkdir "$(SolutionDir)\zips"
IF EXIST "$(SolutionDir)\zips\$(TargetName).zip" DEL /F "$(SolutionDir)\zips\$(TargetName).zip"
mkdir "$(ProjectDir)\Plugins\$(TargetName)"
copy /Y "$(TargetPath)" "$(ProjectDir)\Plugins\$(TargetName)\$(TargetName).dll"
$(SolutionDir)\7zip\7z.exe a "$(SolutionDir)\zips\$(TargetName).zip" "$(ProjectDir)\Plugins"
Xcopy /Y /E /I "$(ProjectDir)Plugins" "$(ModFolder)"
)
</PostBuildEvent>
</PropertyGroup>
</Project>