(message "\nWelcome to the main installation program for the update to Hack Attack III.\n\n\nPOKES DETAILS\n\nAuthor:- "#hack_author"\nVersion:- "#hack_version"\nDate:- "#hack_date"\n\n\n\nClick Proceed when ready....")
(set #HA3_INSTALLED
(askbool
(prompt "Do you have the original Hack Attack III installed?")
(help "This is primarily an update to the original Hack Attack III. However, it can also be installed as a stand-alone unit with just these POKEs set up.")
(choices "No"
"Yes")
(default 0)
)
)
;HA3=0 -> HA3 is installed
(if (= #HA3_INSTALLED 0)
(
(set #directory
(askdir
(prompt "Where do you keep the main Hack Attack III program?)")
(help "This program has to know where the main Hack Attack III program is kept so that the new POKEs can be copied over, and the menus updated....\n\nNote that only the directories will show up on this requester.. In other words, you won't actually SEE the Hack Attack III file, you just have to know where it is (use a file manager if at all unsure).")
(prompt "This program couldn't find the main Hack Attack III program.\nThis indicates that you have probably selected the wrong directory.\n\nHowever, if you are sure you have sleceted this directory correctly (like perhaps you have already renamed/erased/moved the old Hack Attack III file, it can continue and will just install this as a stand-alone product.\nSo, Are you SURE this is the correct directory?\n\nAnswer:-\n\nYES ..... Installation will continue....\nNO ...... Installation will abort (sorry).")
(help "Just what it says there.\n\nI may as well take this time to say sorry I couldn't get it to jump back to the start.. I'm new at this script writing lark myself. Maybe if the Amiga had been shipped with a MANUAL for the installer program?!?!?")
(choices "No. Stop here"
"Yes. Carry on regardless")
(default 0)
)
)
(if (= #HA3_NOT_Found 0)
(
(set INSTALL_GO 1)
(set new_install 1)
)
)
(if (= #HA3_NOT_Found 1)
(
(exit "Try running this installation program once you have verified where the file HACK ATTACI III is kept.\n\nIf you are convinced you are doing everything properly, run a file manager like DOpus and manually copy the files in the A-Z directories to the matching HA3 directories, and use a text editor to update the A-Z menus" (QUIET))
)
)
)
)
)
;end of "YES" option
(if (= #HA3_INSTALLED 1)
(
(set #HA3_NOT_INSTALLED
(askbool
(prompt "This is an update to Hack Attack III. However, it can be used by iteslf (a sort of mini POKE guide with these POKEs. \n\nDo you want to continue and install this update by itself, or abort?\n\nAnswer:-\n\nYES ..... Installation will continue....\nNO ...... Installation will abort (sorry).")
(help "Just what it says there.\n\nI may as well take this time to say sorry I couldn't get it to jump back to the start.. I'm new at this script writing lark myself. Maybe if the Amiga had been shipped with a MANUAL for the installer program?!?!?")
(choices "No. Stop here"
"Yes. Install it")
(default 0)
)
)
)
)
)
(if (= #HA3_NOT_INSTALLED 0)
(
(set new_install 1)
(set #directory
(askdir
(prompt "Where do you want to install the POKE Guide?)")
(help "Select somewhere you want to install the GUIDE?\n\nNote that only the directories will show up on this requester...")
(default "HA3:")
)
)
(makeassign "HA3_Dir" #directory)
(set @default-dest #directory)
(run "copy temp/POKE_GUIDE.guide ha3_dir:")
(run "copy temp/POKE_GUIDE.guide.info ha3_dir:")
)
)
(if (= #HA3_NOT_INSTALLED 1)
(
(exit "You have aborted\n\nYou can either re-install this as a stand alone product, or install Hack Attack III and then re-run this installation program.\n\nYou can get Hack Attack III from Aminet under misc/emu/acs-ha3.lha. It's on Aminet 5" (QUIET))
)
)
(makeassign "HA3_Dir" #directory)
(set @default-dest #directory)
;COPY THE FILES TO THE ASSIGNED DIRECTORY (JUST THE POKES JUST NOW)
(prompt "A script called ZXAM_RUN.DOPUS already exists in your REXX: directory!")
(help "It could be that this is from a previous installation of the program, or it could be an earlier version of the script.\nIf you are really sure that you don't need the version currently installed in the REXX: directory on your HD, then tick the first option ('Copy installation version').\nIf you want to copy the installation version, but keep a backup copy of the original version currently installed on your HD, tick both boxes.\nIf you want to only keep the version on your HD, don't tick either box'")
(choices "Install version from this installation."
(message "The installer version of the script has not been copied")
;do absolutely nothing at all hehehe
))
;update the menu for each letter (this will be good!)
(if (= new_install 1)
(
(message "This program will now create new sub-index files in the directory you selected\n\nThis may take a few moments, so please be patient.")
)
)
(if (= new_install 0)
(
(message "This program will now update the existing Hack Attack III sub-indexes by adding the new hacks to the bottom of them.\n\nThis may take a few moments, so please be patient.")
)
)
(set #ha3_letter "A")
(P_update_guide)
(set #ha3_letter "B")
(P_update_guide)
(set #ha3_letter "C")
(P_update_guide)
(set #ha3_letter "D")
(P_update_guide)
(set #ha3_letter "E")
(P_update_guide)
(set #ha3_letter "F")
(P_update_guide)
(set #ha3_letter "G")
(P_update_guide)
(set #ha3_letter "H")
(P_update_guide)
(set #ha3_letter "I")
(P_update_guide)
(set #ha3_letter "J")
(P_update_guide)
(set #ha3_letter "K")
(P_update_guide)
(set #ha3_letter "L")
(P_update_guide)
(set #ha3_letter "M")
(P_update_guide)
(set #ha3_letter "N")
(P_update_guide)
(set #ha3_letter "O")
(P_update_guide)
(set #ha3_letter "P")
(P_update_guide)
(set #ha3_letter "Q")
(P_update_guide)
(set #ha3_letter "R")
(P_update_guide)
(set #ha3_letter "S")
(P_update_guide)
(set #ha3_letter "T")
(P_update_guide)
(set #ha3_letter "U")
(P_update_guide)
(set #ha3_letter "V")
(P_update_guide)
(set #ha3_letter "W")
(P_update_guide)
(set #ha3_letter "X")
(P_update_guide)
(set #ha3_letter "Y")
(P_update_guide)
(set #ha3_letter "Z")
(P_update_guide)
(set #ha3_letter "NUM")
(P_update_guide)
(set #HA3_ASSIGN 9)
(set exit_mess "Your updated HACK ATTACK III")
(set assign_stat "was NOT")
(if (= new_install 1)
(
(set exit_mess "Your new stand alone POKE GUIDE")
(set #HA3_ASSIGN
(askbool
(prompt "Do you want an assign added to the USER-STARTUP file which points to the directory you have just installed the stand-alone POKE Guide to?\n\n** NOTE ** The assign is NOT required. The POKE Guide will work perfectly well without it - it is just for your convenience.")
(help "Just adds a simple line to the S:USER-STARTUP file which points an assign to where you have just installed the stand-alone POKE Guide to. It just saves you having to trawl through directories.")
(choices "No"
"Yes")
(default 0)
)
)
(if (= #HA3_ASSIGN 0)
(
(set #ASSIGN_NAME
(askstring
(prompt "Please enter the name of the assign you want. Be sure it does not clash with any other assigns!!\n\nIMPORTANT!!\n\nDo NOT put any colon (:) mark at the end. JUST the name....")
(help "Enter the name of the assign you want to give for this directory.\n\n. Be careful you do not select a name which is already used elsewhere (like ENV for example)")
(set bye_bye (cat exit_mess " can be found in the directory\n" #directory "\n\nAn assign " assign_stat " added to S:USER-STARTUP\n\n\nYou can now just double click its icon to start, or you can read the guide docs file supplied"))
(if (= daemon_found 1)
(
(set Dameon_found_message "Your ToolsDaemon menu was ")
(set #UPDATE_DAEMON
(askbool
(prompt "This progam has found Tools Daemon in your SYS:WBSTARTUP drawer.\n\nWould you like to add a menu pointing to the Guide?\n\n\n(Your old settings file will be backed up)")
(help "The program found the file TOOLSDAEMON in your SYS:WBSTARTUP drawer, and can add a menu to your existing ToolsDaemon setup which will point to your newly installed Guide.\n\nNote. If you say yes, the change will not be apparent until you either reboot the Amiga, or go to the TOOLSPREFS option under TOOLS on Workbench, and select SAVE when the setup screen appears.")
(choices "No"
"Yes")
(default 0)
)
)
(set update_daemon_message "NOT")
(if (= #update_daemon 0)
(
(set start_message "\n\n\nYou can now just double click its icon or use the menu in your ToolsDaemon to start. Or you can read the guide docs file supplied")
(message "\nTOOLSDAEMON UPDATED\n\nNote. The change to your ToolsDaemon will not be apparent until you either reboot the Amiga, or go to the TOOLSPREFS option under TOOLS on Workbench, and select SAVE when the setup screen appears.\n\n\nYour old settings have been saved as S:TOOLSDAEMON.MENU_BAK\n\nThis install utility will now try to load the PREFS program for ToolsDaemon. If successful, just click SAVE.")
(set bye_bye (cat exit_mess " can be found in the directory\n" #directory "\n\nAn assign " assign_stat " added to S:USER-STARTUP\n\n" daemon_end_message start_message))