-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.proj
79 lines (61 loc) · 2.88 KB
/
build.proj
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Start" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Variables -->
<PropertyGroup>
<!-- Release Folder -->
<!-- To change the output folder, use the following parameter: /p:BuildDir=C:\BuildTest-->
<!-- <MainReleaseDir>Builds</MainReleaseDir> -->
<!-- <ReleaseDir>$(MainReleaseDir)\$([System.DateTime]::Now.ToString(yyyyMMdd-HHmmss))</ReleaseDir> -->
<!-- Build Folder -->
<OutDir>Storm\Storm\bin\Release</OutDir>
</PropertyGroup>
<!-- "Autostart" -->
<Target Name="Start">
<CallTarget Targets="Build"/>
<CallTarget Targets="CopyRelease"/>
</Target>
<!-- compile solution as release -->
<Target Name="Build">
<!--<MSBuild Projects="Storm\Storm.sln" Properties="Configuration=Debug"/>-->
<MSBuild Projects="Storm\Storm.sln" Properties="Configuration=Release"/>
</Target>
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<!-- copy files to release folder -->
<Target Name="CopyRelease">
<GetAssemblyIdentity AssemblyFiles="$(OutDir)\StormLoader.exe">
<Output
TaskParameter="Assemblies"
ItemName="StormAssemblyIdentities"/>
</GetAssemblyIdentity>
<GitVersion LocalPath="$(MSBuildProjectDirectory)">
<Output TaskParameter="CommitHash" PropertyName="GitCommitHash" />
</GitVersion>
<PropertyGroup>
<ReleaseName>Storm-%(StormAssemblyIdentities.Version)_GIT-$(GitCommitHash)</ReleaseName>
<ReleaseDir>Builds\$(ReleaseName)</ReleaseDir>
</PropertyGroup>
<MakeDir Directories="$(ReleaseDir);$(ReleaseDir)\StardewValley\;$(ReleaseDir)\AppData\;$(ReleaseDir)\AppData\Mods;$(ReleaseDir)\AppData\Storm;"/>
<ItemGroup>
<ReleaseBinaryFiles
Include="$(OutDir)\**\*.*"
Exclude="$(OutDir)\*.pdb;
$(OutDir)\*.xml;
$(OutDir)\*.exe.config;
$(OutDir)\*.vshost.*;
$(OutDir)\Microsoft.Xna.*;">
</ReleaseBinaryFiles>
<ReleaseInjectorFiles
Include="Dependencies\injectors\**\*.*">
</ReleaseInjectorFiles>
</ItemGroup>
<Copy SourceFiles="@(ReleaseBinaryFiles)" DestinationFiles="@(ReleaseBinaryFiles -> '$(ReleaseDir)\StardewValley\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="Dependencies\steam_appid.txt" DestinationFolder="$(ReleaseDir)\StardewValley"/>
<Copy SourceFiles="README.md;LICENSE" DestinationFolder="$(ReleaseDir)"/>
<Copy SourceFiles="@(ReleaseInjectorFiles)" DestinationFiles="@(ReleaseInjectorFiles -> '$(ReleaseDir)\AppData\Storm\%(RecursiveDir)%(Filename)%(Extension)')"/>
<CreateItem Include="$(ReleaseDir)\**" >
<Output ItemName="ZipFiles" TaskParameter="Include"/>
</CreateItem>
<Zip ZipFileName="Builds\$(ReleaseName).zip" WorkingDirectory="$(ReleaseDir)" Files="@(ZipFiles)" />
<Copy SourceFiles="Builds\$(ReleaseName).zip" DestinationFolder="C:\Development\StormReleases"/>
</Target>
</Project>