summaryrefslogtreecommitdiff
path: root/amiga/dist/Install
blob: 62970a43be715726de0bcf4962ad8a7c880bea45 (plain)
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
; Installation script for NetSurf

(procedure p_setmimetype #type #mimetype
	(transcript "Setting MIME Type " #mimetype " for default " #type " icon")

	(set #fullpath (cat "ENVARC:Sys/def_" #type))

	(tooltype
		(prompt "Setting MIME type")
		(help @tooltype-help)
		(dest #fullpath)
		(settooltype "MIMETYPE" #mimetype)
	)
)

(if (= @app-name "NetSurfAutoInstall") (set #AutoInstall 1))

(if (<> #AutoInstall 1) (welcome))

(complete 0)

(set @default-dest (getenv "AppPaths/NetSurf"))

(set @default-dest
	(askdir
		(prompt "Where would you like to install NetSurf?")
		(help @askdir-help)
		(default @default-dest)
	)
)

(set #icon-exists (exists (tackon @default-dest "NetSurf.info")))

; *****************************************************
; TODO: Check OS version/existing build and provide
; option to select graphics.library or part-Cairo build.
; ****************************************************

(copylib
	(prompt "Please check the version of NetSurf you are copying against "
			"any which might already be installed.")
	(help @copylib-help)
	(source "NetSurf")
	(dest @default-dest)
	(infos)
	(optional "askuser" "force" "oknodelete")
	(confirm "expert")
)

(complete 20)

(copyfiles
	(prompt "Copying files")
	(source "")
	(choices "Resources" "Rexx" "NetSurf.guide" "NetSurf.readme")
	(help @copyfiles-help)
	(dest @default-dest)
	(infos)
;	(all)
)

(complete 70)

(set #options-exist (exists (tackon @default-dest "Resources/Options")))

(if (= #options-exist 0)
	(
		(if (exists "TBimages:" (noreq))
			(set #aiss-theme "AISS")
		)

		(set #themename
   			(askchoice
  				(prompt "Please select theme")
 	      		(help "AISS theme requires AISS (and def_pointers for 32-bit "
						"pointers), and will only be shown as an option if "
						"AISS is installed.\n\n"
						@askchoice-help)
				(choices "Default" #aiss-theme)
       			(default 0)
   			)
		)

		(select #themename
			(set #theme "Resources/Themes/Default")
			(set #theme "Resources/Themes/AISS")
		)

		(set #theme-icon (tackon @default-dest (tackon #theme "NetSurf.info")))
		(set #icon-exists (exists #theme-icon))

		(if #icon-exists
			(
				(copyfiles
					(prompt "Copying theme icon")
					(source #theme-icon)
					(help @copyfiles-help)
					(dest @default-dest)
				)
			)
		)

		(textfile
			(prompt "Setting default options")
			(help @textfile-help)
			(dest (tackon @default-dest "Resources/Options"))
			(append 	"font_min_size:12\n"
					"theme:" #theme "\n")
		)
	)
)

(complete 90)

(working "Setting MIME types")
(p_setmimetype "css" "text/css")
(p_setmimetype "html" "text/html")
(p_setmimetype "ascii" "text/plain")
(p_setmimetype "jpeg" "image/jpeg")
(p_setmimetype "gif" "image/gif")
(p_setmimetype "png" "image/png")
(p_setmimetype "jng" "image/jng")
(p_setmimetype "mng" "image/mng")
(p_setmimetype "svg" "image/svg")
(p_setmimetype "bmp" "image/bmp")
(p_setmimetype "ico" "image/ico")
(p_setmimetype "sprite" "image/x-riscos-sprite")
(p_setmimetype "lha" "application/x-lha")
(p_setmimetype "zip" "application/x-zip")

(complete 100)

(if (= #AutoInstall 1)
	(
		(exit (quiet))
	)
	(
		(exit)
	)
)