delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/10/16/22:15:15

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <dont_use_email AT nohavenotit DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Making a standalone EXE that will work without DJGPP
Date: Wed, 16 Oct 2013 22:10:23 -0400
Organization: Aioe.org NNTP Server
Lines: 39
Message-ID: <op.w42tnlhz0e5s1z@localhost>
References: <f753e67c-d661-4f55-802c-f52e4dabca8b AT googlegroups DOT com>
<6a5bd97a-a320-4b63-b323-ce16243b7d52 AT googlegroups DOT com>
<bcd3711d-e2c6-420a-b6c9-bb5973e4870d AT googlegroups DOT com>
NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse AT aioe DOT org
User-Agent: Opera Mail/12.16 (Linux)
X-Notice: Filtered by postfilter v. 0.8.2
Bytes: 2259
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 16 Oct 2013 16:35:09 -0400, Segadude <starsegadude AT gmail DOT com>  
wrote:
...

> I want a single EXE that will run in a pure DOS environment
> without the need for anything else to be installed.

You should only need to follow the two steps Rugxulo posted.

At a DOS command prompt, in the LUA directory, with the DJGPP
environment and path variables setup in order to locate
exe2coff.exe in the DJGPP bin directories:

E.g., after initializing your DJGPP setup, do something like:

C:\lua522\exe2coff lua522.exe
C:\lua522\copy/b cwsdstub.exe + lua522 lua522.exe

What is the name of the lua executable?
What directory is the lua executable within?

Change the above example to fit, if different.

If the LUA build didn't produce a .exe, e.g., lua522 without
a .exe extension, you only need the second step.

> Could you elaborate a bit on how to use the cwsdstub?

To produce a stand-alone executable, cwsdstub must *replace*
the default DJGPP executable stub.  That's done by
removing the default stub and pre-pending cwsdstub to the
main executable.  'exe2coff' removes the default stub
 from .exe's, leaving the main executable.  The DOS command
"copy" (not "xcopy") in binary mode - "copy/b" - combines
the binary objects (stub and main executable) into a single
file.


Rod Pemberton

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019