Skip to content

Commit

Permalink
Patch directly instead of using MSDelta, to support various language …
Browse files Browse the repository at this point in the history
…versions of ILPack.dpl.

Improve error reporting and fix a few minor issues with it.

Switch to VS 2019 with XP toolset.
  • Loading branch information
int19h committed Nov 28, 2019
1 parent 6cf2f4a commit 1c71775
Show file tree
Hide file tree
Showing 9 changed files with 389 additions and 356 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -258,4 +258,5 @@ paket-files/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc
/source.zip
Binary file removed Ilpack.dpl.msdelta
Binary file not shown.
10 changes: 5 additions & 5 deletions aow-patch.sln
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.6
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.161
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aow-patch", "aow-patch.vcxproj", "{294EF181-9DEA-440E-93D4-FCB2D6569A1A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Debug-BDIFF|x86 = Debug-BDIFF|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{294EF181-9DEA-440E-93D4-FCB2D6569A1A}.Debug|x86.ActiveCfg = Debug|Win32
{294EF181-9DEA-440E-93D4-FCB2D6569A1A}.Debug|x86.Build.0 = Debug|Win32
{294EF181-9DEA-440E-93D4-FCB2D6569A1A}.Debug-BDIFF|x86.ActiveCfg = Debug-BDIFF|Win32
{294EF181-9DEA-440E-93D4-FCB2D6569A1A}.Debug-BDIFF|x86.Build.0 = Debug-BDIFF|Win32
{294EF181-9DEA-440E-93D4-FCB2D6569A1A}.Release|x86.ActiveCfg = Release|Win32
{294EF181-9DEA-440E-93D4-FCB2D6569A1A}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {78D34258-78A7-4EE9-9091-FEE81A1CB861}
EndGlobalSection
EndGlobal
71 changes: 17 additions & 54 deletions aow-patch.vcxproj
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug-BDIFF|Win32">
<Configuration>Debug-BDIFF</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
Expand All @@ -24,21 +20,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfAtl>Static</UseOfAtl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-BDIFF|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfAtl>Static</UseOfAtl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfAtl>Static</UseOfAtl>
Expand All @@ -49,9 +38,6 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-BDIFF|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
Expand All @@ -60,12 +46,6 @@
<LinkIncremental>true</LinkIncremental>
<TargetName>AoW_MapViewer.ShowScene_patch</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-BDIFF|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)Debug\</OutDir>
<IntDir>Debug\</IntDir>
<TargetName>bdiff</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>AoW_MapViewer.ShowScene_patch</TargetName>
Expand All @@ -82,22 +62,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;msdelta.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-BDIFF|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>BDIFF;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;msdelta.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand All @@ -111,13 +76,16 @@
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;msdelta.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand All @@ -126,11 +94,9 @@
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="bdiff.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug-BDIFF|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
Expand All @@ -140,9 +106,6 @@
<ItemGroup>
<Image Include="aow-patch.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Ilpack.dpl.msdelta" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand All @@ -151,15 +114,15 @@
<ZipFolder>$(IntDir)zip</ZipFolder>
<SourceFiles>$(MSBuildProjectFile);@(ClInclude);@(ClCompile);@(ResourceCompile);@(Image);@(None)</SourceFiles>
</PropertyGroup>
<Target Name="BeforeResourceCompile" DependsOnTargets="ZipSource"/>
<Target Name="BeforeResourceCompile" DependsOnTargets="ZipSource" />
<UsingTask TaskName="ZipFolder" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
<ParameterGroup>
<SourceFolder ParameterType="System.String" Required="true" />
<ZipFile ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.IO.Compression.FileSystem" />
<Code Type="Fragment" Language="cs"><![CDATA[
<ParameterGroup>
<SourceFolder ParameterType="System.String" Required="true" />
<ZipFile ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.IO.Compression.FileSystem" />
<Code Type="Fragment" Language="cs"><![CDATA[
try {
Log.LogMessage(string.Format("Compressing folder \"{0}\" into \"{1}\"", SourceFolder, ZipFile));
System.IO.Compression.ZipFile.CreateFromDirectory(SourceFolder, ZipFile, System.IO.Compression.CompressionLevel.NoCompression, false);
Expand All @@ -169,11 +132,11 @@
return false;
}
]]></Code>
</Task>
</Task>
</UsingTask>
<Target Name="ZipSource">
<Delete Files="$(SourceZip)" Condition="Exists($(SourceZip))" />
<Copy DestinationFolder="$(ZipFolder)" SourceFiles="$(SourceFiles)" />
<ZipFolder SourceFolder="$(ZipFolder)" ZipFile="$(SourceZip)" />
</Target>
</Project>
</Project>
4 changes: 0 additions & 4 deletions aow-patch.vcxproj.filters
Expand Up @@ -3,7 +3,6 @@
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="bdiff.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
Expand All @@ -16,7 +15,4 @@
<ItemGroup>
<Image Include="aow-patch.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Ilpack.dpl.msdelta" />
</ItemGroup>
</Project>
10 changes: 0 additions & 10 deletions bdiff.cpp

This file was deleted.

0 comments on commit 1c71775

Please sign in to comment.