Qbasicnews.com

Full Version: Making .exes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Should exe files be made as standalone or by needing BRUN45 when being posted on the web? Could I post exes needing BRUN45 and also post BRUN45 if people did not have it? Does BRUN45 work with QBasic 1.1 and 3.0?
I always compile as standalone, but I dunno, maybe it would allow more memory the other way.... haven't really experimented.
The BRUN45 stuff was 'cause those bytes are included in every single EXE file, and where people had no hard disk drives, it could be handy to have just one BRUN45 and smaller exes which shared it on the same diskette. Think that QB 4.5 was coded in 1987.

BRUN45 only works with QB 45 executables. QB 30 executables use BRUN30 and QB 2.X executables use BRUN20.
So not really worth it then. Thanks
I recommend doing the standalone and totally forget about using the runtime. The only advantage in using the runtime is that the EXE's that use it are smaller. That's because standalone exe's contain all the runtime support routines in the exe itself, instead of calling on the BRUN file for them like the BRUN required exe's do.

Programs compiled as standalones are larger, but they run quicker than those using the BRUN (from what I've read in the QB knowledge base). Also, having to call on the BRUN uses about 76k more memory than a standalone does. And there are more 'bugs' that pop up when using the BRUN, especially when using VIEW SCREEN , PUT, and there's some memory problems, according to the QB Knowledge base.

I got turned-off on using the BRUN's long ago when I recieved a QB compiled program from someone who never did supply me with the correct runtime required to run it.

- Dav
so when i compile standalone why do i have to enter a runtime
and what exactly are you "entering", the name of a file? Are you sure you're compiling for a stand-alone .EXE? (It sounds like what you think is happening isn't.)



Quote:so when i compile standalone why do i have to enter a runtime
Quote:so when i compile standalone why do i have to enter a runtime

You must be compiling to EXE's that require it. QB does default to that option, and I sometimes compile the wrong EXE's because of that.

After you choose the 'Make EXE file' from the Run menu, you should see a check box on the lower right that gives two options....

Produce:
[X] Exe Requiring BRUN45.EXE
[_] Stand-Alone EXE file.

Make sure the Stand-Alone box is checked instead and you'll get a EXE not requiring the BRUN program.

- Dav
the reason you'd have to type in something regarding the runtime library after you run the program is because your program couldn't find BRUN45.EXE in your path. (Otherwise, you wouldn't get a prompt for it.)
Allright... Now the second thing I'm interested in. Say I have QBasic 1.1, 3.0, 4.5 and 7.1, and I also have programs which use OPEN statements, etc. How should a directory tree be set up for qbasic. This is my idea:

Code:
C:/
    qbasic/
        qb11/
            'all qbasic 1.1 files, not any programs
        qb30/
             ' all 3.0 files, no progs
        qb45/
            ' all 4.5
        qb71/
            ' all 7.1
        programs/
            alpha/    ' a program folder
                alpha.bas
                alpha2.bas
                alpha.exe
                hiscores.txt     ' files to be called by alpha.bas and .exe
                data.txt
            beta/
                beta.bas
                ' etc etc
So in this setup all programs are in the one place and organised by folder. Thus when opening a program in any version of qbasic you don't have to go around hunting for a file in the wrong qbasic directory.

If this sort of directory structure was made standard then no one would ever have a problem when someone gives them an exe with no source and with external files. It's really annoying to get an exe with the file addressing wrong and no way of working out the correct addressing.

Any thoughts, different structures?