Game Development Community

Compiled TorqueDemo.exe the wrong size?

by Simon OCallaghan · in Technical Issues · 01/17/2008 (4:38 am) · 6 replies

I have read a lot of the posts in this forum and cannot find any mention of how to fix my problem. I can compile no problem but I can't get the default installation of TGE to compile the same as the exe supplied in the example directory.

I bought the Torque Game Engine SDK last weekend and downloaded version 1.5.2.
I downloaded & installed Microsoft Compiler Visual C++ 2005 Express Edition V 8.0.50727.42
I also followed the following documentation for installation of compiler : tdn.garagegames.com/wiki/Torque/vs2k5
I downloaded Microsoft Platform SDK and updated all my compiler paths

First test was to see if I could compile the torqueDemo.exe in the example directory.
I loaded up the VC project file (Torque SDK.sln) and compiled a debug version of the game no problem.
I then switched to the RELEASE option (Build/Configuration Manager) and compiled again no problem.

Compile message (=== Build: 7 succeeded, 0 failed, 0 up-to-date, 0 skipped ====)

This is where I am confused.

Original TorqueDemo.exe = 1,185 Kb
My release version = 3,044 Kb!!

I assumed that something is wrong with the compiler (Project/Properties) options and decided to see what I could change that might reduce the size of the exe down to the shipped original version. I made sure I was changing the Active(release) parameters and not a debug build.

Configuration Properities - C/C++ - Optimization
Maximize Speed (/O2) changed to Minimize Size (/O1)

My new release version = 2,536 Kb

This is still a long way off from 1,185 Kb what is going wrong?
How come the exe's are so different in size?
I assume something else is being included? DLL's?

The directory contains a lot of DLL files:
glu2d3d.dll = built by compiler (understand where that comes from)
opengl2d3d.dll = same as above
Openal32.dll = ??
unicows.dll = ??
wrap_oal.dll = ??

I don't understand where you compile the other 3 DLL's from? I assume the openal32 and wrap_oal are from the OpenAL SDK but not sure how to create fresh DLL's. Should I be concerned with these DLL's? I assume I have to include these DLL's with my final game release?

Thanks
Sims

#1
01/17/2008 (5:10 am)
The executable delivered as part of the installation/demo is simply compressed to ease download size.
#2
01/17/2008 (5:17 am)
Cool, thanks. What compressor was used on the TorqueDemo.exe?

I read (en.wikipedia.org/wiki/Executable_compression) that some exe compressors are flagged as virus by scanners.

Quote:Another disadvantage is that some utilities can no longer identify run-time library dependencies, as only the statically linked extractor stub is visible.

Also, some older virus scanners simply report all compressed executables as viruses because the decompressor stubs share some characteristics with those. Most modern virus scanners can unpack several different executable compression layers to check the actual executable inside.

Can you recommend a compressor which is good with most virus scanners?

Thanks
Sims
#3
01/17/2008 (6:52 am)
I believe it was UPX.
#4
01/17/2008 (7:26 am)
Thanks, I will take a look at that version.

I am still confused on what all the other DLL's are in the example directory.

Do I have to include them all with my game?
Do I need to re-compile any of these? or can I just include them as is?

The directory contains a lot of DLL files:
glu2d3d.dll = built by compiler (understand where that comes from)
opengl2d3d.dll = same as above
Openal32.dll = ??
unicows.dll = ??
wrap_oal.dll = ??

Thanks
Sims
#5
01/17/2008 (7:29 am)
You will need to ship them with your game. The unicows.dll, for example, adds Unicode support for Windows 98.
#6
01/17/2008 (11:12 am)
The UPX utility worked a treat, the example/torquedemo.exe is down to the original size. I will include the other DLL's in my game directory then.

Thank you very much for the rapid response.
Sims