Skip to content

Commit

Permalink
Adjust the compilation configurations to optimize the binary size for…
Browse files Browse the repository at this point in the history
… the Self Extracting Executables.
  • Loading branch information
MouriNaruto committed Sep 8, 2024
1 parent 5825030 commit 969bdf5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NanaZip.Core/NanaZip.Core.Sfx.Console.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
<ClCompile>
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<AdditionalOptions>%(AdditionalOptions) /Wv:18</AdditionalOptions>
<Optimization Condition="'$(Configuration)' == 'Release'">MinSpace</Optimization>
<FavorSizeOrSpeed Condition="'$(Configuration)' == 'Release'">Size</FavorSizeOrSpeed>
</ClCompile>
<Link>
<LargeAddressAware>true</LargeAddressAware>
Expand Down
2 changes: 2 additions & 0 deletions NanaZip.Core/NanaZip.Core.Sfx.Setup.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<AdditionalOptions>%(AdditionalOptions) /Wv:18</AdditionalOptions>
<PreprocessorDefinitions>Z7_NO_REGISTRY;Z7_NO_CRYPTO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization Condition="'$(Configuration)' == 'Release'">MinSpace</Optimization>
<FavorSizeOrSpeed Condition="'$(Configuration)' == 'Release'">Size</FavorSizeOrSpeed>
</ClCompile>
<Link>
<LargeAddressAware>true</LargeAddressAware>
Expand Down
2 changes: 2 additions & 0 deletions NanaZip.Core/NanaZip.Core.Sfx.Shared.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<PreprocessorDefinitions>Z7_EXTRACT_ONLY;Z7_NO_READ_FROM_CODER;Z7_SFX;Z7_NO_LONG_PATH;Z7_NO_LARGE_PAGES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">Z7_LZMA_DEC_OPT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4113;</DisableSpecificWarnings>
<Optimization Condition="'$(Configuration)' == 'Release'">MinSpace</Optimization>
<FavorSizeOrSpeed Condition="'$(Configuration)' == 'Release'">Size</FavorSizeOrSpeed>
</ClCompile>
<MASM>
<UseSafeExceptionHandlers Condition="'$(Platform)'=='Win32'">true</UseSafeExceptionHandlers>
Expand Down
2 changes: 2 additions & 0 deletions NanaZip.Core/NanaZip.Core.Sfx.Windows.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<AdditionalOptions>%(AdditionalOptions) /Wv:18</AdditionalOptions>
<PreprocessorDefinitions>Z7_NO_REGISTRY;Z7_LANG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization Condition="'$(Configuration)' == 'Release'">MinSpace</Optimization>
<FavorSizeOrSpeed Condition="'$(Configuration)' == 'Release'">Size</FavorSizeOrSpeed>
</ClCompile>
<Link>
<LargeAddressAware>true</LargeAddressAware>
Expand Down
2 changes: 2 additions & 0 deletions NanaZip.Frieren/NanaZip.Frieren.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<ItemDefinitionGroup>
<ClCompile>
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<Optimization Condition="'$(Configuration)' == 'Release'">MinSpace</Optimization>
<FavorSizeOrSpeed Condition="'$(Configuration)' == 'Release'">Size</FavorSizeOrSpeed>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions NanaZip.Shared/NanaZip.Shared.Mitigations.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<ItemDefinitionGroup>
<ClCompile>
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<Optimization Condition="'$(Configuration)' == 'Release'">MinSpace</Optimization>
<FavorSizeOrSpeed Condition="'$(Configuration)' == 'Release'">Size</FavorSizeOrSpeed>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions NanaZip.Shared/NanaZip.Shared.ModernExperienceShims.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<ItemDefinitionGroup>
<ClCompile>
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<Optimization Condition="'$(Configuration)' == 'Release'">MinSpace</Optimization>
<FavorSizeOrSpeed Condition="'$(Configuration)' == 'Release'">Size</FavorSizeOrSpeed>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down

0 comments on commit 969bdf5

Please sign in to comment.