home *** CD-ROM | disk | FTP | other *** search
-
- A fileCopier is a kind of xyobject which has:
-
- A way to get a fileCopier of a number 'n' files from an xynumber 'a' to an xynumber 'b',
-
- Make new. Set it to an xyobject from a to b.
- Make it into a fileCopier.
- In new,
- Make count. Set it to 0.
- Make total. Set it to n.
- Make progressBar. Set it to a black rectangle with blue border from 0,0 to size.
- In it,
- Make projector. Set it to a transparent rectangle with blue border from 0,0 to 0,(size's y).
- Make progress. Set it to a blue rectangle from 0,0 to 0,(size's y).
-
- When downclicked,
- End this program.
-
- Detach it. Return it.
-
- A way to display message a string 's' in it,
- Do nothing.
-
- A way to copy file a string 'a' to a string 'b' in it,
-
- Call it f.
- Project 1 to progress in f.
- copy file a to b.
- Add 1 to progress in f.
-
- A way to copy bale a string 'a' to a string 'b' in it,
-
- Call it f.
- Project 1 to progress in f.
- copy bale a to b.
- Add 1 to progress in f.
-
- A way to copy macintosh file a string 'a' to a string 'b' in it,
-
- Call it f.
- Project 1 to progress in f.
- copy macintosh file a to b.
- Add 1 to progress in f.
-
- A way to copy file a string 'a' to a string 'b' in it with a number 'n',
-
- Call it f.
- Project n to progress in f.
- copy file a to b.
- Add n to progress in f.
-
- A way to copy bale a string 'a' to a string 'b' in it with a number 'n',
-
- Call it f.
- Project n to progress in f.
- copy bale a to b.
- Add n to progress in f.
-
- A way to copy macintosh file a string 'a' to a string 'b' in it with a number 'n',
-
- Call it f.
- Project n to progress in f.
- copy macintosh file a to b.
- Add n to progress in f.
-
- A way to project a number 'n' to progress in it,
-
- Call it f.
- f's count += n.
- Set f's progressBar's projector's end's x to (((f's count) / (f's total)) *
- f's progressBar's size's x).
- Wait until the next cycle.
-
- A way to add a number 'n' to progress in it,
-
- Call it f.
- Set f's progressBar's progress's end's x to (((f's count) / (f's total)) *
- f's progressBar's size's x).
- Wait until the next cycle.
-
- To remove the last character from a string 's',
- Detach s's character # (the number of characters in s).
-
- To get a string 's' from the CD,
- Make t. Set it to the application path.
- Append s to t.
- log t.
- Return t.
-
- To get a string 's' from the mac CD,
- Make t. Set it to the application mac path.
- Append s to t.
- log t.
- Return t.
-
- To get cat string1 and string2,
- Make s. set it to string1.
- append string2 to s.
- Return s.
-
- To get cat string1 and number1,
- Make s. set it to string1.
- print number1 to string1.
- Return s.
-
- To get the install volume,
- Make p. Set it to the application mac path.
- Make v. Set it to "".
- Make colon. Set it to ":".
- For each character 'c' in p,
- If c = colon's character,
- End this loop.
- Otherwise,
- Append c to v.
- log cat "volume: " and v.
- Return v.
-
- Record that system is not logpaused.
-
- A logwindow is a kind of stringbox which has:
-
- A way to get a logwindow of a string 's' using a pen 'p' from an xynumber 'a' to an xynumber 'b',
-
- Make a stringbox of s using p from a to b.
- Make it into a logwindow. In it,
- Make buffer. Set it to s.
- Set its backgroundcolor to p's backgroundcolor.
- Detach it. Return it.
-
- A way to log a string 's' in it,
-
- Append "<p>" to its buffer.
- Append s to its buffer.
- Set its beginning to the beginning of its buffer.
- Record that system is not ready.
- If system is logpaused,
- Wait until system is ready.
-
- A way to log a string 's',
-
- Log s in mainscreen's logwindow.
-
- A way to log a number 'n',
-
- Make s. Set it to "".
- Print n to s.
- Log s.
-
- A way to enable logging,
-
- Show mainScreen's logwindow.
-
- A way to disable logging,
-
- Hide mainScreen's logwindow.
-
- Make whitePen. Set it to a pen of DOMCAS12.FNT with white on transparent.
- In it,
- Set leftmargin to 5.
- Set rightmargin to 5.
- Set paragraphIndent to 0.
- Record that it is centered.
-
- Make BlackPen. Set it to a pen of DOMCAS12.FNT with black on white.
- In it,
- Set leftmargin to 5.
- Set rightmargin to 5.
- Set paragraphIndent to 0.
-
- Set the window title to "Installing Knowledge Land".
- Make system's mainScreen. Set it to a screen.
- In it,
- Make background. Set it to a picture of SI_BACK.CMP from 0,0 to 640,480.
- Make a logwindow of "" using blackPen from 0,30 to 640,480.
- Make cursor. Set it to a picture of ART\HAND.CMP at 320,240.
- Control cursor with the mouse.
- When keyed,
- If the key is the escape key,
- End this program.
- If the key is the F2 key,
- Record that system is ready.
- If the key is the F9 key,
- If mainScreen's logwindow is visible,
- disable logging.
- Otherwise,
- enable logging.
- If the key is the F10 key,
- If system is logpaused,
- Record that system is not logpaused.
- Otherwise,
- Record that system is logpaused.
- Display it.
- disable logging.
-
- Wait until the next cycle.
- // Record that system is not ready.
-
- Log "Hit F2 to continue".
-
- // Wait until system is ready.
-
- Log "Bringing up save dialog.".
-
- // Ari: We bring up the save file dialog in order to determine where to install the product.
- Make a library named SaveLib of "SaveFile".
- Make a libFunction named saveFile of "SaveFile" from SaveLib.
- In saveFile,
- Make prompt. Set it to "Where would you like to install Knowledge Land?".
- Make defName. Set it to "KnowledgeLand".
- 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.
-
- If saveFile's result equals 1, // didn't cancel
- In mainScreen,
- Make progressBox. Set it to a fileCopier of 60 files from 0,0 to 640,28.
- Make a stringbox of "Please wait, or hit ESC to cancel." using whitePen from 0,0 to 640,28.
- Set its backgroundcolor to whitePen's backgroundcolor.
-
- 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.
-
- // trace_print_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.
-
- // trace_print_concatenation {"macPath = ", macPath}.
- log cat "mac path: " and 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.
-
- // trace_print_concatenation {"pcPath = ", pcPath}.
- log cat "pc path: " and pcpath.
-
- Wait until the next cycle.
-
- //Call "KnowledgeLand" the_volume.
- Make the_volume. Set it to the install volume.
-
- // Ari: We ensure that the necessary volume is mounted.
- If the volume the_volume is not mounted,
- Display message "Knowledge Land is not mounted!" in mainScreen's progressBox.
- Wait until the volume the_volume is mounted.
-
- Log cat "Mac volume: " and macVol.
-
- // 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.
-
- Make macHDRoot. Set it to the drive of volume macvol. Append "\\" to it.
- [
- Make cdvol. Set it to the volume of drive the_volume.
- Make hdvol. Set it to the volume of drive macVol.
-
- log cdvol.
- log hdvol.
- ]
-
- // tylor: show the cursor again
- log "free space?".
- log the free disk space on macHDRoot.
- If (the free disk space on macHDRoot) is less than (25 * 1024 * 1024),
- log "Not enough free space on volume!".
- Otherwise,
- Make hdRootPath. Set it to "$PRODUCTHDROOT".
- Append pcPath to it.
- Append "\\" to it.
-
- log hdRootPath.
- //Make hdRootPath. Set it to the application path.
- //log hdRootPath.
-
- //Make hdAcePath. Set it to hdRootPath.
- //Append "ACE\\" To it.
-
- // Tylor: adding thingee to check install time
- Call now the_start_time.
-
- copy file "SUPPORT\\MAC\\ACE" from the CD to hdRootPath in mainScreen's progressBox.
-
- copy file "SUPPORT\\CMN\\COM\\" from the CD to cat hdRootPath and "COM\\" in mainScreen's progressBox with 3.
- copy file "SUPPORT\\CMN\\LIB\\" from the CD to cat hdRootPath and "LIB\\" in mainScreen's progressBox with 6.
- copy file "SUPPORT\\CMN\\LEX\\" from the CD to cat hdRootPath and "LEX\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\LEX\\PC\\" from the CD to cat hdRootPath and "LEX\\PC\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\LEX\\MAC\\" from the CD to cat hdRootPath and "LEX\\MAC\\" in mainScreen's progressBox.
- copy bale "SUPPORT\\OPT\\FMAV0001" from the CD to hdRootPath in mainScreen's progressBox with 19.
-
- copy file "SUPPORT\\CMN\\MOD\\" from the CD to cat hdRootPath and "MOD\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\MAIN\\" from the CD to cat hdRootPath and "MOD\\MAIN\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\LOGIN\\" from the CD to cat hdRootPath and "MOD\\LOGIN\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\PROFILE\\" from the CD to cat hdRootPath and "MOD\\PROFILE\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\HAND\\" from the CD to cat hdRootPath and "MOD\\HAND\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\AVATAR\\" from the CD to cat hdRootPath and "MOD\\AVATAR\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\TRADE\\" from the CD to cat hdRootPath and "MOD\\TRADE\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\SCRAP\\" from the CD to cat hdRootPath and "MOD\\SCRAP\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\MOD\\INTRO\\" from the CD to cat hdRootPath and "MOD\\INTRO\\" in mainScreen's progressBox.
-
- copy file "SUPPORT\\CMN\\FMD01ENG\\" from the CD to cat hdRootPath and "FMD01ENG\\" in mainScreen's progressBox.
- copy bale "SUPPORT\\CMN\\FMD01ENG\\CARDS" from the CD to cat hdRootPath and "FMD01ENG\\" in mainScreen's progressBox with 3.
- copy file "SUPPORT\\CMN\\FMD01ENG\\MAIN\\" from the CD to cat hdRootPath and "FMD01ENG\\MAIN\\" in mainScreen's progressBox.
- copy bale "SUPPORT\\CMN\\FMD01ENG\\MAIN\\SCENES" from the CD to cat hdRootPath and "FMD01ENG\\MAIN\\" in mainScreen's progressBox with 2.
- copy file "SUPPORT\\CMN\\FMD01ENG\\LOGIN\\" from the CD to cat hdRootPath and "FMD01ENG\\LOGIN\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\FMD01ENG\\PROFILE\\" from the CD to cat hdRootPath and "FMD01ENG\\PROFILE\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\FMD01ENG\\HAND\\" from the CD to cat hdRootPath and "FMD01ENG\\HAND\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\FMD01ENG\\AVATAR\\" from the CD to cat hdRootPath and "FMD01ENG\\AVATAR\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\FMD01ENG\\TRADE\\" from the CD to cat hdRootPath and "FMD01ENG\\TRADE\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\FMD01ENG\\SCRAP\\" from the CD to cat hdRootPath and "FMD01ENG\\SCRAP\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\FMD01ENG\\BROWSER\\" from the CD to cat hdRootPath and "FMD01ENG\\BROWSER\\" in mainScreen's progressBox.
- copy file "SUPPORT\\CMN\\FMD01ENG\\INTRO\\" from the CD to cat hdRootPath and "FMD01ENG\\INTRO\\" in mainScreen's progressBox.
-
- Make macDir. Set it to macPath.
-
- Append ":" to macPath.
- log macPath.
- copy Macintosh file "SUPPORT:MAC:KnowledgeLand" from the mac CD to macPath in mainScreen's progressBox with 3.
- copy Macintosh file "SUPPORT:MAC:CMDLINE.TXT" from the mac CD to macPath in mainScreen's progressBox.
-
- Wait until the next cycle.
-
- // 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 macDir.
- log oldPath.
- Make newName. Set it to oldPath.
- Call rename.
-
- // Ari: We setup the INI correctly.
- Make macFullPath. Set it to macVol.
- Append pcPath to it.
-
- Set currentinisection to an inisection of "LAND".
-
- Set currentinisection's CDRoot to "KnowledgeLand".
- Set currentinisection's lang to "eng".
- Set currentinisection's kidproof to "yes".
- Set currentinisection's bordercolor to "0,0,0.".
- Set currentinisection's tunefileExtension to ".MGM".
- Set currentinisection's LOGO_DROP to "few".
- Set currentinisection's ProductName to "Knowledge Land".
- Set currentinisection's ProductID to "FM".
- Set currentinisection's ProductLang to "ENG".
- Set currentinisection's FirstModule to "intro".
- Set currentinisection's FirstRoom to "1".
- Set currentinisection's TTS to "no".
- Set currentinisection's VoiceOver to "yes".
-
- // Open the mac folder it was installed to
- Append "KnowledgeLand" 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.
-
- End this program.