Java has .jar, C++ has .???

Jan 31, 2011 at 9:32pm
I'm just looking for a way to add all files to a single executable or ".???"

I just don't want to create all instuctions and ReadMe's etc. with ofstream.
How do I give 1-file for someone to download, that turns into all the files I need?


BTW I know there are installers, but they don't help me learn this stuff. Thanks
Jan 31, 2011 at 10:25pm
I'm thinking you could have been a little clearer in your question new guy (I don't know anything about Java, other than that I drink something sometimes referred to that way), but you can put text into resource files and compile them right into your exe. The text strings are then accessed with various resource Api functions. Another name for this is a 'String Table'.
Feb 1, 2011 at 12:13am
Get 7zip and put your stuff in a .zip file.

Give your .zip file to people.

People will download the .zip and extract it to get all the readmes and other files.
Feb 1, 2011 at 3:24am
K I seen the

#include "Resource.h"

Is that what you are talking about freddie1?
//--------------------
Disch, I would but I want the initial double click to start the .exe
IS there a way to set the.zip up to do that?
Last edited on Feb 1, 2011 at 3:25am
Feb 1, 2011 at 4:56am
^You can make a self extracting .zip if you want. I don't remember the process, but google should.
Feb 1, 2011 at 1:13pm
Yes, there are many things that can be put into resource files such as menu descriptions, version information, text data, bit maps, etc. Textural data is put into a resource script file with a rc extension. This data is compiled into *.obj files with the resource compiler and linked into your final app with the linker.

Self extracting zip files are also cool - as others have mentioned. However, that still involves multiple files. I know of folks who have actually put dll binaries into resource files and got them to work. I'm not sure how that works. If you want to look into it searce on rc.exe and resource files. Personally, I don't care for them that much and tend to only use them for menus and dialog box templates.
Feb 13, 2011 at 11:34am
Make a .exe file which creates all the files (see C++ tutorial on this site). It won't need zips or anything.
Feb 15, 2011 at 4:49am
There is no such .jar kind of facility available in C++. You need to extract all file out and put it in a directory. You must go for ZIP or Setup EXE. 7zip is good third party library to do that.
Last edited on Feb 15, 2011 at 4:50am
Feb 21, 2011 at 9:10am
idk if this is even doable for what you want, highly recommend that you look into compression methods but a simple solution would be to convert those files/readmes/dlls/everything into different byte arrays, copy those byte arrays into your .exe project(for the installer) and then have you own GUI for the installer and when they reach the actual points of installing what you are actually doing is writing those byte arrays/files onto the disk at the specified location, i sometimes do something smiler to this when i manually map a .dll file into memory and not want to have it exposed to crackers and so on.
Topic archived. No new replies allowed.