]> git.sesse.net Git - pistorm/blob - platforms/amiga/rtg/PiGFX Install/PiGFX Installer
Fixes to pistorm.hdf
[pistorm] / platforms / amiga / rtg / PiGFX Install / PiGFX Installer
1 ; PiGFX
2
3 ; Generated by InstallerGen 1.5!
4
5 (complete 0)
6 (set @app-name "PiGFX")
7 (set @default-dest "Sys:")
8
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.")
10
11 (complete 3)
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. "
14 )
15
16 (complete 6)
17 ; Check if P96 is installed
18 (set #P96check
19   (exists "Sys:Prefs/Picasso96Mode" (noreq))
20 )
21
22 (complete 9)
23 ; If Picasso96Mode exists
24 (if (= #P96check 0)
25 (
26
27 (complete 12)
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.")
30
31 )
32 ) ; End If
33 (complete 15)
34 ; Check if old PiGFX monitor file exists
35 (set #OldPiGFX
36   (exists "Devs:Monitors/PiGFX" (noreq))
37 )
38
39 (complete 18)
40 ; If old PiGFX monitor file exists
41 (if (= #OldPiGFX 1)
42 (
43
44 (complete 21)
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. "
47 )
48
49 (complete 24)
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.")
54   (infos)
55   (optional "askuser")
56 )
57
58 )
59 ) ; End If
60 (complete 26)
61 ; Check if old pigfx020 card  file exists
62 (set #Old020card
63   (exists "Libs:Picasso96/pigfx020.card" (noreq))
64 )
65
66 (complete 29)
67 ; If old pigfx020 card file exists
68 (if (= #Old020card 1)
69 (
70
71 (complete 32)
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. "
74 )
75
76 (complete 35)
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.")
81   (infos)
82   (optional "askuser")
83 )
84
85 )
86 ) ; End If
87 (complete 38)
88 ; Check if old pigfx030 card  file exists
89 (set #Old030card
90   (exists "Libs:Picasso96/pigfx030.card" (noreq))
91 )
92
93 (complete 41)
94 ; If old pigfx030 card file exists
95 (if (= #Old030card 1)
96 (
97
98 (complete 44)
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. "
101 )
102
103 (complete 47)
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.")
108   (infos)
109   (optional "askuser")
110 )
111
112 )
113 ) ; End If
114 (complete 50)
115 ; Check if P96Settings exists
116 (set #P96settingsold
117   (exists "Devs:Picasso96Settings" (noreq))
118 )
119
120 (complete 53)
121 ; If P96Settings exists
122 (if (= #P96settingsold 1)
123 (
124
125 (complete 56)
126 ; Backup or delete old settings
127 (set #backupoptions
128   (askchoice
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.")
131     (choices "Yes" "No")
132     (default 0)
133   )
134 )
135 (if (= #backupoptions 0) (set #P96backup 1) (set #P96backup 0))
136 (if (= #backupoptions 1) (set #P96delete 1) (set #P96delete 0))
137
138 )
139 ) ; End If
140 (complete 59)
141 ; Backup old settings
142 (if (= #P96backup 1)
143 (
144
145 (complete 62)
146 ; Check for old settings backup
147 (set #P96settingsbackupold
148   (exists "Devs:Picasso96Settings.old" (noreq))
149 )
150
151 )
152 ) ; End If
153 (complete 65)
154 ; If old P96Settings backup already exists
155 (if (= #P96settingsbackupold 1)
156 (
157
158 (complete 68)
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.")
163   (infos)
164   (optional "askuser")
165 )
166
167 )
168 ) ; End If
169 (complete 71)
170 ; Create P96settings backup
171 (rename "Devs:Picasso96Settings" "Devs:Picasso96Settings.old"
172   (prompt "Creating backup of previous Picasso96Settings.")
173   (help )
174 )
175
176 (complete 74)
177 ; If ok to delete old P96Settings
178 (if (= #P96settingsdelete 1)
179 (
180
181 (complete 76)
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.")
186   (infos)
187   (optional "askuser")
188 )
189
190 )
191 ) ; End If
192 (complete 79)
193 ; Locate original P96 install files
194 (set #P96files
195   (askdir
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)
199   )
200 )
201
202 (complete 82)
203 ; Copy PiGFX card files
204 (copyfiles
205   (prompt "Copying PiGFX card files to Libs: ")
206   (help @copyfiles-help)
207   (source "")
208   (dest "Libs:Picasso96")
209   (choices "Files/pigfx020.card" "Files/pigfx030.card")
210 )
211
212 (complete 85)
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. "
215 )
216
217 (complete 88)
218 ; Make temporary assign to P96 install files
219 (makeassign "P96Temp" #P96files)
220
221 ; Check original p96settings exists
222 (set #OriginalP96settings
223   (exists "P96Temp:devs/Picasso96Settings.15" (noreq))
224 )
225
226 ; If original P96settings does not exist
227 (if (= #OriginalP96settings 0)
228 (
229
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.")
232
233 )
234 ) ; End If
235 ; Check original monitor file exists
236 (set #OriginalP96monitor
237   (exists "P96Temp:devs/monitors/Picasso96" (noreq))
238 )
239
240 ; If original monitor file does not exist
241 (if (= #OriginalP96monitor 0)
242 (
243
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.")
246
247 )
248 ) ; End If
249 (complete 91)
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.")
254   (confirm "average")
255 )
256
257 (complete 94)
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. ")
262   (confirm "average")
263 )
264
265 (complete 97)
266 ; Copy PiGFX icon
267 (copyfiles
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/")
270   (source "")
271   (dest "Devs:Monitors")
272   (choices "Files/PiGFX.info")
273 )
274
275 ; Reminder to enable RTG
276 (message "Remember to enable RTG in the PiStorm default.cfg file."
277 )
278