38.107.191.97
Hokay, you done your track, and ready to let it loose on the unsuspecting racers of Nascar Racing Season 2003.
You've seen the releases by PWF (Even the Beta ones) and want to get as a professional install without it costing the earth??
Well now you can!!
To start with, you're going to have to download some stuff.
Inno Setup which will actually create the executable file.
ISTool which can make the creation a little easier.
Now you've got these files, install Inno Setup and ISTool, in that order.
Run ISTool, click on File -> Preferences to open the Preferences dialog. In here click on the "Associate ISTool with Inno Setup scripts".
This will mean that when you double click on an iss file, this program will run. (Makes things a tad easier. :-) )
Open up the iss template and save it to your track source directory.
(I usually develop out of the Nascar directory, then create my distro and install it each time to test it. Doesn't take that long, pretty automated, and makes sure you have a working distro each step of your track creation process.)
In the template, there is very little that needs altering. You can edit the script directly, or use the point and click approach in each section. We'll start using the Script section to edit some stuff at the start.
The script section should already be selected, and you should see something like this....
I've only shown the setup section here. In this section, change the App bits to reflect your track and website (if applicable), change the LicenseFile and InfoAfterFile to whatever yours are (If there aren't any, delete em!) and the OutputBaseFilename to whatever you want your executable to be (Don't put the .exe after it)
The script will try to get the Nascar installation directory from the registry (the DefaultDirName directive). At the moment it looks in the Local Machine section. If anyone knows any different let me know. The destination directory is selectable by the end user anyways, so if it's not there, it's not the end of the world.
For the Files section, this bit is probably gonna be easier in the Script section. Click on Edit -> Replace (or Ctrl+H) and type in brooklands_outer in the Find What box. In the Replace With, put the directory name for your track to go in. Replace all the occurrences in the [Files ] section. You will notice at the end there is an [_ISToolPreCompile] section, I'll explain about this later.
Most of the files that you need are in the Files section already. You can delete any extras I have there, but you will need to add your track.dat and your track.cam files. You can copy an existing line and edit it appropriately.
DO NOT edit anything in the code section. This is the clever bit that only allows you to install the track in the Nascar folder (ie where NR2003.exe is).
In here I get the program to run a batch file that creates my .dat file. I'm a lazy git, so I'll do anything to make my life easier. For this to work you need to have the sandbox directory (with all the program in) in your system's PATH directive. (If you need help with this, I'm sure someone can point you in the right direction for this).
The contents of the batch file is one line:-
mklib yourtrack.def
OK, so I lied about the PATH above. You can put the full path to the mklib program in there, but you'll have to put quotes round it if the path has spaces in it. Example:-
"C:\Program Files\Sandbox\mklib.exe" yourtrack.def
If you use another method to pack your dat files, as long as it supports command line arguments, you could change the batch file, or the pre-compile steps to suit.
As you can see, I've named mine dodat.bat. An inspired name I know. :-)
Once you have that, you can either double click the existing under Pre Compilation Steps, or edit the entry under [_ISToolPreCompile] to where your batch file is.
Hokay, now you have that, you should now have a working script that will create a working install. (assuming we've both not done something wrong. :-) )
Click on the Compile Setup button
to compile your setup. It will create your dat file for you, then the setup program. If Test Compiled Setup was checked in the Preferences dialog, you will be asked if you want to test it. If you haven't, then click on the Run Setup button
.
There you go, you should now have a self installing track.
This is only just a taster on the programs. Go on, experiment, try a few things. (like under Appearance under Options, you can change the images used during install)
And those of you who write programs for distribution, an easy, free, and pretty much customisable install system.