2 ; $VER: Install 1.3 (21.5.2012)
4 ; $Id: Install 246 2010-06-11 10:07:45Z thboeckel $
8 ; 1.0 10.06.2010: initial release
9 ; 1.1 11.06.2010: extended the final message that a reboot might be
10 ; necessary to be able to use the just installed version.
11 ; 1.2 06.10.2010: changed the default destination path for libs depending
12 ; on the detected system
13 ; 1.3 21.05.2012: fixed the wrong selection of the builtin language.
14 ; 1.4 20.12.2012: added 3.x to supported MorphOS targets.
15 ;----------------------------------------------------------------------------
16 ; /// default language detection
18 (while (<> @language (select #i "deutsch" @language))
21 (if (= #i 1) ; LANGUAGE
22 (set #language "english")
23 (set #language @language)
26 ;----------------------------------------------------------------------------
28 (if (= @language "english")
30 (set #acknowledgeOS (cat "Please acknowledge the automatic\n"
31 "detection of your operating system:"))
33 @app-name " has been successfully installed.\n"
35 "A reboot might be necessary to\n"
36 "finish this installation!"))
42 (if (= @language "deutsch")
44 (set #acknowledgeOS (cat "Bitte bestätigen Sie die automatische\n"
45 "Ermittlung Ihres Betriebssystems:"))
47 @app-name " wurde erfolgreich installiert.\n"
49 "Gegebenenfalls ist ein Neustart des Systems\n"
50 "nötig, um die Installation abzuschließen!"))
55 ;----------------------------------------------------------------------------
56 ; /// Checking environment
57 (set EXEC_ver (getversion "exec.library" (resident)))
58 (set NEWLIB_ver (getversion "newlib.library" (resident)))
59 (set AROS_ver (getversion "aros.library" (resident)))
61 ; we use newlib.library to check whether we are running on AmigaOS 4.x
62 (if (>= NEWLIB_ver (* 4 65536))
63 (set #detectedSystem 1)
65 ; we are not running on AmigaOS 4.x
66 (if (>= AROS_ver (* 40 65536))
67 (set #detectedSystem 3)
69 ; we are not running on AROS
70 ; now check if we are running on MorphOS (exec.library V50+) or on AmigaOS 3.x
71 (if (>= EXEC_ver (* 50 65536))
72 (set #detectedSystem 2)
73 (set #detectedSystem 0)
82 (prompt #acknowledgeOS)
83 (help @askchoice-help)
84 (choices "AmigaOS 3.x"
91 (default #detectedSystem)
94 ; finally convert the system number into a string for easier understanding
96 (select #detectedSystem "os3" "os4" "mos" "aros-i386" "aros-ppc" "aros-x86_64")
99 ; set up the source and destination path
100 (if (= #detectedSystem "os3")
102 (set #C_source "C/AmigaOS3")
104 (set #LIB_source "Libs/AmigaOS3")
105 (set #LIB_dest "LIBS:")
106 (set #PREFS_source "Prefs/AmigaOS3")
109 (if (= #detectedSystem "os4")
111 (set #C_source "C/AmigaOS4")
113 (set #LIB_source "Libs/AmigaOS4")
114 (set #LIB_dest "LIBS:")
115 (set #PREFS_source "Prefs/AmigaOS4")
118 (if (= #detectedSystem "mos")
120 (set #C_source "C/MorphOS")
121 (set #C_dest "SYS:C")
122 (set #LIB_source "Libs/MorphOS")
123 (set #LIB_dest "SYS:Libs")
124 (set #PREFS_source "Prefs/MorphOS")
127 (if (= #detectedSystem "aros-i386")
129 (set #C_source "C/AROS-i386")
131 (set #LIB_source "Libs/AROS-i386")
132 (set #LIB_dest "LIBS:")
133 (set #PREFS_source "Prefs/AROS-i386")
136 (if (= #detectedSystem "aros-ppc")
138 (set #C_source "C/AROS-ppc")
140 (set #LIB_source "Libs/AROS-i386")
141 (set #LIB_dest "LIBS:")
142 (set #PREFS_source "Prefs/AROS-i386")
145 (if (= #detectedSystem "aros-x86_64")
147 (set #C_source "C/AROS-x86_64")
149 (set #LIB_source "Libs/AROS-x86_64")
150 (set #LIB_dest "LIBS:")
151 (set #PREFS_source "Prefs/AROS-x86_64")
160 ; copy the .library files
161 (foreach #LIB_source "#?.library"
164 (source (tackon #LIB_source @each-name))
174 (foreach #C_source "#?"
177 (source (tackon #C_source @each-name))
186 ; copy the Prefs files
187 (foreach #PREFS_source "#?"
190 (source (tackon #PREFS_source @each-name))
201 ; /// ********************
202 ;----------------------------------------------------------------------------