Added SharpZipLib and ILMerge support to build a single .exe

This commit is contained in:
Alex Lennon 2013-11-08 12:54:40 -08:00
parent 94b4f990b0
commit 77683b72bc
6 changed files with 140 additions and 2 deletions

4
.nuget/packages.config Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ILMerge.MSBuild.Tasks" version="1.0.0.3" />
</packages>

View file

@ -13,6 +13,12 @@
"SccProvider" = "8:"
"Hierarchy"
{
"Entry"
{
"MsmKey" = "8:_4BF8E0C0CEA1BCFDD3FAE4CBE0488579"
"OwnerKey" = "8:_8FDF365DCE9B4F70A60EF2BB1651CCBF"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_8FDF365DCE9B4F70A60EF2BB1651CCBF"
@ -25,6 +31,12 @@
"OwnerKey" = "8:_8FDF365DCE9B4F70A60EF2BB1651CCBF"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_4BF8E0C0CEA1BCFDD3FAE4CBE0488579"
"MsmSig" = "8:_UNDEFINED"
}
}
"Configurations"
{
@ -43,6 +55,14 @@
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
}
}
"Release"
{
@ -59,6 +79,14 @@
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
}
}
}
"Deployable"
@ -88,6 +116,37 @@
}
"File"
{
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4BF8E0C0CEA1BCFDD3FAE4CBE0488579"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_4BF8E0C0CEA1BCFDD3FAE4CBE0488579"
{
"Name" = "8:SharpZipLib.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:SharpZipLib.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_072AE4B10D3C471AA2B16D68E3691837"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
}
"FileType"
{
@ -694,7 +753,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8FDF365DCE9B4F70A60EF2BB1651CCBF"
{
"SourcePath" = "8:..\\DiskImager\\obj\\x86\\Debug\\DiskImager.exe"
"SourcePath" = "8:..\\DiskImager\\obj\\x86\\Release\\DiskImager.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_072AE4B10D3C471AA2B16D68E3691837"

View file

@ -11,6 +11,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "DiskImager.Installer", "DiskImager.Installer\DiskImager.Installer.vdproj", "{001C286E-8D1F-4B60-8E76-FF20CDE63C39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libs", "Libs\Libs.csproj", "{1B0F140A-DFA6-4693-9C09-FCB9E0B35189}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{19CD6AEC-F046-48F6-8C68-E4C460CCAE47}"
ProjectSection(SolutionItems) = preProject
.nuget\packages.config = .nuget\packages.config
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
@ -23,6 +30,8 @@ Global
{4A73C63C-2BF2-4F85-AA55-A5CA581A33B4}.Release|x86.Build.0 = Release|x86
{001C286E-8D1F-4B60-8E76-FF20CDE63C39}.Debug|x86.ActiveCfg = Debug
{001C286E-8D1F-4B60-8E76-FF20CDE63C39}.Release|x86.ActiveCfg = Release
{1B0F140A-DFA6-4693-9C09-FCB9E0B35189}.Debug|x86.ActiveCfg = Debug|x86
{1B0F140A-DFA6-4693-9C09-FCB9E0B35189}.Release|x86.ActiveCfg = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?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)' == '' ">Debug</Configuration>
@ -39,7 +39,13 @@
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="SharpZipLib">
<HintPath>..\Libs\SharpZipLib\SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
@ -101,4 +107,17 @@
<Target Name="AfterBuild">
</Target>
-->
<!-- Code to merge the assemblies into one:setup.exe -->
<UsingTask TaskName="ILMerge.MSBuild.Tasks.ILMerge" AssemblyFile="$(SolutionDir)\packages\ILMerge.MSBuild.Tasks.1.0.0.3\tools\ILMerge.MSBuild.Tasks.dll" />
<Target Name="AfterBuild">
<ItemGroup>
<MergeAsm Include="$(OutputPath)$(TargetFileName)" />
<MergeAsm Include="$(OutputPath)SharpZipLib.dll" />
</ItemGroup>
<PropertyGroup>
<MergedAssembly>$(ProjectDir)$(OutDir)$(TargetFileName)</MergedAssembly>
</PropertyGroup>
<Message Text="ILMerge @(MergeAsm) -&gt; $(MergedAssembly)" Importance="high" />
<ILMerge InputAssemblies="@(MergeAsm)" OutputFile="$(MergedAssembly)" TargetKind="SameAsPrimaryAssembly" />
</Target>
</Project>

47
Libs/Libs.csproj Normal file
View file

@ -0,0 +1,47 @@
<?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)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1B0F140A-DFA6-4693-9C09-FCB9E0B35189}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Libs</RootNamespace>
<AssemblyName>Libs</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</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|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Content Include="SharpZipLib\SharpZipLib.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Binary file not shown.