;HDPP Installer

(complete 0)
(message "Welcome to the HDPP installation program.\n\n"
         "This process is automatic and the only input required from you "
         "is the place which you want to install the program.\n\n"
         "HDPP is ©1998 Joker Developments Limited.") 

(set #destdir
 (askdir
  (prompt "Select a directory to install HDPP to (a directory will be created.")
  (help "HDPP needs to have it's own directory if it is going to be "
        "installed successfully. The installer will create the directory "
        "called HDPP on it's own, so don't worry.")
  (default "Workbench:Tools")
 )
)

(set #dest
 (tackon #destdir "HDPP/")
)
(set @default-dest #dest)
(makedir #dest
 (prompt "Creating directory "#dest".")
 (help @makedir-help)
 (infos)
)

(copyfiles
 (prompt "Copying required files to "#dest"...")
 (help @copyfiles-help)
 (source "")
 (dest #dest)
 (infos)
 (all)
)

(rename "C:LoadWB" "C:IO.DEV"
 (prompt "Renaming C:LoadWB to C:IO.DEV...")
 (help "HDPP requires the LoadWB command to be called IO.DEV so that the "
       "script file can be put in as LoadWB. This ensures that there are "
       "no modifications to your startup-sequence itself.")
)
(textfile
 (prompt "Creating a new LoadWB script in C: ...")
 (help "This new script will launch HDPP and then load the workbench as "
       "usual. This way, people fiddling with your startup-sequence will "
       "see nothing unusual. This is how HDPP buries itself in the "
       "system.")
 (dest "C:LoadWB")
 (append "Assign HDPP: "#dest"\n"
         "HDPP:HDPP1.0\n"
         "Assign HDPP: Remove\n"
         "C:IO.DEV >NIL:")
)
(protect "C:LoadWB" "+s")
(copyfiles
 (prompt "Installing the Prefs program to SYS:Prefs ...")
 (help "The HDPP Prefs program allows you to change your password 'on the "
       "fly' and is extremely easy to use.")
 (source "HDPP_Prefs")
 (dest "SYS:Prefs")
 (infos)
)
(complete 100)
