-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZO.LOM.APP.csproj
142 lines (141 loc) · 8.32 KB
/
ZO.LOM.APP.csproj
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>True</UseWPF>
<ApplicationIcon>docs\img\ZeeOgre.ico</ApplicationIcon>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageId>ZeeOgre.LoadOrderManager</PackageId>
<Title>ZeeOgre's Load Order Manager</Title>
<Authors>ZeeOgre</Authors>
<Product>LoadOrderManager</Product>
<Copyright>2024 ZeeOgre</Copyright>
<PackageProjectUrl>https://github.com/ZeeOgre/ZO.LoadOrderManager</PackageProjectUrl>
<PackageIcon>docs\img\ZeeOgre_NoBackground.jpg</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/ZeeOgre/ZO.LoadOrderManager</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackAsTool>True</PackAsTool>
<ToolCommandName>ZeeOgre.LoadOrderManager</ToolCommandName>
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
<RootNamespace>ZO.LoadOrderManager</RootNamespace>
<AssemblyName>LoadOrderManager</AssemblyName>
<Configurations>Debug;Release;GitRelease</Configurations>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
<Version>0.0.16.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='GitRelease|AnyCPU'">
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="DiffPlex.Wpf" Version="1.4.0" />
<PackageReference Include="MahApps.Metro.IconPacks.Material" Version="5.0.1" />
<PackageReference Include="MaterialDesignColors" Version="3.1.0" />
<PackageReference Include="MaterialDesignThemes" Version="5.1.0" />
<PackageReference Include="MaterialDesignThemes.MahApps" Version="3.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Data.SQLite" Version="1.0.119" />
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
<PackageReference Include="YamlDotNet" Version="16.1.3" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="data\**\*" CopyToOutputDirectory="PreserveNewest" />
<Content Include="docs\**\*" CopyToOutputDirectory="OverwriteAlways" />
</ItemGroup>
<ItemGroup>
<Compile Remove="installer\ZO.LoadOrderManager-cache\**" />
<EmbeddedResource Remove="installer\ZO.LoadOrderManager-cache\**" />
<None Remove="installer\ZO.LoadOrderManager-cache\**" />
<Page Remove="installer\ZO.LoadOrderManager-cache\**" />
</ItemGroup>
<ItemGroup>
<None Remove="data\nexus_modlist.json" />
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<Target Name="RearrangeOutputFiles" AfterTargets="Build;Publish" BeforeTargets="PostBuildEvent">
<ItemGroup>
<DllFiles Include="$(OutputPath)*.dll" Exclude="$(OutputPath)LoadOrderManager.dll;$(OutputPath)lib\**\*.*" />
<ResourceDllFiles Include="$(OutputPath)**\*.resources.dll" Exclude="$(OutputPath)lib\locale\**\*.*" />
<LocaleFiles Include="$(OutputPath)locale\**\*" />
<RuntimeFiles Include="$(OutputPath)runtimes\**\*" />
</ItemGroup>
<Move SourceFiles="@(DllFiles)" DestinationFolder="$(OutputPath)lib\%(RecursiveDir)" />
<MakeDir Directories="$(OutputPath)lib\locale" />
<Move SourceFiles="@(ResourceDllFiles)" DestinationFolder="$(OutputPath)lib\locale\%(RecursiveDir)" />
<Move SourceFiles="@(LocaleFiles)" DestinationFolder="$(OutputPath)lib\locale\%(RecursiveDir)" />
<MakeDir Directories="$(OutputPath)lib\runtimes" />
<Move SourceFiles="@(RuntimeFiles)" DestinationFolder="$(OutputPath)lib\runtimes\%(RecursiveDir)" />
<RemoveEmptyDirectories RootDirectory="$(OutputPath)" />
</Target>
<Target Name="CopyConfigFile" AfterTargets="Build;Publish" BeforeTargets="PostBuildEvent">
<ItemGroup>
<!--<ConfigFile Include="config\config.yaml" Condition="'$(Configuration)' == 'Debug'" />
<ConfigFile Include="config\config_sample.yaml" Condition="'$(Configuration)' != 'Debug'" />-->
<ConfigFile Include="config\config_sample.yaml" />
</ItemGroup>
<Copy SourceFiles="@(ConfigFile)" DestinationFiles="$(OutputPath)config\config.yaml" />
</Target>
<UsingTask TaskName="RemoveEmptyDirectories" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<RootDirectory ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System.IO" />
<Code Type="Fragment" Language="cs"><![CDATA[
var directories = Directory.GetDirectories(RootDirectory, "*", SearchOption.AllDirectories)
.OrderByDescending(d => d.Count(c => c == Path.DirectorySeparatorChar));
foreach (var dir in directories)
{
if (Directory.GetFiles(dir).Length == 0 && Directory.GetDirectories(dir).Length == 0)
{
Directory.Delete(dir, false);
}
}
]]></Code>
</Task>
</UsingTask>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == 'GitRelease'">
<Exec Command="powershell -ExecutionPolicy Bypass -File $(ProjectDir)scripts\IncrementVersion.ps1 -SettingsFile $(ProjectDir)Properties\Settings.settings -CsprojFilePath $(ProjectDir)ZO.LOM.APP.csproj -AppConfigFilePath $(ProjectDir)App.config -VersionTxtFilePath $(ProjectDir)Properties\version.txt -AipFilePath $(ProjectDir)Installer\ZO.LoadOrderManager.aip -XmlOutputPath $(ProjectDir)Properties\AutoUpdater.xml -Configuration $(Configuration) -AssemblyInfoFilePath $(ProjectDir)Properties\AssemblyInfo.cs" />
</Target>
<Target Name="PostBuildMoveCheck" BeforeTargets="RunAdvancedInstaller" AfterTargets="PostBuildEvent">
<Message Text="Executing PostBuildMoveCheck target..." Importance="high" />
<Exec Command="powershell -ExecutionPolicy Bypass -File "$(ProjectDir)scripts\WaitForFileMove.ps1" -filePath "$(TargetDir)lib\*.dll" -timeoutInSeconds 60" />
<Message Text="PostBuildMoveCheck target execution completed." Importance="high" />
</Target>
<PropertyGroup>
<MsiFileName Condition="'$(Configuration)' == 'GitRelease'">ZO.LoadOrderManager.msi</MsiFileName>
<MsiFileName Condition="'$(Configuration)' == 'Release'">ZO.LoadOrderManager.release.msi</MsiFileName>
<MsiFileName Condition="'$(Configuration)' == 'Debug'">ZO.LoadOrderManager.debug.msi</MsiFileName>
<PackageReleaseNotes>ful automation test.</PackageReleaseNotes>
</PropertyGroup>
<Target Name="RunAdvancedInstaller" AfterTargets="PostBuildMoveCheck" Condition="'$(Configuration)' == 'GitRelease' Or '$(Configuration)' == 'Release'">
<Message Text="Executing RunAdvancedInstaller target..." Importance="high" />
<Exec Command="%25ADVINST_COM%25 /build "$(ProjectDir)installer\ZO.LoadOrderManager.aip" -buildslist "AnyCPU_$(Configuration)"" />
<Message Text="RunAdvancedInstaller target execution completed." Importance="high" />
</Target>
<Target Name="PostBuild" AfterTargets="RunAdvancedInstaller" Condition="'$(Configuration)' == 'GitRelease'">
<Message Text="Executing PostBuild target..." Importance="high" />
<Exec Command="powershell -ExecutionPolicy Bypass -File "$(ProjectDir)scripts\post-build.ps1" -configuration $(ConfigurationName) -msiFile "$(ProjectDir)installer\$(MsiFileName)" -versionFile "$(ProjectDir)Properties\version.txt"" />
<Message Text="PostBuild target execution completed." Importance="high" />
</Target>
</Project>