forked from zapek/Ambient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall
More file actions
145 lines (122 loc) · 4.13 KB
/
Copy pathInstall
File metadata and controls
145 lines (122 loc) · 4.13 KB
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
;
; Ambient installer script
;
; $VER: Install 1.3 (24.03.2006)
;
failat 21
echo "Ambient installation"
echo "--------------------"
echo ""
ask "This will install/upgrade Ambient on your system. Continue ? (y/n)"
if warn
; create directories
echo "creating directories.." noline
makedir >NIL: mossys:Ambient
makedir >NIL: mossys:Ambient/libs
makedir >NIL: mossys:Ambient/modules
makedir >NIL: mossys:Ambient/images
makedir >NIL: mossys:Ambient/docs
makedir >NIL: mossys:Ambient/scripts
makedir >NIL: mossys:Ambient/catalogs
makedir >NIL: mossys:Ambient/arexx
makedir >NIL: sys:Prefs/Ambient
makedir >NIL: sys:Prefs/Ambient/filetypes
makedir >NIL: sys:Prefs/Ambient/filetypes/application
makedir >NIL: sys:Prefs/Ambient/filetypes/audio
makedir >NIL: sys:Prefs/Ambient/filetypes/image
makedir >NIL: sys:Prefs/Ambient/filetypes/model
makedir >NIL: sys:Prefs/Ambient/filetypes/text
makedir >NIL: sys:Prefs/Ambient/filetypes/video
makedir >NIL: sys:Prefs/Ambient/filetypes/message
makedir >NIL: sys:Prefs/Ambient/filetypes/multipart
makedir >NIL: sys:Prefs/Ambient/filetypes/internal
echo " done"
; copy stuff
echo "copying main executable.." noline
copy Ambient mossys:Ambient quiet
protect mossys:Ambient/Ambient +RWED >NIL:
echo " done"
if exists syslibs
echo "copying system libraries.." noline
copy syslibs/#? mossys:libs quiet
echo " done"
endif
if exists libs
echo "copying private libraries.." noline
copy libs/#? mossys:Ambient/libs quiet
echo " done"
endif
echo "copying modules.." noline
copy modules/#? mossys:Ambient/modules/ quiet
echo " done"
ask "Do you want to overwrite already existing UI images in MOSSYS:Ambient/images/? (y/n)"
if warn
echo "copying images.." noline
copy images/#? mossys:Ambient/images/ quiet
else
echo "copying new images.." noline
copy images/#? mossys:Ambient/images/ quiet dontovr
endif
echo " done"
echo "copying scripts.." noline
copy scripts/#? mossys:Ambient/scripts/ quiet
echo " done"
echo "copying arexx scripts.." noline
copy arexx/#? mossys:Ambient/arexx/ quiet
echo " done"
echo "copying catalogs.." noline
copy catalogs/#? mossys:Ambient/catalogs/ quiet all
echo " done"
echo "copying docs.." noline
copy docs/#? mossys:Ambient/docs/ quiet
echo " done"
echo "copying recognition.db.." noline
copy recognition.db mossys:Ambient/ quiet
echo " done"
ask "Do you want to install the LoadWB command (recommended) ? (y/n)"
if warn
echo "copying LoadWB.." noline
copy c/LoadWB mossys:c quiet
protect mossys:c/loadwb +RWED >NIL:
echo " done"
endif
ask "Do you want to install the Open command? (y/n)"
if warn
echo "copying Open.." noline
copy c/Open mossys:c quiet
protect mossys:c/Open +RWED >NIL:
echo " done"
endif
if not exists sys:prefs/Ambient/Advanced.conf
echo "copying advanced prefs.." noline
copy "prefs/Advanced.conf,default" sys:prefs/Ambient/Advanced.conf
echo " done"
else
echo ""
echo "There is an example configuration in prefs/ which you can"
echo "install to SYS:Prefs/Ambient/Advanced.conf"
endif
ask "Do you want to update your own filetypes (Recommend. This only renames filetypes if required, no settings will go lost)? (y/n)"
if warn
echo "updating filetypes.." noline
cd "SYS:Prefs/Ambient/Filetypes"
; check for old superfluous descriptors and rename them (not very
; smart yet, but should work in most cases)
rename application/msexcel application/vnd.ms-excel >NIL:
rename application/x-powerpoint application/vnd.ms-powerpoint >NIL:
rename audio/x-mka audio/x-matroska >NIL:
rename video/x-mkv video/x-matroska >NIL:
rename audio/flac audio/x-flac >NIL:
rename audio/x-c64 audio/prs.sid >NIL:
rename text/x-javascript application/javascript >NIL:
rename text/x-blitzbasic application/x-blitzbasic >NIL:
rename text/x-manual application/x-manual >NIL:
rename text/x-ftxt application/x-ftxt >NIL:
echo " done"
endif
echo ""
echo "Ambient successfully installed. Have a nice day."
echo ""
else
echo "Why do you bother running the script then? Go away."
endif