Running game from CD/DVD

Started by gabrielsab, Tue 27/02/2007 11:11:13

Previous topic - Next topic

gabrielsab

Hi all, I made another post about running my game from a dvd
with an error of :

"unable to write to the current directory. do not run this game off a network or cd rom drive. also check drive free space (you need 1mb free)."

I was told to edit the acsetup.cfg file to include the variable "datadir" to tell where the path of the files are on the dvd. I dont know how to do this to include all possable dvd drive letters as it is the "F" drive on my pc but on my mums its drive "D" I need to know how to script this.

This is what is in the acsetup.cfg file at the moment.

[sound]
digiid=-1
midiid=-1
digiwin=1096302880
midiwin=-1
digiindx=0
midiindx=0
digiwinindx=0
midiwinindx=0
usevox=0
[misc]
gamecolordepth=32
defaultres=5
screenres=1
letterbox=0
windowed=0
refresh=85
cachemax=20480

Im going to be running the game from the dvd as it has alot of avi files about 3.6 gig worth.

Thanks Shaun.

GarageGothic

I'm not sure it's even possible to run an AGS game from a non-writable media. You can use Game.SetSaveGameDirectory("$MYDOCS$/Name of your savegame folder") in your game script to allow the game to save to the harddrive instead of trying to write to the DVD. However, the game setup still needs to be able to write to the .cfg file if you change any settings, and I *think* that has to be placed in the same dir as the .exe file.

Ashen

You can't play the game from non-writable media - that's what the error means - but you can run the game off you HD and have the bulk of the data on CD or DVD.

This should probably have gone in the other thread, rather than starting a new one for an extenstion of the same question. (Although, this part probably doesn't belong in Beginners Tech, so I'd likely have moved it over anyway...)

If it's only going to be used on one or two computers, you can probably just edit acsetup.cfg for them as needed (as GG said, it'll need to be on the HD, along with the game EXE). If you're looking to distribute it to a lot of people, you'll probably need to look into some sort of installer program, that can make the changes automatically. I think innosetup can do that, but I'm not sure - Google or a forum search might be more help.
I know what you're thinking ... Don't think that.

strazer

Yes, please don't open two threads about the same problem. Your thread will get moved to the appropriate forum if needed. Also, use more descriptive subject lines next time.

As for your problem, I also think an installer that puts the exe and cfg to the hard drive and adds the correct datadir line to acsetup.cfg is your best bet.

Da_Elf

#4
yup. some games ask you when installing if you want to load minimum, or maximum data (meaning all the avi's for cut scenes) onto the hard drive. when i finish my asterix game id love to work with a group to do a larger game with lots of cut scenes and animated elements in the game. the game should be huge in itself so i was wondering since there is the option to split the game up into smaller pieces, can you keep most of the pieces also on a cd and only install the 1st exe piece to the hard drive?

GarageGothic

Be aware that running directly off discs doesn't work as well anymore as it used to back in the mid-nineties. Today's drives are much faster in reading - BUT, for that reason they also take longer to "spin up" (accellerate from standstill to reading speed). If your game frequently reads data off disc (such as in FMV games), this could make the game feel rather choppy and a full install would be preferable. If it's only a once-in-a-while thing (a cutscene every five minutes), it shouldn't be a problem.

gabrielsab

If using an installer program to copy the exe file, cfg file and the setup file to a hard drive will work ie being able to run the avi files (some 3.2 gig of them) from the dvd I would love to know how and what program best dose this if someone would point me in the right direction that explains this ide apreciate it.

Thanks
Shaun.


gabrielsab

Hi all I have tried to install and use install creator but it dosnt support an install to read from the installed files that go onto the hard drive and read the files when needed from the dvd..... unless I buy the full program but on their forum they said to just use ags and script it but im still at a dead end to how to do this.

What can I do for this?

Thanks
Shaun.

strazer

Quote from: gabrielsab on Thu 08/03/2007 14:13:49it dosnt support an install to read from the installed files that go onto the hard drive and read the files when needed from the dvd

I don't think I understand. Could you rephrase that?

To be clear, the function to read game data off the disc drive is a function of AGS (datadir).
All the installer has to do is put the game exe and cfg onto the hard drive and then modify the acsetup.cfg, adding the datadir parameter. I can't imagine an installer program wouldn't be able to do this.

gabrielsab

To strazer, you hit the nail on the head I have tried one install creator program but it didnt have this feature and another program made one single file that installs all the files but im trying to avoid this type of install. Another program called Tarma Installer might do what I need but they ask me to buy a registration fee or the installed game will not work after 8 hours and im not going to fork out $280 to do this. Dose anyone know of a free program that will install the 3 files and link the rest of the avi's to the dvd im using? Or by using the function datadir in AGS can someone please tell me how to script it to read the avi files from any dvd rom drive. I might have to stear clear of an installer program and just use the datadir function and manualy install the three files that will then read from the dvd. Once again how do I do this? Thanks Shaun.

Da_Elf

problem is that with that link you sent that it says you have to specify the folder where the data can be found. what if your cd rom is drive E but someone elses is drive D?

GarageGothic

#12
InnoSetup should be perfectly capable of making those changes to the .cfg file.

Edit: A small addition. The function I was thinking of in InnoSetup is made for editing .ini files, but I don't see why it should't be able to add a line to the .cfg if you input the right filename.

gabrielsab

I dont realy know what your talking about GarageGothic could you please tell me who or where to surf to that explains all this in laymans terms or someone that can help me from start to finish?

Thanks
Shaun.

GarageGothic

#14
Well, I would recommend downloading InnoSetup and reading the documentation for the program. When you create an installer with InnoSetup, the actions performed by the installer is determined by a script file. Most actions are set up for you by the wizard, so you normally don't have to edit the script manually. But if you want to use special functions, like this one, you must add them by hand before compiling the installer.

Look up "INI" in the index of the InnoSetup help file for more info. I'm guessing it should be something like:
Quote
[INI]
Filename: "{app}\acsetup.cfg"; Section: "misc"; Key: "datadir"; String: "{drive:{src}}"

I'm not sure that the String value at the end is correct (I *think* it should add the drive letter for the cd drive you install from), if not, you'll have to play around with it a bit and check the help file for other possible parameters.

gabrielsab

Thanks GarageGothic what you said did the trick, thanks everyone else too.

Regards
Shaun. 8)

GarageGothic

Awesome that it worked without further changes. Glad to be of service.

Rui 'Trovatore' Pires

I once got KQ2VGA to run off a CD, totally. All I installed on my hard drive was the acwin.exe interpreter, winsetup.exe and acsetup.cfg.

Wish I could remember the settings. It made for a nice "Minimal (just the engine) / Medium (just the exe and assorted game.00? files) / Maximum (whole thing)" option at instalation.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk