Net/XNA exe-packer
by Cliff · in General Discussion · 09/03/2006 (10:01 pm) · 5 replies
Whelp, I have finished and released MuCruncher2, my exe-packer for .net and now tested and fixed for XNA use. Compress your exe files at least 50% and as much as 65%.
Find it here.
Find it here.
#2
Probably won't be making a source release on this, don't know... I'm afraid I don't tend to be as source-code friendly as a lot of the folks these days. heh.
09/05/2006 (1:44 pm)
It's actually more about good compression than about embedding an assembly. If you put all of your resources in the executable, you should be able to shrink the size of your production no less than 50%. Admittedly, disk space isn't the premium it used to be but what can I say? I'm old school. heh.Probably won't be making a source release on this, don't know... I'm afraid I don't tend to be as source-code friendly as a lot of the folks these days. heh.
#3
and i'd be interested in purchasing the source code, if it's reasonably low cost. if you are interested, you can email me at jasons aatt cwite ddoott org. I can promise that I wont be using the code for any product (commercial or otherwise) I am just interested in seeing how you implemented the launcher.
I've done a lot of research around obfuscation of .net assemblies, so this stuff is pretty much right up my alley.
ps: i did a quick look at your assembly, and it looks like you are embedding the assembly directly, not using a resource? i think that's interesting.
09/05/2006 (2:17 pm)
Why dont you use the built-in compression api's? (they are new in .net 2.0) I guess if you want the compression to have certain characteristics, then a home-rolled one is okay too.and i'd be interested in purchasing the source code, if it's reasonably low cost. if you are interested, you can email me at jasons aatt cwite ddoott org. I can promise that I wont be using the code for any product (commercial or otherwise) I am just interested in seeing how you implemented the launcher.
I've done a lot of research around obfuscation of .net assemblies, so this stuff is pretty much right up my alley.
ps: i did a quick look at your assembly, and it looks like you are embedding the assembly directly, not using a resource? i think that's interesting.
#4
I'd be happy to share the actual reflection code with you. It's actually pretty simple, here's an example that just does it by loading from file - you can easily adapt it for something else:
09/05/2006 (4:09 pm)
It was actually because the compression rate of the built in compression libs was horrible.I'd be happy to share the actual reflection code with you. It's actually pretty simple, here's an example that just does it by loading from file - you can easily adapt it for something else:
FileStream inFile = File.OpenRead("loadthis.exe");
byte[] inBytes = new byte[inFile.Length];
inFile.Read(inBytes, 0, (int)inFile.Length);
inFile.Close();
Assembly run = Assembly.Load(inBytes);
Object[] j = new Object[1];
j[0] = args;
run.EntryPoint.Invoke(null, j);
#5
thanks!
-Jason
09/05/2006 (5:37 pm)
Cliff, you dont have any email address posted, any way you could ping me over email? jasons aatt cwite ddoott orgthanks!
-Jason
Torque Owner Jason Swearingen
cliff: any chance of a source code release?
-Jason