1 Howto add new game packs to the InstallShield setup
2 ---------------------------------------------------
6 The files that IS uses are pretty much all text files, in the template/ directory
7 we have a special copy of these files that make up the IS project.
9 The copy in the template/ directory has files which contain string like
10 <<GTK_DIR>> which are replaced with actual values whenever the setup.pl script
17 Disclaimer: I'm writing that as I am building the RTCW game pack. It is possible
18 that it is fairly outdated when you read it, but my guess is it can be a useful
20 Update: using this for JKII support, made sure everything is still valid
24 - Updating for Halflife build, added a bit more info in places.
26 NOTE: you need cygwin installed (http://www.cygwin.com) to run setup.pl tools
27 (Base installation + perl)
29 You also need UUIDGEN.exe in your path. It's normally in the
30 "Visual Studio .NET\Common7\Tools" directory
32 Some experience with IS and our particular way of handling it is expected.
33 The following information is DENSE, read everything
35 - select a base name for the pack (which we will use in various variables):
37 - make a RELEASE build of GtkRadiant.
38 - run setup.pl to generate the IS directories
39 e.g. ./setup.pl 'c:\\my documents\\Source\\GtkRadiant' q3.cf
40 (the directory contains GtkRadiant, Src, etc..)
41 - start WorkDir/GtkRadiant.ipr, this is an half-templated setup we can
42 easily work on to add new stuff
44 - go to file groups and start adding new groups:
46 will hold the editor modules and binaries (map compiler, bspc)
48 will hold sample files and editor files:
49 maps, models, additional textures, shader scripts, entities.def, project template
50 set the destination directory for those files:
52 goes in the game pack directory: DIR_GAMETOOLS_WOLF
54 goes straight into the Wolf path: DIR_GAME_WOLF
56 - start feeding stuff in those file groups
57 make sure all those files start from the prefix we are working with
58 (C:\home\Id in my case)
61 Wolf (Wolf Executable Files)
62 -- Wolf editing media (Wolf Media Files)
63 NOTE: make sure that you put the file groups in those components you created!
65 - go to add the pack to setup.rul:
68 NUMBER DO_GAME_WOLF_BOOL;
69 STRING szDIR_GAME_WOLF, szDIR_GAMETOOLS_WOLF;
72 define any strings you use, e.g. szJKII and DEFAULTJKIIDIR;
73 add template for wolf pack inclusion
74 DO_GAME_WOLF_BOOL = <<DO_GAME_WOLF_BOOL>>;
76 - copy 'game pack #1' code and paste is as a 'game pack #2'
77 start renaming the code and updating it
78 (use the registry key for default path lookup if possible)
79 Wolf setup doesn't leave an install path, we will hardcode to
80 C:\\Program Files\\Return To Castle Wolfenstein
81 and look for the binary
82 (note, this is by far the part with the most things to do,
83 read carefully the game pack code, replace everywhere it's needed,
84 put the right 'BACK' code etc.)
86 NOTE: the 'if (nResult = BACK) then' code gets more complicated as new packs are added
87 sadly, it's not possible to store labels into variables for jumps
88 the next 'nResult = BACK' in non-gamepack code needs to be updated too
90 - in Dlg_SdStartCopy, add summary for Wolf operations
91 if (DO_GAME_WOLF_BOOL == 1) then
92 ListAddString(listStartCopy,"Return To Castle Wolfenstein folder:",AFTER);
93 ListAddString(listStartCopy," " + szDIR_GAME_WOLF,AFTER);
94 ListAddString(listStartCopy,"Return To Castle Wolfenstein mapping package folder:",AFTER);
95 ListAddString(listStartCopy," " + szDIR_GAMETOOLS_WOLF,AFTER);
98 - in OnMoved, add generation of the game file for Wolf
99 if (DO_GAME_WOLF_BOOL == 1) then
100 if (CreateDir(TARGETDIR ^ "games")< 0) then
101 // Report the error; then abort.
102 MessageBox ("Unable to create directory " + TARGETDIR ^ "games", SEVERE);
105 if (CreateFile(nvFileHandle, TARGETDIR ^ "games", "wolf.game")< 0) then
107 MessageBox ("CreateFile " + TARGETDIR ^ "games" + "\\wolf.game failed.", SEVERE);
110 WriteLine(nvFileHandle, "<?xml version=\"1.0\" encoding=\"iso-8859-1\" standalone=\"yes\"?>");
111 WriteLine(nvFileHandle, "<!-- generated by Radiant setup, modify at your own risks -->");
112 WriteLine(nvFileHandle, "<game name=\"Return To Castle Wolfenstein\" gametools=\"" + szDIR_GAMETOOLS_WOLF + "/\"/>");
113 WriteLine(nvFileHandle, " gamename=\"wolf\"");
114 WriteLine(nvFileHandle, " enginename=\"quake3\"");
115 CloseFile(nvFileHandle);
118 - configure the setup so that the new components are installed by default:
119 in 'Setup Types' tab, check the new components
120 NOTE: do that in BOTH types, specially Custom
122 - once all those changes are done, we are gonna validate the update..
124 make a backup copy of setup/win32/WorkDir ($ cp -R WorkDir/ WorkDir-backup)
126 - templatize WorkDir/ with the setup.pl
127 $ ./setup.pl 'c:\\home\\Id' -template template-gen
128 Configured for base GtkRadiant directory: 'C:\\home\\Id'
129 Building a template version of WorkDir into template-gen/
132 Processing 'C:\\home\\Id' into '<<GTKRAD_DIR>>'
134 - check with a recursive diff that it's all good (Araxis Merge!)
135 Files template/Component Definitions/Default.cdf and template-gen/Component Definitions/Default.cdf differ
136 Files template/Component Definitions/Default.fgl and template-gen/Component Definitions/Default.fgl differ
137 Files template/File Groups/Default.fdf and template-gen/File Groups/Default.fdf differ
138 Files template/Script Files/Setup.rul and template-gen/Script Files/Setup.rul differ
139 Files template/Text Substitutions/Setup.tsb and template-gen/Text Substitutions/Setup.tsb differ
141 newly added, the file groups files
143 - copy over template-gen/ into template/
144 $ cp -R template-gen/* template/
146 - cvs update in the template dir, add new files etc.
150 - edit template/Component Definitions/Default.cdf in a text editor to configure the 'include in build' templates
151 search for [Wolf] and change the line:
154 INCLUDEINBUILD=<<DO_GAME_WOLF_BOOL_YESNO>>
156 search for [Wolf\Wolf Editing Media] and change the line:
159 INCLUDEINBUILD=<<DO_GAME_WOLF_BOOL_FULL_YESNO>>
161 that is, main is always installed, and the editing media only in full
162 NOTE: IS 6.0 has the nasty habit of changing order in Default.cdf on each save .. makes things harder
164 - edit 'sub configure_tree' in setup/win32/setup.pl:
165 copy from an existing game pack code and adapt
166 there's a general boolean, and a full setup boolean
167 (search and replace affects Setup.rul and Default.cdf)
169 add the corresponding items to
172 add a corresponding output string under
173 print " DO_CORE : $DO_CORE\n";
175 - search for '# set default config' and add the new default entry (default to 0)
176 as well as the verbosity below
178 - create a new .cf file
183 $SETUP_DIR = 'Setup-ET';
189 - build a new setup using a .cf file.
193 ./setup.pl 'C:\\home\\Id' wolf.cf
195 - load up Setup-Wolf/GtkRadiant.ipl into IS and build it!