I'm sure Pete or bplus would be interested.
I need a Installer function for DOS. First just for the game (a relative simple copy form source to destination)
Later to be expanded to install and remove mods.
Do you want this for DOS? (then I am not interested)
Oh ha! Just looked at forum this is big big project of dedicated people, ha!O yes, there are some big projects there. We hope to someday port the whole thing to C and modern systems.
If it's DOS and just Qbasic what's to install unless the QBasic doesn't have a compiler.
If the code is all in QBASIC then you should be able to open most of it in QB64 and compile to executables for modern systemsNo
If it’s just an installer, can’t you just create a simple batch script to do the job?It needs to be a bit more flexible than that.
Best place to ask for this type thing is from the DosBox community — they stay immersed in the proper syntax all the time.I haven't found that part of the community yet. Most of the forum is about DOSBox itself and troubleshooting games.
I would not be comfortable with working on an installer that requires a knowledge of the game. I absolutely pass on offering help on this one.Knowledge of the game is handy for the advanced functions. But I can provide that information if needed,
Pete
Is this the Stunts about you are talking?Well yes that is the one. It is from 1990 and runs on a 286. So i guess DOS version 3.3 and up.
https://www.youtube.com/watch?v=UwsU8ArCmQk (https://www.youtube.com/watch?v=UwsU8ArCmQk)
and does it run in MSDOS 5.0/6.2 or lower?
Here another source in the web: https://www.abandonwaredos.com/abandonware-game.php?abandonware=Stunts&gid=2054 (https://www.abandonwaredos.com/abandonware-game.php?abandonware=Stunts&gid=2054)I run it in DOSBox. but others run it bare-metal MSDOS or freedos.
So you don't run it under DOSBOX but in a Virtual Machine with MSDOS installed.
You're trying to do an installer with QBasic that is installed in old MsDOS.
You needn't a compiled .EXE except if it runs under MSDOS! The choice to use Qbasic is clear but not all the QB45 functions are in QBasic, starting from Call Interrupt so you need to workaround with Call Absolute.
A good undefined projectNot everything is defined because it also depends on the person working with it. There is artistic freedom.
Is the interface of installer ... command line, with window and components like those of VBDOS in ASCII, or in graphic mode? Using mouse or not? ...running in a LAN with what protocol?
A simple idea can become very complicated if you don't specify at starting the features.
There are so many retro DOSlovers, you can ask also on the Pete's forum that is specifically QB/QBasic.
https://www.tapatalk.com/groups/qbasic/ (https://www.tapatalk.com/groups/qbasic/) if Pete doesn't answer to your call.
Good Luck
Ill check the other forum as wel. Thanks for the information.turns out that i already found that forum, there if was redirected here on the basis that this one is more active,
I run it in DOSBox. but others run it bare-metal MSDOS or freedos.So I must imagine that the program runs standalone and the installer is like Forge for Minecraft. A composer/installer of different mods that add different objects to the main game, and to get this there is a tree of folder with files/resources.
Some in a VM. It depends on system and personal preference.
I see there is a lot of interest in the code.
That is nice. And you're welcome to it.
But is there anyone willing to write a simple installer?
Just added to the setup script. And doesn't have to be perfect either.
A copy all from A to B can be accomplished by a Windows command or batch file. That can be done with a Shell command from QB64. Where does A and B come from? user input?User input. As long as the source contains the game.
_FileExists is a function that can check for files present.
User input. As long as the source contains the game.
If destination doesn't exist ask to create.
If it does exist ask for overwrite.
OK @Daniel3D can you say in English and in detail (specific Files, Folders, Extensions to which we will probably assign string variables or arrays or make Data lines) and step by step what you want the Installer to do? Call this pseudo coding.
So user inputs a (Source) Folder, it probably with have to be pathed. Do you know what I mean by pathed? All sub Folders from Drive to Folder in question: Drive:\\sub\sub\Source
Then check if that Folder contains, what game?
User inputs a Destination Folder (again pathed so we don't have to write code looking all over the hard drive for it, only to (NOT) find out it is in the SD card slot.
Get permission to overwrite... assuming success so far, then what? Just copy all files from Source to Destination?
If these are for windows only, couldn't you just make the whole thing a self-extracting EXE?It is meant to be DOS only. To fit with the game.
It is meant to be DOS only. To fit with the game.
User input. As long as the source contains the game.
If destination doesn't exist ask to create.
If it does exist ask for overwrite.
COPY *.* DRIVE://FOLDER/*.*
Edit INSTALL.BAT to point to desired directory to save to. Save and execute.
I'll wait for pseudo, get all questions answered before coding.I hope I cover all important bits.
@Pete going by thisTechnically, one could use the installer to restore a broken game by installing/overwrite.
I was thinking "the source" is Folder containing "the game".
We could actually make a backup folder before overwriting the destination in case something goes horribly wrong.
Is it as simple as this...Looks good.
DEMO. I would recommend this.
1) DON'T use run, instead choose to make this exe by clicking RUN in the IDE and in the menu that opens, click "Make exe only."
2) Now make a folder called "myQB64installdemo" and cut and use Windows Explorer to move the qb64 exe file just made into that new folder.
3) Run the exe.
This is just for piece of mind, so any modifications will not mess with stuff in your QB64 folder.
The program will make a new sub-directory, called: mock-directory-to-demo-installer
Now I made it a sub-directory for demo purposes, only. If this is what the OP is looking for, obviously that part of the installer would need to be worked on so the user could install to the C drive, D drive, etc.
The code also makes a phony Hello World text file in the folder the exe is in. It then copies that file to the new install folder. The demo technique could be used to copy (install) any file. Of course this simple type of install process does not affect the Windows Registry. Anyway, here's my demo...Code: QB64: [Select]
SourceFile$ = "Hello-World.txt" TargetDir$ = "mock-directory-to-demo-installer" ' Source file exists, ask user to install. ' User wants to install. Ask if target directory is okay for install. ' Prompt for overwrite. _LIMIT 30 b$ = INKEY$ ' Create directory. MKDIR TargetDir$ ' Install. PRINT "Directory path: "; TargetDir$ CLOSE #1 CLOSE #1 ' Verify install.
Pete
Quote from: SMcNeill on Today at 04:03:51 AM
If these are for windows only, couldn't you just make the whole thing a self-extracting EXE?
It is meant to be DOS only. To fit with the game.
And maybe a batch script can do it to, I don't know
I don't know if that can handle sub folders and check source and destination.
I'll type out a pseudo script later when I am behind a real computer.
@bplus : the Freebasic code you referred to was compiled such that it runs under DOS. It was the easiest way to code what was needed and still support DOS.
And various other emulators/VM's to run 19 different instances of the game, including the Amiga and the PC-98 version
From my re-kindled interest in "DOS version of FreeBASIC" I am what appears to be a minority of users (of "DOS version of FreeBASIC") who uses FreeBASIC-DOS in "bare-metal mode" i.e to say there is "no windows around" (so to speak)Sounds cool.
@bplus : the Freebasic code you referred to was compiled such that it runs under DOS. It was the easiest way to code what was needed and still support DOS.
Wow! kudos to FB (@Pete don't kill me.) Glad I didn't try running it, well I couldn't because didn't have FB and won't usually run a stranger's exe.I wouldn't be surprised if you could compile it in qb64.
I wouldn't be surprised if you could compile it in qb64.
Maybe not without errors but the program doesn't change files, only moves them so it's relatively safe. But that is not really important.
@Daniel3DI'm not in a hurry. I would like to have it finished before the end of the year because this is the 30th anniversary year.
Thanks for giving us more clues and the pseudo. My mind and heart at moment is invested in a Couple of Challenges with deadlines (there is a pun somewhere in there about deadlines in October with Halloween, @Pete might find it ;-))
In the attachment, a tree example of the game.
It contains the main game with the unfinished SETUP (source included below) - quickbasic
and a mod program sgar (not important/relevant at the moment) - freebasic
Yeah, FB and QB64 are close cousins but FB has stuff that baffle me, Macros and Oop stuff like built in methods for objects and new constructors (have I got that term right?), pointers...True. The programmer in our forum is (slowly) building a remake of the game engine in freebasic. He has built the graphics engine which is beyond me.
Some of it can be translated to QB64 like pointers to _Mem maybe? some just have no equivalent in QB64 like the Oop stuff, WTH macro's sometimes they look like subs or functions, I always thought of macros as key Combo shortcut for editing.
@Daniel3D
I may be interested in specific custom installers ( eg a bootable usb stick for say 286 computer and possibly semi-automatic installation into Windows 10 x64 DOSbox). Also possibly some support/advice if installation to be made by 3.5" floppy.
@Daniel3DBare metal on a modern system is tricky because they often don't have legacy support. Usually sound support is most difficult. So I hope it works, and I know some tricks that might help. Let me know.
Would you be able to share files for me to try installing your racing game on my INTEL i7 computer (bare metal mode via booting from usb stick and booting from 3.5" floppy)(DOSbox various builds via windows desktop icon)?
I would like to try
The sound and music are of a custom format.
I can't share that. I can share a sample of the music.
Just to understand:no copyright. We have had contact with the EA, but they don't seem to remember having it.
the game is abandoneware, so no copyright is hanging on it, is it?
Is there no kind of informations about the custom format?there is a lot of information about it. Even some adaptation for the engine sounds.
About installer I believe in my solution: write a Qbasic version of Installer to get a 16bit version usind Qbasic/QUickBasic and a 32/64 bit version using QB64.That sounds good. I'm only asking for the 16bit installer, but the modern ones are welcome.
Freebasic... it supports 16bit compiling... but for what? Are how many machines with 16bit OSes in the world?
One member of our community ran the game successfully on an emulated Amstrad PC1512 (8086, 8MHz, CGA graphics)to reach this kind of user I think that the installer must be written in C64 Basic! In a way GWBASICA/QBASIC compatible... so the code gets the good/versatle position that I have stressed!
Wowto reach this kind of user I think that the installer must be written in C64 Basic! In a way GWBASICA/QBASIC compatible... so the code gets the good/versatle position that I have stressed!I think you are right.
@Daniel3DO shoot.
Hi
I never have had used a C64 or another Commodore machine. Some decades ago I have had a C64 emulator, (CCS64) and so I have tried some games of that machine. I was never been able to do other that drop on CCS64 icon the game file to play.
However this seems to be interesting
https://www.c64-wiki.com/wiki/BASIC (https://www.c64-wiki.com/wiki/BASIC)
http://www.mypccollection.altervista.org/downloads/manuali/Dos/Dos_GWbasic%20manual%20(eng).pdf (http://www.mypccollection.altervista.org/downloads/manuali/Dos/Dos_GWbasic%20manual%20(eng).pdf)
I started coding with QBasic, but for the task request it seems the same that GW BASIC.
I'll try to have time to spend on this idea with code.
------------------------------------------
on run install
- ask source of the game #(can be the same as the current dir or different, does not matter | does not need to be checked)
# Enter drive to install form:
# EXAMPLE: A:\
- check if the source contains SKID*.exe files (there should be four of them, but check for any)
ask for destination,
# Enter GAME directory
# EXAMPLE c:\stunts\
Check if the destination exists. Create or Ask to overwrite or change destination.
Don't check for enough space.
then copy files [source directory + subdirectories + all files]
(ESC to terminate, don't revert, just stop)
show, install complete box Return to menu on enter.
-----------------------------------------------
Can you make it sequential?Q1: Moving voices of menu isn't so hard... but let's talk about source and destination paths:
instal game > enter source > enter destination
install mod > enter source > enter destination.
Hi Daniel3Dals default source i would take "A:\"
fine to see your feedback.
1. about Q1: Moving voices of menu isn't so hard... but let's talk about source and destination paths:
I think that it must be a value of default for the path and the destination, moreover the user can change one or both the paths manually. If you like to memorize the last used paths it is possible to do. Or do you prefer to memorize only the last paths used?
Q2: you prefer a sequential method, user chooses what to install, user chooses from where, user chooses to where...The source should be default "a:\" but if this is changed within the session it should show the latest used first. But not stored after the session closes.
if no new path is entered user uses a previous path... so the question is
"Do you like to use the last previous path or the Default path?"
Install game: installs the game as it is, including all mods that are there. Deinstallation of mods is something for later. Cars can be deinstalled, but placing them in the garage is sufficient. Deinstallation of cars will be implemented in the garage program.
about
"Original STUNTS and MODs"
Q1: is good for installation the version that I have got from abandonware site? (about 210 files) I have downloaded both the game both the manual for security answer.
Q2: on the website that you have linked before http://stunts.kalpen.de/stunts.htm (http://stunts.kalpen.de/stunts.htm) there is also the last version 1.1, is there some substantial difference? And if yes, what is the final version of game that will be installed?Honest answer, there might never be a final version. The tree.txt that I made contains the version that will be for now (except sgar that is a mod, and the garage dir contains modded cars that are not part of the official release). Included a cleaned up version of the game tree.
Q3: Are MOD's files grouped following a standard structure or no?Mod programs and files should be installed in the game dir.. Cars should go in the garage if present. The game doesn't break if more than 32 cars are in the game folder. It will only list the first 32.
It is clear to me that cars are max 32 in the main directory, the rest are in the garage (folder garage) and a separate module to install only MODs is useful to change the set of 32 cars loaded into game.
Thanks for the quick reply.
waiting your Answers...
Sub ExtractCarName (c As Car, path As String)
If Len(c.file(1)) = 0 Then
c.carname = "Unknown"
Exit Sub
End If
Dim f As Integer, s As String, n As Short, l As Long
f = FreeFile
Open path & SLASH & c.file(1) For Binary Access Read As f
s = Space(100)
Get #f, , s
n = InStr(s, "gnam")
Get #f, n + 16, l
l += 39
s = Space(255)
Get #f, l, s
n = InStr(s, Chr(0))
If n Then s = Left(s, n - 1) Else s = Left(s, 40)
Close f
c.carname = s
End Sub
It starts from line 180 if you would like to see the context.
I have tried to run in DOSBOX the sgar.exe posted into .ZIP as compiled of installer freebasic version, but I got error that you can see in screenshot after.Sorry i missed this part
[ This attachment cannot be displayed inline in 'Print Page' view ]
Ever try to run a game and get an error like:
Load error: no DPMI - Get csdpmi*b.zip
You need a DPMI server, and the most popular is CWSDPMI. Unzip the CWSDMPI.EXE file into the game's directory and try running it again, it should work.
TREESTU1 is the correct file listI have had some time to spend with QB64, so I make another step towards the final application ofinstaller
I love the solution,
that way, I can change it if needed for other incarnations of the game.
fine to read thisAdded below.
please can give me a working link to a modded version of STUNTS so I can go on and finish the project.
That you have posted before is too slow! When I try to download the archive it showed a too long time to download (just 6 hours).
In the while I'll make a version of memorizing the last paths used.
Waiting your answer.
Sub UpdateRunFileCould you replace this part for me in your copy?
Open runfile$ For Output As 1
If videoid$(curvideo%) = "Tandy" Then
v$ = "TDY"
a$ = " "
ElseIf videoid$(curvideo%) = "Hercules" Then
v$ = "CGA"
a$ = " /h"
Else
v$ = videoid$(curvideo%)
a$ = " "
End If
Print #1, "@SKID" + v$ + ".EXE" + a$;
This should have a different setting for hercules graphics because it is based on CGA.
new modded cars are only in garage folder orYou didn't miss the point. I was unclear again.alsoin STUNTS folder,thinking thatGarage is a subfolder of STUNTS?
Separate cars in own directory/folder must be copied into garage folder or into STUNTS folder?
@Daniel3DSOURCE -----------------------------> DESTINATION
SOURCE -----------------------------> DESTINATION
1. (Ok clear)
Original STUNTS files----------------> all copied
2. (please clearer)
|----> all files copied
New files (cars, tracks and so on)-----| ? What to do?
in STUNTS modded |---->only selected files copied
3. (please clearer)
|----> all files copied
Garage Folder-------------------------| ? What to do?
|---->only selected files copied
4. (Ok clear)
|----> storing a copy in different path -->all files copied
Other folders with new files (cars, tracks and so on)-----|
| |--> in garage for future use
(please clearer)|---->installing for use only selected files copied |
| |-->in STUNTS for actual use
max 32 cars
I hope I was clear.
Thanks again.
Both options are validok we take it all
HiThere shouldn't be any file permission problem within the DOS environment, unless DOSBox is configured to emulate the disk on a directory in the host OS that does have permission restrictions
I'm testing the application.
Under window98 it is ok, it needs only admin security permission.
But running in DOSBOX I'm getting a strange issue with the path of destination, nevertheless I'll try again on other machine under DOSBOX.
See later.
I know ASM but it is really hard to do ASM in QB64. I'm not saying impossible - and I have tried by disassembling QB64 code but my lack of compiler knowledge makes that a challenge. I just do not have the time or patience to tweak QB64 code nor would I want to other than for pure amusement.You can download the QB64 source code which contains all the sub-routines. You can even review the QB64 output file with the generated basic to C code. What is there to disassemble in QB64? Nothing is hidden from you.
Your best bet is to try to write the entire game in QB64 which is not easy but a lot easier than trying to emulate ASM code in QB64 or get into the really brainy world of API functions etc.
Thank you both. But it is not about the game itself in this case, but just the SETUP/INSTALLER program to go with it. Because the executables have changed, the original installer program doesn't function anymore.I know ASM but it is really hard to do ASM in QB64. I'm not saying impossible - and I have tried by disassembling QB64 code but my lack of compiler knowledge makes that a challenge. I just do not have the time or patience to tweak QB64 code nor would I want to other than for pure amusement.You can download the QB64 source code which contains all the sub-routines. You can even review the QB64 output file with the generated basic to C code. What is there to disassemble in QB64? Nothing is hidden from you.
Your best bet is to try to write the entire game in QB64 which is not easy but a lot easier than trying to emulate ASM code in QB64 or get into the really brainy world of API functions etc.
Do you still need help with this?Well, I'm not sure. There is a lot of progress, but it has halted in the final stages, it seems.
Hi Daniel3DBut that was 4 months ago, and he hasn't been online in almost as long.
fine this function extracting name of car from file of car.
I'll try it so in a second moment I can integrate it.
Soon final version of installer. I'm testing it in Qbasic in DosBox for windows.
See Later
** The only thing I need at the moment is an Installer function added to the setup. The (replacement)setup program is written in QB. It has to run in DOS, that is the main goal.**Only DOS matters.
Ok if the installer only runs in DOS then the game runs in DOS too so Im not sure I follow. You might want to try messing about with Microsoft XP and see if it works there. To run the same DOS game in QB64 you got to port over the basic source code (if you can get the source) and compile it in QB64. Now I think you said that the game was written in 16 bit assembler but that wont run on anything later than XP