2008-11-09 02:11:18 +03:00
|
|
|
; 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)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2008-12-14 02:19:33 +03:00
|
|
|
(set #icon-exists (exists (tackon @default-dest "NetSurf.info")))
|
|
|
|
|
2008-11-09 02:11:18 +03:00
|
|
|
(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)
|
|
|
|
(
|
|
|
|
(set #themename
|
|
|
|
(askchoice
|
|
|
|
(prompt "Please select theme")
|
|
|
|
(help @askchoice-help)
|
|
|
|
(choices "Default" "AISS")
|
|
|
|
(default 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(select #themename
|
|
|
|
(set #theme "Resources/Themes/Default")
|
|
|
|
(set #theme "Resources/Themes/AISS")
|
|
|
|
)
|
|
|
|
|
2008-12-14 02:19:33 +03:00
|
|
|
(set #theme-icon (tackon @default-dest (tackon #theme "NetSurf.info")))
|
2008-12-14 22:41:16 +03:00
|
|
|
(set #icon-exists (exists #theme-icon))
|
|
|
|
|
|
|
|
(if #icon-exists
|
|
|
|
(
|
|
|
|
(copyfiles
|
|
|
|
(prompt "Copying theme icon")
|
|
|
|
(source #theme-icon)
|
|
|
|
(help @copyfiles-help)
|
|
|
|
(dest @default-dest)
|
|
|
|
)
|
|
|
|
)
|
2008-12-14 02:19:33 +03:00
|
|
|
)
|
|
|
|
|
2008-11-09 02:11:18 +03:00
|
|
|
(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")
|
|
|
|
|
|
|
|
(complete 100)
|
|
|
|
|
|
|
|
(if (= #AutoInstall 1)
|
|
|
|
(
|
|
|
|
(exit (quiet))
|
|
|
|
)
|
|
|
|
(
|
|
|
|
(exit)
|
|
|
|
)
|
|
|
|
)
|