Skip to content

Commit

Permalink
Add weird abomination with ILMerge to package build
Browse files Browse the repository at this point in the history
  • Loading branch information
willtrnr committed May 3, 2021
1 parent b5b02a7 commit 46ebca2
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 0 deletions.
31 changes: 31 additions & 0 deletions AffinityEx.Launcher.Designer/AffinityEx.Launcher.Designer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down Expand Up @@ -54,5 +69,21 @@
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(ProjectDir)$(OutDir)Plugins" mkdir "$(ProjectDir)$(OutDir)Plugins"
move "$(ProjectDir)$(OutDir)AffinityEx.Plugins.*" "$(ProjectDir)$(OutDir)Plugins"</PostBuildEvent>
</PropertyGroup>
</Project>
4 changes: 4 additions & 0 deletions AffinityEx.Launcher.Photo/AffinityEx.Launcher.Photo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@
<Reference Include="System" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(ProjectDir)$(OutDir)Plugins" mkdir "$(ProjectDir)$(OutDir)Plugins"
move "$(ProjectDir)$(OutDir)AffinityEx.Plugins.*" "$(ProjectDir)$(OutDir)Plugins"</PostBuildEvent>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(ProjectDir)$(OutDir)Plugins" mkdir "$(ProjectDir)$(OutDir)Plugins"
move "$(ProjectDir)$(OutDir)AffinityEx.Plugins.*" "$(ProjectDir)$(OutDir)Plugins"</PostBuildEvent>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions AffinityEx.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AffinityEx", "AffinityEx\AffinityEx.csproj", "{1FCFEA33-6782-4D7A-88A8-CF6D71E3B564}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AffinityEx.Core", "AffinityEx.Core\AffinityEx.Core.csproj", "{7BAAFA48-7410-43DB-8454-4ADB8DA8BDE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AffinityEx.Launcher", "AffinityEx.Launcher\AffinityEx.Launcher.csproj", "{AE12137B-B7C3-4588-8683-EB8632B77C62}"
Expand All @@ -25,6 +27,10 @@ Global
{125A4D24-C094-4CF2-98BE-FD67D5A0DD7B}.Debug|x64.Build.0 = Debug|x64
{125A4D24-C094-4CF2-98BE-FD67D5A0DD7B}.Release|x64.ActiveCfg = Release|x64
{125A4D24-C094-4CF2-98BE-FD67D5A0DD7B}.Release|x64.Build.0 = Release|x64
{1FCFEA33-6782-4D7A-88A8-CF6D71E3B564}.Debug|x64.ActiveCfg = Debug|x64
{1FCFEA33-6782-4D7A-88A8-CF6D71E3B564}.Debug|x64.Build.0 = Debug|x64
{1FCFEA33-6782-4D7A-88A8-CF6D71E3B564}.Release|x64.ActiveCfg = Release|x64
{1FCFEA33-6782-4D7A-88A8-CF6D71E3B564}.Release|x64.Build.0 = Release|x64
{4470D8A0-F02B-4D00-95EC-E4157241A12D}.Debug|x64.ActiveCfg = Debug|x64
{4470D8A0-F02B-4D00-95EC-E4157241A12D}.Debug|x64.Build.0 = Debug|x64
{4470D8A0-F02B-4D00-95EC-E4157241A12D}.Release|x64.ActiveCfg = Release|x64
Expand Down
96 changes: 96 additions & 0 deletions AffinityEx/AffinityEx.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\ILMerge.3.0.41\build\ILMerge.props" Condition="Exists('..\packages\ILMerge.3.0.41\build\ILMerge.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{1FCFEA33-6782-4D7A-88A8-CF6D71E3B564}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>AffinityEx</RootNamespace>
<AssemblyName>AffinityEx</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AffinityEx.Launcher.Designer\AffinityEx.Launcher.Designer.csproj">
<Project>{db2e8a2b-1de1-411c-b977-e3b4656d935f}</Project>
<Name>AffinityEx.Launcher.Designer</Name>
</ProjectReference>
<ProjectReference Include="..\AffinityEx.Launcher.Photo\AffinityEx.Launcher.Photo.csproj">
<Project>{125a4d24-c094-4cf2-98be-fd67d5a0dd7b}</Project>
<Name>AffinityEx.Launcher.Photo</Name>
</ProjectReference>
<ProjectReference Include="..\AffinityEx.Plugins\AffinityEx.Plugins.csproj">
<Project>{468df7d3-def6-4518-81ad-b406d88e1c6d}</Project>
<Name>AffinityEx.Plugins</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>IF EXIST "$(ProjectDir)$(OutDir)*.config" DEL /Q "$(ProjectDir)$(OutDir)*.config"
IF EXIST "$(ProjectDir)$(OutDir)*.pdb" DEL /Q "$(ProjectDir)$(OutDir)*.pdb"
IF EXIST "$(ProjectDir)$(OutDir)*.xml" DEL /Q "$(ProjectDir)$(OutDir)*.xml"

IF NOT EXIST "$(ProjectDir)$(OutDir)Plugins" MKDIR "$(ProjectDir)$(OutDir)Plugins"
MOVE "$(ProjectDir)$(OutDir)AffinityEx.Plugins.*" "$(ProjectDir)$(OutDir)Plugins"

"$(ILMergeConsolePath)" /ndebug ^
"/lib:C:\Program Files\Affinity\Designer" ^
"/out:$(ProjectDir)$(OutDir)DesignerEx.exe" ^
"$(ProjectDir)$(OutDir)AffinityEx.Launcher.Designer.exe" ^
"$(ProjectDir)$(OutDir)AffinityEx.Launcher.dll"

"$(ILMergeConsolePath)" /ndebug ^
"/lib:C:\Program Files\Affinity\Photo" ^
"/out:$(ProjectDir)$(OutDir)PhotoEx.exe" ^
"$(ProjectDir)$(OutDir)AffinityEx.Launcher.Photo.exe" ^
"$(ProjectDir)$(OutDir)AffinityEx.Launcher.dll"

DEL ^
"$(ProjectDir)$(OutDir)AffinityEx.dll" ^
"$(ProjectDir)$(OutDir)AffinityEx.Launcher.dll" ^
"$(ProjectDir)$(OutDir)AffinityEx.Launcher.Designer.exe" ^
"$(ProjectDir)$(OutDir)AffinityEx.Launcher.Photo.exe"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>IF EXIST "$(ProjectDir)$(OutDir)Plugins\*.*" DEL /Q "$(ProjectDir)$(OutDir)Plugins\*.*"
IF EXIST "$(ProjectDir)$(OutDir)*.*" DEL /Q "$(ProjectDir)$(OutDir)*.*"</PreBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\ILMerge.3.0.41\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.3.0.41\build\ILMerge.props'))" />
</Target>
</Project>
6 changes: 6 additions & 0 deletions AffinityEx/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
4 changes: 4 additions & 0 deletions AffinityEx/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ILMerge" version="3.0.41" targetFramework="net472" />
</packages>

0 comments on commit 46ebca2

Please sign in to comment.