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.
- Record that it is not timing.
- In new,
- Make count. Set it to 0.
- Make total. Set it to n.
- Make index. Set it to 1.
- Make data. Set it to 0.
- 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.
-
- In system,
- Make whitePen. Set it to a pen of ARIAL10.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 ARIAL10.FNT with black on white.
- In it,
- Set leftmargin to 5.
- Set rightmargin to 5.
- Set paragraphIndent to 0.
-
- Make answer. Set it to "".
-
- Record that system is not indialog.
-
- A yesnodialog is a kind of picture which has:
-
- A way to get a yes or no dialog asking a string 'a',
-
- Make new. Set it to a picture of ART\DI_YESNO.CMP from 160,160 to 455,309.
- Make it into a yesnodialog.
- In it,
- Make a stringbox of a using blackPen from 12,35 to 282,114.
- Set its backgroundcolor to blackPen's backgroundcolor.
- Make yes. Set it to an xyobject from 172,5 to 219,31.
- In it,
- Make a picture of ART\DI_YESDN.CMP from 0,0 to 47,26.
- Hide it.
- When downclicked,
- Show this object's picture.
- When upclicked,
- Hide this object's picture.
- Set answer to "yes".
- Record that system is not indialog.
- Detach this object's container.
-
- Make no. Set it to an xyobject from 228,5 to 275,31.
- In it,
- Make a picture of ART\DI_NODN.CMP from 0,0 to 47,26.
- Hide it.
- When downclicked,
- Show this object's picture.
- When upclicked,
- Hide this object's picture.
- Set answer to "no".
- Record that system is not indialog.
- Detach this object's container.
-
- Record that system is indialog.
- Detach new. Return it.
-
- A messagedialog is a kind of picture which has:
-
- A way to get a message dialog of a string 's',
-
- Make new. Set it to a picture of ART\DI_OK.CMP from 160,160 to 455,309.
- Make it into a messagedialog.
- In it,
- Make a stringbox of s using blackPen from 12,35 to 282,114.
- Set its backgroundcolor to blackPen's backgroundcolor.
- Make ok. Set it to an xyobject from 222,5 to 269,31.
- In it,
- Make a picture of ART\DI_OKDN.CMP from 0,0 to 47,26.
- Hide it.
- When downclicked,
- Show this object's picture.
- When upclicked,
- Hide this object's picture.
- Set answer to "ok".
- Record that system is not indialog.
- Detach this object's container.
- Record that system is indialog.
- Detach new. Return it.
-
- 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 ART\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\NW.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.
-
- In system,
- Make install. Set it to 1.
-
- If saveFile's result equals 1, // didn't cancel
-
- In mainScreen,
- Make a yes or no dialog asking INSTALL.TXT.
- Wait until system is not indialog.
-
- If answer is alphabetically equal to "no",
- Set system's install to 2.
- Otherwise,
- Set system's install to 1.
-
- In mainScreen,
- Make progressBox. Set it to a fileCopier of 70 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.
- Make neededspace.
- If install = 1,
- Set neededspace to (30 * 1024).
- Otherwise,
- Set neededspace to (5 * 1024).
- If ((the free disk space on macHDRoot) / 1024) is less than neededspace,
- Make msg. Set it to NOSPACE.TXT.
- Print neededspace to it.
- Append BYTES.TXT to it.
- In mainScreen,
- Make a message dialog of msg.
- Wait until system is not indialog.
- Otherwise,
- Make macDir. Set it to macPath.
-
- // 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.
- Wait until the next cycle.
-
- Make hdRootPath. Set it to "$PRODUCTHDROOT".
- Append pcPath to it.
- Append "\\" to it.
-
- log hdRootPath.
- Call now the_start_time.
-
- copy file "SUPPORT\\MAC\\ACE" from the CD to hdRootPath in mainScreen's progressBox.
- copy bale "SUPPORT\\MAC\\QUICKSND" from the CD to hdRootPath in mainScreen's progressBox with 6.
- // copy bale "SUPPORT\\CMN\\DEMO" from the CD to hdRootPath in mainScreen's progressBox with 6.
- // copy bale "SUPPORT\\CMN\\PSDEMO" from the CD to hdRootPath in mainScreen's progressBox with 6.
-
- 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.
- If platform is "Mac",
- copy file "SUPPORT\\CMN\\LEX\\MAC\\" from the CD to cat hdRootPath and "LEX\\MAC\\" in mainScreen's progressBox with 2.
- Otherwise,
- copy file "SUPPORT\\CMN\\LEX\\PC\\" from the CD to cat hdRootPath and "LEX\\PC\\" in mainScreen's progressBox with 2.
- If install = 1,
- copy bale "SUPPORT\\OPT\\FMAV0001" from the CD to hdRootPath in mainScreen's progressBox with 26.
- Otherwise,
- copy bale "SUPPORT\\OPT\\FMAV0002" from the CD to hdRootPath in mainScreen's progressBox with 26.
-
- 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.
-
- 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.
- copy Macintosh file "OVERRIDE.RES" from the mac CD to macPath in mainScreen's progressBox.
- copy Macintosh file "HELPME" from the mac CD to macPath in mainScreen's progressBox.
- copy Macintosh file "default.ini" from the mac CD to macPath in mainScreen's progressBox.
-
- Wait until the next cycle.
-
- // Ari: We setup the INI correctly.
- Make macFullPath. Set it to macVol.
- Append pcPath to it.
-
- Make strinstall. Set it to "".
- print system's install to strinstall.
-
- 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 "yes".
- Set currentinisection's VoiceOver to "yes".
- Set currentinisection's FM to strinstall.
-
- // 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.