home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install-Plotter3D 3.30 (07.03.98)
-
- ;##############################################################################
- ; Localize
- ;
-
- (if (= @language "deutsch")
- (
- (set #wrongversion
- (cat "Achtung! Es ist eine alte Version des Programmes 'Installer' "
- "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
- "Bitte überprüfen Sie Ihre Konfiguration!"
- ))
-
- (set #update "Update")
- (set #abort "Abbrechen")
-
- (set #welcome_full (cat
- "\n"
- "Willkommen zum Plotter3D Installationsprogramm. \n"
- "\n"
- "Plotter3D ist Freeware, daß heißt es kann frei \n"
- "vertrieben werden, solange keinerlei Profit \n"
- "damit gemacht wird und das Archiv unverändert \n"
- "bleibt. \n"
- "\n"
- "Neue Versionen können aus dem AmiNet bezogen \n"
- "werden, Updates oder aktuelle Version können \n"
- "von meiner Homepage geladen werden: \n"
- " http://www.inf.tu-dresden.de/~ss37 \n"
- "\n"
- " Sven Steiniger, 1998\n"
- ))
- (set #welcome_beta (cat
- "\n"
- "Willkommen zum Plotter3D Installationsprogramm. \n"
- "\n"
- "Sie installieren gerade eine BETA-Version von \n"
- "Plotter3D! Bitte legen sie erst eine Kopie Ihres\n"
- "'Plotter3D:'-Verzeichnisses an. \n"
- "Falls Sie irgendwelche Fehler finden, schicken \n"
- "Sie bitte eine EMail mit dem Schlüsselwort \n"
- "'Plotter3D-Bug' im Subjekt-Feld an folgende \n"
- "Adresse: \n"
- " ss37@inf.tu-dresden.de \n"
- "\n"
- " Danke, Sven Steiniger\n"
- ))
- (set #welcome_update (cat
- "\n"
- "Willkommen zum Plotter3D Installationsprogramm. \n"
- "\n"
- "Sie installieren gerade ein Update zu Plotter3D!\n"
- "Es muß schon eine Vollversion von Plotter3D v3.x\n"
- "auf ihrem System installiert sein. Die aktuelle \n"
- "Version kann aus dem AmiNet geladen werden \n"
- "(gfx/3d/Plotter3D.lha). \n"
- "\n"
- " Sven Steiniger, 1998\n"
- ))
- (set #error_beta (cat
- "\n"
- "Dieses Archiv enthält nur ein Update (beta- \n"
- "Version) von Plotter3D! \n"
- "Es scheint, daß noch keine Vollversion auf Ihrem\n"
- "System installiert ist. Darum kann Ich kein \n"
- "Update durchführen. \n"
- "\n"
- "Die neuste Vollversion kann entweder aus dem \n"
- "AmiNet oder von meiner Homepage \n"
- " http://www.inf.tu-dresden.de/~ss37 \n"
- "bezogen werden. \n"
- ))
-
- (set #installing "Installiere %s...")
- (set #cleaning "Räume auf...")
-
- (set #cp_main "Installiere Hauptprogramm 'Plotter3D'.")
- (set #cp_docs "Installiere Documentation.")
- (set #cp_libs "Installiere Libraries.")
- (set #cp_locale "Installiere Sprachen.")
- (set #cp_funcs "Kopiere Beispiel-Funktionen.")
- (set #cp_mats "Kopiere Beispiel-Materialen.")
- (set #cp_lights "Kopiere Beispiel-Lightquellen.")
- (set #cp_datas "Kopiere Beispiel-Daten.")
- (set #cp_pals "Kopiere Standard-Farbpaletten.")
- (set #cp_images "Kopiere Bilder für Werkzeugleiste.")
- (set #cp_prefs "Kopiere Voreinstellungen.")
- (set #cp_tools "Kopiere Tools.")
-
- (set #ask_update "Plotter3D ist schon auf ihrem System installiert.\nSie können diese Installation updaten oder abbrechen.")
- (set #ask_docs "Bitte wählen Sie die Sprache(n) für die AmigaGuide Dokumentation aus.")
- (set #ask_locale "Bitte wählen Sie die Sprache(n) aus, die Sie installieren wollen.")
- (set #ask_funcs "Bitte wählen Sie die zu installierenden Beispiele aus.\n(Empfohlen: Alle)")
- (set #ask_drawers "Bitte wählen Sie die Verzeichnisse aus, die kopiert werden sollen.\n(Empfohlen: Alle)")
- (set #ask_others "Bitte wählen Sie die Dateien aus, die kopiert werden sollen.")
- (set #ask_clean1 (cat
- "Das Dateiformat für Paletten und \n"
- "Bilder hat sich geändert. Sollen die \n"
- "alten Dateien gelöscht werden, wenn \n"
- "sie doppelt vorhanden sind? (sowohl \n"
- "im neuen als auch im alten Format) \n"
- ))
- (set #ask_clean2 (cat
- "The tools 'ConvertPalette' und 'ILBM2Chunky'\n"
- "wurden aus dem Archiv entfernt. Sie wurden \n"
- "durch die Programme 'ChunkyMaster' und \n"
- "'PalettesMaster' ersetzt. \n"
- "Sollen die alten Programme gelöscht werden? \n"
- ))
-
- (set #destdir "Bitte wählen Sie einen Platz für Plotter3D. Ein Verzeichnis namens 'Plotter3D' wird dort automatisch erzeugt.")
- (set #startup "Einige Kommandos werden zu ihrer \"s:user-startup\" Datei gefügt.")
-
- (set #user_abort "Fehler: Abbruch durch den Benutzer.")
- (set #copyerror "Fehler: Verzeichnis/Datei \"%s\" fehlt!\nEs kann sein das Plotter3D nach der Installation nicht oder nicht korrekt funktioniert.")
-
- (set #answer_yes "Ja")
- (set #answer_no "Nein")
-
- )
- (
- (set #wrongversion
- (cat "You have an old version of the program 'Installer' "
- "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
- "Please check your configuration!"
- ))
-
- (set #update "Update")
- (set #abort "Abort")
-
- (set #welcome_full (cat
- "\n"
- "Welcome to the Plotter3D installation program. \n"
- "\n"
- "Plotter3D is Freeware, means it can be spread \n"
- "freely as long as no profit is made and the \n"
- "archive is not modified. \n"
- "\n"
- "You can get new versions from AmiNet. Updates \n"
- "and actual beta-versions can be downloaded from \n"
- "my homepage at: \n"
- " http://www.inf.tu-dresden.de/~ss37 \n"
- "\n"
- " Sven Steiniger, 1998\n"
- ))
- (set #welcome_beta (cat
- "\n"
- "Welcome to the Plotter3D installation program. \n"
- "\n"
- "You are installing an BETA-version of Plotter3D!\n"
- "Please make a copy of your 'Plotter3D:' \n"
- "directory first. \n"
- "If you find any bugs please mail to: \n"
- " ss37@inf.tu-dresden.de \n"
- "with subject field containing 'Plotter3D-Bug' \n"
- "\n"
- " Thanks, Sven Steiniger\n"
- ))
- (set #welcome_update (cat
- "\n"
- "Welcome to the Plotter3D installation program. \n"
- "\n"
- "You are installing an Update of Plotter3D! \n"
- "It needs an fully installed version of \n"
- "Plotter3D v3.xx. You can get the lastest package\n"
- "from AmiNet (gfx/3d/Plotter3D.lha). \n"
- "\n"
- " Sven Steiniger, 1998\n"
- ))
- (set #error_beta (cat
- "\n"
- "This archive only contains an update (beta- \n"
- "version) of Plotter3D! \n"
- "It seems you have not installed an full version \n"
- "on your system therefore I could not make an \n"
- "update. \n"
- "\n"
- "You can get the latest full version either from \n"
- "your local AmiNet-site or from my homepage: \n"
- " http://www.inf.tu-dresden.de/~ss37 \n"
- ))
-
- (set #installing "Installing %s...")
- (set #cleaning "Cleaning up...")
-
- (set #cp_main "Installing main program 'Plotter3D'.")
- (set #cp_docs "Installing documentation.")
- (set #cp_libs "Installing libraries.")
- (set #cp_locale "Installing languages.")
- (set #cp_funcs "Copying example functions.")
- (set #cp_mats "Copying example materials.")
- (set #cp_lights "Copying example lightsources.")
- (set #cp_datas "Copying example datas.")
- (set #cp_pals "Copying standard colorpalettes.")
- (set #cp_images "Copying toolbar images.")
- (set #cp_prefs "Copying preferences.")
- (set #cp_tools "Copying tools.")
-
- (set #ask_update "Plotter3D is already installed on your system.\nYou can make an update or abort.")
- (set #ask_docs "Select the language(s) of AmigaGuide documentations you wish to install.")
- (set #ask_locale "Select the language(s) you wish to install.")
- (set #ask_funcs "Select the examples you wish to install.\n(Recommended: All)")
- (set #ask_drawers "Select the drawers you wish to copy.\n(Recommended: All)")
- (set #ask_others "Select the files you wish to copy.")
- (set #ask_clean1 (cat
- "The file format of palettes and \n"
- "pictures has been changed. Should the\n"
- "old files be deleted if they exists \n"
- "twice? \n"
- ))
- (set #ask_clean2 (cat
- "The tools 'ConvertPalette' and 'ILBM2Chunky'\n"
- "have been removed from the archive. Instead \n"
- "More powerful tools called 'PalettesMaster' \n"
- "and 'ChunkyMaster' have been included. \n"
- "Should I delete the old tools? \n"
- ))
-
- (set #destdir "Please select a place for the Plotter3D package. A drawer called 'Plotter3D' will be created here.")
- (set #startup "Some commands will be added to your \"s:user-startup\" file.")
-
- (set #user_abort "Error: User abort.")
- (set #copyerror "Error: Directory/File \"%s\" is missed!.\nIt is possible that Plotter3D does not work properly after installation.")
-
- (set #answer_yes "Yes")
- (set #answer_no "No")
-
-
- )
- )
-
- ;##############################################################################
- ; start
- (if (< @installer-version 2752521)
- (
- (message #wrongversion)
- (working (#installing "Installer"))
- (copylib
- (source "Installer")
- (dest "C:")
- (optional "force" "askuser")
- )
- (exit (quiet))
- )
- )
-
- (copylib
- (source "InstallTools/asyncio.library")
- (dest "LIBS:")
- (nogauge)
- (optional "nofail")
- )
-
-
- ;#############################################################################
- ; procedure P_MakeDir
- ; creates a new drawer and copies the icon.
- ;
- ; #spath - source path
- ; #name - name of drawer
-
- (procedure P_MakeDir #pm_path #pm_name
- (
- (if (not (exists (tackon @default-dest (tackon #pm_path #pm_name)) (noreq)))
- (
- (makedir (tackon @default-dest (tackon #pm_path #pm_name)))
- )
- )
- (P_CopyIcon #pm_path #pm_name @copy-help FALSE)
- )
- )
-
- ;##############################################################################
- ; procedure P_CopyDir
- ; copies a whole directory including all subdirectories. If an file exists
- ; it is not overwritten if it has an higher version.
- ;
- ; #cp_name - name of directory
- ; #cp_help - text shown during copy
- ; #cp_overwrite - if TRUE then files without version are overwritten
-
- (procedure P_CopyDir #cp_name #cp_help #cp_overwrite
- (
- (if (exists #cp_name)
- (
- (working ("%s\n(%s/)" #cp_help #cp_name))
- (foreach #cp_name "~(#?.info)"
- (
- (if (< @each-type 0)
- (
- (set cd_source (tackon #cp_name @each-name))
- (set cd_dest (tackon (tackon @default-dest #cp_name) @each-name))
- (if (exists cd_dest)
- (
- (set cd_doit FALSE)
- (set cd_version (GETVERSION cd_dest))
- (if cd_version
- (if (> (GETVERSION cd_source) cd_version) (set cd_doit TRUE))
- (if #cp_overwrite (set cd_doit TRUE))
- )
- )
- (set cd_doit TRUE)
- )
- (if cd_doit (P_CopyFile #cp_name @each-name #cp_help))
- )
- )
- )
- )
- )
- (if (not #v_update) (message (#copyerror #cp_name) (all)))
- )
- )
- )
-
- ;##############################################################################
- ; procedure P_CopyFile
- ; copies a file
- ;
- ; #cf_path - path of file
- ; #cf_name - name of file
- ; #cf_prompt - text for prompt
- ;
- (procedure P_CopyFile #cf_path #cf_name #cf_prompt
- (
- (if (exists (tackon #cf_path #cf_name))
- (
- (copyfiles
- (prompt #cf_prompt)
- (help @copyfiles-help)
- (source (tackon #cf_path #cf_name))
- (dest (tackon @default-dest #cf_path))
- (nogauge)
- )
- (P_CopyIcon #cf_path #cf_name #cf_prompt FALSE)
- )
- (if (not #v_update) (message (#copyerror (tackon #cf_path #cf_name)) (all)))
- )
- )
- )
-
- ;##############################################################################
- ; procedure P_CopyLib
- ; copies a file
- ;
- ; #cl_path - path of file
- ; #cl_name - name of file
- ; #cl_prompt - text for prompt
- ;
- (procedure P_CopyLib #cl_path #cl_name #cl_prompt
- (
- (if (exists (tackon #cl_path #cl_name))
- (
- ;(copylib
- ; (prompt #cl_prompt)
- ; (help @copylib-help)
- ; (source (tackon #cl_path #cl_name))
- ; (dest (tackon @default-dest #cl_path))
- ;)
- (working (#cl_prompt))
- (run
- ("InstallTools/UpDateCopy FROM \"%s\" TO \"%s\" QUIET DEEP"
- (tackon #cl_path #cl_name)
- (tackon @default-dest #cl_path)
- )
- (prompt #cl_prompt)
- (help @copylib-help)
- )
- (P_CopyIcon #cl_path #cl_name #cl_prompt FALSE)
- )
- (if (not #v_update) (message (#copyerror (tackon #cl_path #cl_name)) (all)))
- )
- )
- )
-
-
- ;##############################################################################
- ; procedure P_CopyIcon
- ; copies an icon
- ;
- ; #ci_path - path of icon
- ; #ci_name - name of icon (without .info)
- ; #ci_prompt - text for prompt
- ;
- (procedure P_CopyIcon #ci_path #ci_name #ci_prompt #ci_necessary
- (
- (set ci_file (tackon #ci_path #ci_name))
- (set ci_icon (cat ci_file ".info"))
-
- (if (exists ci_icon)
- (
- (if (exists (tackon @default-dest ci_icon))
- (
- (iconinfo
- (dest (tackon @default-dest ci_file))
- (getposition "#ci_xp" "#ci_yp")
- )
- (copyfiles
- (prompt #ci_prompt)
- (help @copyfiles-help)
- (source ci_icon)
- (dest (tackon @default-dest #ci_path))
- (nogauge)
- )
- (tooltype
- (dest (tackon @default-dest ci_file))
- (setposition #ci_xp #ci_yp)
- )
- )
- (copyfiles
- (prompt #ci_prompt)
- (help @copyfiles-help)
- (source ci_icon)
- (dest (tackon @default-dest #ci_path))
- (nogauge)
- )
- )
- )
- (
- (if (and #ci_necessary (not #v_update))
- (message (#copyerror ci_icon) (all))
- )
- )
- )
- )
- )
-
- ;##############################################################################
- ; procedure P_CleanDir
- ; Scans a directory for double files (differs only in suffix)
- ;
- ;
- ; #cld_name - name of directory
- ; #cld_help - text shown during copy
- ; #cld_good - suffix of good files
- ; #cld_bad - suffix of bad files
- ;
- (procedure P_CleanDir #cld_name #cld_help #cld_good #cld_bad
- (
- (if (exists #cld_name)
- (foreach #cld_name (cat "#?." #cld_good)
- (if (< @each-type 0)
- (
- (set cld_dest
- (tackon
- #cld_name
- (cat
- (substr
- @each-name
- 0
- (- (strlen @each-name) (strlen #cld_good))
- )
- #cld_bad
- )
- )
- )
- (if (exists cld_dest) (delete cld_dest))
- )
- )
- )
- )
- )
- )
-
- ;(procedure P_UserAbort
- ; (
- ; (ABORT #user_abort)
- ; )
- ;)
-
-
- ;##############################################################################
- ; global variables
-
- (set ul_novice 0)
- (set ul_average 1)
- (set ul_expert 2)
-
- ; last_choice contains the result of the last askoptions-call
- (set last_choice 0)
-
- (set #v_update FALSE)
- (set #v_partly FALSE)
- (set #v_docs -1)
- (set #v_locale -1)
- (set #v_examples -1)
- (set #v_extra -1)
- (set #v_others -1)
-
- ;##############################################################################
- ; check beta or update-version.
- (if (exists "Beta.readme")
- (
- (message #welcome_beta)
- (set #v_partly TRUE)
- )
- (if (exists "Update.readme")
- (
- (message #welcome_update)
- (set #v_partly TRUE)
- )
- (message #welcome_full)
- )
- )
- (welcome)
-
-
- ;##############################################################################
- ; get destination path
- (if (exists "plotter3d:" (noreq))
- (
- (set @default-dest (expandpath "plotter3d:/"))
- (set #v_update TRUE)
- (if (not #v_partly)
- (if (not (askbool
- (prompt #ask_update)
- (choices #update #abort)
- (help @askbool-help)
- ))
- (exit (quiet))
- )
- )
- )
- (if #v_partly
- (
- (message #error_beta)
- (exit (quiet))
- )
- (
- (set @default-dest
- (askdir
- (prompt #destdir)
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (set @default-dest (expandpath @default-dest))
- )
- )
- )
-
- ;##############################################################################
- ; documentation
-
- (if (>= @user-level ul_average)
- (set #v_docs
- (askoptions
- (prompt #ask_docs)
- (default #v_docs)
- (help @askoptions-help)
- (choices
- "English"
- "Deutsch"
- )
- )
- )
- )
-
- ;##############################################################################
- ; Locale
-
- (if (>= @user-level ul_average)
- (set #v_locale
- (askoptions
- (prompt #ask_locale)
- (default #v_locale)
- (help @askoptions-help)
- (choices
- "English (built-in)"
- "Deutsch"
- "Français"
- "Español"
- )
- )
- )
- )
-
- ;##############################################################################
- ; examples
-
- (if (>= @user-level ul_expert)
- (set #v_examples
- (askoptions
- (prompt #ask_funcs)
- (default #v_examples)
- (help @askoptions-help)
- (choices
- "Functions"
- "Materials"
- "Lightsources"
- "Palettes"
- "Datas"
- )
- )
- )
- )
-
- ;##############################################################################
- ; extra
-
- (if (>= @user-level ul_expert)
- (set #v_extra
- (askoptions
- (prompt #ask_drawers)
- (default #v_extra)
- (help @askoptions-help)
- (choices
- "Imagebuttons"
- "Preferences"
- "Tools"
- )
- )
- )
- )
-
- ;##############################################################################
- ; others
-
- (if (>= @user-level ul_average)
- (set #v_others
- (askoptions
- (prompt #ask_others)
- (default #v_others)
- (help @askoptions-help)
- (choices
- "Preview picture"
- )
- )
- )
- )
-
- ;##############################################################################
- ; go
-
- (complete 0)
-
- (if (not #v_update)
- (
- (makedir
- (tackon @default-dest "Plotter3D")
- (help @makedir-help)
- )
- (copyfiles
- (help @copyfiles-help)
- (source "/Plotter3D.info")
- (dest @default-dest)
- )
- (tooltype
- (dest (tackon @default-dest "Plotter3D"))
- (noposition)
- )
- )
- )
- (complete 10)
-
- (set @default-dest (tackon @default-dest "Plotter3D"))
-
- ;##############################################################################
- ; copy Main Program
-
- (P_CopyLib "" "Plotter3D" #cp_main)
-
-
- (P_MakeDir "" "Libs")
- (P_CopyDir "Libs" #cp_libs TRUE)
- (P_MakeDir "Libs" "Dither")
- (P_CopyDir "Libs/Dither" #cp_libs TRUE)
-
- (complete 20)
-
- ;##############################################################################
- ; copy documentation
-
- (P_MakeDir "" "Docs")
- (P_CopyFile "Docs" "History" #cp_docs)
- (P_CopyFile "Docs" "Bugs" #cp_docs)
- (P_CopyFile "Docs" "ToDo" #cp_docs)
-
- (if (IN #v_docs 0) ( (P_MakeDir "Docs" "English") (P_CopyDir "Docs/English" #cp_docs TRUE)))
- (if (IN #v_docs 1) ( (P_MakeDir "Docs" "Deutsch") (P_CopyDir "Docs/Deutsch" #cp_docs TRUE)))
-
- (complete 30)
-
- ;##############################################################################
- ; copy Locale
-
- (if (> #v_locale 1)
- (
- (makedir (tackon @default-dest "Catalogs"))
- (if (IN #v_locale 1) ( (P_CopyDir "Catalogs/Deutsch" #cp_locale TRUE) ))
- (if (IN #v_locale 2) ( (P_CopyDir "Catalogs/Français" #cp_locale TRUE) ))
- (if (IN #v_locale 3) ( (P_CopyDir "Catalogs/Español" #cp_locale TRUE) ))
- )
- )
- (complete 40)
-
- ;##############################################################################
- ; install functions etc.
-
- (if (IN #v_examples 0) ( (P_MakeDir "" "Functions") (P_CopyDir "Functions" #cp_funcs TRUE)))
- (if (IN #v_examples 1) ( (P_MakeDir "" "Materials") (P_CopyDir "Materials" #cp_mats FALSE)))
- (if (IN #v_examples 2) ( (P_MakeDir "" "Lights" ) (P_CopyDir "Lights" #cp_lights FALSE)))
- (if (IN #v_examples 3) ( (P_MakeDir "" "Palettes" ) (P_CopyDir "Palettes" #cp_pals FALSE)))
- (if (IN #v_examples 4) ( (P_MakeDir "" "Datas" ) (P_CopyDir "Datas" #cp_datas FALSE)))
-
- (complete 50)
-
- ;##############################################################################
- ; copy extra drawers
-
- (if (IN #v_extra 0) ( (P_MakeDir "" "Images") (P_CopyDir "Images" #cp_images TRUE)))
- (if (IN #v_extra 1) ( (P_MakeDir "" "Prefs" ) (P_CopyDir "Prefs" #cp_prefs FALSE)))
- (if (IN #v_extra 2) ( (P_MakeDir "" "Tools" ) (P_CopyDir "Tools" #cp_tools TRUE)))
-
- (complete 60)
-
- ;##############################################################################
- ; copy other datas
-
- (if (IN #v_others 0) (P_CopyFile "" "PreviewPic" @copyfiles-help))
-
- (complete 80)
-
- ;##############################################################################
- ; Cleanup 1
-
- (if #v_update
- (if (>= @user-level ul_expert)
- (if (askbool
- (prompt #ask_clean1)
- (help @askbool-help)
- (choices
- #answer_yes
- #answer_no
- )
- )
- (
- ; remove double palettes
- (P_CleanDir (tackon @default-dest "Palettes") #cleaning "cpal" "pal256")
- ; remove double pictures
- (P_CleanDir (tackon @default-dest "Datas") #cleaning "ciff" "chunky")
- (P_CleanDir (tackon @default-dest "Datas") #cleaning "ciff" "pal256")
- )
- )
- )
- )
-
- (complete 87)
-
- ;##############################################################################
- ; Cleanup 2
-
- (if #v_update
- (if (>= @user-level ul_expert)
- (if (askbool
- (prompt #ask_clean2)
- (help @askbool-help)
- (choices
- #answer_yes
- #answer_no
- )
- )
- (
- (delete (tackon @default-dest "Tools/ConvertPalette")
- (infos)
- )
- (delete (tackon @default-dest "Tools/ILBM2Chunky")
- (infos)
- )
- )
- )
- )
- )
-
- (complete 95)
-
- ;##############################################################################
- ; startup-sequence
-
- (if (not #v_update)
- (startup "Plotter3D"
- (prompt #startup)
- (help @startup-help)
- (command "assign Plotter3D: \"" @default-dest "\"")
- (confirm "expert")
- )
- )
-
- (makeassign "Plotter3D" @default-dest)
-
- (complete 100)
-