-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.proj
99 lines (97 loc) · 6.93 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<!--<SolutionDir Condition=" '$(SolutionDir)' == '' ">$(MSBuildProjectDirectory)\</SolutionDir>-->
<SolutionDir>$(MSBuildProjectDirectory)\</SolutionDir>
<Platform>AnyCPU</Platform>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<BUILD_ROOT Condition="'$(BUILD_ROOT)' == '' AND Exists('$(SolutionDir)build\')">$(SolutionDir)</BUILD_ROOT>
<BUILD_ROOT Condition="'$(BUILD_ROOT)' == '' AND Exists('$(MSBuildProjectDirectory)\build\')">$(MSBuildProjectDirectory)\</BUILD_ROOT>
</PropertyGroup>
<PropertyGroup>
<ProjectName>FalloutSnip</ProjectName>
<ProjectGuid>{E5EAE955-8751-46A5-9881-C68E7C508151}</ProjectGuid>
<FrameworkDir>$(SolutionDir)Framework\</FrameworkDir>
<FrameworkTargetDir>$(FrameworkDir)bin\$(Configuration)\</FrameworkTargetDir>
<DomainDir>$(SolutionDir)Domain\</DomainDir>
<DomainTargetDir>$(DomainDir)bin\$(Configuration)\</DomainTargetDir>
<ApplicationDir>$(SolutionDir)Application\</ApplicationDir>
<ApplicationTargetDir>$(ApplicationDir)bin\$(Configuration)\</ApplicationTargetDir>
<StageOutputDir>$(SolutionDir)Output\</StageOutputDir>
<MergeOutputFile>$(StageOutputDir)\$(TargetName)$(TargetExt)</MergeOutputFile>
</PropertyGroup>
<Import Project="$(BUILD_ROOT)\build\falloutsnip.common.targets" />
<ItemGroup>
<inputAssembliesConf Include="$(ApplicationTargetDir)*.exe.config" />
<inputAssemblies Include="$(ApplicationTargetDir)*.exe" />
<inputAssemblies Include="$(ApplicationTargetDir)*.dll" />
<CopyToStagingConf Include="$(SolutionDir)conf\**" />
<CopyToStagingScripts Include="$(SolutionDir)scripts\**" />
<CopyToStagingLang Include="$(ApplicationTargetDir)Lang\resource.resources" />
<CopyToStagingLang Include="$(ApplicationTargetDir)Lang\resource.fr-FR.resources" />
<CopyToStagingFr Include="$(ApplicationTargetDir)Lang\**" />
<CopyToStagingFr Include="$(ApplicationTargetDir)fr-FR\FalloutSnip.resources.dll" />
<CopyToStagingFr Include="$(ApplicationTargetDir)fr-FR\**" />
<CopyToStaging Include="$(SolutionDir)falloutsnip_LICENSE" />
<CopyToStaging Include="$(SolutionDir)falloutsnip_README.TXT" />
<CopyToStagingPython Include="$(SolutionDir)Vendor\IronPython\IronPython.dll" />
<CopyToStagingPython Include="$(SolutionDir)Vendor\IronPython\IronPython.Modules.dll" />
<CopyToStagingPython Include="$(SolutionDir)Vendor\IronPython\Microsoft.Dynamic.dll" />
<CopyToStagingPython Include="$(SolutionDir)Vendor\IronPython\Microsoft.Scripting.dll" />
<CopyToStagingPythonLib Include="$(SolutionDir)Vendor\IronPython\lib\**" />
<CopyToStagingPlatform64 Include="$(SolutionDir)Platform\x64\zlib1.dll" />
<CopyToStagingPlatform64 Include="$(SolutionDir)Platform\x64\ZLibMC.dll" />
<CopyToStagingPlatform32 Include="$(SolutionDir)Platform\x86\zlib1.dll" />
<CopyToStagingPlatform32 Include="$(SolutionDir)Platform\x86\ZLibMC.dll" />
</ItemGroup>
<Target Name="Build" DependsOnTargets="version_import">
<MSBuild Projects="$(FrameworkDir)Framework.csproj"
Properties="Configuration=$(Configuration);Platform=$(Platform);SolutionDir=$(SolutionDir)"
Targets="Build"/>
<MSBuild Projects="$(DomainDir)Domain.csproj"
Properties="Configuration=$(Configuration);Platform=$(Platform);SolutionDir=$(SolutionDir)"
Targets="Build"/>
<MSBuild Projects="$(ApplicationDir)Application.csproj"
Properties="Configuration=$(Configuration);Platform=$(Platform);SolutionDir=$(SolutionDir)"
Targets="Build"/>
</Target>
<Target Name="AfterBuild" DependsOnTargets="Build">
<MakeDir Directories="$(ApplicationTargetDir)Lang" />
<SimpleExec Command="$(ApplicationDir)Lang\resgen.exe" Args="$(ApplicationDir)Lang\resource.resx $(ApplicationTargetDir)Lang\resource.resources" WorkingDirectory="$(ApplicationTargetDir)Lang" />
<SimpleExec Command="$(ApplicationDir)Lang\resgen.exe" Args="$(ApplicationDir)Lang\resource.fr-FR.resx $(ApplicationTargetDir)Lang\resource.fr-FR.resources" WorkingDirectory="$(ApplicationTargetDir)Lang" />
<Copy SourceFiles="@(CopyToStagingPlatform32)" DestinationFolder="$(ApplicationTargetDir)Platform\x86" />
<Copy SourceFiles="@(CopyToStagingPlatform64)" DestinationFolder="$(ApplicationTargetDir)Platform\x64" />
</Target>
<Target Name="Package" DependsOnTargets="AfterBuild">
<MakeDir Directories="$(StageOutputDir)" />
<MakeDir Directories="$(StageOutputDir)Lang" />
<MakeDir Directories="$(StageOutputDir)fr-FR" />
<Delete Files="$(StageOutputDir)conf\DockPanel.config" />
<Copy SourceFiles="@(CopyToStaging)" DestinationFolder="$(StageOutputDir)" />
<Copy SourceFiles="@(CopyToStagingConf)" DestinationFolder="$(StageOutputDir)conf\%(RecursiveDir)" />
<Copy SourceFiles="@(CopyToStagingLang)" DestinationFolder="$(StageOutputDir)Lang\%(RecursiveDir)" />
<Copy SourceFiles="@(CopyToStagingScripts)" DestinationFolder="$(StageOutputDir)Scripts\%(RecursiveDir)" />
<Copy SourceFiles="@(CopyToStagingFr)" DestinationFolder="$(StageOutputDir)fr-FR\%(RecursiveDir)" />
<Copy SourceFiles="@(CopyToStagingPython)" DestinationFolder="$(StageOutputDir)" />
<Copy SourceFiles="@(CopyToStagingPythonLib)" DestinationFolder="$(StageOutputDir)\lib\%(RecursiveDir)" />
<Copy SourceFiles="@(inputAssembliesConf)" DestinationFolder="$(StageOutputDir)" />
<Copy SourceFiles="@(inputAssemblies)" DestinationFolder="$(StageOutputDir)" />
<Copy SourceFiles="@(CopyToStagingPlatform32)" DestinationFolder="$(StageOutputDir)Platform\x86" />
<Copy SourceFiles="@(CopyToStagingPlatform64)" DestinationFolder="$(StageOutputDir)Platform\x64" />
<!-- <ILMerge InputAssemblies="@(inputAssemblies)" OutputFile="$(MergeOutputFile)" DebugInfo="true" /> -->
</Target>
<Target Name="Package_rar" DependsOnTargets="Package">
<MakeDir Directories="$(StageOutputDir)" />
<Delete Files="$(StageOutputDir)\$(ProjectName)_v$(Major).$(Minor).rar" />
<SimpleExec Command="$(ProgramFiles)\WinRar\rar.exe" Args="a -r $(ProjectName)_v$(Major).$(Minor).rar * -x*.pdb -x*vshost* -x*.rar -x*.7z" WorkingDirectory="$(StageOutputDir)" />
<SimpleExec Command="$(ProgramFiles)\WinRar\rar.exe" Args="c $(ProjectName)_v$(Major).$(Minor).rar" StdIn="falloutsnip_README.TXT" WorkingDirectory="$(StageOutputDir)" />
</Target>
<Target Name="Package_7z" DependsOnTargets="Package">
<MakeDir Directories="$(StageOutputDir)" />
<Delete Files="$(StageOutputDir)\$(ProjectName)_v$(Major).$(Minor).7z" />
<SimpleExec Command="7za.exe" Args="a -r $(ProjectName)_v$(Major).$(Minor).7z * -x!*.pdb -x!*vshost* -x!*.rar -x!*.7z" WorkingDirectory="$(StageOutputDir)" />
</Target>
</Project>