Skip to content

Commit f0bf1ea

Browse files
committed
added upx compression to reduce filesizes
1 parent e87fc5e commit f0bf1ea

File tree

5 files changed

+43
-6
lines changed

5 files changed

+43
-6
lines changed

DebugView++/DebugView++.vcxproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
<IgnoreImportLibrary>true</IgnoreImportLibrary>
8585
<LinkIncremental>false</LinkIncremental>
8686
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
87+
<PreBuildEventUseInBuild>false</PreBuildEventUseInBuild>
8788
</PropertyGroup>
8889
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
8990
<IgnoreImportLibrary>true</IgnoreImportLibrary>
@@ -225,11 +226,13 @@
225226
</Link>
226227
<PostBuildEvent>
227228
<Message>Create release zip</Message>
228-
<Command>$(ProjectDir)..\zip.exe -j $(TargetDir)/$(TargetName).zip $(TargetDir)DebugView++.exe $(TargetDir)DebugViewConsole.exe $(TargetDir)*.vsix</Command>
229+
<Command>$(ProjectDir)..\createzip.bat $(TargetDir)</Command>
229230
</PostBuildEvent>
230231
<PreBuildEvent>
231-
<Command>$(ComSpec) /c UpdateBuildNr.cmd version.h version.wxi</Command>
232-
<Message>Update version numbers</Message>
232+
<Command>
233+
</Command>
234+
<Message>
235+
</Message>
233236
</PreBuildEvent>
234237
</ItemDefinitionGroup>
235238
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -273,7 +276,7 @@
273276
</Link>
274277
<PostBuildEvent>
275278
<Message>Create release zip</Message>
276-
<Command>$(ProjectDir)..\zip.exe -j $(TargetDir)/$(TargetName).zip $(TargetDir)DebugView++.exe $(TargetDir)DebugViewConsole.exe $(TargetDir)*.vsix</Command>
279+
<Command>$(ProjectDir)..\createzip.bat $(TargetDir)</Command>
277280
</PostBuildEvent>
278281
<PreBuildEvent>
279282
<Command>$(ComSpec) /c UpdateBuildNr.cmd version.h version.wxi</Command>

DebugView++/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#define VERSION 1,7,0,97
2-
#define VERSION_STR "1.7.0.97"
1+
#define VERSION 1,7,0,98
2+
#define VERSION_STR "1.7.0.98"

clang-format.exe

2.32 MB
Binary file not shown.

createzip.bat

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@echo off
2+
pushd %~dp0
3+
4+
setlocal
5+
6+
if [%1] == [] (
7+
echo Usage: createzip ^<binary path^>
8+
goto exit
9+
)
10+
11+
set bin_dir=%1
12+
13+
:: paths can be absolute or relative to the location of this batch file
14+
set zip_bin=.\zip.exe
15+
set upx_bin=.\upx.exe
16+
17+
if not exist %zip_bin% (
18+
echo %zip_bin% does not exist, zipfile creation skipped
19+
goto exit
20+
)
21+
22+
if not exist %upx_bin% (
23+
echo %upx_bin% does not exist, exe compression skipped
24+
goto zip
25+
)
26+
27+
:: UPX compresses executables in place about 40%, has no decompressing memory overhead and is extremely fast
28+
%upx_bin% %bin_dir%\DebugView++.exe
29+
%upx_bin% %bin_dir%\DebugViewConsole.exe
30+
31+
:zip
32+
%zip_bin% -j %bin_dir%\DebugView++.zip %bin_dir%\DebugView++.exe %bin_dir%\DebugViewConsole.exe %bin_dir%\*.vsix
33+
34+
:exit

upx.exe

356 KB
Binary file not shown.

0 commit comments

Comments
 (0)