home *** CD-ROM | disk | FTP | other *** search
- // setup.ace: Macintosh setup program. Stolen shamelessly from Pyramid
- // and hacked up to use on MovieMaker by Jim Winstead Jr.
-
- Set the window title to a string from title.txt.
-
- Set currentIniSection's fileName to "DCSETUP.INI".
- Set currentIniSection's sectionName to "MAIN".
-
- Make the_product.
- Make the_product's debug_print. Set it to true.
- If currentIniSection's debug_print alphabetically equals "yes",
- Set the_product's debug_print to true.
-
- Call (a black screen) the_screen.
- In the_screen,
- Record that this screen is faded.
- Make a picture named bg of bg.cmp at 320,240 sized 640,480.
- Make a picture named hack of hack.cmp at 320,240 sized 32,32.
- Make a picture of cursor.cmp at 320,240.
- Control it with the mouse.
- Control it with the keyboard.
-
- When displayed,
- Fade this screen to black.
- Wait until the next cycle.
- Fade this screen from black in 0.7 sec.
- Record that this screen is not faded.
-
- Display the_screen.
-
- Wait until the_screen is not faded.
-
- refer to i:\mm\build\lib\refer.ace.
- refer to i:\mm\build\lib\dprint.ace.
- refer to i:\mm\build\lib\strings.ace.
- refer to i:\mm\build\lib\math.ace.
-
- Make install_qstn. Set it to a string from question.txt.
- Make default_name. Set it to a string from defname.txt.
-
- Make a library named SaveLib of "SaveFile".
- Make a libFunction named saveFile of "SaveFile" from SaveLib.
- In saveFile,
- Make prompt. Set it to install_qstn.
- Make defName. Set it to default_name.
- Make macPath. Set it to a fixedString with length 255.
- Make p1. Set it to a list. In it,
- Make macPathLen. Set it to 0.
- Make macVol. Set it to a fixedString with length 32.
- Make p2. Set it to a list. In it,
- Make macVolLen. Set it to 0.
- Make pcPath. Set it to a fixedString with length 255.
- Make p3. Set it to a list. In it,
- Make pcPathLen. Set it to 0.
- Call saveFile.
-
- // only do all of this if the user actually chose a directory
- If saveFile's result != 0,
-
- // either wait a cycle for the screen to refresh or the program to really exit
- Wait until the next cycle.
-
- // create new strings for the volumes and paths that don't have the padding of the fixed strings.
- Make spstart. Set it to a stringpoint before character 1 of saveFile's macVol.
- Make spend. Set it to a stringpoint after character (saveFile's p2's macVolLen) of saveFile's macVol.
- Make macVol. Set it to the string between spstart and spend.
- dprint concatenation {"macVol = ", macVol}.
-
- Set spstart to a stringpoint before character 1 of saveFile's macPath.
- Set spend to a stringpoint after character (saveFile's p1's macPathLen) of saveFile's macPath.
- Make macPath. Set it to the string between spstart and spend.
- dprint concatenation {"macPath = ", macPath}.
-
- 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.
- dprint concatenation {"pcPath = ", pcPath}.
-
- // volume name is hard-coded
- Call "DC1" the_volume.
-
- [
- // make sure that the volume is mounted
- // uh, it must be mounted or something strange is happening
- If the volume the_volume is not mounted,
- // should put up pretty graphic
- While the volume the_volume is not mounted,
- Print concatenation {"Please insert the volume \"", the_volume, "\"."}.
- Wait for 1 second.
- // should take down pretty graphic
- ]
-
- // 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.
-
- Make hdRootPath. Set it to concatenation {"$productHDroot", pcPath, "\\"}.
-
- Fade the_screen's bg to 60 percent black in 0.3 sec.
-
- If the free disk space on $producthdroot\ < 15 * 1024 * 1024,
- In the_screen,
- Make a picture of diskspc.cmp at 320,240 sized 320,240.
- Set it's bitmap's palette to hack's bitmap's palette.
- Wait until the next cycle.
-
- When downClicked,
- End this program.
- Wait until the next cycle.
-
- In the_screen,
- Make a picture named please_wait of plswait.cmp at 320,240 sized 320,240.
- Set it's bitmap's palette to hack's bitmap's palette.
- Wait until the next cycle.
-
- // we just do this so that the directory gets created (argh)
- Copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\SAVE" to hdRootPath.
-
- // rename the directory to exactly what the user specified (lower-case and all)
- 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 macPath.
- Call rename.
- // don't care if it fails.
-
- // copy the runner and the other mac files to the chosen directory
- Append ":" to macPath.
- Copy macintosh file "dc1:support:mac:Director's Chair" to concatenation {macPath, "Director's Chair"}.
- Copy macintosh file "dc1:support:mac:Director's Chair User's Guide" to concatenation {macPath, "Director's Chair User's Guide"}.
- Copy macintosh file "dc1:support:mac:override.res" to macPath.
- Copy macintosh file "dc1:support:mac:cmdline.txt" to macPath.
- Copy macintosh file "dc1:support:mac:SaveFile" to macPath.
- Copy macintosh file "dc1:support:mac:OpenFile" to macPath.
- Copy macintosh file "dc1:support:mac:CDSwap" to macPath.
-
- // copy the code
- Copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\START.PAC" to hdRootPath.
- Copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\START.INF" 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 the place holders to make sure the save and render directories are installed
- Copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\SAVE" to concatenation {hdRootPath, "SAVE\\"}.
- Copy file "$PRODUCTCDROOT\\SUPPORT\\CMN\\RENDER" to concatenation {hdRootPath, "RENDER\\"}.
-
- In rename,
- Set oldPath to concatenation {macPath, "SAVE"}.
- Set newName to concatenation {macPath, "Save"}.
- Call rename.
-
- In rename,
- Set oldPath to concatenation {macPath, "RENDER"}.
- Set newName to concatenation {macPath, "Render"}.
- Call rename.
-
- Copy bale "$PRODUCTCDROOT\\SUPPORT\\CMN\\GUIDE" to hdRootPath.
-
- // copy the shared bale. this is the bulk of what we install
- Copy bale "$PRODUCTCDROOT\\SUPPORT\\CMN\\SHARED" to hdRootPath.
-
- // set up the ini file
- Set currentinisection to an inisection of "MAIN" from file "DC.INI".
-
- // store the ugly mac constructs
- Set currentinisection's MACVOL to macVol.
- //no reason to save these that I can see
- // Set currentinisection's MACPATH to macPath.
- // Set currentinisection's PCPATH to pcPath.
-
- // set up paths
- Set currentinisection's HDROOT to concatenation {"$PRODUCTHDROOT", pcPath}.
- Set currentinisection's SHARED to concatenation {"$PRODUCTHDROOT", pcPath, "\\SHARED"}.
- Set currentinisection's SAVE to concatenation {"$PRODUCTHDROOT", pcPath, "\\SAVE"}.
- Set currentinisection's RENDER to concatenation {"$PRODUCTHDROOT", pcPath, "\\RENDER"}.
- Set currentinisection's SFX to concatenation {"$PRODUCTHDROOT", pcPath, "\\SFX"}.
- Set currentinisection's MFX to concatenation {"$PRODUCTHDROOT", pcPath, "\\MFX"}.
- Set currentinisection's DISK1 to "$PRODUCTCDROOT".
- Set currentinisection's DISK2 to "$PRODUCTCDROOT".
- Set currentinisection's DISK3 to "$PRODUCTCDROOT".
-
- Set currentinisection's VOLUME1 to "DC1".
- Set currentinisection's VOLUME2 to "DC2".
- Set currentinisection's VOLUME3 to "DC3".
-
- Set currentinisection's CODE to "DC1.0".
-
- Set currentinisection's allowTrueColorMode to "false".
- Set currentinisection's wantTrueColorMode to "false".
- Set currentinisection's kidProof to "yes".
- Set currentinisection's borderColor to "0,0,0".
-
- Set currentinisection's MaxCacheSize to "5".
-
- // hide and lock many of the files we just installed
-
- Make a library named hideLockLib of "HideLock".
- Make a libFunction named hideLock of "HideLock" from hideLockLib.
- Record that hideLock is longOnResult.
- In hideLock,
- Make p1. Set it to "".
-
- [ Note the values to be passed to the next 2 parameters are:
- +1 to hide or lock
- 0 to leave unchanged
- -1 to unhide or unlock
-
- Hide refers to the icon's visibility in the Finder.
- NameLock controls whether the user can rename this file.
- It's a good idea to NameLock all files that we look for by
- name.
- ]
-
- Make doHide. Set it to 1.
- Make doNameLock. Set it to 1.
-
- In hideLock,
- Set p1 to concatenation {macPath, "CMDLINE.TXT"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "override.res"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "PLCHLDR.TXT"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "SHARED"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "GUIDE"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "START.PAC"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "START.INF"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "START.DNF"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "START.DAC"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "START.DNA"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "OpenFile"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "SaveFile"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "CDSwap"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "Save"}.
- Call hideLock.
-
- In hideLock,
- Set p1 to concatenation {macPath, "Render"}.
- Call hideLock.
-
- // we only lock the name of the executables, we don't hide them!
- In hideLock,
- Set doHide to 0.
- Set p1 to concatenation {macPath, "Director's Chair"}.
- Call hideLock.
-
- In hideLock,
- Set doHide to 0.
- Set p1 to concatenation {macPath, "Director's Chair User's Guide"}.
- Call hideLock.
-
- Detach the_screen's please_wait.
-
- Make the_screen's finish. Set it to a picture of finish.cmp at 320,240 sized 320,240.
- Set it's bitmap's palette to the_screen's hack's bitmap's palette.
- Wait until the next cycle.
-
- In the_screen,
- Make the_mac_path. Set it to macPath.
-
- When downClicked,
- Make a library named openFldrLib of "openFldr".
- Make a libFunction named openFldr of "openFldr" from openFldrLib.
- In openFldr,
- Make macPath. Set it to concatenation {the_mac_path, "Director's Chair"}.
- Call openFldr.
-
- Fade this screen to black in 0.7 sec.
- End this program.
-
-