home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 10
/
Fresh_Fish_10_2352.bin
/
new
/
disk
/
salv
/
disksalv2
/
install
< prev
next >
Wrap
Text File
|
1994-04-12
|
14KB
|
377 lines
;======================================================================
;
; DiskSalv general installer -- $VER: Install 11.5 (11.4.94)
;
; 11.5 Added updates for DiskSalv V11.30 distribution, mainly support
; for the additional locale files.
; 11.4 Simple updates for DiskSalv V11.28
; Fixed the install-locale-from-archive routine
; 11.3 Added better checks for the existance of the locales archive
;
;======================================================================
;
; Some basic strings
(set #disksalv-install
(cat "\nInstall DiskSalv\n"
"\nYou may install the DiskSalv program and related "
"files in the directory of your choice. Proceed?"))
(set #disksalv-install-help
(cat "\nThis section lets you choose in which drawer or on "
"which disk the DiskSalv program will be installed."
"\n\nIf you choose to proceed, you will be asked where you "
"want the DiskSalv files placed. If you choose "
"to skip this part, you will go to the portion of the "
"installation that processes language installations".))
(set #which-disk
"In which disk or drawer should DiskSalv be installed?")
(set #any-locale
(cat "\nInstall DiskSalv Localizations\n"
"\nYou may install the DiskSalv locale files for various "
"languages in the LOCALE: directory. Proceed?"))
(set #any-locale-help
(cat "\nDiskSalv can be operated in different languages."
"\n\nIf you choose to proceed, you will be asked to "
"select the translations you want available on your"
"system."))
(set #which-language "\nWhich catalogs should be installed?")
(set #which-language-help
(cat "\nDiskSalv can be operated in many different "
"languages. One file will be copied to your "
"hard drive for each language supported.\n\n"
"To reduce the amount of space consumed by the "
"language files, you can select only the "
"files of specific languages to be copied.\n\n"
"Check the boxes of the languages you wish "
"to have available on your system.\n\n"
@askoptions-help))
(set #docs-install
(cat "\nInstall DiskSalv Documentation\n"
"\nA small manual for DiskSalv can be installed in the"
"\ndirectory of your choice. Proceed?"))
(set #which-docs "\nWhich manuals should be installed?")
(set #docs-install-help
(cat "\nThis section lets you choose in which drawer or on "
"which disk the DiskSalv documentation will be installed."
"\n\nIf you choose to proceed, you will be asked where you "
"want the DiskSalv documents placed. If you choose "
"to skip this part, installation is complete."))
(set #docs-where
(cat "\nIn which disk or drawer should DiskSalv documentation "
"be installed?"))
(set #system-catalog "locale:catalogs"
#subdir-catalog "locale/catalogs"
#subdir-docs "locale/docs"
#dscatname "DiskSalv.catalog"
#dsdocname "DiskSalv.doc"
#tmp-dir "T:DiskSalv")
(set #get-dearchiver
(cat "\nPlease specify the file name of a de-archiver "
"program for \"LHA\"-type files."))
;======================================================================
;
; This function asks about the language, and sets the global "lang" to
; the language bit mask returned by the request.
;
(procedure ASKLANGUAGE
(if (= askmode 0)
((set lang (askoptions (prompt #which-language)
(help #which-language-help)
(choices "dansk"
"deutsch"
"english"
"español"
"français"
"italiano"
"norsk"
"suomi"
"svenska")))
(if (IN lang 2) (set doclang 1))
(if (IN lang 7) (set doclang (+ doclang 2))))
(if (= doclang 0)
((set doclang (askoptions (prompt #which-docs)
(help #which-language-help)
(choices "english"
"español"
"français"
"svenska")))))))
;======================================================================
;
; This function finds a de-archiver in the user's system, resulting to
; a panic "ask-the-user" if none can be found.
;
(procedure FINDARCPROG
(set n 0)
(while (set test (select n "lz"
"lha"
""))
(if (not (run (cat "which " test)))
(set arcprog test))
(set n (+ n 1)))
(if (= arcprog "")
(set arcprog (askfile (prompt #get-dearchiver)
(help @askfile-help)
(default "C:"))))
)
;======================================================================
;
; This function gets the locale file information. We mark the occasion
; with bit 0 set for the availability of the subdirectory, bit 1 set
; for the availability of the archive file.
;
(procedure ANYLOCALE
(set localecode 0)
(if (exists locale-catalogs)
(set localecode 1))
(if (exists locale-archive)
(set localecode (+ localecode 2)))
localecode)
;======================================================================
;
; This function transfers a locale file from the appropriate archive
; entry to the proper LOCALE:Catalogs subdirectory.
;
(procedure DOCATARCS
(if (= arcprog "") (FINDARCPROG))
(if (<> arcprog "")
((working "\nDe-archiving selected catalogs\n")
(makedir #tmp-dir)
(set arcsfiles (cat #subdir-catalog "/(" arclst ")/#?"))
(set dearc-com (cat arcprog " >NIL: <NIL: e " locale-archive " "
arcsfiles))
(set script (tackon #tmp-dir "de-archive-script"))
(textfile (dest script)
(append (cat "cd " #tmp-dir "\n" dearc-com "\n")))
(execute script)
(copyfiles (source (tackon #tmp-dir #subdir-catalog))
(dest #system-catalog)
(pattern "#?"))
(run (cat "Delete >NIL: <NIL: " #tmp-dir " all")))))
;======================================================================
;
; This function transfers the locale files from the appropriate
; existing subdirectories (in "sublst") to the corresponding
; LOCALE:Catalogs subdirectories.
;
(procedure DOCATSUBS
(copyfiles (source locale-catalogs)
(dest #system-catalog)
(pattern (cat "(" sublst ")"))))
;======================================================================
;
; This function merges the new and old locale files if they both exist.
;
(procedure MERGELOCALES
(if (not (exists locale-archive))
(set locale-archive locale-update)
(if (exists locale-update)
((if (= arcprog "") (FINDARCPROG))
(if (<> arcprog "")
((working "\nUpdating Locale Archives...\n")
(makedir #tmp-dir)
(set dearc-com (cat arcprog " >NIL: <NIL: e " locale-update))
(set rearc-com (cat arcprog " >NIL: <NIL: u " locale-archive
" locale/#?"))
(set script (tackon #tmp-dir "re-archive-script"))
(textfile (dest script)
(append (cat "cd " #tmp-dir "\n" dearc-com "\n" rearc-com "\n")))
(execute script)
; (run (cat "Delete >NIL: <NIL: " #tmp-dir " all"))
))))))
;======================================================================
;
; This function selects the language to be installed.
;
(procedure DOLOCALE
(if (not (exists #system-catalog))
(makedir #system-catalog))
(set n 0
sublst ""
arclst "")
(while (set language (select n "dansk"
"deutsch"
"english"