Skip to content

Commit

Permalink
added upx compression to reduce filesizes
Browse files Browse the repository at this point in the history
  • Loading branch information
janwilmans committed Jul 14, 2017
1 parent e87fc5e commit f0bf1ea
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
11 changes: 7 additions & 4 deletions DebugView++/DebugView++.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<PreBuildEventUseInBuild>false</PreBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
Expand Down Expand Up @@ -225,11 +226,13 @@
</Link>
<PostBuildEvent>
<Message>Create release zip</Message>
<Command>$(ProjectDir)..\zip.exe -j $(TargetDir)/$(TargetName).zip $(TargetDir)DebugView++.exe $(TargetDir)DebugViewConsole.exe $(TargetDir)*.vsix</Command>
<Command>$(ProjectDir)..\createzip.bat $(TargetDir)</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>$(ComSpec) /c UpdateBuildNr.cmd version.h version.wxi</Command>
<Message>Update version numbers</Message>
<Command>
</Command>
<Message>
</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down Expand Up @@ -273,7 +276,7 @@
</Link>
<PostBuildEvent>
<Message>Create release zip</Message>
<Command>$(ProjectDir)..\zip.exe -j $(TargetDir)/$(TargetName).zip $(TargetDir)DebugView++.exe $(TargetDir)DebugViewConsole.exe $(TargetDir)*.vsix</Command>
<Command>$(ProjectDir)..\createzip.bat $(TargetDir)</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>$(ComSpec) /c UpdateBuildNr.cmd version.h version.wxi</Command>
Expand Down
4 changes: 2 additions & 2 deletions DebugView++/version.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define VERSION 1,7,0,97
#define VERSION_STR "1.7.0.97"
#define VERSION 1,7,0,98
#define VERSION_STR "1.7.0.98"
Binary file added clang-format.exe
Binary file not shown.
34 changes: 34 additions & 0 deletions createzip.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@echo off
pushd %~dp0

setlocal

if [%1] == [] (
echo Usage: createzip ^<binary path^>
goto exit
)

set bin_dir=%1

:: paths can be absolute or relative to the location of this batch file
set zip_bin=.\zip.exe
set upx_bin=.\upx.exe

if not exist %zip_bin% (
echo %zip_bin% does not exist, zipfile creation skipped
goto exit
)

if not exist %upx_bin% (
echo %upx_bin% does not exist, exe compression skipped
goto zip
)

:: UPX compresses executables in place about 40%, has no decompressing memory overhead and is extremely fast
%upx_bin% %bin_dir%\DebugView++.exe
%upx_bin% %bin_dir%\DebugViewConsole.exe

:zip
%zip_bin% -j %bin_dir%\DebugView++.zip %bin_dir%\DebugView++.exe %bin_dir%\DebugViewConsole.exe %bin_dir%\*.vsix

:exit
Binary file added upx.exe
Binary file not shown.

0 comments on commit f0bf1ea

Please sign in to comment.