(set ver (/ (getversion) 65536))

(set locale
 (askchoice
  (prompt  "Select the prefered language.")
  (help    "")
  (choices "Dansk" "Deutsch" "English" "Espaol" "Franais" "Svenska")
  (default 2)
 )
)

(if (= locale 0)
 (
 (message "\n IMPORTANT NOTE:\n\n"
          "This program installs MTool and MI on your Amiga.  If you don't understand one of the questions that show up during installation, please select the 'help...' button.  You will be instructed then about the next step and what it's for."
 )

 (set progdest
     (askdir
         (prompt "Please select a drawer for MTool.")
         (help "MTool and MI will be copied to this drawer.")
         (default "SYS:Tools")
         (newpath)
     )
 )

 (set @default-dest progdest)

 (copyfiles
     (prompt "Copying MTool...")
     (source "MTool")
     (infos)
     (dest progdest)
 )

 (complete 20)

 (copyfiles
     (prompt "Copying MTPrefs...")
     (source "Prefs/MTool")
     (infos)
     (dest "SYS:Prefs")
 )

 (complete 30)

 (copyfiles
     (prompt "Copying MI...")
     (source "MI")
     (infos)
     (dest progdest)
 )

 (complete 45)

 (if (= (exists "ENVARC:MTool/MTool.Prefs") FALSE )
 (
     (makedir "ENVARC:MTool")
     (makedir "ENV:MTool")

     (copyfiles
         (prompt "Copying example prefs file...")
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENVARC:MTool")
     )
     (copyfiles
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENV:MTool")
     )
 )
 )

 (complete 60)

 (if (> ver 37)
     (if (exists "Locale:Catalogs/dansk")
     (
         (if (askbool (help "If you selected dansk as default language and install the files, MTool and MI will show up with a dansk user interface.") (prompt "Do you want to install the dansk locale files?"))
         (
             (copyfiles
                 (prompt "Installing Dansk Catalogs")
                 (source "Catalogs/dansk")
                 (pattern "#?")
                 (dest "Locale:Catalogs/dansk")
             )
         )        
         )
     )
     )
 )

 (if (askbool (help "The helpfile offers a help function while running MI.") (prompt "Do you want to install the helpfile for MI?"))
 (
     (copyfiles
         (prompt  "Copying helpfile:...")
         (source  "MI_GB.help")
         (dest    "ENVARC:")
         (newname "MI.help")
     )
 )
 )

 (complete 70)

 (if (askbool (help "The icons will be used in MTool to create icons for files according to their type. This feature is disabled in the unregistered version.") (prompt "Do you want to install the icons?"))
 (
     (set icondest
         (askdir
              (prompt "Please select a drawer for the icons.")
              (help "The example prefs file expects the icons in the default drawer.")
              (default (tackon progdest "MToolIcons"))
              (newpath)
         )
     )

     (if (askbool (help "MagicWB is a collection of background patterns and icons, providing a very nice 8-coloured Workbench.  You can install icons especially designed for MagicWB.") (prompt "Do you use 'MagicWB'?"))
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons/MWB")
         (pattern "(~MT)#?.info")
         (dest icondest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTool.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MI.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTPrefs.info")
         (dest "SYS:Prefs")
         (newname "MTool.info")
     )
     )
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons")
         (pattern "#?.info")
         (dest icondest)
     )
     )
     )
 )
 )

 (complete 80)

 (if (askbool (help "The docs include two AmigaGuide documents and a history file.") (prompt "Do you want to install the docs?"))
 (
     (set docdest
         (askdir
              (prompt "Please select a drawer for the docs.")
              (help "It doesn't matter where you put the docs if you want to move them...")
              (default (tackon progdest "Docs"))
              (newpath)
         )
     )
     (copyfiles
         (prompt "Copying Docs...")
         (source "Docs")
         (pattern "#?_GB.#?")
         (infos)
         (dest docdest)
     )
 )
 )

 (complete 90)

 (if (askbool (help "DatMon is useful in hex mode of MI, Fineline 11 is used in MTools "About" requester.") (prompt "Do you want to install the fonts?"))
 (
     (set fontdest
         (askdir
             (prompt "Please select a drawer for the fonts.")
             (help "If you didn't 'assign add' another font drawer, you shouldn't touch this default setting.")
             (default "Fonts:")
             (newpath)
         )
     )
     (copyfiles
         (prompt "Copying fonts...")
         (source "Fonts")
         (dest fontdest)
         (pattern "#?")
     )
 )
 )

 (complete 99)
 )
)

(if (= locale 1)
 (
 (message "\n HINWEIS ZUR INSTALLATION VON MTOOL:\n\n"
          "Dieses Programm installiert MTool und MI auf Ihrem System. Sollten Sie eine der whrend der Installation auftretenden Fragen nicht verstehen, knnen Sie jederzeit 'Hilfe...' anwhlen. Sie erhalten dann genaue Auskunft, was der nchste Arbeitsschritt macht und wozu er gut ist."
 )

 (set progdest
     (askdir
         (prompt "Bitte whlen Sie ein Verzeichnis fr MTool aus.")
         (help "In das gewhlte Verzeichnis werden die Programme MTool und MI kopiert.")
         (default "SYS:Tools")
         (newpath)
     )
 )

 (set @default-dest progdest)

 (copyfiles
     (prompt "Kopiere Hauptprogramm...")
     (source "MTool")
     (infos)
     (dest progdest)
 )

 (complete 20)

 (copyfiles
     (prompt "Kopiere den Voreinstellungseditor zu MTool")
     (source "Prefs/MTool")
     (infos)
     (dest "SYS:Prefs")
 )

 (complete 30)

 (copyfiles
     (prompt "Kopiere den Textanzeiger MI")
     (source "MI")
     (infos)
     (dest progdest)
 )

 (complete 45)

 (if (= (exists "ENVARC:MTool/MTool.Prefs") FALSE )
 (
     (makedir "ENVARC:MTool")
     (makedir "ENV:MTool")

     (copyfiles
         (prompt "Kopiere Prefsdatei zu MTool")
         (source "Prefs/Env-Archive/MTool/MTool_d.Prefs")
         (dest "ENVARC:MTool")
         (newname "MTool.prefs")
     )
     (copyfiles
         (source "Prefs/Env-Archive/MTool/MTool_d.Prefs")
         (dest "ENV:MTool")
         (newname "MTool.prefs")
     )
 )
 )

 (complete 60)

 (if (> ver 37)
     (if (exists "Locale:Catalogs/deutsch")
     (
         (if (askbool (help "Wenn Sie als Landessprache deutsch gewhlt haben und diese Dateien installieren lassen, werden MTool und MI eine deutsche Benutzeroberflche anzeigen.") (prompt "Soll die deutsche Sprachanpassung installiert werden?"))
         (
             (copyfiles
                 (prompt "Installiere deutsche Catalogs")
                 (source "Catalogs/deutsch")
                 (pattern "#?")
                 (dest "Locale:Catalogs/deutsch")
             )
         )        
         )
     )
     )
 )

 (if (askbool (help "Die Hilfsdatei bietet Ihnen eine deutschsprachige Hilfsfunktion in MI.") (prompt "Soll die Hilfsdatei zu MI kopiert werden?"))
 (
     (copyfiles
         (prompt  "Kopiere Hilfsdatei zu MI nach ENVARC:...")
         (source  "MI_D.help")
         (dest    "ENVARC:")
         (newname "MI.help")
     )
 )
 )

 (complete 70)

 (if (askbool (help "Die Icons werden von MTool benutzt, um Dateien gem ihrem Dateityp mit Icons versehen zu knnen. Diese Fhigkeit ist in der unregistrierten Version gesperrt.") (prompt "Sollen die Icons installiert werden?"))
 (
     (set icondest
         (askdir
              (prompt "Bitte whlen Sie ein Verzeichnis fr die Icons aus.")
              (help "Die mitgelieferte Voreinstellungsdatei erwartet die Icons im vorgegebenen Verzeichnis")
              (default (tackon progdest "MToolIcons"))
              (newpath)
         )
     )

     (if (askbool (help "MagicWB ist eine Sammlung von Hintergrundgraphiken und Icons, die eine sehr schne 8-farbige Workbench ergeben. Sie knnen dazu passende Icons installieren lassen") (prompt "Benutzen Sie 'MagicWB'?"))
     (
     (copyfiles
         (prompt "Kopiere Icons...")
         (source "MToolIcons/MWB")
         (pattern "(~MT)#?.info")
         (dest icondest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTool.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MI.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTPrefs.info")
         (dest "SYS:Prefs")
         (newname "MTool.info")
     )
     )
     (
     (copyfiles
         (prompt "Kopiere Icons...")
         (source "MToolIcons")
         (pattern "#?.info")
         (dest icondest)
     )
     )
     )
 )
 )

 (complete 80)

 (if (askbool (help "Die Anleitungen umfassen zwei AmigaGuide-Dokumente und eine nderungsdatei.") (prompt "Sollen die Anleitungen kopiert werden?"))
 (
     (set docdest
         (askdir
              (prompt "Bitte whlen Sie ein Verzeichnis fr die Anleitungen aus.")
              (help "Es ist egal, wo Sie die Anleitungen hinstecken, Sie sollten Sie blo wiederfinden...")
              (default (tackon progdest "Anleitungen"))
              (newpath)
         )
     )
     (copyfiles
         (prompt "Kopiere Anleitungen...")
         (source "Docs")
         (pattern "#?_D.#?")
         (infos)
         (dest docdest)
     )
 )
 )

 (complete 90)

 (if (askbool (help "Die Schrift DatMon ist im Hex-Modus von MI recht ntzlich, Fineline 11 wird im Aboutrequester von MTool verwendet.") (prompt "Sollen die Schriften kopiert werden?"))
 (
     (set fontdest
         (askdir
             (prompt "Bitte whlen Sie ein Verzeichnis fr die Schriften aus.")
             (help "Wenn Sie kein Verzeichnis zum Fonts:-Verzeichnis zuge'add'et haben, sollten Sie die Einstellung bei Fonts: belassen.")
             (default "Fonts:")
             (newpath)
         )
     )
     (copyfiles
         (prompt "Kopiere Zeichenstze...")
         (source "Fonts")
         (dest fontdest)
         (pattern "#?")
     )
 )
 )

 (complete 99)
 )
)

(if (= locale 2)
 (
 (message "\n IMPORTANT NOTE:\n\n"
          "This programm installs MTool and MI on your Amiga. If you don't understand one of the questions that show up during installation, please select the 'help...' button. You will be instructed then about the next step and what it's good for."
 )

 (set progdest
     (askdir
         (prompt "Please select a drawer for MTool.")
         (help "MTool and MI will be copied to this drawer.")
         (default "SYS:Tools")
         (newpath)
     )
 )

 (set @default-dest progdest)

 (copyfiles
     (prompt "Copying MTool...")
     (source "MTool")
     (infos)
     (dest progdest)
 )

 (complete 20)

 (copyfiles
     (prompt "Copying MTPrefs...")
     (source "Prefs/MTool")
     (infos)
     (dest "SYS:Prefs")
 )

 (complete 30)

 (copyfiles
     (prompt "Copying MI...")
     (source "MI")
     (infos)
     (dest progdest)
 )

 (complete 45)

 (if (= (exists "ENVARC:MTool/MTool.Prefs") FALSE )
 (
     (makedir "ENVARC:MTool")
     (makedir "ENV:MTool")

     (copyfiles
         (prompt "Copying example prefs file...")
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENVARC:MTool")
     )
     (copyfiles
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENV:MTool")
     )
 )
 )

 (complete 60)

 (if (askbool (help "The helpfile offers a help function while running MI.") (prompt "Do you want to install the helpfile for MI?"))
 (
     (copyfiles
         (prompt  "Copying helpfile:...")
         (source  "MI_GB.help")
         (dest    "ENVARC:")
         (newname "MI.help")
     )
 )
 )

 (complete 70)

 (if (askbool (help "The icons will be used in MTool to create icons for files according to their type. This feature is disabled in the unregistered version.") (prompt "Do you want to install the icons?"))
 (
     (set icondest
         (askdir
              (prompt "Please select a drawer for the icons.")
              (help "The example prefs file expects the icons in the default drawer.")
              (default (tackon progdest "MToolIcons"))
              (newpath)
         )
     )

     (if (askbool (help "MagicWB is a collection of background patterns and icons, providing a very nice 8-coloured Workbench. You can install icons especially designed for MagicWB.") (prompt "Do you use 'MagicWB'?"))
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons/MWB")
         (pattern "(~MT)#?.info")
         (dest icondest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTool.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MI.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTPrefs.info")
         (dest "SYS:Prefs")
         (newname "MTool.info")
     )
     )
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons")
         (pattern "#?.info")
         (dest icondest)
     )
     )
     )
 )
 )

 (complete 80)

 (if (askbool (help "The docs iclude two AmigaGuide documents and a history file.") (prompt "Do you want to install the docs?"))
 (
     (set docdest
         (askdir
              (prompt "Please select a drawer for the docs.")
              (help "It doesn't matter where you put the docs, if you manage to refind them...")
              (default (tackon progdest "Docs"))
              (newpath)
         )
     )
     (copyfiles
         (prompt "Copying Docs...")
         (source "Docs")
         (pattern "#?_GB.#?")
         (infos)
         (dest docdest)
     )
 )
 )

 (complete 90)

 (if (askbool (help "DatMon is useful in hex mode of MI, Fineline 11 is used in MTools about requester.") (prompt "Do you want to install the fonts?"))
 (
     (set fontdest
         (askdir
             (prompt "Please select a drawer for the fonts.")
             (help "If you didn't 'assign add' another font drawer, you shouldn't tuch this default setting.")
             (default "Fonts:")
             (newpath)
         )
     )
     (copyfiles
         (prompt "Copying fonts...")
         (source "Fonts")
         (dest fontdest)
         (pattern "#?")
     )
 )
 )

 (complete 99)
 )
)

(if (= locale 3)
 (
 (message "\n IMPORTANT NOTE:\n\n"
          "This programm installs MTool and MI on your Amiga. If you don't understand one of the questions that show up during installation, please select the 'help...' button. You will be instructed then about the next step and what it's good for."
 )

 (set progdest
     (askdir
         (prompt "Please select a drawer for MTool.")
         (help "MTool and MI will be copied to this drawer.")
         (default "SYS:Tools")
         (newpath)
     )
 )

 (set @default-dest progdest)

 (copyfiles
     (prompt "Copying MTool...")
     (source "MTool")
     (infos)
     (dest progdest)
 )

 (complete 20)

 (copyfiles
     (prompt "Copying MTPrefs...")
     (source "Prefs/MTool")
     (infos)
     (dest "SYS:Prefs")
 )

 (complete 30)

 (copyfiles
     (prompt "Copying MI...")
     (source "MI")
     (infos)
     (dest progdest)
 )

 (complete 45)

 (if (= (exists "ENVARC:MTool/MTool.Prefs") FALSE )
 (
     (makedir "ENVARC:MTool")
     (makedir "ENV:MTool")

     (copyfiles
         (prompt "Copying example prefs file...")
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENVARC:MTool")
     )
     (copyfiles
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENV:MTool")
     )
 )
 )

 (complete 60)

 (if (> ver 37)
     (if (exists "Locale:Catalogs/espaol")
     (
         (if (askbool (help "If you selected espaol as default language and install these files, MTool and MI will show up with a spanish user interface.") (prompt "Do you want to install the spanish locale files?"))
         (
             (copyfiles
                 (prompt "Installing Spanish Catalogs")
                 (source "Catalogs/espaol")
                 (pattern "#?")
                 (dest "Locale:Catalogs/espaol")
             )
         )        
         )
     )
     )
 )

 (if (askbool (help "The helpfile offers a help function while running MI.") (prompt "Do you want to install the helpfile for MI?"))
 (
     (copyfiles
         (prompt  "Copying helpfile:...")
         (source  "MI_GB.help")
         (dest    "ENVARC:")
         (newname "MI.help")
     )
 )
 )

 (complete 70)

 (if (askbool (help "The icons will be used in MTool to create icons for files according to their type. This feature is disabled in the unregistered version.") (prompt "Do you want to install the icons?"))
 (
     (set icondest
         (askdir
              (prompt "Please select a drawer for the icons.")
              (help "The example prefs file expects the icons in the default drawer.")
              (default (tackon progdest "MToolIcons"))
              (newpath)
         )
     )

     (if (askbool (help "MagicWB is a collection of background patterns and icons, providing a very nice 8-coloured Workbench. You can install icons especially designed for MagicWB.") (prompt "Do you use 'MagicWB'?"))
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons/MWB")
         (pattern "(~MT)#?.info")
         (dest icondest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTool.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MI.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTPrefs.info")
         (dest "SYS:Prefs")
         (newname "MTool.info")
     )
     )
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons")
         (pattern "#?.info")
         (dest icondest)
     )
     )
     )
 )
 )

 (complete 80)

 (if (askbool (help "The docs iclude two AmigaGuide documents and a history file.") (prompt "Do you want to install the docs?"))
 (
     (set docdest
         (askdir
              (prompt "Please select a drawer for the docs.")
              (help "It doesn't matter where you put the docs, if you manage to refind them...")
              (default (tackon progdest "Docs"))
              (newpath)
         )
     )
     (copyfiles
         (prompt "Copying Docs...")
         (source "Docs")
         (pattern "#?_GB.#?")
         (infos)
         (dest docdest)
     )
     (copyfiles
         (prompt "Copying Docs...")
         (source "Docs")
         (pattern "#?_E.#?")
         (infos)
         (dest docdest)
     )
 )
 )

 (complete 90)

 (if (askbool (help "DatMon is useful in hex mode of MI, Fineline 11 is used in MTools about requester.") (prompt "Do you want to install the fonts?"))
 (
     (set fontdest
         (askdir
             (prompt "Please select a drawer for the fonts.")
             (help "If you didn't 'assign add' another font drawer, you shouldn't tuch this default setting.")
             (default "Fonts:")
             (newpath)
         )
     )
     (copyfiles
         (prompt "Copying fonts...")
         (source "Fonts")
         (dest fontdest)
         (pattern "#?")
     )
 )
 )

 (complete 99)
 )
)

(if (= locale 4)
 (
 (message "\n IMPORTANT NOTE:\n\n"
          "This programm installs MTool and MI on your Amiga. If you don't understand one of the questions that show up during installation, please select the 'help...' button. You will be instructed then about the next step and what it's good for."
 )

 (set progdest
     (askdir
         (prompt "Please select a drawer for MTool.")
         (help "MTool and MI will be copied to this drawer.")
         (default "SYS:Tools")
         (newpath)
     )
 )

 (set @default-dest progdest)

 (copyfiles
     (prompt "Copying MTool...")
     (source "MTool")
     (infos)
     (dest progdest)
 )

 (complete 20)

 (copyfiles
     (prompt "Copying MTPrefs...")
     (source "Prefs/MTool")
     (infos)
     (dest "SYS:Prefs")
 )

 (complete 30)

 (copyfiles
     (prompt "Copying MI...")
     (source "MI")
     (infos)
     (dest progdest)
 )

 (complete 45)

 (if (= (exists "ENVARC:MTool/MTool.Prefs") FALSE )
 (
     (makedir "ENVARC:MTool")
     (makedir "ENV:MTool")

     (copyfiles
         (prompt "Copying example prefs file...")
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENVARC:MTool")
     )
     (copyfiles
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENV:MTool")
     )
 )
 )

 (complete 60)

 (if (> ver 37)
     (if (exists "Locale:Catalogs/franais")
     (
         (if (askbool (help "If you selected franais as default language and install these files, MTool and MI will show up with a French user interface.") (prompt "Do you want to install the French locale files?"))
         (
             (copyfiles
                 (prompt "Installing French Catalogs")
                 (source "Catalogs/franais")
                 (pattern "#?")
                 (dest "Locale:Catalogs/franais")
             )
         )        
         )
     )
     )
 )

 (if (askbool (help "The helpfile offers a help function while running MI.") (prompt "Do you want to install the helpfile for MI?"))
 (
     (copyfiles
         (prompt  "Copying helpfile:...")
         (source  "MI_GB.help")
         (dest    "ENVARC:")
         (newname "MI.help")
     )
 )
 )

 (complete 70)

 (if (askbool (help "The icons will be used in MTool to create icons for files according to their type. This feature is disabled in the unregistered version.") (prompt "Do you want to install the icons?"))
 (
     (set icondest
         (askdir
              (prompt "Please select a drawer for the icons.")
              (help "The example prefs file expects the icons in the default drawer.")
              (default (tackon progdest "MToolIcons"))
              (newpath)
         )
     )

     (if (askbool (help "MagicWB is a collection of background patterns and icons, providing a very nice 8-coloured Workbench. You can install icons especially designed for MagicWB.") (prompt "Do you use 'MagicWB'?"))
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons/MWB")
         (pattern "(~MT)#?.info")
         (dest icondest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTool.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MI.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTPrefs.info")
         (dest "SYS:Prefs")
         (newname "MTool.info")
     )
     )
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons")
         (pattern "#?.info")
         (dest icondest)
     )
     )
     )
 )
 )

 (complete 80)

 (if (askbool (help "The docs iclude two AmigaGuide documents and a history file.") (prompt "Do you want to install the docs?"))
 (
     (set docdest
         (askdir
              (prompt "Please select a drawer for the docs.")
              (help "It doesn't matter where you put the docs, if you manage to refind them...")
              (default (tackon progdest "Docs"))
              (newpath)
         )
     )
     (copyfiles
         (prompt "Copying Docs...")
         (source "Docs")
         (pattern "#?_GB.#?")
         (infos)
         (dest docdest)
     )
 )
 )

 (complete 90)

 (if (askbool (help "DatMon is useful in hex mode of MI, Fineline 11 is used in MTools about requester.") (prompt "Do you want to install the fonts?"))
 (
     (set fontdest
         (askdir
             (prompt "Please select a drawer for the fonts.")
             (help "If you didn't 'assign add' another font drawer, you shouldn't tuch this default setting.")
             (default "Fonts:")
             (newpath)
         )
     )
     (copyfiles
         (prompt "Copying fonts...")
         (source "Fonts")
         (dest fontdest)
         (pattern "#?")
     )
 )
 )

 (complete 99)
 )
)

(if (= locale 5)
 (
 (message "\n IMPORTANT NOTE:\n\n"
          "This programm installs MTool and MI on your Amiga. If you don't understand one of the questions that show up during installation, please select the 'help...' button. You will be instructed then about the next step and what it's good for."
 )

 (set progdest
     (askdir
         (prompt "Please select a drawer for MTool.")
         (help "MTool and MI will be copied to this drawer.")
         (default "SYS:Tools")
         (newpath)
     )
 )

 (set @default-dest progdest)

 (copyfiles
     (prompt "Copying MTool...")
     (source "MTool")
     (infos)
     (dest progdest)
 )

 (complete 20)

 (copyfiles
     (prompt "Copying MTPrefs...")
     (source "Prefs/MTool")
     (infos)
     (dest "SYS:Prefs")
 )

 (complete 30)

 (copyfiles
     (prompt "Copying MI...")
     (source "MI")
     (infos)
     (dest progdest)
 )

 (complete 45)

 (if (= (exists "ENVARC:MTool/MTool.Prefs") FALSE )
 (
     (makedir "ENVARC:MTool")
     (makedir "ENV:MTool")

     (copyfiles
         (prompt "Copying example prefs file...")
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENVARC:MTool")
     )
     (copyfiles
         (source "Prefs/Env-Archive/MTool/MTool.Prefs")
         (dest "ENV:MTool")
     )
 )
 )

 (complete 60)

 (if (> ver 37)
     (if (exists "Locale:Catalogs/svenska")
     (
         (if (askbool (help "If you selected svenska as default language and install these files, MTool and MI will show up with a Swedish user interface.") (prompt "Do you want to install the Swedish locale files?"))
         (
             (copyfiles
                 (prompt "Installing Swedish Catalogs")
                 (source "Catalogs/svenska")
                 (pattern "#?")
                 (dest "Locale:Catalogs/svenska")
             )
         )        
         )
     )
     )
 )

 (if (askbool (help "The helpfile offers a help function while running MI.") (prompt "Do you want to install the helpfile for MI?"))
 (
     (copyfiles
         (prompt  "Copying helpfile:...")
         (source  "MI_S.help")
         (dest    "ENVARC:")
         (newname "MI.help")
     )
 )
 )

 (complete 70)

 (if (askbool (help "The icons will be used in MTool to create icons for files according to their type. This feature is disabled in the unregistered version.") (prompt "Do you want to install the icons?"))
 (
     (set icondest
         (askdir
              (prompt "Please select a drawer for the icons.")
              (help "The example prefs file expects the icons in the default drawer.")
              (default (tackon progdest "MToolIcons"))
              (newpath)
         )
     )

     (if (askbool (help "MagicWB is a collection of background patterns and icons, providing a very nice 8-coloured Workbench. You can install icons especially designed for MagicWB.") (prompt "Do you use 'MagicWB'?"))
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons/MWB")
         (pattern "(~MT)#?.info")
         (dest icondest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTool.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MI.info")
         (dest progdest)
     )
     (copyfiles
         (source "MToolIcons/MWB/MTPrefs.info")
         (dest "SYS:Prefs")
         (newname "MTool.info")
     )
     )
     (
     (copyfiles
         (prompt "Copying icons...")
         (source "MToolIcons")
         (pattern "#?.info")
         (dest icondest)
     )
     )
     )
 )
 )

 (complete 80)

 (if (askbool (help "The docs iclude two AmigaGuide documents and a history file.") (prompt "Do you want to install the docs?"))
 (
     (set docdest
         (askdir
              (prompt "Please select a drawer for the docs.")
              (help "It doesn't matter where you put the docs, if you manage to refind them...")
              (default (tackon progdest "Docs"))
              (newpath)
         )
     )
     (copyfiles
         (prompt "Copying Docs...")
         (source "Docs")
         (pattern "#?_S.#?")
         (infos)
         (dest docdest)
     )
     (copyfiles
         (prompt "Copying Docs...")
         (source "Docs")
         (pattern "#?_GB.#?")
         (infos)
         (dest docdest)
     )
 )
 )

 (complete 90)

 (if (askbool (help "DatMon is useful in hex mode of MI, Fineline 11 is used in MTools about requester.") (prompt "Do you want to install the fonts?"))
 (
     (set fontdest
         (askdir
             (prompt "Please select a drawer for the fonts.")
             (help "If you didn't 'assign add' another font drawer, you shouldn't tuch this default setting.")
             (default "Fonts:")
             (newpath)
         )
     )
     (copyfiles
         (prompt "Copying fonts...")
         (source "Fonts")
         (dest fontdest)
         (pattern "#?")
     )
 )
 )

 (complete 99)
 )
)

(exit)
