libxml2: copy the xml2-config to the crosstoolsdir and patch the paths in the native...
[AROS-Contrib.git] / scalos / Installer / Install3.5_ScalosBeta
blob342c951aea0068ce93f4097f5c4d0bcd15ee2395
1 ; // $Date: 2008-01-19 19:30:12 +0200 (Sa, 19 Jan 2008) $
2 ; // $Revision: 2765 $
4 ; $VER: Scalos Beta Installation Script 4.3 (06.04.2010) (c)2005-2010 THE SALOS TEAM
5 ; Scalos Beta Installation Script written by:
6 ; Name  : Jean-Marie COAT <agalliance@free.fr>
7 ; Name  : Jürgen Lachmann <juergen_lachmann@t-online.de>
9 ; @user-level: 0 novice, 1 average et 2 expert
13 (set #installer-version (/ @installer-version 65536))
15 ;-----------------------------
16 (set #Smdmatrix ("SVGA.png"))
17 (set #Hmdmatrix ("MVGA.png"))
18 (set #Lmdmatrix ("VGA.png"))
19 (set #Deficonify ("def_iconify.iff"))
20 (set #PointerIcons ("PointerIcons.iff"))
21 (set #StatusBar ("StatusBar.iff"))
23 (set #licencetext 'History')
25 (if (>= #installer-version 44)
26         (
27         (effect "center" "radial" $000000 $039A00) ;$000000
29         (set #w (querydisplay "screen" "width"))
30         (set #h (querydisplay "screen" "height"))
31         (set #d (querydisplay "screen" "depth"))
32         (set #c (querydisplay "screen" "colors"))
33         )
36 ;=====================================================
38 (set @language (getenv "Language" ))
41 (set @applicationdate (cat "(06.04.2010)" ))
43 (set #scalosresident 0)
44 (set #scalosresident (getversion "scalos.library" (resident)))
45 (set #scalosresidentVer (/ #scalosresident 65536))
46 (set #scalosresidentRev (- #scalosresident (* #scalosresidentVer 65536) ))
48 (set #tranceversion 0)
49 (set #tranceversion (/ (getversion "trance.library" (resident)) 65536))
50 (set #newlibversion 0)
51 (set #newlibversion (/ (getversion "newlib.library" (resident)) 65536))
53 (set #wbversion 0)
54 (set #MOS 0)
55 (set #OS4 0)
56 (if (> #tranceversion 40)
57         (
58         (set #MOS 1)
59         (set #wbversion 50)
60         (set cpuadd-1 ".060")
61         )
62         (
63         (set #MOS 0)
64         (if (>= #newlibversion 52)
65                 (set #OS4 1)
66                 (set #OS4 0)
67         )
68         (set #wbversion (/ (getversion "Libs:version.library") 65536))
69         )
72 (set #scaversion (getversion "scalos" ))
73 (set #scaver (/ #scaversion 65536) )
74 (set #scarev (- #scaversion (* #scaver 65536) ))
76 ;(message "trance.library version " #tranceversion)
77 ;(message "newlib.library version " #newlibversion)
78 ;(message "wb version " #wbversion)
80 (set #cat-app-name
81         (cat
82                 "Scalos Beta "#scaver"."#scarev""
83         )
85 (set @app-name #cat-app-name)
87 (set foundthemes 0)
89 ;===================== VERSION ICONOBJECT DATATYPES =================================
90 ;= PNG =
91 (set #dtversionpng (getversion "Scalos:Icondatatypes/datatypes/pngiconobject.datatype" ))
92 (set #dtverpng (/ #dtversionpng 65536) )
93 (set #dtrevpng (- #dtversionpng (* #dtverpng 65536) ))
95 ;============================== AMIGAICONOBJ35 ======================================
97 (set #dtversion_aiconobj35 (getversion "Scalos:Icondatatypes/datatypes/amigaiconobj35.datatype" ))
98 (set #dtver_aiconobj35 (/ #dtversion_aiconobj35 65536) )
99 (set #dtrev_aiconobj35 (- #dtversion_aiconobj35 (* #dtver_aiconobj35 65536) ))
101 ;============================= AMIGAICONOBJECT ======================================
103 (set #dtversion_aiconobject (getversion "Scalos:Icondatatypes/datatypes/amigaiconobject.datatype" ))
104 (set #dtver_aiconobject (/ #dtversion_aiconobject 65536) )
105 (set #dtrev_aiconobject (- #dtversion_aiconobject (* #dtver_aiconobject 65536) ))
107 ;=============================== ICONOBJECT =========================================
109 (set #dtversion_iconobject (getversion "Scalos:Icondatatypes/datatypes/iconobject.datatype" ))
110 (set #dtver_iconobject (/ #dtversion_iconobject 65536) )
111 (set #dtrev_iconobject (- #dtversion_iconobject (* #dtver_iconobject 65536) ))
113 ;============================== NEWICONOBJECT =======================================
115 (if (= #OS4 0)
116         (
117         (set #dtversion_niconobject (getversion "Scalos:Icondatatypes/datatypes/newiconobject.datatype" ))
118         (set #dtver_niconobject (/ #dtversion_niconobject 65536) )
119         (set #dtrev_niconobject (- #dtversion_niconobject (* #dtver_niconobject 65536) ))
120         )
123 ;============================== GLOWICONOBJECT =======================================
125 (set #dtversion_glowiconobject (getversion "Scalos:Icondatatypes/datatypes/glowiconobject.datatype" ))
126 (set #dtver_glowiconobject (/ #dtversion_glowiconobject 65536) )
127 (set #dtrev_glowiconobject (- #dtversion_glowiconobject (* #dtver_glowiconobject 65536) ))
130 ;=========================== DIRECTORY Classes ======================================
132 (set #defclasses "Scalos:Icondatatypes/Datatypes")
134 ;====================================================================================
136 (set #catctrl
137         (cat
138                 "Installing useful tools ?\n"
139         )
142 (set #install-exit2
143         (cat
144                 "\nThank you for installing Scalos\n"
145                 "and have fun with it!"
146         )
149 (set #makedir-scalos "Creating Scalos-Destination...")
151 (set #makedir-Prefs-scalos "Creating Prefs-Destination...")
153 (set #CatMOsLibs (cat "Installing MorphOS library:\n"))
154 (set #CatOsLibs  (cat "Installing library:\n"))
156 ;------------------------------------------------------------
157 ;---  CHECK BEST IMAGE SIZE  --------------------------------
158 ;------------------------------------------------------------
160 (if (>= #installer-version 44)
161         (
162         (set #hires 0)
164         (if (> #c 32)
165                 (
166                 (if (> #h 590)
167                         (
168                         (set #hires 2)
169                         )
170                         (
171                         (set #hires 1)
172                         )
173                 )
174                 (if (> #h 800)
175                         (
176                         (set #hires 3)
177                         )
178                 )
179                 )
180         )
182         (if (<= #c 32)
183                 (
184                 (if (> #h 590)
185                         (
186                         (set #hires 2)
187                         )
188                         (
189                         (set #hires 1)
190                         )
191                 )
192                 )
193         )
196         (if #hires
197                 (
198                 (if (= #hires 1)
199                         (
200                         (set #mdmatrix #Lmdmatrix)
201                         )
202                 )
203                 (if (= #hires 2)
204                         (
205                         (set #mdmatrix #Hmdmatrix)
206                         )
207                 )
208                 (if (= #hires 3)
209                         (
210                         (set #mdmatrix #Smdmatrix)
211                         )
212                 )
213                 (showmedia "mdmatrix" (tackon "GFX" #mdmatrix) 'center' 'none' 0)
214                 )
215         )
216         )
218 ;----------------------------------------------------------------------------
219 ;==  PROCEDURE  ASKABOUTCPU =================================================
220 ;----------------------------------------------------------------------------
222 (procedure askaboutcpu
224         (set cpu (database "cpu"))
225         (if     (= cpu 68020)
226                 (set cpuadd-1 ".020")
227         )
228         (if     (= cpu 68030)
229                 (set cpuadd-1 ".020")
230         )
231         (if     (= cpu 68040)
232                 (set cpuadd-1 ".040")
233         )
234         (if     (= cpu 68060)
235                 (set cpuadd-1 ".060")
236         )
239 ;----------------------------------------------------------------------------
240 ;==  PROCEDURE  CLOSEMEDIA  =================================================
241 ;----------------------------------------------------------------------------
243 (procedure P_closemedia #media
244         (if (>= #installer-version 44)
245                 (closemedia #media)
246         )
249 ;----------------------------------------------------------------------------
250 ;==  PROCEDURE  REBOOT  =====================================================
251 ;----------------------------------------------------------------------------
253 (procedure P_EndInstall #boot
254         (if #boot
255                 (
256                         (message #install-exit2)
257                         (P_closemedia mdmatrix)
258                         (if (= #OS4 0)
259                                 (reboot)
260                                 ;else
261                                 (run C:reboot)
262                         )
263                 )
264                 (
265                         (P_closemedia mdmatrix)
266                         (exit #install-exit2) ; (quiet))
267                 )
268         )
271 ;----------------------------------------------------------------------------
272 ;==  PROCEDURE  REPLACE =====================================================
273 ;----------------------------------------------------------------------------
275 (procedure P_Replace #nwb #owb
276         (set #sverwb
277                 (cat
278                         "File to copy:\n"
279                         ""#nwb" replacement.\n"
280                         "Old version will be replaced:\n"
281                         ""#owb".\n"
282                 )
283         )
286 ;----------------------------------------------------------------------------
287 ;==  PROCEDURE  SIMPLE COPY =================================================
288 ;----------------------------------------------------------------------------
290 (procedure P_SimpleCopy #text #src #dest #helptxt
291                 (copyfiles
292                         (prompt #text)
293                         (source #src)
294                         (dest   #dest)
295                         (help   #helptxt)
296                         (files)
297                 )
300 ;----------------------------------------------------------------------------
301 ;==  PROCEDURE  SIMPLE COPY WITH ICON =======================================
302 ;----------------------------------------------------------------------------
304 (procedure P_SimpleCopyInfo #text #src #dest #helptxt
305                 (copyfiles
306                         (prompt #text)
307                         (source #src)
308                         (dest   #dest)
309                         (help   #helptxt)
310                         (files)
311                         (infos)
312                 )
315 ;----------------------------------------------------------------------------
316 ;==  PROCEDURE  SIMPLE AVERAGE / EXPERT =====================================
317 ;----------------------------------------------------------------------------
319 (procedure P_SimpleCopyAvExp #text #src #dest #helptxt
320                 (copyfiles
321                         (prompt #text)
322                         (source #src)
323                         (dest   #dest)
324                         (help   #helptxt)
325                         (confirm "average")
326                         (files)
327                 )
330 ;----------------------------------------------------------------------------
331 ;==  PROCEDURE  SIMPLE COPY FOR NOVICE ======================================
332 ;----------------------------------------------------------------------------
334 (procedure P_SimpleCopyNovice #ntext #nsrc #ndest #nhelptxt
335                 (copyfiles
336                         (prompt #ntext)
337                         (source #nsrc)
338                         (dest   #ndest)
339                         (help   #nhelptxt)
340                         (confirm 0)
341                         (files)
342                 )
345 ;----------------------------------------------------------------------------
346 ;==    PROCEDURE P_VERIFYTHEMES   =====================================
347 ;----------------------------------------------------------------------------
349 (procedure P_VerifyThemes
351         (set ReplaceWinStatusBar 0)
352         (set foundstatusbar 0)
354         (set #b 0)
355         (while
356                 (set brush
357                         (select #b
358                                 "Themes/default/AboutBackground"
359                                 "Themes/default/ScalosAboutLogo"
360                                 "Themes/default/FileTransBackground"
361                                 "Themes/default/ScalosSplashLogo"
362                                 "Themes/default/ScalosLogo"
363                                 "Themes/default/SplashBackground"
364                                 "Themes/default/ToolTipBackground"
365                                 "Themes/default/About/Backfill"
366                                 "Themes/default/About/ButtonFlushSelected"
367                                 "Themes/default/About/ButtonFlushNormal"
368                                 "Themes/default/About/ButtonFlushDisabled"
369                                 "Themes/default/About/ButtonInfoSelected"
370                                 "Themes/default/About/ButtonInfoNormal"
371                                 "Themes/default/About/ButtonInfoDisabled"
372                                 "Themes/default/About/ButtonStopSelected"
373                                 "Themes/default/About/ButtonStopNormal"
374                                 "Themes/default/About/ButtonStopDisabled"
375                                 "Themes/default/About/ButtonOkSelected"
376                                 "Themes/default/About/ButtonOkNormal"
377                                 "Themes/default/About/ButtonOkDisabled"
378                                 "Themes/default/About/ButtonRebootSelected"
379                                 "Themes/default/About/ButtonRebootNormal"
380                                 "Themes/default/About/ButtonRebootDisabled"
381                                 "Themes/default/Desktop/Background"
382                                 "Themes/default/FileTypes/archiveextract"
383                                 "Themes/default/FileTypes/Browse"
384                                 "Themes/default/FileTypes/Close"
385                                 "Themes/default/FileTypes/CreateThumbnail"
386                                 "Themes/default/FileTypes/Delete"
387                                 "Themes/default/FileTypes/Edit"
388                                 "Themes/default/FileTypes/EditCopy"
389                                 "Themes/default/FileTypes/EditCut"
390                                 "Themes/default/FileTypes/EditPaste"
391                                 "Themes/default/FileTypes/Find"
392                                 "Themes/default/FileTypes/Information"
393                                 "Themes/default/FileTypes/NewDir"
394                                 "Themes/default/FileTypes/Open"
395                                 "Themes/default/FileTypes/Properties"
396                                 "Themes/default/FileTypes/Rename"
397                                 "Themes/default/FileTypes/SizeToFit"
398                                 "Themes/default/FileTypes/Update"
399                                 "Themes/default/Window/Background"
400                                 "Themes/default/Window/SortDescending"
401                                 "Themes/default/Window/SortAscending"
402                                 "Themes/default/Window/Textbackground"
403                                 "Themes/default/Window/def_iconify.info"
404                                 "Themes/default/window/ControlBar/Background"
405                                 "Themes/default/window/ControlBar/BrowseDisabled"
406                                 "Themes/default/window/ControlBar/BrowseNormal"
407                                 "Themes/default/window/ControlBar/BrowseSelected"
408                                 "Themes/default/window/ControlBar/ButtonAboutDisabled"
409                                 "Themes/default/window/ControlBar/ButtonAboutNormal"
410                                 "Themes/default/window/ControlBar/ButtonAboutSelected"
411                                 "Themes/default/window/ControlBar/ButtonBackDisabled"
412                                 "Themes/default/window/ControlBar/ButtonBackNormal"
413                                 "Themes/default/window/ControlBar/ButtonBackSelected"
414                                 "Themes/default/window/ControlBar/ButtonForwardDisabled"
415                                 "Themes/default/window/ControlBar/ButtonForwardNormal"
416                                 "Themes/default/window/ControlBar/ButtonForwardSelected"
417                                 "Themes/default/window/ControlBar/ButtonInfoDisabled"
418                                 "Themes/default/window/ControlBar/ButtonInfoNormal"
419                                 "Themes/default/window/ControlBar/ButtonInfoSelected"
420                                 "Themes/default/window/ControlBar/ButtonPropertiesDisabled"
421                                 "Themes/default/window/ControlBar/ButtonPropertiesNormal"
422                                 "Themes/default/window/ControlBar/ButtonPropertiesSelected"
423                                 "Themes/default/window/ControlBar/ButtonUpDisabled"
424                                 "Themes/default/window/ControlBar/ButtonUpNormal"
425                                 "Themes/default/window/ControlBar/ButtonUpSelected"
426                                 "Themes/default/window/ControlBar/CycleBackground"
427                                 "Themes/default/window/ControlBar/CycleNormal"
428                                 "Themes/default/window/ControlBar/CycleSelected"
429                                 "Themes/default/window/ControlBar/CyclePopupBackground"
430                                 "Themes/default/window/ControlBar/HistoryNormal"
431                                 "Themes/default/window/ControlBar/HistorySelected"
432                                 "Themes/default/window/ControlBar/HistoryPopupBackground"
433                                 "Themes/default/window/ControlBar/ShowModeCycleFrame"
434                                 "Themes/default/window/ControlBar/ViewByCycleFrame"
435                                 "Themes/default/window/StatusBar/Background"
436                                 "Themes/default/window/StatusBar/PadLock"
437                                 "Themes/default/window/StatusBar/Reading"
438                                 "Themes/default/window/StatusBar/ShowAll"
439                                 "Themes/default/window/StatusBar/ThumbnailsAlways"
440                                 "Themes/default/window/StatusBar/ThumbnailsAsDefault"
441                                 "Themes/default/window/StatusBar/ThumbnailsGenerate"
442                                 "Themes/default/window/StatusBar/Typing"
443                                 "Themes/default/Menu/DropMenu/Abort"
444                                 "Themes/default/Menu/DropMenu/Copy"
445                                 "Themes/default/Menu/DropMenu/Move"
446                                 "Themes/default/PointerIcons/copying.info"
447                                 "Themes/default/PointerIcons/forbidden.info"
448                                 "Themes/default/PointerIcons/makelink.info"
449                                 "Themes/default/PointerIcons/moving.info"
450                                 "Themes/default/Prefs/Modules/delete"
451                                 "Themes/default/Prefs/Modules/empty_trashcan"
452                                 "Themes/default/Prefs/Modules/execute_command"
453                                 "Themes/default/Prefs/Modules/iconproperties"
454                                 "Themes/default/Prefs/Modules/information"
455                                 "Themes/default/Prefs/Modules/newdrawer"
456                                 "Themes/default/Prefs/Modules/reboot"
457                                 "Themes/default/Prefs/Modules/rename"
458                                 "Themes/default/Prefs/Modules/systeminfo"
459                                 "Themes/default/Prefs/Modules/windowproperties"
460                                 "Themes/default/Prefs/Pages/about"
461                                 "Themes/default/Prefs/Pages/desktop"
462                                 "Themes/default/Prefs/Pages/dragndrop"
463                                 "Themes/default/Prefs/Pages/filedisplay"
464                                 "Themes/default/Prefs/Pages/icons"
465                                 "Themes/default/Prefs/Pages/misc"
466                                 "Themes/default/Prefs/Pages/modules"
467                                 "Themes/default/Prefs/Pages/paths"
468                                 "Themes/default/Prefs/Pages/plugins"
469                                 "Themes/default/Prefs/Pages/startup"
470                                 "Themes/default/Prefs/Pages/truetypefonts"
471                                 "Themes/default/Prefs/Pages/windows"
472                                 "Themes/default/Icons/Overlay/LeftOut"
473                                 "Themes/default/Icons/Overlay/ReadOnly"
474                                 "Themes/default/Icons/Overlay/Thumbnail"
475                                 ""
476                                 )
477                         )
478                         (
479                         (set #Theme-WinStatusBar-Installed (tackon "Scalos:" brush))
480                         (if (exists #Theme-WinStatusBar-Installed (NOREQ))
481                                 (
482                                 (set ReplaceWinStatusBar 1)
483                                 ;(message "Number: " #b "\nBrush: " #Theme-WinStatusBar-Installed)
484                                 )
485                         )
486                         (set #b (+ #b 1))
487                 )
488         )
490         (if ReplaceWinStatusBar
491                 (
492                 (set #ask-replace-winstatusbar
493                         (cat
494                                 "Installer found themes installed.\n"
495                                 "Do you want to replace them?\n"
496                                 "A backup copy will be created in 'Sys:Storage/Scalos'\n\n"
497                                 "NOTE: If an old backup copy already exists, it will be replaced!"
498                         )
499                 )
500                 (set foundstatusbar
501                         (askbool
502                                 (prompt #ask-replace-winstatusbar)
503                                 (help #help-themes-statusbar)
504                                 (default 0)
505                                 )
506                         )
507                 )
508         )
510         (set #b 0)
511         (while
512                 (set brush
513                         (select #b
514                                 "Themes/default/AboutBackground"
515                                 "Themes/default/ScalosAboutLogo"
516                                 "Themes/default/FileTransBackground"
517                                 "Themes/default/ScalosSplashLogo"
518                                 "Themes/default/ScalosLogo"
519                                 "Themes/default/SplashBackground"
520                                 "Themes/default/ToolTipBackground"
521                                 "Themes/default/About/Backfill"
522                                 "Themes/default/About/ButtonFlushSelected"
523                                 "Themes/default/About/ButtonFlushNormal"
524                                 "Themes/default/About/ButtonFlushDisabled"
525                                 "Themes/default/About/ButtonInfoSelected"
526                                 "Themes/default/About/ButtonInfoNormal"
527                                 "Themes/default/About/ButtonInfoDisabled"
528                                 "Themes/default/About/ButtonStopSelected"
529                                 "Themes/default/About/ButtonStopNormal"
530                                 "Themes/default/About/ButtonStopDisabled"
531                                 "Themes/default/About/ButtonOkSelected"
532                                 "Themes/default/About/ButtonOkNormal"
533                                 "Themes/default/About/ButtonOkDisabled"
534                                 "Themes/default/About/ButtonRebootSelected"
535                                 "Themes/default/About/ButtonRebootNormal"
536                                 "Themes/default/About/ButtonRebootDisabled"
537                                 "Themes/default/Desktop/Background"
538                                 "Themes/default/FileTypes/archiveextract"
539                                 "Themes/default/FileTypes/Browse"
540                                 "Themes/default/FileTypes/Close"
541                                 "Themes/default/FileTypes/CreateThumbnail"
542                                 "Themes/default/FileTypes/Delete"
543                                 "Themes/default/FileTypes/Edit"
544                                 "Themes/default/FileTypes/EditCopy"
545                                 "Themes/default/FileTypes/EditCut"
546                                 "Themes/default/FileTypes/EditPaste"
547                                 "Themes/default/FileTypes/Find"
548                                 "Themes/default/FileTypes/Information"
549                                 "Themes/default/FileTypes/NewDir"
550                                 "Themes/default/FileTypes/Open"
551                                 "Themes/default/FileTypes/Properties"
552                                 "Themes/default/FileTypes/Rename"
553                                 "Themes/default/FileTypes/SizeToFit"
554                                 "Themes/default/FileTypes/Update"
555                                 "Themes/default/Window/Background"
556                                 "Themes/default/Window/SortDescending"
557                                 "Themes/default/Window/SortAscending"
558                                 "Themes/default/Window/Textbackground"
559                                 "Themes/default/Window/def_iconify.info"
560                                 "Themes/default/window/ControlBar/Background"
561                                 "Themes/default/window/ControlBar/BrowseDisabled"
562                                 "Themes/default/window/ControlBar/BrowseNormal"
563                                 "Themes/default/window/ControlBar/BrowseSelected"
564                                 "Themes/default/window/ControlBar/ButtonAboutDisabled"
565                                 "Themes/default/window/ControlBar/ButtonAboutNormal"
566                                 "Themes/default/window/ControlBar/ButtonAboutSelected"
567                                 "Themes/default/window/ControlBar/ButtonBackDisabled"
568                                 "Themes/default/window/ControlBar/ButtonBackNormal"
569                                 "Themes/default/window/ControlBar/ButtonBackSelected"
570                                 "Themes/default/window/ControlBar/ButtonForwardDisabled"
571                                 "Themes/default/window/ControlBar/ButtonForwardNormal"
572                                 "Themes/default/window/ControlBar/ButtonForwardSelected"
573                                 "Themes/default/window/ControlBar/ButtonInfoDisabled"
574                                 "Themes/default/window/ControlBar/ButtonInfoNormal"
575                                 "Themes/default/window/ControlBar/ButtonInfoSelected"
576                                 "Themes/default/window/ControlBar/ButtonPropertiesDisabled"
577                                 "Themes/default/window/ControlBar/ButtonPropertiesNormal"
578                                 "Themes/default/window/ControlBar/ButtonPropertiesSelected"
579                                 "Themes/default/window/ControlBar/ButtonUpDisabled"
580                                 "Themes/default/window/ControlBar/ButtonUpNormal"
581                                 "Themes/default/window/ControlBar/ButtonUpSelected"
582                                 "Themes/default/window/ControlBar/CycleBackground"
583                                 "Themes/default/window/ControlBar/CycleNormal"
584                                 "Themes/default/window/ControlBar/CycleSelected"
585                                 "Themes/default/window/ControlBar/CyclePopupBackground"
586                                 "Themes/default/window/ControlBar/HistoryNormal"
587                                 "Themes/default/window/ControlBar/HistorySelected"
588                                 "Themes/default/window/ControlBar/HistoryPopupBackground"
589                                 "Themes/default/window/ControlBar/ShowModeCycleFrame"
590                                 "Themes/default/window/ControlBar/ViewByCycleFrame"
591                                 "Themes/default/window/StatusBar/Background"
592                                 "Themes/default/window/StatusBar/PadLock"
593                                 "Themes/default/window/StatusBar/Reading"
594                                 "Themes/default/window/StatusBar/ShowAll"
595                                 "Themes/default/window/StatusBar/ThumbnailsAlways"
596                                 "Themes/default/window/StatusBar/ThumbnailsAsDefault"
597                                 "Themes/default/window/StatusBar/ThumbnailsGenerate"
598                                 "Themes/default/window/StatusBar/Typing"
599                                 "Themes/default/Menu/DropMenu/Abort"
600                                 "Themes/default/Menu/DropMenu/Copy"
601                                 "Themes/default/Menu/DropMenu/Move"
602                                 "Themes/default/PointerIcons/copying.info"
603                                 "Themes/default/PointerIcons/forbidden.info"
604                                 "Themes/default/PointerIcons/makelink.info"
605                                 "Themes/default/PointerIcons/moving.info"
606                                 "Themes/default/Prefs/Modules/delete"
607                                 "Themes/default/Prefs/Modules/empty_trashcan"
608                                 "Themes/default/Prefs/Modules/execute_command"
609                                 "Themes/default/Prefs/Modules/iconproperties"
610                                 "Themes/default/Prefs/Modules/information"
611                                 "Themes/default/Prefs/Modules/newdrawer"
612                                 "Themes/default/Prefs/Modules/reboot"
613                                 "Themes/default/Prefs/Modules/rename"
614                                 "Themes/default/Prefs/Modules/systeminfo"
615                                 "Themes/default/Prefs/Modules/windowproperties"
616                                 "Themes/default/Prefs/Pages/about"
617                                 "Themes/default/Prefs/Pages/desktop"
618                                 "Themes/default/Prefs/Pages/dragndrop"
619                                 "Themes/default/Prefs/Pages/filedisplay"
620                                 "Themes/default/Prefs/Pages/icons"
621                                 "Themes/default/Prefs/Pages/misc"
622                                 "Themes/default/Prefs/Pages/modules"
623                                 "Themes/default/Prefs/Pages/paths"
624                                 "Themes/default/Prefs/Pages/plugins"
625                                 "Themes/default/Prefs/Pages/startup"
626                                 "Themes/default/Prefs/Pages/truetypefonts"
627                                 "Themes/default/Prefs/Pages/windows"
628                                 "Themes/default/Icons/Overlay/LeftOut"
629                                 "Themes/default/Icons/Overlay/ReadOnly"
630                                 "Themes/default/Icons/Overlay/Thumbnail"
631                                 ""
632                                 )
633                         )
634                         (
635                         (set #Theme-WinStatusBar-Installed (tackon "Scalos:" brush))
636                         (if ReplaceWinStatusBar
637                                 (
638                                 ;(message "Number: " #b "\nInstall: " brush "\nTo: " (tackon "Scalos:" (pathonly(brush))))
639                                 (if foundstatusbar
640                                         (
642                                         (if (exists #Theme-WinStatusBar-Installed (NOREQ))
643                                                 (P_BackupThemes #Theme-WinStatusBar-Installed brush)
644                                         )
645                                         (trap 4
646                                                 (P_SimpleCopy ("Copying: " (fileonly (brush)) "...") brush (tackon "Scalos:" (pathonly(brush))) " Theme.")
647                                                 )
648                                         )
649                                         )
650                                 )
651                                 (
652                                 (trap 4
653                                         (P_SimpleCopy ("Copying: " (fileonly (brush)) "...") brush (tackon "Scalos:" (pathonly(brush))) " Theme.")
654                                         )
655                                 )
656                         )
658                         (if     (= @ioerr 202)
659                                         (
660                                         (message        "ErrorCode: " @ioerr "\nTheme: '" (fileonly(brush)) "'\n"
661                                                 "This theme hasn't been installed to: '" (pathonly(#Theme-WinStatusBar-Installed)) "'!\n"
662                                                 "Installer's going to try to install it again."
663                                                 )
665                                         (trap 4
666                                                 (P_SimpleCopy ("Copying: " (fileonly (brush)) "...") brush (tackon "Scalos:" (pathonly(brush))) " Theme.")
667                                                 )
669                                         (if     (= @ioerr 202)
670                                                         (
671                                                         (message        "ErrorCode: " @ioerr "\nTheme: '" (fileonly(brush)) "'\n"
672                                                         "Sorry! This theme hasn't been installed to: '" (pathonly(#Theme-WinStatusBar-Installed)) "'.\n"
673                                                         )
674                                                 )
675                                         )
677                                 )
679                         )
680                         (set @ioerr 0)
681                         (set #b (+ #b 1))
682                 )
683         )
686 ;----------------------------------------------------------------------------
687 ;==  PROCEDURE P_RemoveObsolete  ========================================
688 ;----------------------------------------------------------------------------
690 (procedure P_RemoveObsolete
691         (set #b 0)
692         (while
693                 (set fname
694                         (select #b
695                                 "SYS:Classes/datatypes/amigaiconobj35.datatype"
696                                 "SYS:Classes/datatypes/amigaiconobject.datatype"
697                                 "SYS:Classes/datatypes/glowiconobject.datatype"
698                                 "SYS:Classes/datatypes/iconobject.datatype"
699                                 "SYS:Classes/datatypes/newiconobject.datatype"
700                                 "SYS:Classes/datatypes/pngiconobject.datatype"
701                                 "Devs:Datatypes/AmigaIconObj35"
702                                 "Devs:Datatypes/AmigaIconObj35.info"
703                                 "Devs:Datatypes/AmigaIconObject"
704                                 "Devs:Datatypes/AmigaIconObject.info"
705                                 "Devs:Datatypes/GlowIconObject"
706                                 "Devs:Datatypes/GlowIconObject.info"
707                                 "Devs:Datatypes/NewIconObject"
708                                 "Devs:Datatypes/NewIconObject.info"
709                                 "Devs:Datatypes/PNGIconObject"
710                                 "Devs:Datatypes/PNGIconObject.info"
711                                 ""
712                         )
713                 )
714                 (
715                         (if     (exists fname (NOREQ))
716                                 (
717                                 (delete fname force)
718                                 )
719                         )
720                         (set #b (+ #b 1))
721                 )
722         )
725 ;----------------------------------------------------------------------------
726 ;==  PROCEDURE P_BACKUPTHEMES  ========================================
727 ;----------------------------------------------------------------------------
729 (procedure P_BackupThemes #picture #pathpic
731         (set #BackupThemes (tackon #storage-scalos "Themes"))
733         (if (not (exists  #BackupThemes (NOREQ)))
734                 (
735                 (makedir #BackupThemes
736                         (prompt "Create dir: " #BackupThemes)
737                         (help   @makedir-help)
738                         )
739                 )
740         )
743         (set #BackupDefaultThemes (tackon #BackupThemes "default"))
745         (if (not (exists  #BackupDefaultThemes (NOREQ)))
746                 (
747                 (makedir #BackupDefaultThemes
748                         (prompt "Create dir: " #BackupDefaultThemes)
749                         (help   @makedir-help)
750                         )
751                 )
752         )
754         (set #BackupThemePointers (tackon #BackupDefaultThemes "Pointers"))
756         (if (not (exists  #BackupThemePointers (NOREQ)))
757                 (
758                 (makedir #BackupThemePointers
759                         (prompt "Create dir: " #BackupThemePointers)
760                         (help   @makedir-help)
761                         )
762                 )
763         )
765         (set #BackupThemeDesktop (tackon #BackupDefaultThemes "Desktop"))
767         (if (not (exists  #BackupThemeDesktop (NOREQ)))
768                 (
769                 (makedir #BackupThemeDesktop
770                         (prompt "Create dir: " #BackupThemeDesktop)
771                         (help   @makedir-help)
772                         )
773                 )
774         )
776         (set #BackupThemeMenu (tackon #BackupDefaultThemes "Menu"))
778         (if (not (exists  #BackupThemeMenu (NOREQ)))
779                 (
780                 (makedir #BackupThemeMenu
781                         (prompt "Create dir: " #BackupThemeMenu)
782                         (help   @makedir-help)
783                         )
784                 )
785         )
787         (set #BackupThemeDropMenu (tackon #BackupThemeMenu "DropMenu"))
789         (if (not (exists  #BackupThemeDropMenu (NOREQ)))
790                 (
791                 (makedir #BackupThemeDropMenu
792                         (prompt "Create dir: " #BackupThemeDropMenu)
793                         (help   @makedir-help)
794                         )
795                 )
796         )
798         (set #BackupThemesWin (tackon #BackupDefaultThemes "Window"))
800         (if (not (exists  #BackupThemesWin (NOREQ)))
801                 (
802                 (makedir #BackupThemesWin
803                         (prompt "Create dir: " #BackupThemesWin)
804                         (help   @makedir-help)
805                         )
806                 )
807         )
809         (set #BackupThemesWinStatusBar (tackon #BackupThemesWin "StatusBar"))
811         (if (not (exists  #BackupThemesWinStatusBar (NOREQ)))
812                 (
813                 (makedir #BackupThemesWinStatusBar
814                         (prompt "Create dir: " #BackupThemesWinStatusBar)
815                         (help   @makedir-help)
816                         )
817                 )
818         )
820         (set #BackupThemesPrefs (tackon #BackupDefaultThemes "Prefs"))
822         (if (not (exists  #BackupThemesPrefs (NOREQ)))
823                 (
824                 (makedir #BackupThemesPrefs
825                         (prompt "Create dir: " #BackupThemesPrefs)
826                         (help   @makedir-help)
827                         )
828                 )
829         )
831         (set #BackupThemesPrefsPages (tackon #BackupThemesPrefs "Pages"))
833         (if (not (exists  #BackupThemesPrefsPages (NOREQ)))
834                 (
835                 (makedir #BackupThemesPrefsPages
836                         (prompt "Create dir: " #BackupThemesPrefsPages)
837                         (help   @makedir-help)
838                         )
839                 )
840         )
842         (set #BackupThemesPrefsModules (tackon #BackupThemesPrefs "Modules"))
844         (if (not (exists  #BackupThemesPrefsModules (NOREQ)))
845                 (
846                 (makedir #BackupThemesPrefsModules
847                         (prompt "Create dir: " #BackupThemesPrefsModules)
848                         (help   @makedir-help)
849                         )
850                 )
851         )
854         (set #BackupThemesIcons (tackon #BackupDefaultThemes "Icons"))
856         (if (not (exists  #BackupThemesIcons (NOREQ)))
857                 (
858                 (makedir #BackupThemesIcons
859                         (prompt "Create dir: " #BackupThemesIcons)
860                         (help   @makedir-help)
861                         )
862                 )
863         )
865         (set #BackupThemesIconsOverlay (tackon #BackupThemesIcons "Overlay"))
867         (if (not (exists #BackupThemesIconsOverlay (NOREQ)))
868                 (
869                 (makedir #BackupThemesIconsOverlay
870                         (prompt "Create dir: " #BackupThemesIconsOverlay)
871                         (help   @makedir-help)
872                         )
873                 )
874         )
876         ; (message "Copy: \n" #picture  "\nTo: \n" (tackon #storage-scalos (pathonly(#pathpic))))
877         (trap 4
878                 (P_SimpleCopy ("Copy backup: " (fileonly (#picture)) "...") #picture (tackon #storage-scalos (pathonly(#pathpic))) " Theme.")
879         )
880         (if     (> @ioerr 0 )
881                 (
882                 (message        "ErrorCode: " @ioerr "\nTheme: '" (fileonly(brush)) "'! :(\n"
883                                 "Sorry! This theme hasn't been copied to: '" (tackon #storage-scalos (pathonly(#pathpic))) "'.\n"
884                                 )
885                 )
886         )
887         (set foundthemes 1)
888         (set @ioerr 0)
891 ;----------------------------------------------------------------------------
892 ;==  PROCEDURE ENVARC AVERAGE ===============================================
893 ;----------------------------------------------------------------------------
895 (procedure P_VerifyEnvarcAverage #ehelptext
897         (set ReplaceEnvarc 0)
898         (set FoundEnvarc 0)
900         (set #num 0)
901         (while
902                 (set #deftype
903                         (select #num
904                                 "deficons.prefs"
905                                 "icandy"
906                                 "Palette13.prefs"
907                                 "Pattern.prefs"
908                                 "Persist.prefs"
909                                 "scalos.prefs"
910                                 "Menu13.prefs"
911                                 "appicon"
912                                 "archive"
913                                 "brush"
914                                 "disk"
915                                 "drawer"
916                                 "filearchive"
917                                 "gif"
918                                 "ILBM"
919                                 "jpeg"
920                                 "picture"
921                                 "project"
922                                 "tool"
923                                 "trashcan"
924                                 ""
925                                 )
926                         )
927                         (
928                         (if (= #num 0)
929                                 (
930                                 (set #ftypes-installed (cat "" (tackon #env #deftype)))
931                                 (set #ftypes-to-install #deficons)
932                                 (set #destbackup "Sys:Storage/Envarc")
933                                 )
934                         )
936                         (if (and (> #num 0) (<= #num 5))
937                                 (
938                                 (set #ftypes-installed (cat "" (tackon #env-scalos #deftype)))
939                                 (set #ftypes-to-install (cat "" (tackon #envarc-common #deftype)))
940                                 (set #destbackup (tackon #storage-scalos "Envarc"))
941                                 )
942                         )
944                         (if (= #num 6)
945                                 (
946                                 (set #ftypes-installed (cat "" (tackon #env-scalos #deftype)))
947                                 (set #ftypes-to-install #menu13)
948                                 (set #destbackup (tackon #storage-scalos "Envarc"))
949                                 )
950                         )
952                         (if (and (> #num 6) (<= #num 19))
953                                 (
954                                 (set #ftypes-installed (cat "" (tackon (tackon #env-scalos "Filetypes") #deftype)))
955                                 (set #ftypes-to-install (cat "" (tackon #envarcftypes #deftype)))
956                                 (set #destbackup (tackon #storage-scalos "Envarc/Filetypes"))
957                                 )
958                         )
960                         (if (exists #ftypes-installed (NOREQ))
961                                 (
962                                 (set ReplaceEnvarc 1)
963                                 ;(message "Number: " #num "\nInstalled: " #ftypes-installed "\nTo install: " #ftypes-to-install "\n\nBackup of: " #ftypes-installed "\nto: " #destbackup)
964                                 )
965                         )
966                         (set #num(+ #num 1))
967                 )
968         )
969         (if ReplaceEnvarc
970                 (
971                 (set #ask-replace-Envarc
972                         (cat
973                                 "Installer found some default preferences installed.\n"
974                                 "Do you want to replace them?\n\n"
975                                 "Files to install:\n"
976                                 "deficons.prefs, icandy, Palette13.prefs, Pattern.prefs\n"
977                                 "Menu13.prefs, Persist.prefs, scalos.prefs\n\n"
978                                 "appicon, archive, brush, disk, drawer, filearchive\n"
979                                 "gif, ILBM, jpeg, picture, project, tool, trashcan\n\n"
980                                 "A backup copy will be created in 'Sys:Storage/Scalos'\n\n"
981                                 "NOTE: If a old backup copy already exists, it will be replaced!"
982                         )
983                 )
984                 (set FoundEnvarc
985                         (askbool
986                                 (prompt #ask-replace-Envarc)
987                                 (help #help-themes-statusbar)
988                                 (default 0)
989                                 )
990                         )
991                 )
992         )
993         (set #num 0)
994         (while
995                 (set #deftype
996                         (select #num
997                                 "deficons.prefs"
998                                 "icandy"
999                                 "Palette13.prefs"
1000                                 "Pattern.prefs"
1001                                 "Persist.prefs"
1002                                 "scalos.prefs"
1003                                 "Menu13.prefs"
1004                                 "appicon"
1005                                 "archive"
1006                                 "brush"
1007                                 "disk"
1008                                 "drawer"
1009                                 "filearchive"
1010                                 "gif"
1011                                 "ILBM"
1012                                 "jpeg"
1013                                 "picture"
1014                                 "project"
1015                                 "tool"
1016                                 "trashcan"
1017                                 ""
1018                                 )
1019                         )
1020                         (
1022                         (if (= #num 0)
1023                                 (
1024                                 (set #ftypes-installed (cat "" (tackon #env #deftype)))
1025                                 (set #ftypes-to-install #deficons)
1026                                 (set #destbackup "Sys:Storage/Envarc")
1027                                 )
1028                         )
1030                         (if (and (> #num 0) (<= #num 5))
1031                                 (
1032                                 (set #ftypes-installed (cat "" (tackon #env-scalos #deftype)))
1033                                 (set #ftypes-to-install (cat "" (tackon #envarc-common #deftype)))
1034                                 (set #destbackup (tackon #storage-scalos "Envarc"))
1035                                 )
1036                         )
1038                         (if (= #num 6)
1039                                 (
1040                                 (set #ftypes-installed (cat "" (tackon #env-scalos #deftype)))
1041                                 (set #ftypes-to-install #menu13)
1042                                 (set #destbackup (tackon #storage-scalos "Envarc"))
1043                                 )
1044                         )
1046                         (if (and (> #num 6) (<= #num 19))
1047                                 (
1048                                 (set #ftypes-installed (cat "" (tackon (tackon #env-scalos "Filetypes") #deftype)))
1049                                 (set #ftypes-to-install (cat "" (tackon #envarcftypes #deftype)))
1050                                 (set #destbackup (tackon #storage-scalos "Envarc/Filetypes"))
1051                                 )
1052                         )
1055                         (if ReplaceEnvarc
1056                                 (
1057                                 (if FoundEnvarc
1058                                         (
1059                                         (if (exists #ftypes-installed (NOREQ))
1060                                                 (
1061                                                 (P_BackupEnvarc #ftypes-installed #destbackup)
1062                                                 )
1063                                         )
1064                                         (P_SimpleCopy ("Copying: " (fileonly (#deftype)) "...") #ftypes-to-install (pathonly(#ftypes-installed)) " default prefs.")
1065                                         )
1066                                         )
1067                                 )
1068                                 (
1069                                 (P_SimpleCopy ("Copying: " (fileonly (#deftype)) "...") #ftypes-to-install (pathonly(#ftypes-installed)) " default prefs.")
1070                                 )
1071                         )
1072                         (set #num (+ #num 1))
1073                 )
1074         )
1077 ;----------------------------------------------------------------------------
1078 ;==  PROCEDURE P_BACKUPENVARC   =============================================
1079 ;----------------------------------------------------------------------------
1081 (procedure P_BackupEnvarc #file #destpath
1083         (if (not (exists  #destpath (NOREQ)))
1084                 (
1085                 (makedir #destpath
1086                         (prompt "Create dir: " #destpath)
1087                         (help   @makedir-help)
1088                         )
1089                 )
1090         )
1091         (P_SimpleCopy ("Copy backup: " (fileonly (#file)) "...") #file #destpath " default prefs.")
1094 ;----------------------------------------------------------------------------
1095 ;==    PROCEDURE ENVARC EXPERT   ============================================
1096 ;----------------------------------------------------------------------------
1098 (procedure P_VerifyEnvarcForExpert #esrc #edest #ehelptext
1100         (set  #flag-icandy  1)
1101         (set  #flag-Palette 2)
1102         (set  #flag-Pattern 4)
1103         (set  #flag-Persist 8)
1104         (set  #flag-scalosprefs 16)
1106         (set #install-default (BITOR #install-default #flag-icandy))
1107         (set #install-default (BITOR #install-default #flag-Palette))
1108         (set #install-default (BITOR #install-default #flag-Pattern))
1109         (set #install-default (BITOR #install-default #flag-Persist))
1110         (set #install-default (BITOR #install-default #flag-scalosprefs))
1113         (set ftypes-files
1114                 (askoptions
1115                         (prompt #prompt-default-prefs)
1116                         (help #fhelptext @askoptions-help)
1117                         (choices
1118                                 "icandy"
1119                                 "Palette13.prefs"
1120                                 "Pattern.prefs"
1121                                 "Persist.prefs"
1122                                 "scalos.prefs"
1123                                 )
1124                                 (default #install-default)
1125                         )
1126                 )
1127                 (set #num 0)
1128                 (while
1129                         (set #deftype
1130                                 (select #num
1131                                         "icandy"
1132                                         "Palette13.prefs"
1133                                         "Pattern.prefs"
1134                                         "Persist.prefs"
1135                                         "scalos.prefs"
1136                                         ""
1137                                         )
1138                                 )
1139                                 (
1140                                 (set #ftypes-installed
1141                                         (cat "" (tackon #edest #deftype)
1142                                         )
1143                                 )
1145                                 (
1146                                 (set #ftypes-to-install
1147                                         (cat "" (tackon #esrc #deftype)
1148                                         )
1149                                 )
1151                                 (if (IN ftypes-files #num)
1152                                         (
1153                                         (P_SimpleCopy "Copy Filetypes: " #ftypes-to-install #edest #ehelptxt)
1154                                         )
1155                                 )
1156                                 (set #num(+ #num 1))
1157                         )
1158                 )
1160         )
1164 ;----------------------------------------------------------------------------
1165 ;==  PROCEDURE ENVARC FILETYPES NOVICE ======================================
1166 ;----------------------------------------------------------------------------
1168 (procedure P_VerifyEnvarcFTypesForNovice #fsrc #fdest #fhelptext
1170         (set  #flag-appicon  1)
1171         (set  #flag-archive 2)
1172         (set  #flag-brush 4)
1173         (set  #flag-disk 8)
1174         (set  #flag-drawer 16)
1175         (set  #flag-filearchive 32) 
1176         (set  #flag-gif 64)
1177         (set  #flag-ILBM 128)
1178         (set  #flag-jpeg 256)
1179         (set  #flag-picture 1024)
1180         (set  #flag-project 2048)
1181         (set  #flag-tool 4096)
1182         (set  #flag-trashcan 8192)
1184         (set #install-default (BITOR #install-default #flag-appicon))
1185         (set #install-default (BITOR #install-default #flag-archive))
1186         (set #install-default (BITOR #install-default #flag-brush))
1187         (set #install-default (BITOR #install-default #flag-disk))
1188         (set #install-default (BITOR #install-default #flag-drawer))
1189         (set #install-default (BITOR #install-default #flag-filearchive))
1190         (set #install-default (BITOR #install-default #flag-gif))
1191         (set #install-default (BITOR #install-default #flag-ILBM))
1192         (set #install-default (BITOR #install-default #flag-jpeg))
1193         (set #install-default (BITOR #install-default #flag-picture))
1194         (set #install-default (BITOR #install-default #flag-project))
1195         (set #install-default (BITOR #install-default #flag-tool))
1196         (set #install-default (BITOR #install-default #flag-trashcan))
1199         (set ftypes-files
1200                 (askoptions
1201                         (prompt #prompt-default-prefs)
1202                         (help #fhelptext @askoptions-help)
1203                         (choices
1204                                 "appicon"
1205                                 "archive"
1206                                 "brush"
1207                                 "disk"
1208                                 "drawer"
1209                                 "filearchive"
1210                                 "gif"
1211                                 "ILBM"
1212                                 "jpeg"
1213                                 "picture"
1214                                 "project"
1215                                 "tool"
1216                                 "trashcan"
1217                                 )
1218                                 (default #install-default)
1219                         )
1220                 )
1221                 (set #num 0)
1222                 (while
1223                         (set #deftype
1224                                 (select #num
1225                                         "appicon"
1226                                         "archive"
1227                                         "brush"
1228                                         "disk"
1229                                         "drawer"
1230                                         "filearchive"
1231                                         "gif"
1232                                         "ILBM"
1233                                         "jpeg"
1234                                         "picture"
1235                                         "project"
1236                                         "tool"
1237                                         "trashcan"
1238                                         ""
1239                                         )
1240                                 )
1241                                 (
1242                                 (set #ftypes-installed
1243                                         (cat "" (tackon #fdest #deftype)
1244                                         )
1245                                 )
1247                                 (
1248                                 (set #ftypes-to-install
1249                                         (cat "" (tackon #fsrc #deftype)
1250                                         )
1251                                 )
1253                                 (if (IN ftypes-files #num)
1254                                         (if (not (exists #ftypes-installed (NOREQ)))
1255                                                 (
1256                                                 (P_SimpleCopy "Copy Filetypes: " #ftypes-to-install #fdest #fhelptxt)
1257                                                 )
1258                                         )
1259                                 )
1260                                 (set #num(+ #num 1))
1261                         )
1262                 )
1263         )
1266 ;----------------------------------------------------------------------------
1267 ;==  PROCEDURE ENVARC NOVICE ================================================
1268 ;----------------------------------------------------------------------------
1270 (procedure P_VerifyEnvarcForNovice #esrc #edest #ehelptext
1272         (set  #flag-icandy  1)
1273         (set  #flag-Palette 2)
1274         (set  #flag-Pattern 4)
1275         (set  #flag-Persist 8)
1276         (set  #flag-scalosprefs 16)
1278         (set #install-default (BITOR #install-default #flag-icandy))
1279         (set #install-default (BITOR #install-default #flag-Palette))
1280         (set #install-default (BITOR #install-default #flag-Pattern))
1281         (set #install-default (BITOR #install-default #flag-Persist))
1282         (set #install-default (BITOR #install-default #flag-scalosprefs))
1285         (set ftypes-files
1286                 (askoptions
1287                         (prompt "Do you want to install Scalos default preferences?\n")
1288                         (help #fhelptext @askoptions-help)
1289                         (choices
1290                                 "icandy"
1291                                 "Palette13.prefs"
1292                                 "Pattern.prefs"
1293                                 "Persist.prefs"
1294                                 "scalos.prefs"
1295                                 )
1296                                 (default #install-default)
1297                         )
1298                 )
1299                 (set #num 0)
1300                 (while
1301                         (set #deftype
1302                                 (select #num
1303                                         "icandy"
1304                                         "Palette13.prefs"
1305                                         "Pattern.prefs"
1306                                         "Persist.prefs"
1307                                         "scalos.prefs"
1308                                         ""
1309                                         )
1310                                 )
1311                                 (
1312                                 (set #ftypes-installed
1313                                         (cat "" (tackon #edest #deftype)
1314                                         )
1315                                 )
1317                                 (
1318                                 (set #ftypes-to-install
1319                                         (cat "" (tackon #esrc #deftype)
1320                                         )
1321                                 )
1323                                 (if (IN ftypes-files #num)
1324                                         (if (not (exists #ftypes-installed (NOREQ)))
1325                                                 (
1326                                                 ;(set #deftext
1327                                                 ;       (cat "Really overwrite: " #ftypes-installed "?"
1328                                                 ;       )
1329                                                 ;)
1330                                                 ;(P_SimpleCopyNovice #deftext #ftypes-to-install #edest #helptext)
1331                                                 ;)
1332                                                 ;(
1333                                                 (set #deftext
1334                                                         (cat "Copying: " #deftype " to:" #ftypes-installed
1335                                                         )
1336                                                 )
1337                                                 (P_SimpleCopy #deftext #ftypes-to-install #edest #helptext)
1338                                                 )
1339                                         )
1340                                 )
1341                                 (set #num(+ #num 1))
1342                         )
1343                 )
1345         )
1348 ;----------------------------------------------------------------------------
1349 ;==  PROCEDURE  P_VERIFYIFEXISTSFORNOVICE ===================================
1350 ;----------------------------------------------------------------------------
1352 (procedure P_VeriFyIfExistsForNovice #srcdir #object #destdir #help
1354         (if (not (exists (tackon #destdir #object) (NOREQ)))
1355                 (
1356                 (set #deftext
1357                         (cat "Copying: " #object " to: " #destdir
1358                         )
1359                 )
1360                 (P_SimpleCopy #deftext (tackon #srcdir #object) #destdir #help)
1361                 )
1362         )
1365 ;----------------------------------------------------------------------------
1366 ;==  PROCEDURE  P_VERIFYIFEXISTSFORAVEXP ===================================
1367 ;----------------------------------------------------------------------------
1369 (procedure P_VeriFyIfExistsForAvExp #srcdir #object #destdir #help
1371         (if (not (exists (tackon #destdir #object) (NOREQ)))
1372                 (
1373                 (set #deftext
1374                         (cat "Copying: " #object " to: " #destdir
1375                         )
1376                 )
1377                 (P_SimpleCopy #deftext (tackon #srcdir #object) #destdir #help)
1378                 )
1379                 (
1380                 (set #deftext
1381                         (cat "Do you want to replace: " #object " from: " #destdir
1382                         )
1383                 )
1384                 (P_SimpleCopyAvExp #deftext (tackon #srcdir #object) #destdir #help)
1385                 )
1386         )
1389 ;----------------------------------------------------------------------------
1390 ;==  PROCEDURE  COPYLIB =====================================================
1391 ;----------------------------------------------------------------------------
1393 (procedure P_Copylib #ptext #srclib #destlib
1394         (copylib
1395                 (prompt #ptext)
1396                 (source #srclib)
1397                 (dest   #destlib)
1398                 (help   @copylib-help)
1399                 (confirm)
1400         )
1403 ;----------------------------------------------------------------------------
1404 ;==  PROCEDURE  COPYLIBCPU ==================================================
1405 ;----------------------------------------------------------------------------
1407 (procedure P_CopylibCPU #ptext #srclib #destlib #new
1408         (askaboutcpu)
1409         (if     (exists (cat #srclib cpuadd-1) )
1410                 (
1411                 (copylib
1412                         (prompt #ptext)
1413                         (source (cat #srclib cpuadd-1))
1414                         (dest #destlib)
1415                         (newname #new)
1416                         (help   @copylib-help)
1417                         (confirm)
1418                         ;(optional "nofail") 
1419                         ) 
1420                 )
1421         )
1424 ;----------------------------------------------------------------------------
1425 ;========================= KICKSTART ========================================
1426 ;----------------------------------------------------------------------------
1428 (set #msg-badkick
1429 (cat "You must be using Kickstart v3.1 and AmigaOS 3.5 "
1430      "to run install script for " @app-name "!"
1431      ))
1433 ;==================
1434 ; Have the  KS3.1
1435 (if (< #wbversion 40)
1436 (   (exit #msg-badkick (quiet))
1437     ))
1439 (set guides-default 1)
1441 (set #bad-kick "You must be using Kickstart 3.0+ to install Scalos")
1442 (set #bad-cpu "You require at least a 68020 or higher processor to run Scalos")
1444 (if (= #MOS 1)
1445         (
1446         (set #machine "MorphOS/PPC")
1447         )
1448         (
1449         (if (= #OS4 1)
1450                 (set #machine "AmigaOS4/PPC")
1451                 (set #machine "AmigaOS/68K")
1452         )
1453         )
1456 (set #install-start
1457         (cat
1458                 "\n\n" @app-name "\n"
1459                 #machine "\n"
1460                 @applicationdate"\n"
1461                 "Copyright © 2000-2010 THE SCALOS TEAM\n\n\n"
1462                 "E-mail: info@scalos.noname.fr\n"
1463                 "Web: http://scalos.noname.fr\n\n"
1464                 "\nThis script will install "@app-name" \n"
1465                 "on your disk...\n")
1468 (set #warning-start
1469         (cat
1470                 "\n\n Scalos (Version: " #scalosresidentVer "." #scalosresidentRev ") is currently running, please, close all windows\n"
1471                 " before to continue the installation. As Scalos use some pictures\n"
1472                 " for windows status bar and if some windows are opened without\n"
1473                 " Status Bar hidden, the installation will break returning a DOS ERROR.\n")
1476 ;--------------------------------------------------------------------
1477 ;---  SCALOS  MESSAGES  ---------------------------------------------
1478 ;--------------------------------------------------------------------
1480 (set #cat-where-scalos
1481         (cat
1482                 "Where would you like to install "#cat-app-name"?\n"
1483                 "(A directory named Scalos will be created)."
1484         )
1486 (set #where-scalos #cat-where-scalos)
1488 (set #where-scalos-help
1489         (cat
1490                 "Scalos will be installed directly into the"
1491                 " desired directory. An assign Scalos: is made"
1492                 " right after the creation of the directory"
1493         )
1496 (set #startup-scalos "Scalos: assign is about add to you user-startup")
1498 (set #startup-scalos-help
1499         (cat
1500                 "An Assign Scalos: will be added to your user-startup"
1501         )
1504 (set #startsca-select "Do you want to install Scalos as Workbench replacement?")
1506 (set #startsca-select-help
1507         (cat
1508                 "If you select YES this installscript will rename the current"
1509                 " LoadWB to LoadWB.orig and install a tiny replacement to load"
1510                 " Scalos intead of the original Workbench"
1511         )
1513 (set #startsca-select-scaloadwbhelp
1514         (cat
1515                 "If you select YES this installscript will copy"
1516                 " LoadWB.scalos to c: and not as LoadWB replacement."
1517         )
1520 ;--------------------------------------------------------------------
1521 ;---  SCALOS PREFS MESSAGES  ----------------------------------------
1522 ;--------------------------------------------------------------------
1524 (set #where-scalosprefs "Where is the place for the preferences editors?")
1526 (set #where-scalosprefs-help
1527         (cat
1528                 "This is the destination directory of all Scalos preferences"
1529                 " editors!\n\n Normally ALL Scalos preferences editors are in Scalos:Prefs !"
1530         )
1533 (set #prompt-default-prefs "Do you want to install Scalos default preferences?")
1535 ;--------------------------------------------------------------------
1536 ;---  PLUGINS MESSAGES  ---------------------------------------------
1537 ;--------------------------------------------------------------------
1539 (set #plugin-select "Do you want to install some useful plugins for Scalos")
1541 (set #plugin-select-help
1542         (cat
1543                 "One plugin for example might be useful for you if you want"
1544                 " a sorted cleanup of the icons..."
1545         )
1548 ;--------------------------------------------------------------------
1549 ;---  COPIES  MESSAGES ----------------------------------------------
1550 ;--------------------------------------------------------------------
1552 (set #copy-scalos "Installing Scalos (Mainprogram)...")
1553 (set #copy-scalosprefs "Installing Scalos Preferences...")
1554 (set #copy-libs1 "Installing Library: iconobject.library ...")
1555 (set #copy-libs4 "Installing Datatype: amigaiconob35.datatype ...")
1556 (set #copy-libs4.1 "Installing Datatype: amigaiconobject.datatype ...")
1557 (set #copy-libs5 "Installing Datatype: iconobject.datatype ...")
1558 (set #copy-libs6 "Installing Datatype: newiconobject.datatype ...")
1559 (set #copy-libs7 "Installing Datatype: pngiconobject.datatype ...")
1560 (set #copy-libs8 "Installing Datatype: glowiconobject.datatype ...")
1561 (set #copy-libs9 "Installing Library:  sqlite3.library ...")
1563 (set #CatMOsGuiLib "Installing MorphOS library: guigfx.library.elf...")
1564 (set #CatMOsRenderLib "Installing MorphOS library: render.library.elf...") 
1565 (set #CatOS4GuiLib "Installing library: guigfx.library.os4...")
1566 (set #CatOS4RenderLib "Installing library: render.library.os4...")
1567 (set #CatGuiLib "Installing library: guigfx.library...")
1568 (set #CatRenderLib "Installing library: render.library...") 
1570 (set #CatPopLib "Installing Library: popupmenu.library...")
1571 (set #CatPrefLib "Installing Library: preferences.library...")
1572 (set #CatScaGfxLib "Installing Library: scalosgfx.library...")
1574 (set #copy-classes "Installing required datatypes (Classes)...")
1575 (set #copy-datatypes "Installing required datatypes (Devs)...")
1576 (set #copy-catalog "Installing desired catalogs...")
1577 (set #copy-presets "Installing Presets...")
1578 (set #copy-filetypes-presets "Installing Filetypes preferences...")
1579 (set #copy-plugins-filetypes "Installing FileTypes Plugins...")
1580 (set #copy-plugins-menu "Installing Menu Plugins...")
1581 (set #copy-plugins-oop "Installing OOP Plugins...")
1582 (set #copy-plugins-preview "Installing Preview Plugins...")
1583 (set #copy-tools "Installing Tools...")
1584 (set #copy-loadwb "Installing LoadWB replacement...")
1586 ;--------------------------------------------------------------------
1587 ;---  DIALOGUES RENAME  ---------------------------------------------
1588 ;--------------------------------------------------------------------
1590 (set #rename-loadwborg "Renaming of original LoadWB...")
1591 (set #rename-loadwbscalos "Renaming/Installing Scalos-LoadWB...")
1593 ;--------------------------------------------------------------------
1594 ;---  MESSAGE: SCALOS NO FOUND [UNUSED] -----------------------------
1595 ;--------------------------------------------------------------------
1597 (set #cat-scalos-nofound
1598         (cat
1599                 "\n\n\nSorry ! Assign SCALOS: no found,\n"
1600                 " ScalosBeta V"#scaver"."#scarev"\n"
1601                 "can't be installed.\n"
1602         )
1604 ;----------------------------------------------------------------------------
1605 ;=========================== PROGRAM-START ==================================
1606 ;----------------------------------------------------------------------------
1608 (set @default-dest "")
1610 ;Check Kickstart (>= v3.0) Version.
1612 (if (< (/ (getversion) 65536) 39)
1613         (abort #bad-kick)
1615 (set processor (database "cpu"))
1616 (if (< processor "68020")
1617         (abort #bad-cpu)
1620 (set #envarc-scalos-request 0)
1622 (set #scalos-default-dest "SYS:")
1623 (set #env "Envarc:")
1624 (set #env-scalos ("Envarc:Scalos"))
1626 ;(set #scalos-default-dest "RAM:t")
1627 ;(set #env "Env:")
1628 ;(set #env-scalos ("Env:Scalos"))
1630 (if (exists #env-scalos (NOREQ))
1631         (set #envarc-scalos-request 1)
1635 (set #storage-scalos ("Sys:Storage/Scalos"))
1637 (set #backupinfo
1638         (cat 
1639                 "\n\nInstaller has found Scalos preferences in '" #env-scalos "'.\n"
1640                 " You will be prompted if you want anything to be overwritten, and\n"
1641                 " a backup copy will be created in '" #storage-scalos "'\n"
1642         )
1645 (complete 0)
1647 ;----------------------------------------------------------------------------
1648 ;=========================== START REQUEST  =================================
1649 ;----------------------------------------------------------------------------
1651 (message #install-start)
1653 ;----------------------------------------------------------------------------
1654 ;============================================================================
1655 ;=== If Scalos is running, check its version and revison, if version >= 40
1656 ;===  OR version = 41 AND revision <= 2 then open request asking user to
1657 ;===  close all windows(datatypes images locked).  
1658 ;============================================================================
1659 (set #residentmore40 0)
1661 (if     (> #scalosresident 0)
1662         (
1663         (if (and (> #scalosresident 0) (>= #scalosresidentVer 40))
1664                         (
1665                         (set #residentmore40 1)
1666                         )
1667                 )
1668                 (if #residentmore40)
1669                         (
1670                         (if     (OR (< #scalosresidentVer 41) (and (= #scalosresidentVer 41) (<= #scalosresidentRev 2)) )
1671                                 (
1672                                 (message #warning-start)
1673                                 )
1674                         )
1675                 )
1676         )
1678 ;===========================================================================
1679 ;---------------------------------------------------------------------------
1681 (welcome)
1683 ;=== DETECT USER-LEVEL SELECTED BY USER =====================================
1685 (set #level @user-level)
1687 ;============================================================================
1689 (if (and (> #envarc-scalos-request 0) (> #level 0))
1690         (
1691         (message #backupinfo)
1692         )
1695 ;===[ SELECT SCALOS DESTINATION ]============================================
1698 (if (and (>= #installer-version 44) (> #level 0))
1699         (
1700         (showmedia "mediatext" #licencetext 'lower_left' 'small' 1 'wordwrap')
1701         )
1704 (set #oldlevel #level)
1706 (if (exists "Scalos:" (NOREQ))
1707         (
1708                 (set firstinstall 0)
1709                 (set #scalos-dest "Scalos:")
1710                 ;===
1711                 (if (exists "Scalos:Scalos" (NOREQ))
1712                         (
1713                                 (if (> #level 0)
1714                                         (
1715                                                 (set #oldversion-select-help
1716                                                         (cat
1717                                                                 "\n\n   Script found ASSIGN Scalos: and\n"
1718                                                                 "compare Scalos version already installed\n"
1719                                                                 "with the new version to install.\n"
1720                                                         )
1721                                                 )
1723                                                 (set #oldscaversion (getversion "Scalos:scalos" ))
1724                                                 (set #oldscaver (/ #oldscaversion 65536) )
1725                                                 (set #oldscarev (- #oldscaversion (* #oldscaver 65536) ))
1726                                                 (set #catoldversion
1727                                                         (cat
1728                                                                 "\n\n   Scalos version already installed:\n"
1729                                                                 "Scalos V"#oldscaver"."#oldscarev"\n\n"
1730                                                                 "   Scalos to install:\n"
1731                                                                 " ScalosBeta V"#scaver"."#scarev" ")
1732                                                 )
1734                                                 ;===
1735                                                 (set #instnew
1736                                                         (askbool
1737                                                                 (prompt #catoldversion)
1738                                                                 (help #oldversion-select-help)
1739                                                                 (default 1)
1740                                                         )
1741                                                 )
1742                                         )
1743                                 )
1744                         )
1745                 )
1746         )
1747         ;== ELSE ==[ ASSIGN SCALOS: NO FOUND ]===============================
1749         (
1750                 (set firstinstall 1)
1751                 (if     (= #level 0)
1752                         (
1753                         (set #scalos-dest #scalos-default-dest)
1754                         )
1755                         (set #scalos-dest
1756                                 (askdir
1757                                         (prompt #where-scalos)
1758                                         (help   #where-scalos-help "\n\n" @askdir-help)
1759                                         (default #scalos-default-dest)
1760                                         (newpath)
1761                                 )
1762                         )
1763                 )
1765         )
1768 (complete 2)
1770 ;===[  BACKUP ENV:SCALOS  ]==================================================
1772 (set #envarc-backup-prompt
1773         (cat
1774                 "Installer found Scalos preferences!\n"
1775                 "If you want, a backup copy of '" #env-scalos "'\n" 
1776                 " will be created in '" #storage-scalos "'"
1777         )
1780 (if #envarc-scalos-request
1781                 (
1782                 (if     (not (exists #storage-scalos (NOREQ)))
1783                                 (
1784                                         (set #create-env-sca
1785                                                 (cat    "Create 'Scalos' directory:\n" #storage-scalos)
1786                                         )
1787                                         (makedir #storage-scalos
1788                                         (prompt #create-env-sca)
1789                                         (help   @makedir-help)
1790                                 )
1791                         )
1792                 )
1794                 ;(copyfiles
1795                 ;       (prompt #envarc-backup-prompt)
1796                 ;       (source #env-scalos)
1797                 ;       (dest   #storage-scalos)
1798                 ;       (help   @askfile-help)
1799                 ;       (confirm "average")
1800                 ;       (infos)
1801                 ;       (all)
1802                 ;)
1803         )
1806 ;========================[ INFOS SCALOS/DATATYPES ]==========================
1808 (set #catinfo
1809         (if (= #OS4 0)
1810                 (cat
1811                         "\n\nScalosBeta V"#scaver"."#scarev" will be installed to : "#scalos-dest"\n\n"
1812                         "Datatypes versions to install:\n\n"
1813                         "- pngiconobject.datatype V"#dtverpng"."#dtrevpng"\n"
1814                         "- amigaiconobj35.datatype V"#dtver_aiconobj35"."#dtrev_aiconobj35"\n"
1815                         "- amigaiconobject.datatype V"#dtver_aiconobject"."#dtrev_aiconobject"\n"
1816                         "- iconobject.datatype V"#dtver_iconobject"."#dtrev_iconobject"\n"
1817                         "- newiconobject.datatype V"#dtver_niconobject"."#dtrev_niconobject"\n"
1818                         "- glowiconobject.datatype V"#dtver_glowiconobject"."#dtrev_glowiconobject"\n"
1819                 )
1820                 ;else
1821                 (cat
1822                         "\n\nScalosBeta V"#scaver"."#scarev" will be installed to : "#scalos-dest"\n\n"
1823                         "Datatypes versions to install:\n\n"
1824                         "- pngiconobject.datatype V"#dtverpng"."#dtrevpng"\n"
1825                         "- amigaiconobj35.datatype V"#dtver_aiconobj35"."#dtrev_aiconobj35"\n"
1826                         "- amigaiconobject.datatype V"#dtver_aiconobject"."#dtrev_aiconobject"\n"
1827                         "- iconobject.datatype V"#dtver_iconobject"."#dtrev_iconobject"\n"
1828                         "- glowiconobject.datatype V"#dtver_glowiconobject"."#dtrev_glowiconobject"\n"
1829                 )
1830         )
1833 (if (= #level 2)
1834         (
1835         (message #catinfo)
1836         )
1839 (P_closemedia mediatext)
1841 ;===================[ CREATE AND ASSIGN SCALOS DIR ]=========================
1843 (if firstinstall
1844         (
1845         (set #userdir
1846                 (cat "" (tackon  #scalos-dest "Scalos"))
1847         )
1849         (if     (not (exists #userdir (NOREQ)))
1850                         (
1851                         (makedir #userdir
1852                                 (prompt #makedir-scalos)
1853                                 (help   @makedir-help)
1854                                 (infos)
1855                                 )
1857                         )
1859                 )
1860                 (makeassign "Scalos" (tackon  #scalos-dest "Scalos"))
1861         )
1865 (set #scalos-dest "Scalos:")
1867 ;----------------------------------------------------------------------------
1868 ;------------------ IF USER-LEVEL = EXPERT (2) ------------------------------
1869 ;----------------------------------------------------------------------------
1870 (if (= #level 2)
1871         (
1872                 (set scalosprefs-dest
1873                         (askdir
1874                                 (prompt #where-scalosprefs)
1875                                 (help   #where-scalosprefs-help "\n\n" @askdir-help)
1876                                 (default (tackon "Scalos:" "Prefs"))
1877                                 (newpath)
1878                         )
1879                 )
1880         )
1881         (
1882                 (set scalosprefs-dest (tackon "Scalos:" "Prefs"))
1883         )
1886 (complete 6)
1888 ;============================================================================
1889 ;==================== VERIFING DIRECTORY TREE THEMES ========================
1890 ;============================================================================
1892 (set #copy-themes-help
1893         (cat
1894                 "Installing different brushes for:\n"
1895                 " statusbar,pointer,tooltip backdrops"
1896         )
1899 (set #copy-themes-logos
1900         (cat
1901                 "Installing Themes:\n " logos "..."
1902         )
1904 (set #copy-themes
1905         (cat
1906                 "Do you want to install themes?\n\n"
1907                 "Brushes or images will be used:\n"
1908                 " - As background for:\n"
1909                 "     FileTransfer Request, Tooltips bubble.\n\n"
1910                 " - As background and informations for:\n"
1911                 "     Windows Statusbar.\n\n"
1912                 " - By 'Scalos Prefs':\n"
1913                 "     Delete, Empty_Traschcan, Execute_Command, Information,\n"
1914                 "     NewDrawer, Reboot, Rename, SystemInfo.\n"
1915         )
1918 (complete 8)
1920 (if (< #level 2)
1921         (
1922         (set askthemes 1)
1923         )
1924         (
1925         (set askthemes
1926                 (askbool
1927                         (prompt #copy-themes)
1928                         (help #copy-themes-help)
1929                         (default 1)
1930                         )
1931                 )
1932         )
1935 (if askthemes
1936         (
1937                 (set themes                     "Scalos:Themes")
1938                 (set themes-defaut              "Scalos:Themes/default")
1940                 (set themes-menu                "Scalos:Themes/default/Menu")
1941                 (set themes-modules             "Scalos:Themes/default/Modules")
1943                 (set themes-module-delete       "Scalos:Themes/default/Modules/delete.module")
1944                 (set themes-module-etrasch      "Scalos:Themes/default/Modules/empty_trashcan.module")
1945                 (set themes-module-ecommand     "Scalos:Themes/default/Modules/execute_command.module")
1946                 (set themes-module-info         "Scalos:Themes/default/Modules/information.module")
1947                 (set themes-module-ndrawer      "Scalos:Themes/default/Modules/newdrawer.module")
1948                 (set themes-module-reboot       "Scalos:Themes/default/Modules/reboot.module")
1949                 (set themes-module-rename       "Scalos:Themes/default/Modules/rename.module")
1950                 (set themes-module-sysinfo      "Scalos:Themes/default/Modules/systeminfo.module")
1952                 (set themes-pointers            "Scalos:Themes/default/PointerIcons")
1953                 (set themes-sound               "Scalos:Themes/default/Sound")
1954                 (set themes-desktop             "Scalos:Themes/default/Desktop")
1955                 (set themes-window              "Scalos:Themes/default/Window")
1956                 (set themes-controlbar          "Scalos:Themes/default/Window/ControlBar")
1957                 (set themes-statusbar           "Scalos:Themes/default/Window/StatusBar")
1959                 (set themes-prefs               "Scalos:Themes/default/Prefs")
1960                 (set themes-prefs-pages         "Scalos:Themes/default/Prefs/Pages")
1961                 (set themes-prefs-modules       "Scalos:Themes/default/Prefs/Modules")
1963                 (set themes-icons               "Scalos:Themes/default/Icons")
1964                 (set themes-icons-overlay       "Scalos:Themes/default/Icons/Overlay")
1966                 (set #makedir-themes            "Creating Themes-Destination...")
1968                 (if (not (exists themes (NOREQ)))
1969                         (
1970                                 (makedir themes
1971                                 (prompt #makedir-themes)
1972                                 (help   @makedir-help)
1973                                 )
1974                         )
1975                 )               (if (not (exists themes-defaut (NOREQ)))
1976                         (
1977                                 (makedir themes-defaut
1978                                 (prompt #makedir-themes)
1979                                 (help   @makedir-help)
1980                                 )
1981                         )
1982                 )               (if (not (exists themes-desktop (NOREQ)))
1983                         (
1984                                 (makedir themes-desktop
1985                                 (prompt #makedir-themes)
1986                                 (help   @makedir-help)
1987                                 )
1988                         )
1989                 )               (if (not (exists themes-menu (NOREQ)))
1990                         (
1991                                 (makedir themes-menu
1992                                 (prompt #makedir-themes)
1993                                 (help   @makedir-help)
1994                                 )
1995                         )
1996                 )               (if (not (exists themes-modules (NOREQ)))
1997                         (
1998                                 (makedir themes-modules
1999                                 (prompt #makedir-themes)
2000                                 (help   @makedir-help)
2001                                 )
2002                         )
2003                 )               (if (not (exists themes-module-delete (NOREQ)))
2004                         (
2005                                 (makedir themes-module-delete
2006                                 (prompt #makedir-themes)
2007                                 (help   @makedir-help)
2008                                 )
2009                         )
2010                 )               (if (not (exists themes-module-etrasch (NOREQ)))
2011                         (
2012                                 (makedir themes-module-etrasch
2013                                 (prompt #makedir-themes)
2014                                 (help   @makedir-help)
2015                                 )
2016                         )
2017                 )               (if (not (exists themes-module-ecommand (NOREQ)))
2018                         (
2019                                 (makedir themes-module-ecommand
2020                                 (prompt #makedir-themes)
2021                                 (help   @makedir-help)
2022                                 )
2023                         )
2024                 )               (if (not (exists themes-module-info (NOREQ)))
2025                         (
2026                                 (makedir themes-module-info
2027                                 (prompt #makedir-themes)
2028                                 (help   @makedir-help)
2029                                 )
2030                         )
2031                 )               (if (not (exists themes-module-ndrawer (NOREQ)))
2032                         (
2033                                 (makedir themes-module-ndrawer
2034                                 (prompt #makedir-themes)
2035                                 (help   @makedir-help)
2036                                 )
2037                         )
2038                 )               (if (not (exists themes-module-reboot (NOREQ)))
2039                         (
2040                                 (makedir themes-module-reboot
2041                                 (prompt #makedir-themes)
2042                                 (help   @makedir-help)
2043                                 )
2044                         )
2045                 )               (if (not (exists themes-module-rename (NOREQ)))
2046                         (
2047                                 (makedir themes-module-rename
2048                                 (prompt #makedir-themes)
2049                                 (help   @makedir-help)
2050                                 )
2051                         )
2052                 )               (if (not (exists themes-module-sysinfo (NOREQ)))
2053                         (
2054                                 (makedir themes-module-sysinfo
2055                                 (prompt #makedir-themes)
2056                                 (help   @makedir-help)
2057                                 )
2058                         )
2059                 )               (if (not (exists themes-pointers (NOREQ)))
2060                         (
2061                                 (makedir themes-pointers
2062                                 (prompt #makedir-themes)
2063                                 (help   @makedir-help)
2064                                 )
2065                         )
2066                 )               (if (not (exists themes-sound (NOREQ)))
2067                         (
2068                                 (makedir themes-sound
2069                                 (prompt #makedir-themes)
2070                                 (help   @makedir-help)
2071                                 )
2072                         )
2073                 )               (if (not (exists themes-window (NOREQ)))
2074                         (
2075                                 (makedir themes-window
2076                                 (prompt #makedir-themes)
2077                                 (help   @makedir-help)
2078                                 )
2079                         )
2080                 )               (if (not (exists themes-statusbar (NOREQ)))
2081                         (
2082                                 (makedir themes-statusbar
2083                                 (prompt #makedir-themes)
2084                                 (help   @makedir-help)
2085                                 )
2086                         )
2087                 )               (if (not (exists themes-controlbar (NOREQ)))
2088                         (
2089                                 (makedir themes-controlbar
2090                                 (prompt #makedir-themes)
2091                                 (help   @makedir-help)
2092                                 )
2093                         )
2094                 )
2096                 ;================================= Default themes prefs ==================================
2098                 (if     (not (exists themes-prefs (NOREQ)))
2099                                 (
2100                                 (makedir themes-prefs
2101                                 (prompt #makedir-themes)
2102                                 (help   @makedir-help)
2103                                 )
2104                         )
2105                 )
2106                 (if     (not (exists themes-prefs-pages (NOREQ)))
2107                                 (
2108                                 (makedir themes-prefs-pages
2109                                 (prompt #makedir-themes)
2110                                 (help   @makedir-help)
2111                                 )
2112                         )
2113                 )
2114                 (if     (not (exists themes-prefs-modules (NOREQ)))
2115                                 (
2116                                 (makedir themes-prefs-modules
2117                                 (prompt #makedir-themes)
2118                                 (help   @makedir-help)
2119                                 )
2120                         )
2121                 )
2123                 ;================================= Default themes icons ==================================
2125                 (if     (not (exists themes-icons (NOREQ)))
2126                                 (
2127                                 (makedir themes-icons
2128                                 (prompt #makedir-themes)
2129                                 (help   @makedir-help)
2130                                 )
2131                         )
2132                 )
2133                 (if     (not (exists themes-icons-overlay (NOREQ)))
2134                                 (
2135                                 (makedir themes-icons-overlay
2136                                 (prompt #makedir-themes)
2137                                 (help   @makedir-help)
2138                                 )
2139                         )
2140                 )
2142                 ;======================================== HELP THEMES ====================================
2144                 (set #help-themes-default
2145                         (cat
2146                                 "\nBackgrounds and Scalos Logo brushes.\n\n"
2147                                 "  AboutBackground: About window background\n"
2148                                 "  FileTransBackground: Request transferfiles window background\n"
2149                                 "  ScalosAboutLogo: About window logo\n"
2150                                 "  ScalosLogo: About page of 'Scalos Prefs'\n"
2151                                 "  ScalosSplashLogo:  Splash window logo\n"
2152                                 "  SplashBackground: Splash window background\n"
2153                                 "  ToolTipBackground: Tooltip bubble background\n\n"
2154                         )
2155                 )
2157                 (set #help-themes-module-delete
2158                         (cat
2159                                 "\nInstalling theme Delete.module file."
2160                         )
2161                 )
2163                 (set #help-themes-module-etrasch
2164                         (cat
2165                                 "\nInstalling theme Empty_TraschCan.module file."
2166                         )
2167                 )
2169                 (set #help-themes-module-ecommand
2170                         (cat
2171                                 "\nInstalling theme Execute_Command.module file."
2172                         )
2173                 )
2175                 (set #help-themes-module-info
2176                         (cat
2177                                 "\nInstalling theme Information.module file."
2178                         )
2179                 )
2181                 (set #help-themes-module-ndrawer
2182                         (cat
2183                                 "\nInstalling theme NewDrawer.module file."
2184                         )
2185                 )
2187                 (set #help-themes-module-reboot
2188                         (cat
2189                                 "\nInstalling theme Reboot.module file."
2190                         )
2191                 )
2193                 (set #help-themes-module-rename
2194                         (cat
2195                                 "\nInstalling theme Rename.module file."
2196                         )
2197                 )
2199                 (set #help-themes-module-sysinfo
2200                         (cat
2201                                 "\nInstalling theme Systeminfo.module file."
2202                         )
2203                 )
2205                 (set #help-themes-PointerIcons
2206                         (cat
2207                                 "\n     Theme PointerIcons files.\n"
2208                                 "They are used for all files to manipulate.\n"
2209                                 "e.g. Icon 'copying.info' is used when\n"
2210                                 "some objects must be copied, moved or cloned."
2211                         )
2212                 )
2214                 (set #help-themes-desktop
2215                         (cat
2216                                 "\n Used as default Desktop background."
2217                         )
2218                 )
2221                 (set #help-themes-window
2222                         (cat
2223                                 "\n Icon 'def_iconify.info' is used for all\n"
2224                                 "Scalos windows iconified on desktop.\n"
2225                                 "Background:     default picture used with mode view by icon.\n"
2226                                 "TextBackground: default picture used with mode view by text."
2227                         )
2228                 )
2230                 (set #help-themes-statusbar
2231                         (cat
2232                                 "\n     Theme for Window's status bar.\n\n"
2233                                 "Reading:\n"
2234                                 "   Indicates that the window is currently reading the disk directory.\n"
2235                                 "Tipyng:\n"
2236                                 "   Indicates that the keyboard icon selection is active.\n"
2237                                 "By typing any letter, you may select the first icon starting with that letter.\n"
2238                                 "PadLock:\n"
2239                                 "   Indicates that the contents of the window cannot be changed.\n"
2240                                 "e.g. might be located on a read-only medium.\n"
2241                                 "ShowAll:\n"
2242                                 "   This symbol shows that the window is in 'Show all files' mode.\n"
2243                                 "Background:\n"
2244                                 "   This brush is used for the gadget status bar background."
2245                         )
2246                 )
2248                 (set #help-themes-prefs
2249                         (cat
2250                                 "\n Used by "Scalos Prefs":\n"
2251                                 " - Pages.\n"
2252                                 " - Modules.\n"
2253                         )
2254                 )
2256                 (set #help-icons-overlay
2257                         (cat
2258                                 "\n Used for "icons overlay":\n"
2259                                 " - LeftOut.\n"
2260                                 " - ReadOnly.\n"
2261                                 " - Thumbnail.\n"
2262                         )
2263                 )
2265                 ;===[ COPY MODULES-THEMES ]==================================
2267                 (set themes-delete-int "Scalos:Themes/default/Modules/delete.module/delete")
2268                 (if (exists themes-delete-int (NOREQ))
2269                         (
2270                                 (set foundthemes 1)
2272                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-delete-int "\n")
2274                                 (set themes-delete-new (cat "" themes-delete-int ".old"))
2275                                 (rename themes-delete-int themes-delete-new
2276                                 (prompt "Rename old theme: delete")
2277                                 )
2278                         )
2279                 )
2280                 (P_SimpleCopy "Installing theme: Delete..." "Themes/default/Modules/delete.module/delete" themes-module-delete #help-themes-module-delete)
2282                 ;------------------------------------------------------------
2284                 (set themes-etrash-int "Scalos:Themes/default/Modules/empty_trashcan.module/empty_trashcan")
2285                 (if (exists themes-etrash-int (NOREQ))
2286                         (
2287                                 (set foundthemes 1)
2289                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-etrash-int "\n")
2291                                 (set themes-etrash-new (cat "" themes-etrash-int ".old"))
2292                                 (rename themes-etrash-int themes-etrash-new
2293                                 (prompt "Rename old theme: empty_trashcan")
2294                                 )
2295                         )
2296                 )
2297                 (P_SimpleCopy "Installing theme: Empty_Trashcan..." "Themes/default/Modules/empty_trashcan.module/empty_trashcan" themes-module-etrasch #help-themes-module-etrasch)
2299                 ;------------------------------------------------------------
2301                 (set themes-exec-int "Scalos:Themes/default/Modules/execute_command.module/execute_command")
2302                 (if (exists themes-exec-int (NOREQ))
2303                         (
2304                                 (set foundthemes 1)
2306                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-exec-int "\n")
2308                                 (set themes-exec-new (cat "" themes-exec-int ".old"))
2309                                 (rename themes-exec-int themes-exec-new
2310                                 (prompt "Rename old theme: execute_command")
2311                                 )
2312                         )
2313                 )
2314                 (P_SimpleCopy "Installing theme: Execute_Command..." "Themes/default/Modules/execute_command.module/execute_command" themes-module-ecommand #help-themes-module-ecommand)
2316                 ;------------------------------------------------------------
2318                 (set themes-info-int "Scalos:Themes/default/Modules/information.module/information")
2319                 (if (exists themes-info-int (NOREQ))
2320                         (
2321                                 (set foundthemes 1)
2323                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-info-int "\n")
2325                                 (set themes-info-new (cat "" themes-info-int ".old"))
2326                                 (rename themes-info-int themes-info-new
2327                                 (prompt "Rename old theme: information")
2328                                 )
2329                         )
2330                 )
2331                 (P_SimpleCopy "Installing theme: Information..." "Themes/default/Modules/information.module/information" themes-module-info #help-themes-module-info)
2333                 ;------------------------------------------------------------
2335                 (set themes-drawer-int "Scalos:Themes/default/Modules/Newdrawer.module/Newdrawer")
2336                 (if (exists themes-drawer-int (NOREQ))
2337                         (
2338                                 (set foundthemes 1)
2340                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-drawer-int "\n")
2342                                 (set themes-drawer-new (cat "" themes-drawer-int ".old"))
2343                                 (rename themes-drawer-int themes-drawer-new
2344                                 (prompt "Rename old theme: newdrawer")
2345                                 )
2346                         )
2347                 )
2348                 (P_SimpleCopy "Installing theme: NewDrawer..." "Themes/default/Modules/newdrawer.module/Newdrawer" themes-module-ndrawer #help-themes-module-ndrawer)
2350                 ;------------------------------------------------------------
2352                 (set themes-reboot-int "Scalos:Themes/default/Modules/Reboot.module/Reboot")
2353                 (if (exists themes-reboot-int (NOREQ))
2354                         (
2355                                 (set foundthemes 1)
2357                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-reboot-int "\n")
2359                                 (set themes-reboot-new (cat "" themes-reboot-int ".old"))
2360                                 (rename themes-reboot-int themes-reboot-new
2361                                 (prompt "Rename old theme: reboot")
2362                                 )
2363                         )
2364                 )
2365                 (P_SimpleCopy "Installing theme: Reboot..." "Themes/default/Modules/reboot.module/reboot" themes-module-reboot #help-themes-module-reboot)
2367                 ;------------------------------------------------------------
2369                 (set themes-rename-int "Scalos:Themes/default/Modules/Rename.module/Rename")
2370                 (if (exists themes-rename-int (NOREQ))
2371                         (
2372                                 (set foundthemes 1)
2374                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-rename-int "\n")
2376                                 (set themes-rename-new (cat "" themes-rename-int ".old"))
2377                                 (rename themes-rename-int themes-rename-new
2378                                 (prompt "Rename old theme: rename")
2379                                 )
2380                         )
2381                 )
2382                 (P_SimpleCopy "Installing theme: Rename..." "Themes/default/Modules/rename.module/rename" themes-module-rename #help-themes-module-rename)
2384                 ;------------------------------------------------------------
2386                 (set themes-sysinfo-int "Scalos:Themes/default/Modules/SystemInfo.module/SystemInfo")
2387                 (if (exists themes-sysinfo-int (NOREQ))
2388                         (
2389                                 (set foundthemes 1)
2391                                 ;(debug "foundthemes = " foundthemes "\nlogos = " themes-sysinfo-int "\n")
2393                                 (set themes-sysinfo-new (cat "" themes-sysinfo-int ".old"))
2394                                 (rename themes-sysinfo-int themes-sysinfo-new
2395                                 (prompt "Rename old theme: systeminfo")
2396                                 )
2397                         )
2398                 )
2399                 (P_SimpleCopy "Installing theme: SystemInfo..." "Themes/default/Modules/systeminfo.module/SystemInfo" themes-module-sysinfo #help-themes-module-sysinfo)
2401                 ;===[ VERIFY DESKTOP/WINDOW/POINTERICONS THEMES ]==========================
2403                 (if (and (>= #installer-version 44) (> #level 0))
2404                         (
2405                         (showmedia "StatusBar" (tackon "GFX" #StatusBar) 'lower_left' 'none' 0)
2406                         (showmedia "Deficonify" (tackon "GFX" #Deficonify) 'center_left' 'none' 0)
2407                         (showmedia "PointerIcons" (tackon "GFX" #PointerIcons) 'upper_left' 'none' 0)
2408                         )
2409                 )
2411                 (if     (= #level 2)
2412                         (
2413                         ;--- EXPERT ---[ Themes/default/PointerIcons ]------------------------------------------------------
2414                         (copyfiles
2415                                 (prompt "Do you want to install theme: PointerIcons?")
2416                                 (source "Themes/default/PointerIcons")
2417                                 (dest   themes-pointers)
2418                                 (help   #help-themes-PointerIcons)
2419                                 (files)
2420                                 (infos)
2421                                 (all)
2422                                 (confirm "expert")
2423                         )
2424                         )
2425                 )
2427                 (if     (= #level 2)
2428                         (
2429                         ;--- EXPERT ---[ Themes/default ]-------------------------------------------------------------------
2430                         (copyfiles
2431                                 (prompt "Do you want to install themes for:\nScalos logos, windows and Tooltip backgrounds")
2432                                 (source "Themes/default")
2433                                 (dest   themes-defaut)
2434                                 (help   #help-themes-default)
2435                                 (files)
2436                                 (confirm "expert")
2437                                 (all)
2438                         )
2440                         ;--- EXPERT ---[ Themes/default/window/ControlBar ]--------------------------------------------------
2441                         (copyfiles
2442                                 (prompt "Do you want to install theme for\nwindows Control Bar and examples?\n")
2443                                 (source "Themes/default/window/ControlBar")
2444                                 (dest   themes-controlbar)
2445                                 (help   #help-themes-controlbar)
2446                                 (files)
2447                                 (confirm "expert")
2448                                 (all)
2449                         )
2451                         ;--- EXPERT ---[ Themes/default/window/statusbar ]--------------------------------------------------
2452                         (copyfiles
2453                                 (prompt "Do you want to install theme for\nwindows statusbar and examples?\n")
2454                                 (source "Themes/default/window/statusbar")
2455                                 (dest   themes-statusbar)
2456                                 (help   #help-themes-statusbar)
2457                                 (files)
2458                                 (confirm "expert")
2459                                 (all)
2460                         )
2462                         ;--- EXPERT ---[ Themes/default/window ]------------------------------------------------------------
2463                         (copyfiles
2464                                 (prompt "Do you want to install theme for windows?\n")
2465                                 (source "Themes/default/window")
2466                                 (dest   themes-window)
2467                                 (help   #help-themes-window)
2468                                 (files)
2469                                 (confirm "expert")
2470                                 (all)
2471                         )
2472                         ;--- EXPERT ---[ Themes/default/Desktop ]-----------------------------------------------------------
2473                         (copyfiles
2474                                 (prompt "Do you want to install theme for desktop?\n")
2475                                 (source "Themes/default/Desktop")
2476                                 (dest   themes-desktop)
2477                                 (help   #help-themes-desktop)
2478                                 (files)
2479                                 (confirm "expert")
2480                                 (all)
2481                         )
2482                         ;--- EXPERT ---[ Themes/default/Prefs/Pages ]-------------------------------------------------------
2483                         (copyfiles
2484                                 (prompt "Do you want to install pages themes used by scalos prefs?\n")
2485                                 (source "Themes/default/Prefs/Pages")
2486                                 (dest   themes-prefs-pages)
2487                                 (help   #help-themes-prefs)
2488                                 (files)
2489                                 (confirm "expert")
2490                                 (all)
2491                         )
2492                         ;--- EXPERT ---[ Themes/default/Prefs/modules ]-----------------------------------------------------
2493                         (copyfiles
2494                                 (prompt "Do you want to install modules themes used by scalos prefs?\n")
2495                                 (source "Themes/default/Prefs/Modules")
2496                                 (dest   themes-prefs-modules)
2497                                 (help   #help-themes-prefs)
2498                                 (files)
2499                                 (confirm "expert")
2500                                 (all)
2501                         )
2502                         ;--- EXPERT ---[ Themes/default/Prefs/icons/Overlay ]-----------------------------------------------
2503                         (copyfiles
2504                                 (prompt "Do you want to install themes used for icons overlay?\n")
2505                                 (source "Themes/default/Icons/Overlay")
2506                                 (dest   themes-icons-overlay)
2507                                 (help   #help-icons-overlay)
2508                                 (files)
2509                                 (confirm "expert")
2510                                 (all)
2511                         )
2513                         )
2514                         (
2515                         (P_VerifyThemes)
2516                         )
2517                         )
2519                 (if (> #level 0)
2520                         (
2521                         (P_closemedia Statusbar)
2522                         (P_closemedia Deficonify)
2523                         (P_closemedia PointerIcons)
2524                         )
2525                 )
2526         )
2530 ;===[ START MODULES ]========================================================
2532 (set modules (tackon #scalos-dest "Modules"))
2534 (set #help-module-iconproper
2535         (cat
2536                 "\nInstalling IconProperties.module."
2537         )
2539 (set #help-module-winproper
2540         (cat
2541                 "\nInstalling WindowProperties.module."
2542         )
2544 (set #help-module-information
2545         (cat
2546                 "\nInstalling Information.module."
2547         )
2549 (set #help-module-delete
2550         (cat
2551                 "\nInstalling Delete.module."
2552         )
2554 (set #help-module-emptytrashcan
2555         (cat
2556                 "\nInstalling Empty_Trashcan.module."
2557         )
2559 (set #help-module-executecommand
2560         (cat
2561                 "\nInstalling Execute_Command.module."
2562         )
2564 (set #help-module-newdrawer
2565         (cat
2566                 "\nInstalling NewDrawer.module."
2567         )
2569 (set #help-module-rename
2570         (cat
2571                 "\nInstalling Rename.module."
2572         )
2575 (set #makedir-modules   "Create modules directory...")
2576 (if (not (exists modules (NOREQ)))
2577         (
2578                 (makedir modules
2579                 (prompt #makedir-modules)
2580                 (help   @makedir-help)
2581                 )
2582         )
2585 (complete 20)
2587 (if     (> #level 0)
2588         (
2589         (copyfiles
2590                 (prompt "Select modules to install, please...")
2591                 (source "Modules/")
2592                 (dest   modules)
2593                 (help @askfile-help)
2594                 (infos)
2595                 (confirm "expert")
2596                 (all)
2597                 )
2598         )
2599         (
2600         (P_VeriFyIfExistsForNovice "Modules" "IconProperties.module"   modules #help-module-iconproper)
2601         (P_VeriFyIfExistsForNovice "Modules" "WindowProperties.module" modules #help-module-winproper)
2602         (P_VeriFyIfExistsForNovice "Modules" "Information.module"      modules #help-module-information)
2603         (P_VeriFyIfExistsForNovice "Modules" "Delete.module"           modules #help-module-delete)
2604         (P_VeriFyIfExistsForNovice "Modules" "Empty_Trashcan.module"   modules #help-module-emptytrashcan)
2605         (P_VeriFyIfExistsForNovice "Modules" "Execute_Command.module"  modules #help-module-executecommand)
2606         (P_VeriFyIfExistsForNovice "Modules" "NewDrawer.module"        modules #help-module-newdrawer)
2607         (P_VeriFyIfExistsForNovice "Modules" "Rename.module"           modules #help-module-rename)
2608         )
2611 ;===[ END MODULES ]===========================================================
2614 (complete 40)
2616 ;===[ COPY SCALOS-MAINFILE ]==================================================
2618 (set #help-scamain
2619         (cat
2620                 "\nInstalling Scalos main executable."
2621         )
2623 (P_SimpleCopyinfo "Installing Scalos ..." "Scalos" #scalos-dest #help-scamain)
2626 ;==================[ COPY PREFS ]============================================
2628 (if (not (exists "Scalos:Prefs" (NOREQ)))
2629         (
2630                 (makedir scalosprefs-dest
2631                         (prompt #makedir-prefs)
2632                         (help   @makedir-help)
2633                 )
2634         (set scalosprefs-dest "Scalos:Prefs")
2635         )
2638 (copyfiles
2639         (prompt #copy-scalosprefs)
2640         (source "Prefs/")
2641         (dest   scalosprefs-dest)
2642         (help   @askfile-help)
2643         (infos)
2644         (confirm)
2645         (all)
2648 (complete 50)
2650 ;==================[ COPY LIBRARIES ]========================================
2652 (P_Copylib #copy-libs1 "Libs/iconobject.library" "Libs:")
2653 (P_Copylib #copy-libs4 "Icondatatypes/Datatypes/amigaiconobject.datatype" #defclasses)
2654 (P_Copylib #copy-libs4.1 "Icondatatypes/Datatypes/amigaiconobj35.datatype" #defclasses)
2655 (P_Copylib #copy-libs5 "Icondatatypes/Datatypes/iconobject.datatype" #defclasses)
2656 (if (= #OS4 0)
2657         (P_Copylib #copy-libs6 "Icondatatypes/Datatypes/newiconobject.datatype" #defclasses)
2659 (P_Copylib #copy-libs7 "Icondatatypes/Datatypes/pngiconobject.datatype" #defclasses)
2660 (P_Copylib #copy-libs8 "Icondatatypes/Datatypes/glowiconobject.datatype" #defclasses)
2661 (P_Copylib #copy-libs9 "Libs/sqlite3.library" "Libs:")
2663 (if (= #OS4 0)
2664         (P_Copylib #CatPopLib    "Libs/popupmenu.library"   "Libs:")
2666 (P_Copylib #CatPrefLib   "Libs/preferences.library" "Libs:")
2667 (P_Copylib #CatScaGfxLib "Libs/scalosgfx.library"   "Libs:")
2669 (if (= #MOS 1)
2670         (
2671         (P_Copylib #CatMOsGuiLib    "Libs/guigfx.library.elf" "Libs:")
2672         (P_Copylib #CatMOsRenderLib "Libs/render.library.elf" "Libs:")
2673         )
2674         (if (= #OS4 1)
2675                 (
2676                 (P_Copylib #CatOS4GuiLib    "Libs/OS4/guigfx.library" "Libs:")
2677                 (P_Copylib #CatOS4RenderLib "Libs/OS4/render.library" "Libs:")
2678                 )
2679                 (
2680                 (P_Copylib #CatGuiLib    "Libs/guigfx.library" "Libs:")
2681                 (P_Copylib #CatRenderLib "Libs/render.library" "Libs:")
2682                 )
2683         )
2686 ;==================[ COPY MUI CLASSES ]========================================
2688 (if (= #MOS 1)
2689         (
2690         (set #mui-classes "SYS:classes/mui")
2691         )
2692         (
2693         (set #mui-classes "MUI:libs/mui")
2694         )
2697 ;===========[ COPY CATALOG FILES ]===========================================
2699 (set catalogs
2700         (tackon "Catalogs" (tackon @language "Scalos"))
2703 (set destination
2704         (tackon "Locale:Catalogs" (tackon @language "Scalos"))
2707 (if (exists (catalogs))
2708         (copyfiles
2709                 (prompt #copy-catalog)
2710                 (source catalogs)
2711                 (dest destination)
2712                 (help @askfile-help)
2713                 (confirm)
2714                 (all)
2715         )
2718 ;===========[ COPY ENV-ARCHIVE ]=============================================
2720 (set #deficons "env-archive/deficons.prefs")
2722 ; select source directory for localized preferences
2723 (if (= #MOS 1)
2724         (
2725         ; MorphOS
2726         (set #envarc-common "env-archive/scalos.MOS")
2727         )
2728         (if (= #OS4 1)
2729                 (
2730                 ; OS4
2731                 (set #envarc-common "env-archive/scalos.OS4")
2732                 )
2733                 (
2734                 ; 68K
2735                 (set #envarc-common "env-archive/scalos.68k")
2736                 )
2737         )
2740 ; default for unknown language is "English"
2741 (set #envarc-locale (tackon #envarc-common "English"))
2743 (if (= @language "français")
2744         (
2745         (set #envarc-locale (tackon #envarc-common "Français"))
2746         )
2748 (if (= @language "deutsch")
2749         (
2750         (set #envarc-locale (tackon #envarc-common "Deutsch"))
2751         )
2754 (set #menu13 (tackon #envarc-locale "Menu13.prefs"))
2755 (set #envarcftypes (tackon #envarc-locale "FileTypes"))
2757 (complete 75)
2759 (if     (= #level 0)
2760                 (
2761                 (P_VerifyEnvarcForNovice #envarc-common #env-scalos #copy-filetypes-presets)
2762                 (P_VerifyEnvarcFTypesForNovice #envarcftypes (tackon #env-scalos "Filetypes") #copy-filetypes-presets)
2763                 (if     (not (exists (tackon #env-scalos "Menu13.prefs") (NOREQ)))
2764                                 (
2765                                 (set #deftext
2766                                         (cat "Copying: " #menu13 " to: " #env-scalos
2767                                         )
2768                                 )
2769                                 (P_SimpleCopy #deftext #menu13 #env-scalos #helptext)
2770                                 )
2771                         )
2773                 (if     (not (exists (tackon #env "deficons.prefs") (NOREQ)))
2774                                 (
2775                                 (set #deftext
2776                                         (cat "Copying: " #deficons " to: " #env
2777                                         )
2778                                 )
2779                                 (P_SimpleCopy #deftext #deficons #env #helptext)
2780                                 )
2781                         )
2782                 )
2783                 (
2784                 ;===[ Average and expert mode ]===
2785                 (if     (= #level 1)
2786                         (
2787                         (P_VerifyEnvarcAverage #copy-filetypes-presets)
2788                         )
2789                 )
2791                 (if     (= #level 2)
2792                         (
2793                                 (P_VerifyEnvarcForExpert #envarc-common #env-scalos #copy-filetypes-presets)
2795                                 ;=========[ COPY ENV-ARCHIVE FILETYPES ]=====================================
2797                                 (copyfiles
2798                                         (prompt #copy-filetypes-presets)
2799                                         (source #envarcftypes)
2800                                         (dest   (tackon #env-scalos "Filetypes"))
2801                                         (help   @askfile-help)
2802                                         (confirm "expert")
2803                                         (all)
2804                                 )
2805                                 (copyfiles
2806                                         (prompt #copy-presets)
2807                                         (source #envarc-locale)
2808                                         (dest   #env-scalos)
2809                                         (help   @askfile-help)
2810                                         (confirm "expert")
2811                                         (files)
2812                                         (all)
2813                                 )
2814                                 (copyfiles
2815                                         (prompt "Do you want to install: \n" #deficons " to: "#env " ?")
2816                                         (source #deficons)
2817                                         (dest   #env)
2818                                         (help   @askfile-help)
2819                                         (confirm "expert")
2820                                         (files)
2821                                 )
2822                         )
2823                 )
2824         )
2827 ;=========[ HISTORY ]=========================================================
2829 (P_SimpleCopy "Installing History..." #licencetext #scalos-dest @askfile-help)
2831 ;=========[ README ]===========================================================
2833 (P_SimpleCopy "Installing Readme..." "Readme.txt" #scalos-dest @askfile-help)
2835 (complete 85)
2837 ;=========[ ASK COPY PLUGINS ================================================
2839 (if (= #level 2)
2840         (
2841                 (set plugin
2842                         (askbool
2843                                 (prompt #plugin-select)
2844                                 (help #plugin-select-help)
2845                                 (default 1)
2846                         )
2847                 )
2848         )
2849         (
2850         (set plugin 1)
2851         )
2854 (if plugin
2855         (
2856                 (set #plugins-dest       "Scalos:Plugins")
2857                 (set #plugins-dest-types "Scalos:Plugins/FileTypes")
2858                 (set #plugins-dest-menu  "Scalos:Plugins/Menu")
2859                 (set #plugins-dest-oop   "Scalos:Plugins/OOP")
2860                 (set #plugins-dest-preview "Scalos:Plugins/Preview")
2862                 (set #makedir-plug       "Creating Plugin-Destination...")
2863                 (set #makedir-plug-types "Creating FileTypes Plugins-Destination...")
2864                 (set #makedir-plug-menu  "Creating Menu Plugins-Destination...")
2865                 (set #makedir-plug-oop   "Creating OOP Plugin-Destination...")
2866                 (set #makedir-plug-preview "Creating Preview Plugin-Destination...")
2868 ;----------------------------------------------------------------------------
2869 ;------------------[ VERIFY DIRECTORY TREE PLUGINS ]-------------------------
2870 ;----------------------------------------------------------------------------
2872                 (if (not (exists #plugins-dest (NOREQ)))
2873                         (
2874                                 (makedir #plugins-dest
2875                                 (prompt #makedir-plug)
2876                                 (help   @makedir-help)
2877                                 )
2878                         )
2879                 )
2881                 (if (not (exists #plugins-dest-types (NOREQ)))
2882                         (
2883                                 (makedir #plugins-dest-types
2884                                 (prompt #makedir-plug-types)
2885                                 (help   @makedir-help)
2886                                 )
2887                         )
2888                 )
2890                 (if (not (exists #plugins-dest-menu (NOREQ)))
2891                         (
2892                                 (makedir #plugins-dest-menu
2893                                 (prompt #makedir-plug-menu)
2894                                 (help   @makedir-help)
2895                                 )
2896                         )
2897                 )
2898                 (if (not (exists #plugins-dest-oop (NOREQ)))
2899                         (
2900                                 (makedir #plugins-dest-oop
2901                                 (prompt #makedir-plug-oop)
2902                                 (help   @makedir-help)
2903                                 )
2904                         )
2905                 )
2907                 (if (not (exists #plugins-dest-preview (NOREQ)))
2908                         (
2909                                 (makedir #plugins-dest-preview
2910                                 (prompt #makedir-plug-preview)
2911                                 (help   @makedir-help)
2912                                 )
2913                         )
2914                 )
2916 (complete 88)
2918 ;=========[ COPY PLUGINS ]===================================================
2920                 (copyfiles
2921                         (prompt #copy-plugins-filetypes)
2922                         (source "PlugIns/Filetypes")
2923                         (dest   (tackon #scalos-dest "Plugins/Filetypes"))
2924                         (help   @askfile-help)
2925                         (confirm)
2926                         (all)
2927                 )
2929                 (copyfiles
2930                         (prompt #copy-plugins-menu)
2931                         (source "Plugins/Menu")
2932                         (dest   (tackon #scalos-dest "Plugins/Menu"))
2933                         (help   @askfile-help)
2934                         (confirm)
2935                         (all)
2936                 )
2938                 (copyfiles
2939                         (prompt #copy-plugins-preview)
2940                         (source "Plugins/Preview")
2941                         (dest   (tackon #scalos-dest "Plugins/Preview"))
2942                         (help   @askfile-help)
2943                         (confirm)
2944                         (all)
2945                 )
2947 ;=========[ COPY OOP PLUGINS WITH VERSIONS CHECKED - AUTO COMPLETE ]=========
2949                 (set p 0)
2950                 (while (set oopplug (select p   "devicefilter.plugin" "persist.plugin" "title_clock.plugin" "title_freepens.plugin" "volumegauge.plugin" "wb39.plugin" "wbrexx.plugin" "xtwindows.plugin" ""))
2951                         (
2952                         (set p(+ p 1))
2953                         (P_Copylib (cat "" #copy-plugins-oop "\n" oopplug "") (tackon "Plugins/OOP" oopplug) (tackon #scalos-dest "Plugins/OOP"))
2954                         )
2955                 )
2957         )
2960 (complete 94)
2962 ;=========[ Remove icon datatypes from old locations ]=======================
2964 (P_RemoveObsolete)
2966 (complete 95)
2968 ;=========[ COPY SCALOS TOOLS ]==============================================
2970 (copyfiles
2971         (prompt #catctrl)
2972         (source "Tools")
2973         (dest "Scalos:Tools")
2974         (help @askfile-help)
2975         (confirm)
2976         (files)
2977         (infos)
2978         (all)
2981 ;=========[ LOADWB (VERSION CHECKED) ]=======================================
2983 (complete 98)
2985 (if (= #MOS 1)
2986         (
2987         (set #loadwb "MOSSYS:c/LoadWB")
2988         )
2989         (
2990         (set #loadwb "c:LoadWB")
2991         )
2993 (set #loadwb-backup (cat #loadwb ".orig"))
2994 (set #loadwbsca (cat #loadwb ".scalos"))
2996 ;=========[ WORKBENCH REPLACEMENT // SET USER LEVEL 1 ]======================
2998 (user 1)
3000 (set #startsca 0)
3002 (set #startsca
3003         (askbool
3004                 (prompt #startsca-select)
3005                 (help #startsca-select-help)
3006                 (default 1)
3007                 )
3008         )
3011 (P_Replace 'C/LoadWB' #loadwb)
3013 (user #oldlevel)
3015 (if #startsca
3016         (
3017         (if     (NOT (exists #loadwb-backup (NOREQ)))
3018                         (
3019                         (rename #loadwb #loadwb-backup
3020                         (prompt #rename-loadwborg)
3021                         )
3022                 )
3023         )
3024         (copyfiles
3025                 (prompt #sverwb)
3026                 (source "c/LoadWB")
3027                 (dest (pathonly #loadwb))
3028                 (help @askfile-help)
3029                 (confirm "expert")
3030         )
3031         (startup @app-name
3032                 (prompt #startup-scalos)
3033                 (help   #startup-scalos-help "\n\n" @startup-help)
3034                 (command 'Assign Scalos: \"' (expandpath (#scalos-dest)) '\"\n')
3035                 )
3036         )
3039 ;=========[ ASK REBOOT ]=====================================================
3041 (set #final-exit
3042         (cat
3043                 "\n\nThe installation of " @app-name " is now complete.\n\n"
3044                 "To enable Scalos Beta, you need to your Amiga.\n\n"
3045                 "Select the \"Yes\" gadget to reboot your Amiga."
3046         )
3049 (set #reboot-help
3050         (cat
3051                 "   New Scalos Beta will be running only after the next startup.\n"
3052                 "If you choose not to reboot you will continue to use the old version of "
3053                 "Scalos currently resident in memory."
3054         )
3057 (if     (> #level 0)
3058                 (
3059                 (if foundthemes
3060                         (
3061                         (set #install-exit
3062                                 (cat
3063                                         "\n\n   Script found some Themes files already presents\n"
3064                                         "in 'Scalos:Themes/modules' directory, and backed them up \n"
3065                                         "with a '.old' suffix.\n"
3066                                         "\n\n   The installation of " @app-name " is now complete.\n\n"
3067                                         "To enable Scalos Beta, you need to reboot your Amiga.\n\n"
3068                                         "Select the \"Yes\" gadget to reboot your Amiga."
3069                                         )
3070                                 )
3071                         )
3072                         (
3073                         (set #install-exit #final-exit)
3074                         )
3075                 )
3076         )
3077         (
3078         (set #install-exit #final-exit)
3079         )
3082 (user 1)
3084 (set @default-dest (expandpath("Scalos:")))
3085 (complete 100)
3087 (if #startsca
3088         (
3089         (set #preboot
3090                 (askbool
3091                         (prompt #install-exit)
3092                         (help #reboot-help)
3093                         (default 0)
3094                 )
3095         )
3096         (P_EndInstall #preboot)
3097         )
3098         (
3099         (P_closemedia mdmatrix)
3100         (exit #install-exit2)
3101         )
3105 ;=========[ END INSTALLATION ]===============================================