2
0
Эх сурвалжийг харах

Add x64 release target for islzma.dll, and new islzma-x64.dll.

Make sure it builds the x64 dll on debug build as well. The target/platform already existed.

Using 64-bit ISCC now works if you first delete ISPP.dll 🥳

x64 targets are the Win32 one except for
-Removal of: <BaseAddress>0x1200000</BaseAddress>
-Removal of: <CallingConvention>StdCall</CallingConvention>
-Removal of (like exe has): WIN32 from PreprocessorDefinitions
-Addition of: <TargetName>islzma-x64</TargetName>
-Addition of (debug only, like exe has): <OutDir>$(ISSRCROOT)\Projects\Bin\</OutDir>
-Change to (like exe has): <TargetMachine>MachineX64</TargetMachine>

Also update Compiler.SetupCompiler to use is7*-x64.dll if x64 ISCmplr.

Also minor cleanup to exe x64 targets.
Martijn Laan 1 сар өмнө
parent
commit
7ec75ca75f

BIN
Files/islzma-x64.dll


+ 8 - 0
Files/islzma-x64.dll.issig

@@ -0,0 +1,8 @@
+format issig-v2
+file-name "islzma-x64.dll"
+file-size 166544
+file-hash dcbcc895d2cc3c4b14dbced1efd4a7e0ef75a5a1ea0cce0212af11f32de3cac7
+file-tag ""
+key-id def0147c3bbc17ab99bf7b7a9c2de1390283f38972152418d7c2a4a7d7131a38
+sig-r 8e168d3548c25888c78a3425e917050cfead54ad88b37df813cae673c379c55e
+sig-s ebf3550874293146190114b7406f396376385d0f919aecf69b023ada8a495736

+ 2 - 2
Projects/Bin/synch-isfiles.bat

@@ -12,8 +12,8 @@ copy ..\..\Files\is*zlib.dll
 copy ..\..\Files\is*zlib.dll.issig
 copy ..\..\Files\isscint.dll
 copy ..\..\Files\isscint.dll.issig
-copy ..\..\Files\islzma.dll
-copy ..\..\Files\islzma.dll.issig
+copy ..\..\Files\islzma*.dll
+copy ..\..\Files\islzma*.dll.issig
 copy ..\..\Files\islzma*.exe
 copy ..\..\Files\islzma*.exe.issig
 copy ..\..\Files\WizClassicSmallImage.bmp

+ 9 - 8
Projects/Src/Compiler.SetupCompiler.pas

@@ -618,10 +618,11 @@ procedure TSetupCompiler.InitLZMADLL;
 begin
   if LZMAInitialized then
     Exit;
-  var Filename := CompilerDir + 'islzma.dll';
+  const DllName = {$IFDEF WIN64} 'islzma-x64.dll' {$ELSE} 'islzma.dll' {$ENDIF};
+  var Filename := CompilerDir + DllName;
   var M := LoadCompilerDLL(Filename, [ltloTrustAllOnDebug]);
   if not LZMAInitCompressFunctions(M) then
-    AbortCompile('Failed to get address of functions in islzma.dll');
+    AbortCompile('Failed to get address of functions in ' + DllName);
   LZMAInitialized := True;
 end;
 
@@ -2727,12 +2728,12 @@ begin
       end;
     ssArchiveExtraction: begin
         Value := LowerCase(Trim(Value));
-        if Value = 'enhanced/nopassword' then begin
-          SetupHeader.SevenZipLibraryName := 'is7zxr.dll'
-        end else if Value = 'enhanced' then begin
-          SetupHeader.SevenZipLibraryName := 'is7zxa.dll'
-        end else if Value = 'full' then
-          SetupHeader.SevenZipLibraryName := 'is7z.dll'
+        if Value = 'enhanced/nopassword' then
+          SetupHeader.SevenZipLibraryName := {$IFDEF WIN64} 'is7zxr-x64.dll' {$ELSE} 'is7zxr.dll' {$ENDIF}
+        else if Value = 'enhanced' then
+          SetupHeader.SevenZipLibraryName := {$IFDEF WIN64} 'is7zxa-x64.dll' {$ELSE} 'is7zxa.dll' {$ENDIF}
+        else if Value = 'full' then
+          SetupHeader.SevenZipLibraryName := {$IFDEF WIN64} 'is7z-x64.dll' {$ELSE} 'is7z.dll' {$ENDIF}
         else if Value <> 'basic' then
           Invalid;
       end;

+ 0 - 2
Projects/Src/Compression.LZMACompressor/islzma/islzma.def

@@ -1,5 +1,3 @@
-LIBRARY islzma
-
 EXPORTS
   LZMA_Init3 = LZMA_Init
   LZMA_SetProps3 = LZMA_SetProps

+ 4 - 2
Projects/Src/Compression.LZMACompressor/islzma/islzma.sln

@@ -17,10 +17,12 @@ Global
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Debug|Win32.ActiveCfg = Debug|Win32
 		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Debug|Win32.Build.0 = Debug|Win32
-		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Debug|x64.ActiveCfg = Debug|Win32
+		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Debug|x64.ActiveCfg = Debug|x64
+		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Debug|x64.Build.0 = Debug|x64
 		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Release|Win32.ActiveCfg = Release|Win32
 		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Release|Win32.Build.0 = Release|Win32
-		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Release|x64.ActiveCfg = Release|Win32
+		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Release|x64.ActiveCfg = Release|x64
+		{9A22AB1E-129F-4448-A167-79B909AC4C10}.Release|x64.Build.0 = Release|x64
 		{A260686C-A249-40E7-8E00-EF9F1B315341}.Debug|Win32.ActiveCfg = Debug|Win32
 		{A260686C-A249-40E7-8E00-EF9F1B315341}.Debug|Win32.Build.0 = Debug|Win32
 		{A260686C-A249-40E7-8E00-EF9F1B315341}.Debug|x64.ActiveCfg = Debug|x64

+ 66 - 0
Projects/Src/Compression.LZMACompressor/islzma/islzma.vcxproj

@@ -5,10 +5,18 @@
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <VCProjectVersion>17.0</VCProjectVersion>
@@ -24,20 +32,37 @@
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <PlatformToolset>v143</PlatformToolset>
     <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
     <_ProjectFileVersion>17.0.35004.147</_ProjectFileVersion>
@@ -47,11 +72,23 @@
     <OutDir>$(ISSRCROOT)\Projects\Bin\</OutDir>
     <IntDir>$(ShortProjectName)\$(Platform)\$(Configuration)\</IntDir>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <IntDir>$(ShortProjectName)\$(Platform)\$(Configuration)\</IntDir>
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>islzma-x64</TargetName>
+    <OutDir>$(ISSRCROOT)\Projects\Bin\</OutDir>
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <LinkIncremental>false</LinkIncremental>
     <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
     <IntDir>$(ShortProjectName)\$(Platform)\$(Configuration)\</IntDir>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(ShortProjectName)\$(Platform)\$(Configuration)\</IntDir>
+    <TargetName>islzma-x64</TargetName>
+  </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
@@ -68,6 +105,20 @@
       <TargetMachine>MachineX86</TargetMachine>
     </Link>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;ISLZMA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>islzma.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ISLZMA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -85,6 +136,21 @@
       <TargetMachine>MachineX86</TargetMachine>
     </Link>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;ISLZMA_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>islzma.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="..\..\..\..\Components\Lzma2\7zStream.c" />
     <ClCompile Include="..\..\..\..\Components\Lzma2\Alloc.c" />

+ 6 - 0
Projects/Src/Compression.LZMACompressor/islzma/islzma.vcxproj.user

@@ -6,4 +6,10 @@
     <LocalDebuggerCommandArguments>Debug.iss</LocalDebuggerCommandArguments>
     <LocalDebuggerWorkingDirectory>$(ISSRCROOT)\Projects\Bin</LocalDebuggerWorkingDirectory>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LocalDebuggerCommand>$(ISSRCROOT)\Projects\Bin\Compil32.exe</LocalDebuggerCommand>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+    <LocalDebuggerCommandArguments>Debug.iss</LocalDebuggerCommandArguments>
+    <LocalDebuggerWorkingDirectory>$(ISSRCROOT)\Projects\Bin</LocalDebuggerWorkingDirectory>
+  </PropertyGroup>
 </Project>

+ 0 - 2
Projects/Src/Compression.LZMACompressor/islzma/islzma_exe.vcxproj

@@ -133,7 +133,6 @@
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
-      <CallingConvention>StdCall</CallingConvention>
     </ClCompile>
     <Link>
       <AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -155,7 +154,6 @@
       <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
-      <CallingConvention>StdCall</CallingConvention>
     </ClCompile>
     <Link>
       <AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>

+ 1 - 1
README.md

@@ -224,7 +224,7 @@ from the bzlib directory in the [iscompress] repository.
 **Files\isunzlib.dll**, **Files\iszlib.dll** - Compiled by Visual Studio 2005
 from the zlib-dll directory in the [iscompress] repository.
 
-**Files\islzma.dll**, **Files\islzma32.exe**, **Files\islzma64.exe** - Compiled
+**Files\islzma(-x64).dll**, **Files\islzma32.exe**, **Files\islzma64.exe** - Compiled
 by Visual Studio 2022 from the [Projects\Src\Compression.LZMACompressor\islzma] directory.
 
 **Files\isscint.dll** - Compiled by Visual Studio 2022 from Scintilla source