A while ago I thought I saw something where you could run the game setup by passing command line arguments to the game.exe file.
If this is so what are the command line arguments?
If not, let me know so I can go get a beer or something... :)
As far as I can remember, you do it by calling game.exe --setup
I'm not perfectly sure though, as I don't have any AGS games on this computer to try it.
Thanks ThunderStorm. That works just fine....
Yep - in fact, that is all that the winsetup.exe program does.
Before you ask "How come it takes 40 KB just to do that?", blame Visual Studio :P
Heh Talking about --setup, I think it's the place to add my 2 cents here.
It's quite common that AGS games were released without the winsetup.exe or any setup batch files, which makes it quite annoying for nontechnies. Copying the setup.exe directly from an AGS distribution to your game's folder won't help much either as during compile time some small game name info was added to the file for it to work with your game. Here's some quick tips for how to bring up setup easily for the nontechnies:
1. If you're playing with a DOS compiled game or you're familiar with DOS (this works ALSO for WIN compiled games), you can of course go to the game's folder and type:
GAMENAME --setup
Alternatively, you can create a batch file easily, you may use DOS Edit, notepad or any other text editor. A faster way:
In DOS prompt, type: copy con: setup.bat <Enter>
Type in the appropiate command: GAMENAME --setup
Hit <Ctrl-Z> to quit editing and viola, younow have the games' SETUP.BAT which you can invoke from a DOS prompt (or real DOS) or by double clicking in an explorer folder.
[Note: substitute GAMENAME with the name of the game's executable.]
2. Alternatively, there's an even faster way for making a shortcut to setup a win compiled game, just do:
(a) right-click on the game -> Create Shortcut here
(b) right-click on the newly created shortcut -> Property
(c) in "shortcut" tab -> target, there's something like "d:\path...\gamename.exe", just add " --setup" (note the space) to the end of it and click [OK]
(d) The shortcut can now be used to setup the AGS game, you may rename it to something like "SETUP" if you want.
Exellent point... ;) We all could try and save disk space and bandwith by starting to use the shortcut method... Putting them allready with our game ;D
Actually putting a shortcut in a distributed game is not a good idea, as there're path info in it, so that's why Pumaman had to make the wraper winsetup.exe for it.
Putting a setup.bat in the ZIP should work most of the case, but I've heard that it might not work with win2K or winXP. So the best solution is to distribute your win-compiled games with winsetup.exe (and SETUP.BAT if it's DOS compiled).
Actually what I posted was just a quick solution for people who want to play downloaded games distributed without the setup files, it's not recommended for those who zip their own games to leave out the winsetup.exe file.
Don't Windows allow shortcuts with only the program name as target, or did it work just with dos executables?
TK: That only works if you put the executable in one of the directories that windows searches when trying to launch a program.
All: The reason I asked about this, is that I am making a game launcher program for AGS games. I'll have something to show soon. Perhaps by next weekend.
So perhaps having a game launcher will help this situation.
By the way, would anyone be interested in making or donating some 16x16 button glyphs for the followng buttons?
Play Game
Setup Game
Exit Launcher
Configure Launcher
Help Launcher
Cancel
Ok
Add Catagory
Remove Catagory
Or a 32x32 AGS Launcher Icon.
Stay tuned ...
Check your messages. ;)
Gilbert: good advice about running the setup - if you don't mind I'll add it to the knowledge base.
As for batch files - no, they don't work properly in Win2000 or XP. Under these operating systems, the current directory when a batch file starts running is set to the Windows directory, not the folder that the batch file is in.
This means it is impossible to make it run the accompanying executable, and is why I had to create the winsetup program instead.
Shortcuts always store the complete path to the file, so again they don't work if somebody else has the files in a different folder name. This is rather annoying I agree, but there we are.
Quote from: Pumaman on Tue 02/09/2003 19:26:07
Gilbert: good advice about running the setup - if you don't mind I'll add it to the knowledge base.
Yes whatever, but always emphasize that people ZIPping their own games
SHOULD ITFWS (Include The F... *ahem* WinSetup.exe) ;D