Embeding a module into and executable

M

Mike Smith

I have an application which is similar in function to Setup.exe. The user
downloads it, uses it once in most cases and throws it away. I am trying to
coax .NET into making it one file and it is fighting me all the way.

If I do a full build from my source files I get what I want, one exe file.
The problem comes when build the program as a library and then try to make
an exe file out of it. I have to add this extra step because the code
obfuscator works on libraries, it cannot take a "signed and sealed" exe file
and obfuscate it into another exe. If I try to add the library to a Visual
Studio project it simply creates a reference to the external module. I get
a tiny exe file which breaks if run without the larger module file in the
same directory. I tried using the AL.exe tool which has an /embed directive
which looked promising but that turns out to only embed resources.

Does anyone have a solution to this? Maybe there are security issues or
something that would cause Microsoft to disallow embedding of libraries
without source code. It seems like a strange restriction.
 
M

Mike Smith

Thanks, that is exactly what I was looking for.

Since you asked, we were trying to obfuscate "on the cheap". Since the
original source was in Java we used the OpenSource ProGuard obfuscator on
the Java byte code and then used jbimp.exe to convert it to obfuscated IL
code. The jbimp.exe tool can create an exe but with few options, so we have
jbimp make a library instead and then use AL.exe to add the icon, version
info, etc. Therefore it's ironic that the final piece of the puzzle would
be filled in by the very people we were trying to avoid paying! This is a
"proof of concept" project and once funded yours will be the obfuscator we
buy, I PROMISE!

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top