Set spstart to a stringpoint before character 1 of saveFile's pcPath.
Set spend to a stringpoint after character (saveFile's p3's pcPathLen) of saveFile's pcPath.
Make pcPath. Set it to the string between spstart and spend.
trace_print_concatenation {"pcPath = ", pcPath}.
Wait until the next cycle.
// Ari: We can hard code the volume name.
Call "pyramid1" the_volume.
// Ari: We ensure that the necessary volume is mounted.
If the volume the_volume is not mounted,
Call a picture of SUPPORT\CMN\CONSOLE\INSERT1.CMP at 150,330 the_picture.
Append the_picture to the_screen.
Wait until the volume the_volume is mounted.
Detach the_picture.
Wait until the next cycle.
// Ari: We set these weird Mac constructs, knowing that they won't be saved to the INI.
Set CD root to volume the_volume.
Set HD root to volume macVol.
// tylor: show the cursor again
In the_screen,
Make _cursor. Set it to a picture of SUPPORT\CMN\CONSOLE\NW.CMP at 320,240.
Control _cursor with the mouse.
Wait until the next cycle.
If (the free disk space on $PRODUCTHDROOT\) is less than (15 * 1024 * 1024),
Call a picture of SUPPORT\CMN\CONSOLE\BLANKBOX.CMP at 320,240 the_picture.
In the_picture,
Make _text. Set it to stringbox(SUPPORT\CMN\CONSOLE\SETPSPAC.TXT, the_pen, 20,80, (the_picture's size's x - 20 pixels),(the_picture's size's y - 20 pixels)).
In _text,
Set backgroundcolor to transparent.
Set palette to the_picture's bitmap's palette.
Make _ok_box. Set it to stringbox(SUPPORT\CMN\CONSOLE\OKAY.TXT, the_pen, 20,20, (the_picture's size's x - 20 pixels),(50 pixels)).
In _ok_box,
Set backgroundcolor to transparent.
//Call (a copy of the_pen) the_blue_pen.
//Set the_blue_pen's color to blue.
//Set _ok_box's pen to the_blue_pen.
Set palette to the_picture's bitmap's palette.
Make _response. Set it to a null.
When the left mousebutton is pressed,
Set _response to true.
Append the_picture to the_screen.
Wait until the_picture's _response is not a null.
Detach the_picture.
Otherwise,
Fade the_screen's _splash to 70 percent black in .5 seconds.
Call a picture of SUPPORT\CMN\CONSOLE\BLANKBOX.CMP at 320,240 the_picture.
In the_picture,
Make _text. Set it to stringbox(SUPPORT\CMN\CONSOLE\PLESWAIT.TXT, the_pen, 20,80, (the_picture's size's x - 20 pixels),(the_picture's size's y - 20 pixels)).
In _text,
Set backgroundcolor to transparent.
//trace_print the_picture.
//trace_print palette(the_picture).
//trace_print palette.
Set palette to the_picture's bitmap's palette.
Append the_picture to the_screen.
// Tylor: want to get rid of the cursor picture during the copy process
Hide the_screen's _cursor.
Wait until the next cycle.
Make hdRootPath. Set it to concatenation {"$productHDroot", pcPath, "\\"}.
// Tylor: adding thingee to check install time
Call now the_start_time.
// Ari: We copy the install directory - given that the copy is not recursive, we may need to go in and copy some other stuff by hand.
//copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\CURRENT" to hdRootPath.
// Rename installed folder to preserve case sensitivity
Make a library named renameLib of "rename".
Make a libFunction named rename of "rename" from renameLib.
In rename,
Make oldPath. Set it to macPath.
Make newName. Set it to oldPath.
Call rename.
Append ":" to macPath.
copy Macintosh file "pyramid1:support:mac:pyramid" to macPath.
copy Macintosh file "pyramid1:support:mac:cmdline.txt" to macPath.
copy Macintosh file "pyramid1:support:mac:default.ini" to macPath.
copy Macintosh file "pyramid1:support:mac:override.res" to macPath.
copy Macintosh file "pyramid1:support:mac:cdswap" to macPath.
copy Macintosh file "pyramid1:support:mac:apppath" to macPath.
copy bale "$PRODUCTCDROOT\\SUPPORT\\CMN\\CONSOLE" to hdRootPath.
copy bale "$PRODUCTCDROOT\\SUPPORT\\CMN\\JOURNAL" to hdRootPath.
copy bale "$PRODUCTCDROOT\\SUPPORT\\CMN\\MSG" to hdRootPath.
copy bale "$PRODUCTCDROOT\\SUPPORT\\CMN\\MUSIC" to hdRootPath.
copy bale "$PRODUCTCDROOT\\SUPPORT\\CMN\\NEW" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\START.DAC" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\START.DNA" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\START.DNF" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\START.INF" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\START.PAC" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\STATM.DAT" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\VALULIST.DAT" to hdRootPath.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\CURRENT\\" to concatenation {hdRootPath, "CURRENT\\"}.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\GAME1\\" to concatenation {hdRootPath, "GAME1\\"}.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\GAME2\\" to concatenation {hdRootPath, "GAME2\\"}.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\GAME3\\" to concatenation {hdRootPath, "GAME3\\"}.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\GAME4\\" to concatenation {hdRootPath, "GAME4\\"}.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\GAME5\\" to concatenation {hdRootPath, "GAME5\\"}.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\GAME6\\" to concatenation {hdRootPath, "GAME6\\"}.
copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\GAME7\\" to concatenation {hdRootPath, "GAME7\\"}.
//Tylor: time stuff
trace_print_concatenation{"Time to copy files: ", now - the_start_time}.
Set the_start_time to now.
// Ari: We setup the INI correctly.
Set currentinisection to an inisection of "MAIN" from file "PYRAMID.INI".
trace_print currentinisection.
Set currentinisection's MACPATH to macPath.
Set currentinisection's MACVOL to macVol.
Set currentinisection's PCPATH to pcPath.
Set currentinisection's COMMON to concatenation {"$PRODUCTHDROOT", pcPath}.
Set currentinisection's CONSOLE to concatenation {"$PRODUCTHDROOT", pcPath, "\\CONSOLE"}.
Set currentinisection's CURRENT to concatenation {"$PRODUCTHDROOT", pcPath, "\\CURRENT"}.
Set currentinisection's JOURNAL to concatenation {"$PRODUCTHDROOT", pcPath, "\\JOURNAL"}.
Set currentinisection's MUSIC to concatenation {"$PRODUCTHDROOT", pcPath, "\\MUSIC"}.
Set currentinisection's NEW to concatenation {"$PRODUCTHDROOT", pcPath, "\\NEW"}.
Set currentinisection's VOLUME1 to "PYRAMID1".
Set currentinisection's VOLUME2 to "PYRAMID2".
Set currentinisection's GAME1 to "*PYRAMID1:\\GAME".
Set currentinisection's GAME2 to "*PYRAMID2:\\GAME".
Set currentinisection's TuneFileExtension to ".MGM".
Set currentinisection's allowTrueColorMode to "false".
Set currentinisection's borderColor to "0,0,0".
Set currentinisection's displaySoundErrors to "No".
Set currentinisection's DontNeedQuickTime to "Yes".
Set currentinisection's hideWaitCursor to "yes".
Set currentinisection's kidProof to "yes".
Set currentinisection's LANG to "ENG".
Set currentinisection's MaxCacheSize to "5".
Set currentinisection's MEM_CACHE to "2750".
Set currentinisection's MEM_POOL to "1000".
Set currentinisection's TUNE_ACTIVE to "NO".
Set currentinisection's wantTrueColorMode to "false".
Set currentinisection's WAITINTERVAL to "1500".
Set currentinisection's ILVBS to "320".
// Tylor: time info
trace_print_concatenation {"Time to write to INI: ", now - the_start_time}.
Detach the_picture.
Wait until the next cycle.
// Open the mac folder it was installed to
Append "Pyramid" to macPath.
Call macPath the_macpath.
Make a library named openFldrLib of "openFldr".
Make a libFunction named openFldr of "openFldr" from openFldrLib.
In openFldr,
Make macPath. Set it to the_macpath.
Call openFldr.
Fade the_screen from 70 percent to 100 percent black in .5 seconds.