Can you make a basic installer package that runs under the console, and not under windows???
Can you make a basic installer package that runs under the console, and not under windows???
If you find out, tell me PLEASE. Even if the answer is for Windows, please tell me if you get the chance.
Thank you.
I have absolutely NO idea how installer programs work.
The only way I can imagine is to make the app and read it into an array in your installer. I havent tried this but it seems logical.
Unless there is some way to acually append dataonto your actual application.
What is C++?
I think installers just do any pre-run stuff that needs doing. Such as, for example, copying the files to the appropriate location (files might be stored in an archive file format, so it would also decompress them), adding a registry key pointing to the program directory, or whatever else might need doing. So your 'installer' could simply be (ignoring security risks):
If you're talking about the flashy "InstallShield" thing, MSVC Pro (not sure bout standard and others) comes with "InstallShield Wizard for MSVC", supposedly you can make installers with it.Code:system("copy myprog.arc c:\\MyProg\\myprog.exe");
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Hunter are you saying you can access your executable while its in use?
I think the main question was how do you make an application that stores a separate application within it. So theres one .exe that puts an .exe and other files into a folder.
What is C++?
What I'm getting is you'll have at least two files
program.exe, the actual program you want to install
install.exe, a program which copies 'program.exe' to a specifed location (see hunter's post)
source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense
I'm sure there's a way to do it.. after all, self-extracting zips do it I'll run a quick test though..I think the main question was how do you make an application that stores a separate application within it. So theres one .exe that puts an .exe and other files into a folder.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Is it possible that the installer simply hold all resource files and source files, then compiles them, and places them into the directory, while copying the other needed files into the said directories?
To code is divine
Installer programs which are not console based simply insert the files they want to install as resources in their programs. Then they can use the resource API functions to extract the resources from the .exe and use them as they see fit.
As a console application, you cant use resources. In this case, you need to pad the end of your .exe with the files that you want to install. Then from your .exe you open up your .exe for reading only. Then you fseek() to the end of your executable code, where the start of your padding is. Here you read the padded installation files and write them to where ever you want on the hard drive. This method is a little trickier than the resource method, because you need to know beforehand how far to seek into the file. Either way though, it's not that hard.
Thats what i was thinking.. BUT couldint you store them into buffers in your program. Seems alot simpler.
What is C++?
It wouldnt be easier. Since the files are most likely binary, how would you input that into a buffer? There would be a lot of escape characters needed there.
Couldnt you read in the executable byte by byte into an unsigned char array? Maybe im confusing myself...
What is C++?
You could, but how would that help? Remember that the goal is to have all the installation files within a single executable. Its possible that maybe I'm not understanding what you are getting at here. Could you give a small example of what you mean to ensure we are on the same page?
Welcome to the world of OpenSource
NSIS
Wel the more I thought it out.. the more i realized it would be extremely difficult. So mevermindOriginally Posted by bithub
I wasnt thnking it all out. But your right bith
What is C++?