home *** CD-ROM | disk | FTP | other *** search
/ International Financial Statistics / International Financial Statistics.ISO / install / inscript.fra < prev    next >
Encoding:
Text File  |  1991-02-12  |  12.7 KB  |  490 lines

  1. ; CD Answer Installation Script - Generic                               jdk
  2. ; <<CDA>> Feb 5 1991;2.03
  3.  
  4. ; single/multiple disk version
  5. ;
  6. ;   To customize this install script:
  7. ;      1. Put the product name (1-8 characters) in a file called
  8. ;         'PRODNAME'. There should be no carriage return/line feed at
  9. ;         the end of the name- the file should contain just the characters
  10. ;         of the name.
  11. ;      2. Put the application name (CD Author 4 character project identifier)
  12. ;         in a file called 'APPLNAME'. Again, no other chars should be
  13. ;         the file. Multiple applications are formed by adding a space,
  14. ;         then another application identifier
  15. ;      3. Put the start-up message in a file called PRODSCRN.<language>
  16. ;         There should not be more than 10 lines.
  17. ;
  18. ;    The first disk must contain the \INSTALL directory.
  19. ;    This contains the general system files for the install
  20. ;    process and may be repeated on disk #2, etc.
  21. ;    The application specific files are kept in a directory
  22. ;    named 'DISK1'. If additional disks are required, create
  23. ;    an (empty) file on the current disk named '\MORE' and
  24. ;    put the overflow files in a directory named \DISK2 (3, 4, ...).
  25.  
  26. BREAK abort
  27.  
  28. ; install disk
  29. PARSE_PATH <$ProgDir>
  30. SET insdrive = <$Drive>
  31. SET ins = <insdrive>\INSTALL
  32. SET curdisk = 1
  33. GOSUB need_disk
  34.  
  35. ; here are some defaults:
  36.  
  37. ;  default destination drive
  38. PARSE_PATH <$CurDir>
  39. SET def_dest = C:\
  40. IF NOT "<$Drive>"=="<insdrive>" DO SET def_def = <$Drive>
  41.  
  42. ;  default CD-ROM interface (FS_HSGEN {High Sierra} or FS_ISGEN {ISO})
  43. SET def_cdtype = High Sierra
  44. SET def_driver = FS_HSGEN
  45. IF EXISTS <insdrive>\INSTALL\<def_driver>.* GOTO ok_driver
  46. SET def_cdtype = ISO
  47. SET def_driver = FS_ISGEN
  48. :ok_driver
  49.  
  50. ;  language
  51. SET def_lang = <$Language>
  52.  
  53. ; application name(s) (4 char ident(s) on CD-ROM)
  54. READFILE names = <ins>\APPLNAME.
  55.  
  56. ; product name (application name for batch file, subdirectory name)
  57. READFILE prod = <ins>\PRODNAME.
  58.  
  59. ; default dest drive and directory
  60. PARSE_PATH <def_dest><prod>.CD
  61. SET dstdrive = <$Drive>
  62. SET path = <$Dir>
  63. CD <dstdrive>\
  64.  
  65. ; read and display Application Installation Screen
  66. IF NOT EXISTS <insdrive>\DISK1\PRODSCRN.<def_lang> GOTO no_banner
  67. READFILE screen = <insdrive>\DISK1\PRODSCRN.<def_lang>
  68. GOTO show_banner
  69. :no_banner
  70. SET screen =
  71. ----       CD Answer Installation pour:\n\n
  72. ----              <prod>\n\n
  73. ----       Application(s): <names>
  74. :show_banner
  75. CLEAR
  76. TEXT <screen>
  77. SET screen =
  78. WAIT
  79.  
  80. SET def_drive=<dstdrive>
  81. SET def_path=<path>
  82.  
  83. GOTO okdir
  84. :getdir
  85. CLEAR
  86. TEXT \nError -\n\n
  87. ---- Le chemin d'acces <dstdrive><path> n'est pas autorise!
  88. ---- Pour que l'installation du logiciel reussise, il faut qu'il y ait
  89. ---- un nom valide de sous-repertoire et d'unite.
  90. WAIT
  91. :okdir
  92. CLEAR
  93. TEXT Le logiciel d'extraction doit etre installe sur votre disque dur ou sur un 
  94. ---- disquette formatee.  Les valeurs standards sont <dstdrive> pour l'unite (le 
  95. ---- disque dur generalement) et un sous-repertoire designee sous le nom de 
  96. ---- <path>.  Pour utiliser ces valeurs, appuyez a 
  97. ----deux reprises sur ─┘ (Enter).  Si vous voulez les modifier, tapez
  98. ---- le nouveau nom de l'unite et du sous-repertoire en regard de l'invite
  99. ---- appropriee, puis appuyez sur ─┘ (Enter) 
  100.  
  101.  
  102. INPUT 6,8,5 dstdrive  = Installation sur unite        ?
  103. INPUT 6,10,40 path    = Installation dans repertoire  ?
  104. SET dest = <dstdrive><path>
  105. SET confile = <ins>\_DW_.CFG
  106.  
  107. IF "<dstdrive>"=="" GOTO getdir
  108. IF "<path>"=="\" GOTO getdir
  109. IF "<path>"=="" GOTO getdir
  110. IF NOT DIREXISTS <dstdrive>\ GOTO getdir
  111.  
  112. CD <dstdrive>\
  113.  
  114. IF NOT DIREXISTS <dest> GOTO nopath
  115. IF NOT EXISTS <dest>\DW.EXE GOTO nopath
  116. CLEAR
  117. TEXT Le repertoire "<dest>" existe deja.
  118. NEWMENU ?, 3, 54
  119. MENU Supprimez l'ancienne version; installez la nouvelle
  120. MENU Supprimez l'ancienne version; n'installez pas le nouveau
  121. MENU Modifiez la configuration; ne copiez pas le logiciel
  122. MENU Interrompez l'installation sans faire aucune modification
  123.  
  124. CHOICE 1
  125. CLEAR
  126. TEXT Effacement du contenu anterieur de <dest>...
  127. FOREACH name = <names>
  128.  DEL <dest>\<name>*.*
  129. NEXT
  130. DEL <dest>\FS_*.DRV
  131. DEL <dest>\SC_*.DRV
  132. DEL <dest>\PR_*.DRV
  133. DEL <dest>\GR_*.DRV
  134. DEL <dest>\_DW_*.*
  135. DEL <dest>\DW.EXE
  136. DEL <dest>\UPDATE.EXE
  137. GOTO okpath
  138.  
  139. CHOICE 2
  140. CLEAR
  141. TEXT Suppression du repertoire <dest>...
  142. FOREACH name = <names>
  143.  DEL <dest>\<name>*.*
  144. NEXT
  145. DEL <dest>\FS_*.DRV
  146. DEL <dest>\SC_*.DRV
  147. DEL <dest>\PR_*.DRV
  148. DEL <dest>\GR_*.DRV
  149. DEL <dest>\_DW_*.*
  150. DEL <dest>\DW.EXE
  151. DEL <dest>\UPDATE.EXE
  152. IF NOT EXISTS <dest>\*.* GOTO remdest
  153. TEXT Le repertoire <dest> contient des fichiers non repertories, 
  154. ---- le repertoire n'est pas supprime!!
  155. WAIT
  156. GOTO norem
  157. :remdest
  158. RD <dest>
  159. :norem
  160. DEL <dstdrive>\<prod>.BAT
  161. GOTO end2
  162.  
  163. CHOICE 3
  164. SET alter = Y
  165. SET confile = <dest>\_DW_.CFG
  166. GOTO okpath
  167.  
  168. CHOICE 4
  169. GOTO end2
  170. ENDCHOICES
  171.  
  172. :nopath
  173. MD <dest>
  174. IF NOT DIREXISTS <dest> GOTO getdir
  175. :okpath
  176.  
  177. IF NOT EXISTS <confile> GOTO no_config
  178. DISP 5,14 Reading configuration...
  179. READCONFIG <confile>
  180. :no_config
  181.  
  182. HSCOUNT hs
  183. IF NOT <hs>==0 GOTO have_hs
  184.  
  185. CLEAR
  186. TEXT  Probleme - Aucune unite CD-ROM n'est installee.  \n\n Veuillez utiliser le 
  187. ---- disque d'installation fourni par votre fabricant d'unite CD-ROM pour 
  188. ---- installer le questionnaire de peripheriques.  Puis reexecutez le programme 
  189. ---- d'installation. \n\n
  190. ---- Remarque : le disque d'installation de l'unite CD-ROM reproduira quelques 
  191. ---- fichiers sur votre disque systeme et modifiera les fichiers
  192. ---- CONFIG.SYS et AUTOEXEC.BAT.
  193. ---- D'autres programmes utilisent MSCDEX, il est recommande de supprimer
  194. ---- la ligne d'appel de ce programme de votre fichier AUTOEXEC.BAT, etant
  195. ---- donne que ce logiciel n'en a pas besoin.  Assurez vous de
  196. ---- reinitialiser votre systeme une fois que les modules CD-ROM sont 
  197. ---- installes.
  198.  
  199. WAIT
  200. ABORT
  201.  
  202. :have_hs
  203.  
  204. SET msg =
  205. IF <hs>==1 GOTO instOne
  206.  
  207. TEXT Vous pouvez choisir parmi differentes unites CD-ROM <def_cdtype>.  Avec
  208. ---- l'aide des touches  et , selectionnez le peripherique CD-ROM
  209. ---- <def_cdtype> dans la liste, puis appuyez sur ┘ (Enter) lorsque vous etes 
  210. ---- pret a commencer.  Appuyez sur Esc pour interrompre l'installation.
  211. GOTO :instMore
  212.  
  213. :instOne
  214. SET msg = Un module CD-ROM <def_cdtype> est installe (voir CONFIG.SYS):\n\n
  215.  
  216. :instMore
  217. HSDRIVER hsname = 25, 6
  218. CONFIG Driver = "<def_driver>=<hsname>"
  219. CLEAR
  220. TEXT <msg> Le module CD-ROM <def_cdtype> selectionne est nomme "«<hsname>»".  Dans le cas ou cette information est erronee, appuyez sur Esc pour
  221. ---- interrompre l'installation et verifiez votre fichier CONFIG.SYS.
  222. ---- Il n'est pas necessaire de faire appel au programme MSCDEX.EXE 
  223. ---- (Suffixes CD-ROM de Microsoft) pour executer ce logiciel
  224. ---- moins qu'il soit necessaire pour un autre logiciel, vous pouvez 
  225. ---- supprimer ce programme de votre fichier \AUTOEXEC.BAT (dans lequel 
  226. ---- le programme d'installation de l'unite peut l'avoir place).
  227. WAIT
  228.  
  229. CLEAR
  230. TEXT Copie de l'interface CD-ROM <def_cdtype>...
  231. SET driver_name = <def_driver>.DRV
  232. GOSUB copy_driver
  233.  
  234. ;---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -
  235.  
  236. CLEAR
  237. TEXT Options Ecran :\n
  238. ---- Avec l'aide des fleches  et , selectionnez un type d'ecran, puis appuyez sur ┘ (Enter).
  239.  
  240. NEWMENU ? 6 46
  241. MENU Ecran standard          Pas de graphics
  242. MENU Carte graphique Hercules
  243. MENU Adaptateur CGA
  244. MENU Olivetti, AT&T ou Compaq Plasma
  245. MENU Adaptateur EGA
  246. MENU Adaptateur MCGA
  247. MENU Adaptateur VGA
  248.  
  249.  
  250. IF "<$Screen:1:3>"=="HER" DO MENU_DEFAULT 2
  251. IF "<$Screen:1:3>"=="CGA" DO MENU_DEFAULT 3
  252. IF "<$Screen:1:3>"=="EGA" DO MENU_DEFAULT 5
  253. IF "<$Screen:1:4>"=="MCGA" DO MENU_DEFAULT 6
  254. IF "<$Screen:1:3>"=="VGA" DO MENU_DEFAULT 7
  255.  
  256. SET Port = N
  257. SET Graphic = N
  258.  
  259. CHOICE 1
  260.  SET scr_type = SC_STD
  261. CHOICE 2
  262.  SET scr_type = SC_HERC
  263.  SET Port = ?
  264. CHOICE 3
  265.  SET scr_type = SC_CGA
  266.  SET Port = ?
  267.  SET Graphic = ?
  268. CHOICE 4
  269.  SET scr_type = SC_ATT
  270.  SET Port = ?
  271.  SET Graphic = ?
  272. CHOICE 5
  273.  SET scr_type = SC_EGA
  274.  SET Port = ?
  275.  SET Graphic = ?
  276. CHOICE 6
  277.  SET scr_type = SC_MCGA
  278.  SET Port = ?
  279. CHOICE 7
  280.  SET scr_type = SC_VGA
  281.  SET Port = ?
  282.  SET Graphic = ?
  283. ENDCHOICES
  284.  
  285. SET extra =
  286. IF NOT "<Port>" == "?" GOTO no_flash
  287.  
  288. CLEAR
  289. TEXT Copie du module d'ecran...
  290. ---- Avec l'aide des fleches  et , selectionnez un type d'ecran, puis appuyez sur ┘ (Enter).
  291.  
  292. NEWMENU ? 6 52
  293. MENU Ecran standard       Couleur ou monochrome Monitor
  294. MENU Ordinateur portatif  Ecran monochrome integre
  295.  
  296.  
  297.  IF "<Graphic>"=="?" DO MENU Use graphic mode only
  298.  IF "<scr_type>"=="SC_CGA" DO MENU Older Color Screens - interference or "snow"
  299.  
  300. IF "<$Screen:-4>"=="PORT" DO MENU_DEFAULT 2
  301.  
  302. CHOICE 2
  303.   SET extra = P
  304. CHOICE 3
  305.   SET extra = G
  306. CHOICE 4
  307.   SET extra = F
  308. ENDCHOICES
  309.  
  310. :no_flash
  311.  
  312. CONFIG Screen = "<scr_type>=<extra>"
  313.  
  314. CLEAR
  315. TEXT Copie du module d'ecran
  316. SET driver_name = <scr_type>.DRV
  317. GOSUB copy_driver
  318.  
  319. ;---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -
  320.  
  321. CLEAR
  322. TEXT Selections d'imprimantes:\n
  323. ---- Avec l'aide des fleches  et , selectionnez l'imprimante desiree et poussez ┘ (Enter).
  324.  
  325. NEWMENU ? 6 46
  326. MENU Imprimante sans graphiques
  327. MENU HP LaserJet 150 DPI
  328. MENU HP LaserJet 300 DPI
  329. MENU HP LaserJet avec JLaser
  330. MENU Canon LBP avec JLaser
  331.  
  332. SET extra =
  333. CHOICE 1
  334.  SET prn_type = PR_STD
  335.  SET extra = ?2
  336. CHOICE 2
  337.  SET prn_type = PR_PCL15
  338.  SET extra = ?1
  339. CHOICE 3
  340.  SET prn_type = PR_PCL30
  341.  SET extra = ?1
  342. CHOICE 4
  343.  SET prn_type = PR_JLHP
  344.  SET extra = ?1
  345. CHOICE 5
  346.  SET prn_type = PR_JLCAN
  347. ENDCHOICES
  348.  
  349. IF NOT "<extra>"=="?1" GOTO pr_type_1
  350. CLEAR
  351. TEXT Choix des detailles d'imprimante:\n
  352. ---- Utiliser les fleches  ou  pour choisir les options de l'imprimante et puissez ┘
  353. ---- (Enter).
  354.  
  355. NEWMENU ? 6 46
  356. MENU HP Roman- serie de 8 caracteres (std)
  357. MENU HP PC-serie de 8 caracteres (seulement LJ II/III )
  358.  
  359. SET extra =
  360. CHOICE 1
  361.  SET extra = R
  362. CHOICE 2
  363.  SET extra = X
  364. ENDCHOICES
  365. :pr_type_1
  366.  
  367. IF NOT "<extra>"=="?2" GOTO pr_type_2
  368. CLEAR
  369. TEXT Choix des details d'imprimante:\n
  370. ---- Utiliser les fleches  et  pour choisir les options de l'imprimante et poussez ┘ (Entrer).
  371.  
  372. NEWMENU ? 6 46
  373. MENU PC serie de 8 bit caracteres
  374. MENU National de 7 bit caracteres
  375. SET extra =
  376. CHOICE 2
  377.  SET extra = 7
  378. ENDCHOICES
  379. :pr_type_2
  380.  
  381. SET port =
  382. NEWMENU ? 6 40
  383. MENU LPT1       Imprimante parallele # 1
  384. MENU LPT2       Imprimante Parallele # 2
  385. MENU COM1       Imprimante sequentiel # 1
  386. MENU COM2       Imprimante sequentiel # 2
  387. MENU PRN        Imprimante courante de DOS 
  388.  
  389. CLEAR
  390. TEXT Choix des connexions d'imprimante:\n
  391. ---- Utiliser les fleches  et  pour choisir le port de l'imprimante et poussez ┘ (Entrer).
  392.  
  393. CHOICE 1
  394.  SET port = LPT1,
  395. CHOICE 2
  396.  SET port = LPT2,
  397. CHOICE 3
  398.  SET port = COM1,
  399. CHOICE 4
  400.  SET port = COM2,
  401. CHOICE 5
  402.  SET port = PRN,
  403. ENDCHOICES
  404.  
  405. CONFIG Printer = "<prn_type>=<port><extra>"
  406.  
  407. CLEAR
  408. TEXT  Copie des connexions d'imprimante....
  409. SET driver_name = <prn_type>.DRV
  410. GOSUB copy_driver
  411.  
  412. ;---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -
  413.  
  414. IF "<alter>"=="Y" GOTO done
  415.  
  416. :read_disk
  417. GOSUB need_disk
  418.  
  419. CLEAR
  420. TEXT Installation des fichiers d'applications a partir du disque 
  421. ---- d'installation <curdisk>...
  422. COPY_OPT <insdrive>\DISK<curdisk>\*.* <dest>
  423.  
  424. CALC curdisk = <curdisk> + 1
  425. IF EXISTS <insdrive>MORE GOTO read_disk
  426.  
  427. CONFIG Language = "<def_lang>"
  428. goto DONE
  429.  
  430. :copy_driver
  431. IF EXISTS <ins>\<driver_name> GOTO ok_copy
  432. CALC curdisk = <curdisk> + 1
  433. GOSUB need_disk
  434. GOTO copy_driver
  435. :ok_copy
  436. COPY <ins>\<driver_name> <dest>
  437. RETURN
  438.  
  439. :need_disk
  440. IF DIREXISTS <insdrive>\DISK<curdisk> DO RETURN
  441. :retry_disk2
  442. CLEAR
  443. TEXT Introduisez le disque d'installation numero <curdisk> et appuyez sur ┘ (Enter) lorsque vous etes pret a commencer.
  444. WAIT
  445. IF DIREXISTS <insdrive>\DISK<curdisk> DO RETURN
  446.  
  447. CLEAR
  448. TEXT Le disque introduit n'est pas le disque d'installation numero <curdisk> !
  449. NEWMENU ?, 3, 15
  450. MENU Retry
  451. MENU Abort
  452.  
  453. CHOICE 1
  454. GOTO retry_disk2
  455. ENDCHOICES
  456.  
  457. ABORT
  458.  
  459. :abort
  460. if "<dest>"=="" GOTO nofiles
  461. if "<alter>"=="Y" GOTO nofiles
  462. CLEAR
  463. TEXT \n\n!!! Installation interrompue !!!\n\n
  464. ---- Suppression des fichiers copies...
  465. UNCOPY
  466. :nofiles
  467. CLEAR
  468. TEXT \n\n!!! Installation interrompue !!!\n\n
  469. goto END
  470.  
  471. :done
  472. CLEAR
  473. TEXT Mise a date des configurations du texte
  474. WRITECONFIG <dest>\_DW_.CFG
  475. IF "<alter>"=="Y" GOTO end
  476. WRITEFILE <dstdrive>\<prod>.BAT = <dstdrive>\ncd <path>\nDW\ncd \\n
  477.  
  478. CLEAR
  479. TEXT \nL'installation est complet!\n\n
  480. ----Un fichier sequential appele <prod> a ete cree dans le repertoire <dstdrive>. \n\nPour executer le programme, tapez : <prod> ┘\n\n
  481. ----Important: Pour que cette commande fonctionne selon les indications,
  482. ---- vous devez etre dans le repertoire <dstdrive>\ ou ce repertoire doit
  483. ---- se trouver dans la commande PATH.
  484.  
  485. :end
  486. WAIT
  487.  
  488. :end2
  489. CD <$CurDir>
  490.