release mode compilation

This is a discussion on release mode compilation within the C++ Programming forums, part of the General Programming Boards category; hi, does anyone knows how to combine a couples of exe files to be one big exe file in a ...

  1. #1
    Registered User tsarena's Avatar
    Join Date
    May 2002
    Posts
    8

    Unhappy release mode compilation

    hi,

    does anyone knows how to combine a couples of exe files to be one big exe file in a release mode compilation?

    i'm writing a program that used a couples of exe files in it and i want to distribute the exe file to other people. but in order to do that, i also have to give them the others exe files to make the program works and it's quite messy. so that's why i want to combine all the exe files needed by the program into just one exe file for easier distribution.

    thanx in advance.

  2. #2
    Unregistered
    Guest
    You want to combine exe-files? Sure about that? I can imagine that you have several sourcefiles which are compiled to binary and then linked to one exe. But I've never heard of combining exe-files? Don't you mean you want to link binaries?

    BTW, which compiler are you using?

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    49

    Talking

    It's quite challenging...

    Thinking...

    The only imageable method I can accept is : pack two EXE file as custom resource, and , unpack them to disk(or ramdisk) and run them when you need them.

    ...

    Quite complex.

  4. #4
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Why don't u just put it in a folder?

    P.S. Sounds a lot like a virus to me, no offense.

  5. #5
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317
    Hi Tsarena,

    It just isn't possible. An executable file is something like a jigsaw puzzle. Unless someone created another jigsaw that you can put side by side with the former and have a bigger picture, you will not make any sense of it.

    The only way is for you to have access to the source code for those executables and add it to your project, then change your code to accomodate that addition. Bear in mind this is most probably not an easy task.
    It would mean 1st of all a very sharp code analysis ability on your part (depending of course on the complexity of the newly added sources) so that you could understand what the developer had in mind. You would then have to remove all the main functions and move their code (or part of it) to new functions, change the code, create calls for them, change almost certainly the code on the new sources... I mean, you are better off writting it from scratch.
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

  6. #6
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    It is possible and I think there are tools for it. Some make viruses by attaching a virus to a game so when the game is installed, so is the virus. At least that is what I have heard.

    So, I think that it is possible. Not 100% sure though because I have never needed to do something like that.

  7. #7
    Registered User tsarena's Avatar
    Join Date
    May 2002
    Posts
    8

    Thumbs up

    thanx for all your suggestion.it sound liked i'm doing something impossible.
    i'm using microsoft visual c++ 6.0 as my compiler.

    golfinguy4: don't worry,it's not a virus.BTW i have no idea how to make one either. it just a simulator program.

    so, is it possible if i'm using nmake to link the other exe files with the program? for the other exe files, i don't have the source codes nor the .obj files because i'm not the one who wrote those files.

    thnx in advance.

  8. #8
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317
    Viruses that act on such a manner are very small when compared with full executables and have 2 main differences:

    1. They lack the code that is prefixed to all exes at link time. i.e. they are not executables in the way we know them.

    2. They specifically tag that code. In other words they are designed to attack/change/corrupt the code that instructs an exe to load itself to memory and run under a given kernel.
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

  9. #9
    Registered User
    Join Date
    May 2002
    Posts
    17
    Are you perhaps thinking of zipping them?

    So however many files u have get compressed into one .zip file (which u can make into a self-extracting .exe). Then the user downloads your file and unzips everything to a folder???

    Try searching for WinZip, EasyZip, or PowerArchive on Google, and it should turn up some results. Im not quite sure which of those are free though, i think EasyZip.

  10. #10
    Registered User tsarena's Avatar
    Join Date
    May 2002
    Posts
    8

    Thumbs up

    Thanx for the brilliant suggestions you guys gave me. Since i'm running out of time, i just used the zip method.

  11. #11
    Registered User
    Join Date
    Apr 2002
    Posts
    249

    It is great ...

    Don't gave up, you will do that once your own ver of C++.
    you can build it...

    Nobody think in the past that we will have Pentiume CPUs...
    You will do it ... it is a great idea.
    C++
    The best

  12. #12
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    some people don't actually "ATTACH" viruses, they use a hex editor and put the virus in.

  13. #13
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    oh, but it is possible! disassemble both, and link them together or something. i believe thats how viruses are "attached".

  14. #14
    Registered User
    Join Date
    May 2002
    Posts
    317
    Last time I checked a virus could attach itself to varies EXE programs thus making multiple copies of itself. You know like a biological virus, the way it got its name. The coding to attach to an exe is incorporated into the virus itself, that way in can spread. Its not really too hard you just need to know how an EXE is laid out and then after that its just simple file manipulation.

    **Note** However things have changed a little from the past because now a virus writer needs to outthink the virus protection software so the attaching is not quite as bold as it use to be.

  15. #15
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    I didn't say it wasn't possible, I just said that some people use hex editors to put viruses in. That's beyond my knowledge, I'm not smart enough to do anything like that (I know some people that used the hex editor to add stuff to Wolfenstein 3D before ID software released the C sourcecode)

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can not set breakpoint in release mode
    By George2 in forum Windows Programming
    Replies: 4
    Last Post: 07-16-2008, 03:43 AM
  2. Results in Debug and Release mode are different
    By jaro in forum C Programming
    Replies: 11
    Last Post: 05-27-2006, 11:08 AM
  3. Debug Mode Vs. Release Mode
    By incognito in forum Tech Board
    Replies: 5
    Last Post: 12-18-2003, 03:06 PM
  4. 2min in debug mode, 3sec in release!
    By glUser3f in forum C++ Programming
    Replies: 9
    Last Post: 10-03-2003, 01:00 PM
  5. problem with MSVC++ 6's release mode
    By dirkduck in forum C++ Programming
    Replies: 13
    Last Post: 03-23-2002, 02:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21