Re: Big file ...
- Posted by "Carl R. White" <crwhite at COMP.BRADX.XAC.UK> Sep 25, 1997
- 601 views
On Wed, 24 Sep 1997, Stefan Meyer wrote: > Assume, I have written an .ex program with some picturefiles, sounds etc. > How can I put all that stuff into ONE .exe file? It's possible to munge it all together with Euphoria, but I wouldn't recommend that. I prefer to use a method I described a while ago for Jiri's "Aliens" game. 1. Make a backup of your program, pictures and sounds in case something goes wrong below. 2. Get hold of a copy of PKZip (you should be able to do this for any self-extracting archiver, but the below is optimized for PK). 3a. You might like to bind a main executable at this stage, although you don't have to... 3b. Zip all of the files (program etc.) into a zipfile (note the use of the tilde '~', you might have to remove a character to fit it in): PKZIP ~[FileName] PROG.EX(E) EFILES.E WIBBLE.E (if you haven't bound them already). e.g. PKZIP ~ALIENS ALIENS.EXE *.WAV -- I'd made sure the .WAVs were the only ones in my work -- directory 4. Make a SFX archive: ZIP2EXE ~[FileName] e.g. ZIP2EXE ~ALIENS 5. Delete all files except the ~[FileName].EXE (This is why I told you to make a backup of the files) 6. Create a batch file along the following lines (don't include the bracketed comments): ----------------------------------------------------------------------- REM [FileName].BAT (no tilde '~' here) @ECHO OFF MKDIR ~[FileName].TMP (create a temporary directory) COPY ~[FileName].EXE ~[FileName].TMP (copy the SFX into the temp.dir.) CD ~[FileName].TMP (move to the directory) ~[FileName] (extract the files) [FileName] (run the program) ECHO Y | DEL *.* (we've done, remove files) CD .. (move back to where we were) RMDIR ~[FileName].TMP (get rid of the temp.dir.) ECHO Done! ----------------------------------------------------------------------- e.g. My "Aliens" batch file looked like this: ----------------------------------------------------------------------- REM ALIENS.BAT @ECHO OFF MKDIR ~ALIENS.TMP COPY ~ALIENS.EXE ~ALIENS.TMP CD ~ALIENS.TMP ~ALIENS ALIENS ECHO Y | DEL *.* CD .. RMDIR ~ALIENS.TMP ECHO Done! ----------------------------------------------------------------------- And so all of the program and support files are stored within one .EXE -- Carl R White | e-mail...: crwhite- at -comp.brad.ac.uk | finger...: crwhite- at -dcsun1.comp.brad.ac.uk | web......: http://www.student.comp.brad.ac.uk/~crwhite/ Anti-Spam: Remove x's from header and change '- at -' to '@' in .sig