-
Notifications
You must be signed in to change notification settings - Fork 2
/
Install
executable file
·170 lines (149 loc) · 3.88 KB
/
Install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
(procedure p_setdeftool #type
(set #def (cat "def_" #type))
(tooltype
(prompt "Setting default tool for " #type)
(help @tooltype-help)
(dest (tackon "ENVARC:Sys/" #def))
(setdefaulttool (tackon @default-dest #Avalanche))
)
)
; START
(set #os-vernum (getversion "libs:version.library"))
(set #os-ver (/ #os-vernum 65536))
(transcript "Running on OS v" #os-ver)
(if (< #os-ver 50)
(
(set #tools-dir "SYS:Tools")
(set #avalanche "Avalanche")
(set #arc-7zip "")
(set #arc-arj "")
(set #arc-bz2 "")
(set #arc-gzip "")
(set #arc-lha "")
(set #arc-lharc "")
(set #arc-lzx "")
(set #arc-pkzip "")
(set #arc-rar "")
(set #arc-tar "")
(set #arc-zip "")
(set #arc-zoo "")
(set #xvs-ver 0)
)
; else
(
; OS4 doesn't have Tools.
(set #tools-dir (getenv "AppDir/AvalanchePPC"))
(if (= #tools-dir "") (set #tools-dir "SYS:Utilities"))
(set #avalanche "AvalanchePPC")
(set #arc-7zip "7zip")
(set #arc-arj "arj")
(set #arc-bz2 "bz2")
(set #arc-gzip "gzip")
(set #arc-lha "lha")
(set #arc-lharc "lharc")
(set #arc-lzx "lzx")
(set #arc-pkzip "pkzip")
(set #arc-rar "rar")
(set #arc-tar "tar")
(set #arc-zip "zip")
(set #arc-zoo "zoo")
(set #xvs-vernum (getversion "libs:xvs.library"))
(set #xvs-ver (/ #xvs-vernum 65536))
(transcript "xvs.library v" #xvs-ver)
)
)
(set #xad-ver (getversion "libs:xadmaster.library"))
(if (= #xad-ver 0)
(
(message "Please note that this program requires xadmaster.library!\n\n"
"You will need to install it before running Avalanche. "
"It can be downloaded from Aminet util/arc" (all))
)
)
(welcome)
(set @default-dest
(askdir
(prompt "Please select where you would like Avalanche to be installed"
" (a drawer will NOT be created)")
(help @askdir-help)
(default #tools-dir)
)
)
(set #doc-dest
(askdir
(prompt "Please select where you would like the Avalanche "
"documentation to be installed (a drawer will NOT be created)")
(help @askdir-help)
(default "LOCALE:Help")
)
)
(set #full-path (tackon @default-dest #Avalanche))
(set #icon-exists (exists (cat #full-path ".info")))
(copyfiles
(prompt "Copying Avalanche")
(help @copyfiles-help)
(source #Avalanche)
(dest @default-dest)
)
; copy xvs.l.main on os4
(if (>= #xvs-ver 33)
(
(copyfiles
(prompt "Copying xvs.l.main")
(help @copyfiles-help)
(source "libs/xvs.l.main")
(dest "libs:")
)
)
)
; Don't overwrite existing icon
(if (= #icon-exists 0)
(
(copyfiles
(prompt "Copying Avalanche icon")
(help @copyfiles-help)
(source (cat #Avalanche ".info"))
(dest @default-dest)
)
)
)
(copyfiles
(prompt "Copying Avalanche Guide")
(help @copyfiles-help)
(source "Avalanche.guide")
(dest #doc-dest)
)
(set #def-icons
(askoptions
(prompt "Set default tool for the following filetypes:")
(help "AmigaOS 3.2 by default has one default icon for all archives. "
"Selecting \"archive\" here will set Avalanche as the default tool "
"for all archives.")
(choices "archive"
#arc-7zip
#arc-arj
#arc-bz2
#arc-gzip
#arc-lha
#arc-lharc
#arc-lzx
#arc-pkzip
#arc-rar
#arc-tar
#arc-zip
#arc-zoo)
)
)
(if (BITAND #def-icons 1) (p_setdeftool "archive"))
(if (BITAND #def-icons 2) (p_setdeftool #arc-7zip))
(if (BITAND #def-icons 4) (p_setdeftool #arc-arj))
(if (BITAND #def-icons 8) (p_setdeftool #arc-bz2))
(if (BITAND #def-icons 16) (p_setdeftool #arc-gzip))
(if (BITAND #def-icons 32) (p_setdeftool #arc-lha))
(if (BITAND #def-icons 64) (p_setdeftool #arc-lharc))
(if (BITAND #def-icons 128) (p_setdeftool #arc-lzx))
(if (BITAND #def-icons 256) (p_setdeftool #arc-pkzip))
(if (BITAND #def-icons 512) (p_setdeftool #arc-rar))
(if (BITAND #def-icons 1024) (p_setdeftool #arc-tar))
(if (BITAND #def-icons 2048) (p_setdeftool #arc-zip))
(if (BITAND #def-icons 4096) (p_setdeftool #arc-zoo))