]> git.sesse.net Git - pistorm/blobdiff - platforms/amiga/rtg/PiGFX Install/PiGFX Installer
Fixes to pistorm.hdf
[pistorm] / platforms / amiga / rtg / PiGFX Install / PiGFX Installer
diff --git a/platforms/amiga/rtg/PiGFX Install/PiGFX Installer b/platforms/amiga/rtg/PiGFX Install/PiGFX Installer
new file mode 100644 (file)
index 0000000..d569e8b
--- /dev/null
@@ -0,0 +1,278 @@
+; PiGFX
+
+; Generated by InstallerGen 1.5!
+
+(complete 0)
+(set @app-name "PiGFX")
+(set @default-dest "Sys:")
+; 
+(welcome "This installer will configure your Picasso96 installation for use with PiGFX RTG.\n\nAny old PiGFX card or monitor files that are detected will be removed.")
+
+(complete 3)
+; Reminder to install P96
+(message "Please ensure you have already installed Picasso96. You can choose any GFX board (or select none at all) during the install process as this will not be used. \n\nThe install process will ask for the location of the original Picasso96 files that you used to install it. Please make sure to have them available. "
+)
+
+(complete 6)
+; Check if P96 is installed
+(set #P96check
+  (exists "Sys:Prefs/Picasso96Mode" (noreq))
+)
+
+(complete 9)
+; If Picasso96Mode exists
+(if (= #P96check 0)
+(
+
+(complete 12)
+; Advise to install P96 and exit
+(exit "Picasso96 does not appear to be installed.\n\nOnce Picasso96 has been installed, please re-run the PiGFX installer.")
+
+)
+) ; End If
+(complete 15)
+; Check if old PiGFX monitor file exists
+(set #OldPiGFX
+  (exists "Devs:Monitors/PiGFX" (noreq))
+)
+
+(complete 18)
+; If old PiGFX monitor file exists
+(if (= #OldPiGFX 1)
+(
+
+(complete 21)
+; Warn that old PiGFX file will be removed
+(message "An old PiGFX monitor file has been found in Devs:Monitors/\n\nThis will now be removed. "
+)
+
+(complete 24)
+; Delete old PiGFX file
+(delete "Devs:Monitors/PiGFX"
+  (prompt "Deleting old PiGFX monitor file.")
+  (help "A previous version of the PiGFX monitor file has been detected in Devs:Monitors/ and will be removed.")
+  (infos)
+  (optional "askuser")
+)
+
+)
+) ; End If
+(complete 26)
+; Check if old pigfx020 card  file exists
+(set #Old020card
+  (exists "Libs:Picasso96/pigfx020.card" (noreq))
+)
+
+(complete 29)
+; If old pigfx020 card file exists
+(if (= #Old020card 1)
+(
+
+(complete 32)
+; Warn that old pigfx020 card file will be removed
+(message "An old pigfx020.card file has been found in Libs:Picasso96/\n\nThis will now be removed. "
+)
+
+(complete 35)
+; Delete old pigfx020 card file
+(delete "Libs:Picasso96/pigfx020.card"
+  (prompt "Deleting old PiGFX monitor file.")
+  (help "A previous version of the pigfx020.card file has been detected in Libs:Picasso96/ and will be removed.")
+  (infos)
+  (optional "askuser")
+)
+
+)
+) ; End If
+(complete 38)
+; Check if old pigfx030 card  file exists
+(set #Old030card
+  (exists "Libs:Picasso96/pigfx030.card" (noreq))
+)
+
+(complete 41)
+; If old pigfx030 card file exists
+(if (= #Old030card 1)
+(
+
+(complete 44)
+; Warn that old pigfx030 card file will be removed
+(message "An old pigfx030.card file has been found in Libs:Picasso96/\n\nThis will now be removed. "
+)
+
+(complete 47)
+; Delete old pigfx030 card file
+(delete "Libs:Picasso96/pigfx030.card"
+  (prompt "Deleting old PiGFX monitor file.")
+  (help "A previous version of the pigfx030.card file has been detected in Libs:Picasso96/ and will be removed.")
+  (infos)
+  (optional "askuser")
+)
+
+)
+) ; End If
+(complete 50)
+; Check if P96Settings exists
+(set #P96settingsold
+  (exists "Devs:Picasso96Settings" (noreq))
+)
+
+(complete 53)
+; If P96Settings exists
+(if (= #P96settingsold 1)
+(
+
+(complete 56)
+; Backup or delete old settings
+(set #backupoptions
+  (askchoice
+    (prompt "Do you wish to backup your old Picasso96Settings file to Picasso96Settings.old.\n\nIf you select \"No\" then your settings file will be deleted.")
+    (help "There is already an existing Picasso96Settings file located in Devs: \n\nPlease choose if to backup this file to Picasso96Settings.old or if it can be deleted.")
+    (choices "Yes" "No")
+    (default 0)
+  )
+)
+(if (= #backupoptions 0) (set #P96backup 1) (set #P96backup 0))
+(if (= #backupoptions 1) (set #P96delete 1) (set #P96delete 0))
+
+)
+) ; End If
+(complete 59)
+; Backup old settings
+(if (= #P96backup 1)
+(
+
+(complete 62)
+; Check for old settings backup
+(set #P96settingsbackupold
+  (exists "Devs:Picasso96Settings.old" (noreq))
+)
+
+)
+) ; End If
+(complete 65)
+; If old P96Settings backup already exists
+(if (= #P96settingsbackupold 1)
+(
+
+(complete 68)
+; Delete old P96Settings backup
+(delete (tackon @default-dest "Devs/Picasso96Settings.old")
+  (prompt "Delting old Picasso96Settings.old file. ")
+  (help "The old back up of the Picasso96Settings file has been detected and will now be removed.")
+  (infos)
+  (optional "askuser")
+)
+
+)
+) ; End If
+(complete 71)
+; Create P96settings backup
+(rename "Devs:Picasso96Settings" "Devs:Picasso96Settings.old"
+  (prompt "Creating backup of previous Picasso96Settings.")
+  (help )
+)
+
+(complete 74)
+; If ok to delete old P96Settings
+(if (= #P96settingsdelete 1)
+(
+
+(complete 76)
+; Delete old P96Settings file
+(delete "Devs:Picasso96Settings"
+  (prompt "Deleting old Picasso96Settings file.")
+  (help "An old Picasso96Settings file has been detected in Devs: and will now be deleted.")
+  (infos)
+  (optional "askuser")
+)
+
+)
+) ; End If
+(complete 79)
+; Locate original P96 install files
+(set #P96files
+  (askdir
+    (prompt "Please select the folder containing the original Picasso96 installation files (The folder is typically called Picasso96Install). These are required to create the PiGFX settings and monitor files. ")
+    (help "Please locate the original Picasso96 installtion files. This is the folder from which you originally installed Picasso96 and is usually called Picasso96Install.\n\nThis installation has to patch some of the original files to create the new PiGFX monitor and settings files. \n")
+    (default @default-dest)
+  )
+)
+
+(complete 82)
+; Copy PiGFX card files
+(copyfiles
+  (prompt "Copying PiGFX card files to Libs: ")
+  (help @copyfiles-help)
+  (source "")
+  (dest "Libs:Picasso96")
+  (choices "Files/pigfx020.card" "Files/pigfx030.card")
+)
+
+(complete 85)
+; Warn about temporary assign to install files
+(message "A temporary assign called P96Temp: will be created to locate the original Picasso96 files. This will be removed once you reboot. "
+)
+
+(complete 88)
+; Make temporary assign to P96 install files
+(makeassign "P96Temp" #P96files)
+
+; Check original p96settings exists
+(set #OriginalP96settings
+  (exists "P96Temp:devs/Picasso96Settings.15" (noreq))
+)
+
+; If original P96settings does not exist
+(if (= #OriginalP96settings 0)
+(
+
+; Advise original settings cannot be found
+(exit "The original Picasso96Settings file that is required to create the PiGFX settings file cannot be located.\n\nPlease ensure you set the correct path to the original installation files, and are using a compatible version of Picasso96 from Aminet or Individual Computers. Please see Readme.txt for more information.")
+
+)
+) ; End If
+; Check original monitor file exists
+(set #OriginalP96monitor
+  (exists "P96Temp:devs/monitors/Picasso96" (noreq))
+)
+
+; If original monitor file does not exist
+(if (= #OriginalP96monitor 0)
+(
+
+; Advise original monitor cannot be found
+(exit "The original Picasso96 monitor file that is required to create the PiGFX monitor file cannot be located.\n\nPlease ensure you set the correct path to the original installation files, and are using a compatible version of Picasso96 from Aminet or Individual Computers. Please see Readme.txt for more information.")
+
+)
+) ; End If
+(complete 91)
+; Patching P96 monitor file
+(run "Patch/gpatch" "P96Temp:devs/monitors/Picasso96" "Patch/PiGFX.patch" "Devs:Monitors/PiGFX"
+  (prompt "Patching original Picasso monitor file to create PiGFX monitor file in Devs:Monitors/")
+  (help "A PiGFX monitor file will be created by patching one of the original monitor files.")
+  (confirm "average")
+)
+
+(complete 94)
+; Patching P96Settings file
+(run "Patch/gpatch" "P96Temp:devs/Picasso96Settings.15" "Patch/P96Settings.patch" "Devs:Picasso96Settings"
+  (prompt "Patching original Picasso96Settings file and creating PiGFX Devs:Picasso96Settings file. ")
+  (help "A new Picasso96Settings file for PiGFX will be created by patching on of the original settings files. ")
+  (confirm "average")
+)
+
+(complete 97)
+; Copy PiGFX icon
+(copyfiles
+  (prompt "Copying the PiGFX icon and tooltypes to Devs:Monitors/")
+  (help "The will copy the PiGFX icon that contains the required tooltypes to Devs:Monitors/")
+  (source "")
+  (dest "Devs:Monitors")
+  (choices "Files/PiGFX.info")
+)
+
+; Reminder to enable RTG
+(message "Remember to enable RTG in the PiStorm default.cfg file."
+)
+