home *** CD-ROM | disk | FTP | other *** search
-
- ; Script for installing KCommodity v2.5
- ; $VER: Install-KCommodity 1.2 (14.06.93)
-
- (complete 0)
-
- (set @default-dest "")
-
-
- ; ASK FOR ICON-TYPE
-
- (set IconType (askbool (prompt "Do you prefer the 8-Color Icons ???\n"
- "Your colors should be set to the following :\n"
- "Color 0-3 : Normal C= WB Colors\n"
- "Color 4 : Dark gray \n"
- "Color 5 : Green \n"
- "Color 6 : Red \n"
- "Color 7 : Yellow \n\n"
- "Thanks to Michael 'mick' Hohmann for the icons"
- )
- (help "The 8-Color Icons are for users running a WB\n"
- "with more than 4 colors.")
- (choices "8-Color"
- "4-Color"
- )
- )
- )
-
- (if (= 1 IconType)
- (
- (working "The icons are being unpacked to ram:")
- (run ("c/LhA x 8Icons/8Icons.lha ram:"))
- ))
-
- ; INSTALL THE MAIN PROGRAM
-
- (working "The main program is being unpacked to ram:")
- (run ("c/LhA x WBStartUp/KCXMain.lha ram:"))
-
- (set KCXMain (askdir (prompt "Specify the directory to place the main program")
- (default "SYS:WBStartUp")
- (help "KCommodity`s main program should be located "
- "within SYS:WBStartUp in order to be launched on every "
- "BootUp. If you do not like this location, "
- "select a different."
- )
- )
- )
-
- (copyfiles (source "ram:WBStartUp/KCommodity") (dest KCXMain) (infos) (files))
- (if (= 1 IconType)
- (
- (copyfiles (source "ram:8Icons/WBStartUp/KCommodity.info") (dest KCXMain) (files))
- ))
- (set KCXMainPrg (tackon KCXMain "KCommodity"))
- (foreach "ram:WBStartUp" "#?" (delete (tackon "ram:WBStartUp" @each-name)))
- (delete "ram:WBStartUp")
-
- (complete 10)
-
-
-
- ; INSTALL THE PREFERENCES EDITOR
-
- (working "The prefs editor is being unpacked to ram:")
- (run ("c/LhA x Prefs/KCXPrefs.lha ram:"))
-
- (set KCXPrefs (askdir (prompt "Specify the path for the Preferences editor. "
- "Do not use the same path as for the main program!")
- (default "SYS:Prefs")
- (help "This is the preferences editor for KCommodity. "
- "it should be installed to SYS:Prefs, so that "
- "KCommodity will find it easily. If you want "
- "to install that program to a different "
- "location, you will have to change the searchpath "
- "within the main program`s icon. Refer to the "
- "manual in order to see how this is done.\n "
- "After installation the ToolTypes will be "
- "set to your destinations."
- )
- )
- )
-
- (copyfiles (source "ram:Prefs/KCommodity") (dest KCXPrefs) (infos) (files))
- (if (= 1 IconType)
- (
- (copyfiles (source "ram:8Icons/Prefs/KCommodity.info") (dest KCXPrefs) (files))
- ))
- (set KCXPrefsPrg (tackon KCXPrefs "KCommodity"))
- (foreach "ram:Prefs" "#?" (delete (tackon "ram:Prefs" @each-name)))
- (delete "ram:Prefs")
-
- (complete 20)
-
-
- ; INSTALL THE PRINTER MODULE
-
- (working "The printer module is being unpacked to ram:")
- (run ("c/LhA x Utilities/KCXDump.lha ram:"))
-
- (set KCXPrinter (askdir (prompt "Specify the path for the Printer module")
- (default "SYS:Utilities")
- (help "This is KCommodity`s printer module. Use it "
- "to dump screens/windows to a printer or "
- "an IFF-ILBM file. Per default KCommodity will search"
- "within SYS:Utilites for that module. If you "
- "prefer a different location, you will have "
- "to change a ToolType within the main program`s "
- "list of ToolTypes. Refer to the manual for "
- "more information about this.\n "
- "After installation the ToolTypes will be "
- "set to your destinations."
- )
- )
- )
-
- (copyfiles (source "ram:Utilities/KCXPrinter") (dest KCXPrinter) (infos) (files))
- (if (= 1 IconType)
- (
- (copyfiles (source "ram:8Icons/Utilities/KCXPrinter.info") (dest KCXPrinter) (files))
- ))
- (set KCXPrintPrg (tackon KCXPrinter "KCXPrinter"))
- (foreach "ram:Utilities" "#?" (delete (tackon "ram:Utilities" @each-name)))
- (delete "ram:Utilities")
-
- (if (= 1 IconType)
- (
- (foreach "ram:8Icons/Prefs" "#?" (delete (tackon "ram:8Icons/Prefs" @each-name)))
- (delete "ram:8Icons/Prefs")
-
- (foreach "ram:8Icons/WBStartUp" "#?" (delete (tackon "ram:8Icons/WBStartUp" @each-name)))
- (delete "ram:8Icons/WBStartUp")
-
- (foreach "ram:8Icons/Utilities" "#?" (delete (tackon "ram:8Icons/Utilities" @each-name)))
- (delete "ram:8Icons/Utilities")
-
- (delete "ram:8Icons")
- ))
-
-
- (complete 30)
-
-
- ; NO HEAD FOR THE LIBRARY
-
- (working "The libraries are being unpacked to ram:")
- (run ("c/LhA x libs/Libs.lha ram:"))
-
- (message "The kcx.library will be copied to your LIBS: directory now.")
- (copylib (prompt "Copying kcx.library") (help @copylib-help ) (source "ram:libs/kcx.library") (dest "LIBS:") (confirm))
-
- (complete 40)
-
-
-
- ; CHECK FOR REQTOOLS.LIBRARY AND INSTALL IF NEEDED
-
- (message "If you are not running Workbench 2.1 and up, you will need "
- "reqtools.library v38 and up. I will check, whether you already "
- "use a version suited. If not, the library will be copied to LIBS:.\n"
- "ReqTools is Copyright (C) Nico Francois")
-
- (copylib (prompt "Copying reqtools.library") (help @copylib-help) (source "ram:libs/reqtools.library") (dest "LIBS:") (confirm))
- (complete 60)
-
- (foreach "ram:Libs" "#?" (delete (tackon "ram:Libs" @each-name)))
- (delete "ram:Libs")
-
-
-
- ; PLACE THE DEFAULT PREFERENCES FILE
-
- (set GotOld (askbool (prompt "Do you already have a v2.0 Preferences file ? "
- "If so, please locate the file, so that I "
- "can convert it to the new format")
- (help "If you were using KCommodity v2.0 then you may now "
- "specify your old prefs file, in order to "
- "convert it to the new format. This does not work "
- "with preferences older than these of v2.0 !")
- (choices "Yes, I do have v2.0"
- "No, install default v2.5")
- )
- )
-
- (if (= 1 GotOld)
- (
- (set MyPrefs (askfile (prompt "Please locate your old v2.0 prefs file")
- (default "ENVARC:KCX.PREFS")
- (help @askfile-help)
- )
- )
- (working "Now converting old preferences file")
- (run ("PrefsConvert/PrefsConvert %s") MyPrefs)
- )
-
- ; else
-
- (
- (set MyPrefs (askdir (prompt "Where should I place the default Preferences file ?")
- (default "ENVARC:")
- (help "Simple. This is the preferences containing all of "
- "the builtin settings. This is just an example."
- "You may copy it to the defaut path, but if you "
- "don`t, you will have to set a ToolType within the "
- "main program`s and the preferences editor`s icon."
- )
- )
- )
- (copyfiles (source "prefs/envarc/KCX/KCX.PREFS") (dest MyPrefs) (files))
- (set MyPrefs (tackon MyPrefs "KCX.PREFS"))
- ))
-
- (complete 60)
-
-
-
-
-
- ; IF LOCALE.LIBRARY IS EXITING WITHIN LIBS: CHECK FOR CATALOGS
-
- (if (not (exists "libs:locale.library"))
- (
- (message "Sorry, you do not have locale.library installed. "
- "Therefore, no localization facilities will be installed."
- )
- )
-
- ; else
-
- (
- (set Langs (askoptions
- (prompt "KCommodity is localized, that means you may use "
- "the program in different languages. Please choose "
- "the desired langauges now. The default language "
- "is english, so you do not have to select english.")
- (choices "dansk"
- "deutsch"
- "français"
- "italiano (N/A yet)"
- "español"
- "norsk (N/A yet)"
- "svenska (N/A yet)"
- "nederlands"
- "suomi"
- )
- (help "These are the languages supported by KCommodity "
- "and all it`s programs. Simply specify the languages "
- "you prefer and the needed catalog files will be "
- "copied to the LOCALE:CATALOGS directory.\n "
- "for the language 'suomi' a language file will "
- "be copied to LOCALE:LANGUAGES.\n"
- "These features are only available under Workbench 2.1 "
- "and later releases. The script assumes the needed "
- "directories to be existent except for suomi"
- ))
- )
-
- (if (IN Langs 0)
- (
- (working "Unpacking danish catalogs")
- (run ("c/LhA x locale/catalogs/dansk/Catalogs.lha locale:catalogs/dansk/"))
- ))
- (if (IN Langs 1)
- (
- (working "Unpacking german catalogs")
- (run ("c/LhA x locale/catalogs/deutsch/Catalogs.lha locale:catalogs/deutsch/"))
- ))
- (if (IN Langs 2)
- (
- (working "Unpacking french catalogs")
- (run ("c/LhA x locale/catalogs/français/Catalogs.lha locale:catalogs/français/"))
- ))
- (if (IN Langs 3)
- (
- (message "Sorry, the italian catalogs weren`t ready yet.\n"
- "They will be released soon...")
- ; (working "Unpacking italian catalogs")
- ; (run ("c/LhA x locale/catalogs/italiano/Catalogs.lha locale:catalogs/italiano/"))
- ))
- (if (IN Langs 4)
- (
- (working "Unpacking spanish catalogs")
- (run ("c/LhA x locale/catalogs/español/Catalogs.lha locale:catalogs/español/"))
- ))
- (if (IN Langs 5)
- (
- (message "Sorry, the norwegian catalogs weren`t ready yet.\n"
- "They will be released soon...")
- ; (working "Unpacking norwegian catalogs")
- ; (run ("c/LhA x locale/catalogs/norsk/Catalogs.lha locale:catalogs/norsk/"))
- ))
- (if (IN Langs 6)
- (
- (message "Sorry, the swedish catalogs weren`t ready yet.\n"
- "They will be released soon...")
- ; (working "Unpacking swedish catalogs")
- ; (run ("c/LhA x locale/catalogs/svenska/Catalogs.lha locale:catalogs/svenska/"))
- ))
- (if (IN Langs 7)
- (
- (working "Unpacking dutch catalogs")
- (run ("c/LhA x locale/catalogs/nederlands/Catalogs.lha locale:catalogs/nederlands/"))
- ))
- (if (IN Langs 8)
- (
- (if (not (exists "locale:catalogs/suomi"))
- (
- (makedir "locale:catalogs/suomi" (prompt "Creating LOCALE:CATALOGS/suomi")
- (help "Normally this directory may not be existend")
- (confirm))
- ))
-
- (working "Unpacking finnish catalogs")
- (run ("c/LhA x locale/catalogs/suomi/Catalogs.lha locale:catalogs/suomi/"))
-
- (if (not (exists "locale:languages/suomi.language"))
- (
- (working "Installing suomi.language")
-
- (copyfiles (source "locale/languages/suomi.language") (dest "locale:languages/")
- (prompt "Copying soumi.language to locale:languages")
- (help @copyfiles-help)
- )
- ))
- ))
- ))
-
- (complete 70)
-
-
- ; WHAT ABOUT THE DOCS ?
-
- (if (askbool (prompt "Do you want to install the manual ? "
- "The manual comes in two different formats "
- "and two different languages.")
- (help "KCommodity comes with two types of manuals. "
- "One is a plain ASCII document, the other one "
- "is for use with AmigaGuide©. You have the "
- "possibility to choose from english and german "
- "versions of the documents. Registered users "
- "have the possibility to install a DVI file")
- )
- (
- (if (exists "Docs/DVI")
- (
- (set Types (askoptions
- (prompt "KCommodity comes with two types of manuals. "
- "There is a plain ASCII document and a "
- "AmigaGuide© version of the manuals. "
- "You, as a registered user, may use "
- "DVI files as well (TeX-Output)"
- )
- (help "Please select the destination directory for "
- "the manuals. I suggest you place the "
- "AmigaGuide© documents within the searchpath "
- "of AmigaGuide© or MultiView©. The DVI File "
- "may be viewd with a DVI Previewer and printed "
- "with a suited printer driver."
- )
- (choices "Plain ASCII"
- "AmigaGuide©"
- "TeX-DVI-File"
- ))
- )
- )
-
- ; else
-
- (
- (set Types (askoptions
- (prompt "KCommodity comes with two types of manuals. "
- "There is a plain ASCII document and a "
- "AmigaGuide© version of the manuals. "
- )
- (help "Please select the destination directory for "
- "the manuals. I suggest you place the "
- "AmigaGuide© documents within the searchpath "
- "of AmigaGuide© of MultiView©"
- )
- (default 1)
- (choices "Plain ASCII"
- "AmigaGuide©"
- ))
- )
- ))
-
- (set Mans (askchoice
- (prompt "Please select the language for the manuals.")
- (help "You can select from two different languages.")
- (default 0)
- (choices
- "english"
- "deutsch"
- ))
- )
-
- (if (IN Types 0)
- ( (set ASCIIDir (askdir
- (prompt "Please select the destination directory "
- "for the ASCII documentation")
- (default "Work:")
- (help @askdir-help)
- )
- )
-
- (if (= Mans 0)
- (
- (working "Unpacking english ASCII documentation")
- (run ("c/LHA x Docs/ASCII/english/KCXDOC.lha %s" ASCIIDir))
- ))
- (if (= Mans 1)
- (
- (working "Unpacking german ASCII documentation")
- (run ("c/LHA x Docs/ASCII/deutsch/KCXDOC.lha %s" ASCIIDir))
- ))
- ))
-
- (if (IN Types 1)
- ( (set GuideDir (askdir
- (prompt "Please select the destination directory "
- "for the AmigaGuide© documentation")
- (help @askdir-help)
- (default "Work:"))
- )
- (if (= Mans 0)
- (
- (working "Unpacking english AmigaGuide© documentation")
- (run ("c/LHA x Docs/Guide/english/KCXDOC.lha %s" GuideDir))
- ))
- (if (= Mans 1)
- (
- (working "Unpacking german AmigaGuide© documentation")
- (run ("c/LHA x Docs/Guide/deutsch/KCXDOC.lha %s" GuideDir))
- ))
- ))
-
- (if (IN Types 2)
- (
- (set TeXDir (askdir
- (prompt "Please select the destination directory "
- "for the TeX-DVI documentation")
- (help @askdir-help)
- (default "Work:"))
- )
- (if (= Mans 0)
- (
- ; (message "You asked for a german Documentation."
- ; "Due to lack of diskspace, there`s only "
- ; "the german DVI file")
- (working "Unpacking english TeX documentation")
- (run ("c/LHA x Docs/DVI/english/KCXDOC.lha %s" TeXDir))
- ))
- (if (= Mans 1)
- (
- ; (message "You asked for an english Documentation."
- ; "Due to lack of diskspace, there`s only "
- ; "the english DVI file")
- (working "Unpacking german TeX documentation")
- (run ("c/LHA x Docs/DVI/deutsch/KCXDOC.lha %s" TeXDir))
- ))
- ))
- ))
-
- (complete 90)
-
-
- (if (askbool (prompt "The Revision Control System is something for "
- "programmers. It may be usefull while working "
- "on a program (for keeping revision-notes) "
- "Additional information will be written "
- "to the Revision Header, if two Environment "
- "variables are set. These are for the name "
- "of the author (YOU) and the firm you are "
- "working for. If you want to enter the names "
- "and add the needed SetEnv calls to your "
- "S:User-StartUp file, then click on Ok")
- (help "You will have to enter your name and the name "
- "of the firm. The Installer will then add "
- "the needed lines to your S:User-StartUp file "
- "for setting these Environment variables.")
- (choices "Ok"
- "No way")
- )
- (
- (set MyName (askstring (prompt "Please enter your name now")
- (help @askstring-help)
- ))
- (set MyFirm (askstring (prompt "Please enter your company`s name now")
- (help @askstring-help)
- ))
-
- (startup "KCommodity variables for RCS" (prompt "Adding lines to S:User-StartUp")
- (help @startup-help)
- (command ('SetEnv AUTHOR "%s"\n' MyName)
- ('SetEnv COMPANY "%s"' MyFirm)
- )
- )
-
- (if (askbool (prompt "Would you like to install KCommodity`s "
- "ARexx Scripts for Source-Revisions ?")
- (help "These scripts are used to create another "
- "Revision from within an editor. Supported "
- "editors are CygnusED Pro and TurboText. "
- "Additionally there are shell scripts.")
- (choices "Yes"
- "No")
- )
- (
- (set RexxFiles (askoptions
- (prompt "Please select the appropriate scripts suiting your needs ")
- (help "Simply select the editor you are using or "
- "select the shell to have the shell scripts ")
- (choices "Cygnus ED"
- "TurboText"
- "Shell Scripts")
- )
- )
-
- (set SourceModes (askoptions
- (prompt "Now please select the languages you "
- "normally programm in, so that the "
- "needed scripts may be installed")
- (help "This is only to reduce the amount of "
- "copied files")
- (choices "Assembler"
- "Basic"
- "C"
- "Modula/Pascal/Oberon")
- )
- )
-
- (set RexxDir (askdir (prompt "Please select the directory for the scripts ")
- (help "Normally you will place ARexx Scripts within "
- "the logical device REXX:")
- (default "REXX:")
- )
- )
-
- (working "The ARexx scripts are being unpacked to ram:")
- (run ("c/LhA x Rexx/RexxScripts.lha ram:"))
-
- (if (IN SourceModes 0)
- (
- (if (IN RexxFiles 0)
- (copyfiles (source "ram:Rexx/CygnusED/ASMRevision.ced") (dest RexxDir) (files)))
- (if (IN RexxFiles 1)
- (copyfiles (source "ram:Rexx/TurboText/ASMRevision.ttx") (dest RexxDir) (files)))
- (if (IN RexxFiles 2)
- (copyfiles (source "ram:Rexx/ASMRevision.rexx") (dest RexxDir) (files)))
- ))
-
- (if (IN SourceModes 1)
- (
- (if (IN RexxFiles 0)
- (copyfiles (source "ram:Rexx/CygnusED/BASRevision.ced") (dest RexxDir) (files)))
- (if (IN RexxFiles 1)
- (copyfiles (source "ram:Rexx/TurboText/BASRevision.ttx") (dest RexxDir) (files)))
- (if (IN RexxFiles 2)
- (copyfiles (source "ram:Rexx/BASRevision.rexx") (dest RexxDir) (files)))
- ))
-
- (if (IN SourceModes 2)
- (
- (if (IN RexxFiles 0)
- (copyfiles (source "ram:Rexx/CygnusED/CRevision.ced") (dest RexxDir) (files)))
- (if (IN RexxFiles 1)
- (copyfiles (source "ram:Rexx/TurboText/CRevision.ttx") (dest RexxDir) (files)))
- (if (IN RexxFiles 2)
- (copyfiles (source "ram:Rexx/CRevision.rexx") (dest RexxDir) (files)))
- ))
-
- (if (IN SourceModes 3)
- (
- (if (IN RexxFiles 0)
- (copyfiles (source "ram:Rexx/CygnusED/PASRevision.ced") (dest RexxDir) (files)))
- (if (IN RexxFiles 1)
- (copyfiles (source "ram:Rexx/TurboText/PASRevision.ttx") (dest RexxDir) (files)))
- (if (IN RexxFiles 2)
- (copyfiles (source "ram:Rexx/PASRevision.rexx") (dest RexxDir) (files)))
- ))
-
- (foreach "ram:Rexx/CygnusED" "#?" (delete (tackon "ram:Rexx/CygnusED" @each-name)))
- (delete "ram:Rexx/CygnusED")
-
- (foreach "ram:Rexx/TurboText" "#?" (delete (tackon "ram:Rexx/TurboText" @each-name)))
- (delete "ram:Rexx/TurboText")
-
- (foreach "ram:Rexx" "#?" (delete (tackon "ram:Rexx" @each-name)))
- (delete "ram:Rexx")
- ))
- ))
-
- (message "Now changing the tooltypes of the main program, so that it "
- "will find the programs.\nAdditionally the ToolTypes for\nfinding the prefs will be set.")
-
- (tooltype (dest KCXMainPrg) (settooltype ("PREFSPATH") (KCXPrefsPrg)))
- (tooltype (dest KCXMainPrg) (settooltype ("PRINTERPATH") (KCXPrintPrg)))
- (tooltype (dest KCXMainPrg) (settooltype ("SETTINGS") (MyPrefs)))
- (tooltype (dest KCXPrefsPrg) (settooltype ("SETTINGS") (MyPrefs)))
- (tooltype (dest KCXMainPrg) (noposition))
- (tooltype (dest KCXPrefsPrg) (noposition))
- (tooltype (dest KCXPrintPrg) (noposition))
-
- (complete 100)
-
- (set EndMsg1 ("The main program can be found in\n%s\n" KCXMain))
- (set EndMsg2 ("The Prefs editor is located in\n%s\n" KCXPrefs))
- (set EndMsg3 ("and the Printer module was copied to\n%s\n" KCXPrinter))
-
- (exit EndMsg1 EndMsg2 EndMsg3 "\nHave fun using KCommodity\nNote the changed address !\nSee the Note/Achtung files for more")
-