Re: Resources and Euphoria (Opening a new thread)

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Thu, 28 May 1998, JesusC - Jesus Consuegra wrote:

> Hi everybody!.
> I'm trying to setup a single .EXE file to include everything needed for that
> application, (bitmaps, text strings, parameter files, -even some data-).
[space save]
> Has someone done something like this?.
> Thanks.
> Jesus.

Closest I've come to anything similar is a message I posted to the list a
very long time ago.

I include it here in case anyone missed it:

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...: cyrek- at -bigfoot.com              / Remove the hyphens before
Finger...: crwhite- at -dcsun1.comp.brad.ac.uk \ mailing or fingering...
Url......: http://www.bigfoot.com/~cyrek/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu