Jump to content

multi .exe files compiled in 1.exe


Recommended Posts

What I`m trying to do is to compile 6 scripts into the one exe. The reason for this approach is because I have to run atleast 2-3 au3.exe files at the same time independently from each other, even tho, all of them are involved in controling the same application (game). Besides those 6 .exe files, I have a folder with files (ini, txt, png, class, etc.) that also has to be put into the main.exe file. I thought, it would be neat to have one .exe file to start the program from, instead of having all 6 of them installed + the data folder. I looked at Zedna`s Resources.au3, and tryed to implement something to suit my needs, but that is a bit over my head. I have tryed to compile those with Res-Add-Files, and everything seems to look fine if I run that main.exe file in the same folder where all other files are, but if I move that main.exe to another folder, or another comp, I get a windows error msg popping up saying that windows cannot find the file specified. I know that all those files got included into my main.exe during compilation process, and size of it increased accordingly, but still it wont work on other machines. I was looking at FileInstall() for my next move, but a problem with that is that I dont like having those files installed somewhere on other ppl`s machines.

Is there a way to keep all those files in one.exe?

Sorry for the long post, but I`m getting desperate here.

Link to comment
Share on other sites

Include and install a file with the compiled script.

FileInstall ( "source", "dest" [, flag] )

Parameters

source The source path of the file to compile. This must be a literal string; it cannot be a variable. It can be a relative path (using .\ or ..\ in the path).

dest The destination path of the file with trailing backslash if only the directory is used. This can be a variable.

flag [optional] this flag determines whether to overwrite files if they already exist:

0 = (default) do not overwrite existing files

1 = overwrite existing files

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

The FileInstall function is designed to include files into a compiled AutoIt script. These included files can then be "extracted" during execution of the compiled script if the statement is executed. Keep in mind that files such as images can greatly increase the size of a compiled script.

The source file must be a string and not a variable so that the compiler can extract the filename to include. The source cannot contain wildcards.

When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation).

Files maintain their original creation/modification timestamps when installed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...