3 ; Generated by InstallerGen 1.5!
6 (set @app-name "PiGFX")
7 (set @default-dest "Sys:")
9 (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.")
12 ; Reminder to install P96
13 (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. "
17 ; Check if P96 is installed
19 (exists "Sys:Prefs/Picasso96Mode" (noreq))
23 ; If Picasso96Mode exists
28 ; Advise to install P96 and exit
29 (exit "Picasso96 does not appear to be installed.\n\nOnce Picasso96 has been installed, please re-run the PiGFX installer.")
34 ; Check if old PiGFX monitor file exists
36 (exists "Devs:Monitors/PiGFX" (noreq))
40 ; If old PiGFX monitor file exists
45 ; Warn that old PiGFX file will be removed
46 (message "An old PiGFX monitor file has been found in Devs:Monitors/\n\nThis will now be removed. "
50 ; Delete old PiGFX file
51 (delete "Devs:Monitors/PiGFX"
52 (prompt "Deleting old PiGFX monitor file.")
53 (help "A previous version of the PiGFX monitor file has been detected in Devs:Monitors/ and will be removed.")
61 ; Check if old pigfx020 card file exists
63 (exists "Libs:Picasso96/pigfx020.card" (noreq))
67 ; If old pigfx020 card file exists
72 ; Warn that old pigfx020 card file will be removed
73 (message "An old pigfx020.card file has been found in Libs:Picasso96/\n\nThis will now be removed. "
77 ; Delete old pigfx020 card file
78 (delete "Libs:Picasso96/pigfx020.card"
79 (prompt "Deleting old PiGFX monitor file.")
80 (help "A previous version of the pigfx020.card file has been detected in Libs:Picasso96/ and will be removed.")
88 ; Check if old pigfx030 card file exists
90 (exists "Libs:Picasso96/pigfx030.card" (noreq))
94 ; If old pigfx030 card file exists
99 ; Warn that old pigfx030 card file will be removed
100 (message "An old pigfx030.card file has been found in Libs:Picasso96/\n\nThis will now be removed. "
104 ; Delete old pigfx030 card file
105 (delete "Libs:Picasso96/pigfx030.card"
106 (prompt "Deleting old PiGFX monitor file.")
107 (help "A previous version of the pigfx030.card file has been detected in Libs:Picasso96/ and will be removed.")
115 ; Check if P96Settings exists
117 (exists "Devs:Picasso96Settings" (noreq))
121 ; If P96Settings exists
122 (if (= #P96settingsold 1)
126 ; Backup or delete old settings
129 (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.")
130 (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.")
135 (if (= #backupoptions 0) (set #P96backup 1) (set #P96backup 0))
136 (if (= #backupoptions 1) (set #P96delete 1) (set #P96delete 0))
141 ; Backup old settings
146 ; Check for old settings backup
147 (set #P96settingsbackupold
148 (exists "Devs:Picasso96Settings.old" (noreq))
154 ; If old P96Settings backup already exists
155 (if (= #P96settingsbackupold 1)
159 ; Delete old P96Settings backup
160 (delete (tackon @default-dest "Devs/Picasso96Settings.old")
161 (prompt "Delting old Picasso96Settings.old file. ")
162 (help "The old back up of the Picasso96Settings file has been detected and will now be removed.")
170 ; Create P96settings backup
171 (rename "Devs:Picasso96Settings" "Devs:Picasso96Settings.old"
172 (prompt "Creating backup of previous Picasso96Settings.")
177 ; If ok to delete old P96Settings
178 (if (= #P96settingsdelete 1)
182 ; Delete old P96Settings file
183 (delete "Devs:Picasso96Settings"
184 (prompt "Deleting old Picasso96Settings file.")
185 (help "An old Picasso96Settings file has been detected in Devs: and will now be deleted.")
193 ; Locate original P96 install files
196 (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. ")
197 (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")
198 (default @default-dest)
203 ; Copy PiGFX card files
205 (prompt "Copying PiGFX card files to Libs: ")
206 (help @copyfiles-help)
208 (dest "Libs:Picasso96")
209 (choices "Files/pigfx020.card" "Files/pigfx030.card")
213 ; Warn about temporary assign to install files
214 (message "A temporary assign called P96Temp: will be created to locate the original Picasso96 files. This will be removed once you reboot. "
218 ; Make temporary assign to P96 install files
219 (makeassign "P96Temp" #P96files)
221 ; Check original p96settings exists
222 (set #OriginalP96settings
223 (exists "P96Temp:devs/Picasso96Settings.15" (noreq))
226 ; If original P96settings does not exist
227 (if (= #OriginalP96settings 0)
230 ; Advise original settings cannot be found
231 (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.")
235 ; Check original monitor file exists
236 (set #OriginalP96monitor
237 (exists "P96Temp:devs/monitors/Picasso96" (noreq))
240 ; If original monitor file does not exist
241 (if (= #OriginalP96monitor 0)
244 ; Advise original monitor cannot be found
245 (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.")
250 ; Patching P96 monitor file
251 (run "Patch/gpatch" "P96Temp:devs/monitors/Picasso96" "Patch/PiGFX.patch" "Devs:Monitors/PiGFX"
252 (prompt "Patching original Picasso monitor file to create PiGFX monitor file in Devs:Monitors/")
253 (help "A PiGFX monitor file will be created by patching one of the original monitor files.")
258 ; Patching P96Settings file
259 (run "Patch/gpatch" "P96Temp:devs/Picasso96Settings.15" "Patch/P96Settings.patch" "Devs:Picasso96Settings"
260 (prompt "Patching original Picasso96Settings file and creating PiGFX Devs:Picasso96Settings file. ")
261 (help "A new Picasso96Settings file for PiGFX will be created by patching on of the original settings files. ")
268 (prompt "Copying the PiGFX icon and tooltypes to Devs:Monitors/")
269 (help "The will copy the PiGFX icon that contains the required tooltypes to Devs:Monitors/")
271 (dest "Devs:Monitors")
272 (choices "Files/PiGFX.info")
275 ; Reminder to enable RTG
276 (message "Remember to enable RTG in the PiStorm default.cfg file."