How do you make an executable by a program? I want to have an option in my program to create an executable... how? thx in advance
I don't know whether it helps you or not. There is a function called system() which is used to issue a shell command. int system(const char *string); string is the command. int system("cc sample.c -o sample"); Then you will get an executable sample.
This is what I mean: You have a programm, let's say it makes maze games. A user can set different settings, and then he clicks File -> Create executable. So I want to make a programm that wil make programms .
Thats a very complicated situations. You need to be having compiler to generate the executables but I guess your problem can be solved by a couple of ways. 1. Allow them saving a file of your custom extension say mz and when user double clicks it it opens using your application. 2. You save a compiled executable as a resource in the project of your VC and when user saves the data extract the binary resource to the harddisk and assign the settings accordingly into some predefined resources.
well i was thinking about have a prefab executable that opens a file of custom exenstension, but i was wondering is it was possible to create my own custom made executable. (I seen it in some programs)
It uses the second option as the size of the download is onky 3.6 MB which can make us assume it does not have the compiler for creating the exe. Also just open the gamemaker after instalation and click on File -> Create Executable and then try running the exe. You will see the error about the resource which suggest that they have the exe as resource and when saving they inject more resource into the exe for it to run.
What you says seem pretty hard: to inject into an executable. You would have to know exeactly where everything fits in. And you can make code in gamemaker, like a script. that would be seen as resource also?
Actually its pretty simple. There are API's to do that. See the [thread=643]sample[/thread] that reads as well as writes into an exe.