Successfully shrinked Famitracker to 406KB

General discussion about tracking, help and support.
womo
Posts: 15
Joined: Thu May 14, 2015 3:43 am
Location: China

Successfully shrinked Famitracker to 406KB

Postby womo » Fri May 15, 2015 3:34 pm

Is this behavior acceptable for Famitracker? I'll stop showing new files if it's not allowed.
Several months ago, I localized Famitracker to Chinese and reduced its size to 581KB, the reason is only for the size limit of the forum. However I don't think I reached the minimize size of a runnable executable file can squeeze, so I improved it even smaller.
On the default compile parameters, the result file is over 1.3MB huge. But not all the things in exe file is necessary for running, the debug info is unecessary, and the MFC library icons, dialogs and strings can be removed if they are not used. The compiler optimization options can be changed either.
Now the MFC library usage is set to "Use MFC in public shared DLL" (is this sentence right? I'm not sure what's it in English Microsoft Visual Studio). It may cause some of the operating systems failed to run when it lacks referrenced MFC dlls, I've tested it in virtual machine of newly installed XP SP3 and it works.
It is said that using msvcrt.lib in an older Visual C++ instead of the compiler default one can shrink the file size while minimize affection of portable, because the older library rely on an older DLL which is OS built-in earlier, but the compiler failed to build with "x unparsable external symbols", the lowest usable library is 2005, which has no effect on file size, so it isn't used in this result. I believe there is further shrinking that is not discovered yet.
Image
Special thanks to the image tag, the new forum is so good.
Attachments
FamiTracker.zip
(259.2 KiB) Downloaded 32 times

jsr
Site Admin
Posts: 112
Joined: Tue Jan 06, 2015 1:25 pm

Re: Successfully shrinked Famitracker to 406KB

Postby jsr » Fri May 15, 2015 10:50 pm

I have tried the shared DLL setting, but then it wouldn't work for some users due to missing MFC runtime files. Maybe the situation is better now but previously these files was not available in a default windows installation. The debug info is necessary for crash dumps, but I had the impression it didn't make much difference to the size of the EXE file?

UPX might be worth trying, I did that a few years ago but then the application icons disappeared for some reason. That might have been fixed since then.
Famitracker developer

User avatar
Radnyx
Posts: 20
Joined: Thu Apr 23, 2015 10:06 pm
Location: United States
Contact:

Re: Successfully shrinked Famitracker to 406KB

Postby Radnyx » Sat May 16, 2015 3:40 am

jsr wrote:The debug info is necessary for crash dumps, but I had the impression it didn't make much difference to the size of the EXE file?


Debug releases for .exes REALLY buff up the size of the executable.

jsr
Site Admin
Posts: 112
Joined: Tue Jan 06, 2015 1:25 pm

Re: Successfully shrinked Famitracker to 406KB

Postby jsr » Sat May 16, 2015 10:19 am

Yeah a debug build is obviously much larger, but in this case it's a release build with debug information enabled. I just checked it, all information is stored in a separate database so it makes no difference at all to the .exe.
Famitracker developer

8BitZtunerYT
Posts: 379
Joined: Thu Apr 23, 2015 7:20 pm
Location: Somewhere stuck in Winamp

Re: Successfully shrinked Famitracker to 406KB

Postby 8BitZtunerYT » Sat May 16, 2015 11:48 am

This is awesome!
slowly ceasing to exist.
"8BitZ caresses his keyboard as he orgasms to the sounds of Winamp."
-retrodpc, 2015

womo
Posts: 15
Joined: Thu May 14, 2015 3:43 am
Location: China

Re: Successfully shrinked Famitracker to 406KB

Postby womo » Fri May 22, 2015 5:04 am

jsr wrote:I have tried the shared DLL setting, but then it wouldn't work for some users due to missing MFC runtime files. Maybe the situation is better now but previously these files was not available in a default windows installation. The debug info is necessary for crash dumps, but I had the impression it didn't make much difference to the size of the EXE file?

UPX might be worth trying, I did that a few years ago but then the application icons disappeared for some reason. That might have been fixed since then.
When did you test that change? I'm not tried OS before XP SP3 since it's hard to get them, but XP SP3 which released in 2008 is capable, MFC90.DLL is inside the system default.

jsr
Site Admin
Posts: 112
Joined: Tue Jan 06, 2015 1:25 pm

Re: Successfully shrinked Famitracker to 406KB

Postby jsr » Sat May 23, 2015 11:09 am

A few years ago I think. But it depends on the version of MFC too, runtime files for newer versions are more unlikely to be available on default system installations.
Famitracker developer

User avatar
w7n
Posts: 241
Joined: Fri May 15, 2015 1:37 am
Location: Nanamori-Chuu
Contact:

Re: Successfully shrinked Famitracker to 406KB

Postby w7n » Mon May 25, 2015 1:39 pm

Womo: What's your account in baidu? IKYO?
nsf.nesbbs.com under reconstruction, better player might be available in the future.

VRC6 PWM is GAY because it has colours of the rainbow in the NSFPlay keyboard visualizer.


Return to “General Talk”

Who is online

Users browsing this forum: No registered users and 3 guests