; $VER: Installation script for FlashMandelWOS 2.0 (16 Mar 2002)
; © Edgar Schwan
; Created with GoldED 6.18

(if (>= (/ @installer-version 65536) 44)
    (
    (effect "lower_right" "radial" $00FFAA $0000FF)
    (showmedia "startpic" "Pictures/Mandelbrot_def.iff" "upper_left" "none" 0)
    (showmedia "startsound" "Welcome.8SVX" "upper_left" "none" 0)
    (setmedia startsound "play")
    )
)

(set #conflevel "expert")
(set #execname "FlashMandelWOS")
(set #oldexecname "FlashMandelPPC")
(set #assignname "FLASHMANDEL:")
(set #plainassign (substr #assignname 0 (- (strlen #assignname) 1)))
(set #keep_path 0)
(set #settings_saved 0)

(set #TT_COLORSREMAP "0")          ; default tooltypes
(set #TT_FONTNAME "courier.font")
(set #TT_FONTSIZE "13")
(set #TT_IMAGMAX "1.125")
(set #TT_IMAGMIN "-1.125")
(set #TT_JULIACONSTIMAG "-0.26")
(set #TT_JULIACONSTREAL "-0.72")
(set #TT_REALMAX "1.0")
(set #TT_REALMIN "-2.0")
(set #TT_SCREENDEPTH "8")
(set #TT_SCREENWIDTH "800")
(set #TT_SCREENHEIGHT "600")
(set #TT_SCREENMODE "0x50041000")
(set #TT_STARTPRI "-3")
(set #TT_POWER "1")
(set #TT_STARTWITHJULIA "0")
(set #TT_USEPPC "1")
(set #TT_USERNAME "Amiga_Rulez!")

(                              ; english
(set #txt_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 #txt_welcome
(cat "Welcome to the Installation of FlashMandelWOS!"))
(set #txt_wrong_os
(cat "Incorrect OS version (FlashMandelWOS requires OS 39 or better)!"))
(set #txt_misc_error
(cat "An error has occurred during installation. Please check the log file to understand the error."))
(set #txt_choose_dir_head
(cat "Please choose the installation path.\nA new drawer named 'FlashMandel' will be created there!"))
(set #txt_cpu_error
(cat "FlashMandelWOS needs at least a 68020-CPU and a Floating-Point-Processor!"))
(set #txt_ask_languages
(cat "Please select the languages to install.\nThe english language is built in the program!"))
(set #txt_italian
(cat "italian"))
(set #txt_german
(cat "german"))
(set #default_language %00)
(set #txt_ask_files
(cat "Please select the files to install!"))
(set #txt_documentation
(cat "documentation"))
(set #txt_pictures
(cat "example-pictures"))
(set #txt_palettes
(cat "example-colorpalettes"))
(set #txt_sources
(cat "sources (for programmers)"))
(set #txt_arexx-scripts
(cat "arexx-scripts"))
(set #txt_overwrite
(cat "FlashMandel has been installed before.\n\nWhat should I do with this installation?\n\nAll files in the directory '" #assignname "sources' and '" #assignname "Developer' will surely be lost!!"))
(set #txt_update_inst
(cat "Update old installation"))
(set #txt_new_inst
(cat "Delete old installation and install it once more"))
(set #txt_delete_inst
(cat "Delete it forever"))
(set #txt_really_delete
(cat "Do you really want to delete FlashMandel?"))
(set #txt_delete
(cat "Deleting old installation..."))
(set #txt_keep_path
(cat "Keep path of old installation?\n\n(%s)"))
(set #txt_copy_pictures
(cat "Copy example-pictures..."))
(set #txt_copy_palettes
(cat "Copy example-palettes..."))
(set #txt_copy_docs
(cat "Copy documentation..."))
(set #txt_copy_sources
(cat "Copy sources..."))
(set #txt_copy_arexx-scripts
(cat "Copy arexx-scripts..."))
(set #txt_copy_deutsch
(cat "Copy german catalog..."))
(set #txt_copy_italiano
(cat "Copy italian catalog..."))
(set #txt_copy_prog
(cat "Copy executable..."))
(set #txt_create_dir
(cat "Create directory '%s'..."))
(set #txt_copy_icon
(cat "Copy icon..."))
(set #txt_keep_settings
(cat "Keep configuration from old installation?"))
(set #txt_add_assign
(cat "Add a line to the user-startup!"))
(set #txt_add_assign_msg
(cat "To run FlashMandel correctly,\nI have to add a line to the user-startup:\n\nAssign " #assignname " \"%s\"\n\nProceed?"))
)

(if (= @language "deutsch")    ; deutsch
(
(set #txt_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 #txt_welcome
(cat "Willkommen zur Installation von FlashMandelWOS!"))
(set #txt_wrong_os
(cat "Inkorrekte OS-Version. Flashmandel benötigt mindestens OS 39 oder besser."))
(set #txt_misc_error
(cat "Während der Installation trat ein Fehler auf. Bitte prüfen Sie das Log-File für weitere Informationen!"))
(set #txt_choose_dir_head
(cat "Bitte wählen Sie den Installations-Pfad.\nEin neues Verzeichnis namens 'FlashMandel' wird automatisch erzeugt!"))
(set #txt_cpu_error
(cat "FlashMandelWOS benötigt mindestens eine 68020-CPU inclusive Fließkomma-Prozessor!"))
(set #txt_cpu_error
(cat "FlashMandelWOS benötigt mindestens eine 68020-CPU inclusive Fließkomma-Prozessor!"))
(set #txt_ask_languages
(cat "Wählen Sie die zu installierenden Sprachen.\nDie englische Sprache ist im Programm eingebaut!"))
(set #txt_italian
(cat "Italienisch"))
(set #txt_german
(cat "Deutsch"))
(set #default_language %01)
(set #txt_ask_files
(cat "Welche der folgenden Dateien sollen installiert werden?"))
(set #txt_documentation
(cat "Dokumentation"))
(set #txt_pictures
(cat "Beispiel-Bilder"))
(set #txt_palettes
(cat "Beispiel-Farbpaletten"))
(set #txt_sources
(cat "Quelltexte (für Programmierer)"))
(set #txt_arexx-scripts
(cat "ARexx-Skripte"))
(set #txt_overwrite
(cat "FlashMandel ist schon einmal installiert worden.\n\nWas soll mit dieser Installation geschehen?\n\nAlle im Verzeichnis '" #assignname "sources' bzw. '" #assignname "Developer' befindlichen Dateien werden auf jeden Fall gelöscht!"))
(set #txt_update_inst
(cat "Updaten"))
(set #txt_new_inst
(cat "Löschen und neu installieren"))
(set #txt_delete_inst
(cat "Installation nur löschen"))
(set #txt_really_delete
(cat "Wollen Sie FlashMandel wirklich löschen?"))
(set #txt_delete
(cat "Alte Installation wird gelöscht..."))
(set #txt_keep_path
(cat "Pfad von alter Installation beibehalten?\n\n(%s)"))
(set #txt_copy_pictures
(cat "Kopiere Beispielgrafiken..."))
(set #txt_copy_palettes
(cat "Kopiere Beispielpaletten..."))
(set #txt_copy_docs
(cat "Kopiere Dokumentation..."))
(set #txt_copy_sources
(cat "Kopiere Quelltexte..."))
(set #txt_copy_arexx-scripts
(cat "Kopiere ARexx-Skripte..."))
(set #txt_copy_deutsch
(cat "Kopiere deutschen Katalog..."))
(set #txt_copy_italiano
(cat "Kopiere italienischen Katalog..."))
(set #txt_copy_prog
(cat "Kopiere Programm..."))
(set #txt_create_dir
(cat "Erzeuge Verzeichnis '%s'..."))
(set #txt_copy_icon
(cat "Kopiere Piktogramm..."))
(set #txt_keep_settings
(cat "Konfiguration von alter Installation übernehmen?"))
(set #txt_add_assign
(cat "Füge eine Zeile der user-startup hinzu!"))
(set #txt_add_assign_msg
(cat "Für den ordnungsgemäßen Betrieb von FlashMandel,\nmuß eine Zeile der user-startup hinzugefügt werden:\n\nAssign " #assignname " \"%s\"\n\nSoll dies nun geschehen?"))
))

(if (= @language "italiano")             ; italiano
(
(set #txt_wrongversion
(cat "Mi dispiace, hai una vecchia versione del programma 'Installer' "
     "sul tuo Amiga!\n\nLa procedura di installazone necessita di almeno il programma Installer versione 42.9.\n\n"
     "Per favore controlla la tua configurazione!"))
(set #txt_welcome
(cat "Benvenuto nell'installazione di FlashMandelWOS!"))
(set #txt_wrong_os
(cat "Mi dispiace, Sistema Operativo non supportato (FlashMandelWOS necessita di almeno OS 39)!"))
(set #txt_misc_error
(cat "C'è stato un problema durante l'installazione. Controlla il file di log per conoscere l'errore."))
(set #txt_choose_dir_head
(cat "Scegli il percorso dell'installazione.\nUn nuovo cassetto di nome 'FlashMandel' verrà creato!"))
(set #txt_cpu_error
(cat "FlashMandelWOS necessita di almeno un processore MC68020 e un coprocessore matematico!"))
(set #txt_ask_languages
(cat "Per favore seleziona la lingua da installare.\nL'inglese è il linguaggio predefinito!"))
(set #txt_italian
(cat "italiano"))
(set #txt_german
(cat "tedesco"))
(set #default_language %10)
(set #txt_ask_files
(cat "Per favore seleziona i files da installare!"))
(set #txt_documentation
(cat "documentazione"))
(set #txt_pictures
(cat "immagini di esempio"))
(set #txt_palettes
(cat "tavolozze di esempio"))
(set #txt_sources
(cat "codici sorgenti (per programmatori)"))
(set #txt_arexx-scripts  ;new
(cat "arexx-scripts"))
(set #txt_overwrite
(cat "FlashMandel has been installed before.\n\nWhat should I do with this installation?\n\nAll files in the directory '" #assignname "sources' and '" #assignname "Developer' will surely be lost!!"))
;new   (cat "E' già presente una installazione di FlashMandel.\n\nCosa vuoi farne?\n\nTutti i files nel cassetto '" #assignname "sources' saranno sicuramente persi!!"))
(set #txt_update_inst
(cat "Aggiorna la preesistente installazione"))
(set #txt_new_inst
(cat "Cancella l'installazione presente e reinstalla ancora una volta"))
(set #txt_delete_inst
(cat "Cancella tutto per sempre"))
(set #txt_really_delete
(cat "Vuoi veramente cancellare FlashMandel?"))
(set #txt_delete
(cat "Sto cancellando la vecchia installazione..."))
(set #txt_keep_path
(cat "Mantengo il percorso della vecchia installazione?\n\n(%s)"))
(set #txt_copy_pictures
(cat "Copio le immagini di esempio..."))
(set #txt_copy_palettes
(cat "Copio le tavolozze di esempio..."))
(set #txt_copy_docs
(cat "Copio la documentazione..."))
(set #txt_copy_sources
(cat "Copio il codice sorgente..."))
(set #txt_copy_arexx-scripts   ;new
(cat "Copy arexx-scripts..."))
(set #txt_copy_deutsch
(cat "Copio i cataloghi per il tedesco..."))
(set #txt_copy_italiano
(cat "Copio i cataloghi per l'italiano..."))
(set #txt_copy_prog
(cat "Copio l'eseguibile..."))
(set #txt_create_dir
(cat "Creo il cassetto '%s'..."))
(set #txt_copy_icon
(cat "Copio l'icona..."))
(set #txt_keep_settings
(cat "Mantengo la configurazione della vecchia installazione?"))
(set #txt_add_assign
(cat "Aggiungo una riga alla user-startup!"))
(set #txt_add_assign_msg
(cat "Affinchè FlashMandel funzioni correttamente,\naggiungo una riga alla user-startup:\n\nAssign " #assignname " \"%s\"\n\nProcedo?"))
))

; check installer-version

(set ver (/ @installer-version 65536))
(set rev (- @installer-version (* ver 65536)))

(debug ("Installer-Version: %ld.%ld" ver rev))

(if (< ver 42)
    (abort #txt_wrong_inst)
)

; check if we are running under correct OS

(if (< (/ (getversion) 65536) 39)
    (abort #txt_wrong_os)
)

; check CPU and FPU

(if (patmatch "68000|68010" (database "cpu"))
    (abort #txt_cpu_error)
)
(if (patmatch "68881|68882|FPU040" (database "fpu"))
    (abort #txt_cpu_error)
)

; error handling

(onerror
    (if (> @ioerr 0)
        (
            (message(#txt_misc_error))
        )
    )

    (exit (quiet))
)

(welcome #txt_welcome)

; handling for installation-dir

(set #update 2)
(set #keep_path 0)

(if (getassign #plainassign "a")
  (
;    (set #update                  ; old installation found
;        (askbool
;            (prompt #txt_overwrite)
;            (help "")
;            (default 1)
;            (choices #txt_update_inst #txt_delete_inst)
;            )
;        )
    (set #update
        (askchoice
            (prompt #txt_overwrite)
            (help @askchoice-help)
            (default 0)
            (choices #txt_update_inst #txt_new_inst #txt_delete_inst)
            )
        )

    (debug ("#update: %ld" #update))

    (if (= #update 0)
        (                                   ; ** do update **
        (iconinfo                                    ; keep old tooltype-settings
            (dest (cat #assignname #oldexecname))
            (gettooltype "COLORSREMAP" "#TT_COLORSREMAP"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "FONTNAME" "#TT_FONTNAME"))
        (debug ("tooltype 'FONTNAME': '%s'" #TT_FONTNAME))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "FONTSIZE" "#TT_FONTSIZE"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "IMAGMAX" "#TT_IMAGMAX"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "IMAGMIN" "#TT_IMAGMIN"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "JULIACONSTIMAG" "#TT_JULIACONSTIMAG"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "JULIACONSTREAL" "#TT_JULIACONSTREAL"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "REALMAX" "#TT_REALMAX"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "REALMIN" "#TT_REALMIN"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "SCREENDEPTH" "#TT_SCREENDEPTH"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "SCREENWIDTH" "#TT_SCREENWIDTH"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "SCREENHEIGHT" "#TT_SCREENHEIGHT"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "SCREENMODE" "#TT_SCREENMODE"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "STARTPRI" "#TT_STARTPRI"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "POWER" "#TT_POWER"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "STARTWITHJULIA" "#TT_STARTWITHJULIA"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "USEPPC" "#TT_USEPPC"))
        (iconinfo
            (dest (cat #assignname #oldexecname))
            (gettooltype "USERNAME" "#TT_USERNAME"))

        (set #settings_saved 1)

        (delete (cat #assignname "developer")            ; delete developer
            (prompt #txt_delete)
            (help "")
            (optional force)
            (all)
            )
        (delete (cat #assignname "docs")                 ; delete docs
            (prompt #txt_delete)
            (help "")
            (optional force)
            (all)
            )
        (delete (cat #assignname #oldexecname)           ; delete old executable
            (prompt #txt_delete)
            (help "")
            (optional force)
            (infos)
            )
        (delete (cat #assignname #oldexecname ".readme") ; delete old readme
            (prompt #txt_delete)
            (help "")
            (optional force)
            (infos)
            )
        (delete (cat #assignname "FlashMandel.readme")   ; delete old readme (2)
            (prompt #txt_delete)
            (help "")
            (optional force)
            (infos)
            )
        (delete (cat #assignname "FlashMandel.ilbm")      ; delete logo
            (prompt #txt_delete)
            (help "")
            (optional force)
            (infos)
            )
;        (delete (cat #assignname "catalogs")       ; delete catalogs
;            (prompt #txt_delete)
;            (help "")
;            (optional force)
;            (all)
;            )
        (set #keep_path 1)
        (set @default-dest (expandpath #assignname))
        )
        )

    (if (= #update 1)
        (                                   ; ** do new installation **
        (delete (cat #assignname "#?")             ; delete files in FLASHMANDEL:
            (prompt #txt_delete)
            (help "")
            (optional force)
            (confirm)
            (all)
            )

        (set #keep_path
            (askbool                               ; keep old path ?
                (prompt (#txt_keep_path (expandpath #assignname)))
                (help "")
                (default 1)
                )
            )

        (if #keep_path
            (                                      ; - keep it ...
                (set @default-dest (expandpath #assignname))
                )
            (                                      ; - use new path ...
                (set #oldpath (expandpath #assignname))
                (debug ("alter pfad: '%s'" #oldpath))
                (run (cat "Assign " #assignname " remove")
                    (prompt "")
                    (help "")
                    )
                (delete #oldpath                ; delete FLASHMANDEL:
                    (prompt #txt_delete)
                    (help "")
                    (optional force)
                    (infos)
                    (all)
                    )
                )
            )
            )
        )

    (if (= #update 2)
        (                                   ; ** delete FlashMandel **
        (message #txt_really_delete)

        (debug ("alles löschen"))

        (set #path (expandpath #assignname))

        (debug ("path: '%s'" #path))

        (run (cat "Assign " #assignname " remove") ; remove assign
             (prompt "")
             (help "")
             )

        (delete #path                              ; delete files in FLASHMANDEL:
            (prompt #txt_delete)
            (help "")
            (optional force)
            (confirm)
            (all)
            )

        (exit (quiet))                              ; ready
        )
        )
    )
)

(if (= #keep_path 0)
    (
        (set @default-dest            ; ask installation-directory
            (askdir
                (prompt #txt_choose_dir_head)
                (help @askdir-help)
                (default @default-dest)
                )
            )
    (set @default-dest (tackon @default-dest "FlashMandel"))
    )
)
(debug ("neuer pfad: '%s'" @default-dest))

; ask languages to install

(set #languages
    (askoptions
        (prompt #txt_ask_languages)
        (help @askoptions-help)
        (choices #txt_german #txt_italian)
        (default #default_language)
    )
)

; ask files to install

(if (= #update 0)
   (set #files_default %01001)
   (set #files_default %01111)
   )

(set #files
    (askoptions
        (prompt #txt_ask_files)
        (help @askoptions-help)
        (choices #txt_pictures #txt_palettes #txt_documentation #txt_sources #txt_arexx-scripts)
        (default #files_default)
    )
)

; create new directory, if necessary

(if (= #keep_path 0)
    (makedir @default-dest
        (prompt (#txt_create_dir @default-dest))
        (help @makedir-help)
        (infos)
    )
)

(makeassign #plainassign @default-dest)

; copy files

(if #files
    ((if (IN #files 0)
        ((copyfiles                                      ; copy picture-files
            (prompt #txt_copy_pictures)
            (help @copyfiles-help)
            (source "Pictures")
            (dest (cat #assignname "Pictures"))
            (all)
            (infos)
            (optional askuser)
            (confirm #conflevel)
            )
        (run (cat "c:copy Pictures.info " #assignname "Pictures.info QUIET NOREQ")   ; does not work with 'copyfiles'
            (prompt #txt_copy_icon)
            (help "")
            )
        )
     )
     (if (IN #files 1)
        ((copyfiles                                      ; copy palette-files
            (prompt #txt_copy_palettes)
            (help @copyfiles-help)
            (source "Palettes")
            (dest (cat #assignname "Palettes"))
            (all)
            (infos)
            (optional askuser)
            (confirm #conflevel)
            )
        (run (cat "c:copy Palettes.info " #assignname "Palettes.info QUIET NOREQ")   ; does not work with 'copyfiles'
            (prompt #txt_copy_icon)
            (help "")
            )
        )
     )
     (if (IN #files 2)
        ((copyfiles                                      ; copy documentation
            (prompt #txt_copy_docs)
            (help @copyfiles-help)
            (source "Docs")
            (dest (cat #assignname "Docs"))
            (all)
            (infos)
            (optional askuser)
            (confirm #conflevel)
            )
        (run (cat "c:copy Docs.info " #assignname "Docs.info QUIET NOREQ")   ; does not work with 'copyfiles'
            (prompt #txt_copy_icon)
            (help "")
            )
        )
     )
     (if (IN #files 3)
        ((copyfiles                                      ; copy sources
            (prompt #txt_copy_sources)
            (help @copyfiles-help)
            (source "Developer")
            (dest (cat #assignname "Developer"))
            (all)
            (infos)
            (optional askuser)
            (confirm #conflevel)
            )
        (run (cat "c:copy Developer.info " #assignname "Developer.info QUIET NOREQ")   ; does not work with 'copyfiles'
            (prompt #txt_copy_icon)
            (help "")
            )
         )
     )
     (if (IN #files 4)
        ((copyfiles                                      ; copy arexx-scripts
            (prompt #txt_copy_arexx-scripts)
            (help @copyfiles-help)
            (source "arexx")
            (dest (cat #assignname "arexx"))
            (all)
            (infos)
            (optional askuser)
            (confirm #conflevel)
            )
        (run (cat "c:copy arexx.info " #assignname "arexx.info QUIET NOREQ")   ; does not work with 'copyfiles'
            (prompt #txt_copy_icon)
            (help "")
            )
        )
     )
    )
)

; copy languages

(if #languages
    (
        (makedir (cat #assignname "catalogs")
            (prompt (#txt_create_dir (cat #assignname "catalogs")))
            (help @makedir-help)
            (confirm #conflevel)
            )

        (if (IN #languages 0)                             ; deutsch
            (copyfiles
                (prompt #txt_copy_deutsch)
                (help @copyfiles-help)
                (source "catalogs/deutsch")
                (dest (cat #assignname "catalogs/deutsch"))
                (all)
                (optional askuser)
                (confirm #conflevel)
                )
            )
        (if (IN #languages 1)                              ; italiano
            (copyfiles
                (prompt #txt_copy_italiano)
                (help @copyfiles-help)
                (source "catalogs/italiano")
                (dest (cat #assignname "catalogs/italiano"))
                (all)
                (optional askuser)
                (confirm #conflevel)
                )
            )
    )
)

(copyfiles                    ; copy executable
    (prompt #txt_copy_prog)
    (help @copyfiles-help)
    (source #execname)
    (dest #assignname)
    (infos)
    (optional askuser)
    (confirm #conflevel)
    )

(copyfiles                    ; copy readme
    (prompt #txt_copy_prog)
    (help @copyfiles-help)
    (source (cat #execname ".readme"))
    (dest #assignname)
    (infos)
    (optional askuser)
    (confirm #conflevel)
    )

(copyfiles                    ; copy Welcome.8svx
    (prompt #txt_copy_prog)
    (help @copyfiles-help)
    (source "Welcome.8svx")
    (dest #assignname)
    (infos)
    (optional askuser)
    (confirm #conflevel)
    )

(if (= #settings_saved 1)
    (if (askbool
            (prompt #txt_keep_settings)
            (help "")
            (default 1))
        (
        (tooltype                                    ; set old tooltype-settings
            (dest (cat #assignname #execname))
            (settooltype "COLORSREMAP" #TT_COLORSREMAP))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "FONTNAME" #TT_FONTNAME))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "FONTSIZE" #TT_FONTSIZE))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "IMAGMAX" #TT_IMAGMAX))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "IMAGMIN" #TT_IMAGMIN))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "JULIACONSTIMAG" #TT_JULIACONSTIMAG))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "JULIACONSTREAL" #TT_JULIACONSTREAL))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "REALMAX" #TT_REALMAX))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "REALMIN" #TT_REALMIN))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "SCREENDEPTH" #TT_SCREENDEPTH))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "SCREENWIDTH" #TT_SCREENWIDTH))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "SCREENHEIGHT" #TT_SCREENHEIGHT))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "SCREENMODE" #TT_SCREENMODE))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "STARTPRI" #TT_STARTPRI))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "POWER" #TT_POWER))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "STARTWITHJULIA" #TT_STARTWITHJULIA))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "USEPPC" #TT_USEPPC))
        (tooltype
            (dest (cat #assignname #execname))
            (settooltype "USERNAME" #TT_USERNAME))
        )
    )
)

; add assign to user-startup

(if (askbool
        (prompt (#txt_add_assign_msg @default-dest))
        (help "")
        )
    (startup #execname
        (prompt #txt_add_assign)
        (help @startup-help)
        (command (cat "Assign " #assignname " \"" @default-dest "\""))
        )
    )

(exit)

