home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p085 / 1.img / DESIGN.INF next >
Encoding:
INI File  |  1992-01-29  |  12.8 KB  |  473 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;
  3. ;; Purpose
  4. ;;   Installation script for MicroSim Design Center
  5. ;;   under Windows 3.0
  6. ;;
  7. ;; Returned value
  8. ;;
  9. ;; Discussion
  10. ;;   Uses Instalit for Windows, by HPI
  11. ;;
  12. ;; Author
  13. ;;   kws - 03 Dec 90 - created
  14. ;;
  15. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  16. do initializeInstall
  17.  
  18. [pointSTART]
  19. getMenuChoice
  20.   Install complete Design Center.
  21.   Partial Installation.
  22.   Exit Installation program.
  23. endGetMenuChoice
  24.  
  25. inCase choice is
  26.   =1: queAllFiles
  27.       [number1] := 1
  28.   =2: [number1] := 2
  29.   =3: do exitInstall 
  30. endInCase
  31.  
  32. if [number1] = 2
  33. [point2NDMENU]
  34.   ;; user has selected a partial install
  35.   ;; [number1] always set to installation menu choice (1 == full install)
  36.   getMenuChoice
  37.     Install PSpice and PSpice libraries only.
  38.     Install Probe only.
  39.     Install Schematics and Schematics libraries only.
  40.     Install Stimulus Editor only.
  41.     Install Parts only.
  42.     Install Device Equation Files (if purchased).
  43.     Install Filter Design Files (if purchased).
  44.     Copy one file from the installation disks.
  45.     Go back to main menu.
  46.     Exit Installation program.
  47.   endGetMenuChoice
  48.   
  49.   inCase choice is
  50.     =1:   queFileGroup 10              ;; pspice and libs
  51.           queFileGroup 11
  52.           [number1] := 2
  53.     =2:   queFileGroup 20              ;; probe
  54.           [number1] := 3
  55.     =3:   queFileGroup 30              ;; schematics and libs
  56.           queFileGroup 31       
  57.           [number1] := 4
  58.     =4:   queFileGroup 40              ;; stmed
  59.           [number1] := 5
  60.     =5:   queFileGroup 50              ;; parts
  61.           [number1] := 6
  62.     =6:   do installDeviceEquations    ;; device equations
  63.           [number1] := 7
  64.     =7:   do installFilterDesigner     ;; filter designer
  65.           [number1] := 8
  66.     =8:   do copyOneFile
  67.           [number1] := 9
  68.           goto [point2NDMENU]
  69.     =9:   goto [pointSTART]
  70.     =10:  do exitInstall
  71.   endInCase
  72. endif
  73.  
  74. [pointGETDIRECTORY]
  75.  
  76. ;; Check for hard disk A: (NEC) or C:
  77. if driveIsPresent A
  78.   if driveIsRemoveable A
  79.     determineInstallationDirectory C:\MSIM requireFixed noCreate
  80.   else
  81.     determineInstallationDirectory A:\MSIM requireFixed noCreate
  82.   endif
  83. else
  84.   determineInstallationDirectory requireFixed noCreate
  85. endif
  86.  
  87.  
  88. if directoryExists [installationDirectory]
  89.   dialog [yesOrNo1] useHeader "Delete Existing Files"
  90.     The directory [installationDirectory] already exists.
  91.  
  92.     Select 'Yes' to copy new files to this directory,
  93.     overwriting files of the same name, like WPROBE.EXE, etc.
  94.     Select 'No' to specify a different installation directory.
  95.  
  96.   endDialog
  97.  
  98.   if [yesOrNo1] = n 
  99.     goto [pointGETDIRECTORY]
  100.   endif
  101. endIf
  102.  
  103. if [number1] = 1                       
  104.   ;; [number1] always set to installation menu choice (1 == full install)
  105.   if freeSpaceOnDrive installationDrive < queSize 
  106.     dialog [yesOrNo1] useHeader "Installation Error"
  107.       Insufficient space on this disk drive, need at least
  108.       queSize bytes.  Do you wish to select another drive?
  109.     endDialog
  110.     if [yesOrNo1] = y 
  111.       goto [pointGETDIRECTORY]
  112.     else 
  113.       do abortInstall
  114.     endif
  115.   endif
  116. endif  
  117.  
  118. if [number1] = 1
  119.   ;; get *.iff, readme.*, and msim.ini while we have disk #1 in the drive
  120.   copyFiles
  121.     msim.ini
  122.     readme.*
  123.     *.iff
  124.   endCopyFiles
  125. endif
  126.  
  127. ;; copy all user selected files now
  128. getQuedFiles onePerLine noInsertionPrompt
  129.  
  130. createDirectoryIfNecessary [installationDirectory]\BACKUP
  131.  
  132. setCompletionStatusTo finished
  133.  
  134. ;; install program groups if in Windows and doing a full install
  135. if Windows
  136.   if [number1] = 1
  137.     dialog [yesOrNo1] useHeader "Design Center Group"
  138.       Do you want to create a Design Center group with
  139.       icons for the programs (PSpice, Probe, etc.)?
  140.     endDialog
  141.  
  142.     if [yesOrNo1] = y
  143.       if fileIsInLibrary FILTER.EXE
  144.         buildProgramGroup "Design Center" MSIM.GRP replace
  145.           [installationDirectory]\psched.exe  "Schematics"      [installationDirectory]\psched.exe
  146.           [installationDirectory]\wpspice.exe "PSpice"          [installationDirectory]\wpspice.exe
  147.           [installationDirectory]\wprobe.exe  "Probe"           [installationDirectory]\wprobe.exe
  148.           [installationDirectory]\stmed.exe   "Stimulus Editor" [windowsDirectory]\progman.exe
  149.           [installationDirectory]\parts.exe   "Parts"           [windowsDirectory]\progman.exe
  150.           [installationDirectory]\filter.exe  "Filter Designer" [windowsDirectory]\progman.exe
  151.         endBuildProgramGroup
  152.       else
  153.         buildProgramGroup "Design Center" MSIM.GRP replace
  154.           [installationDirectory]\psched.exe  "Schematics"      [installationDirectory]\psched.exe
  155.           [installationDirectory]\wpspice.exe "PSpice"          [installationDirectory]\wpspice.exe
  156.           [installationDirectory]\wprobe.exe  "Probe"           [installationDirectory]\wprobe.exe
  157.           [installationDirectory]\stmed.exe   "Stimulus Editor" [windowsDirectory]\progman.exe
  158.           [installationDirectory]\parts.exe   "Parts"           [windowsDirectory]\progman.exe
  159.         endBuildProgramGroup
  160.       endif 
  161.     endif
  162.   endif
  163.  
  164.   if protectedMode
  165.   else
  166.     dialog useHeader "Installation Warning"
  167.       You are currently running in real mode.
  168.       The MicroSim Design Center requires
  169.       Windows to be run in protected mode.
  170.     endDialog
  171.   endif
  172. endif  ;; if windows
  173.  
  174. ;; noSysFileConfirmation
  175.  
  176. if [number1] = 1
  177.   dialog [yesOrNo1] useHeader "Modify AUTOEXEC.BAT?"
  178.     Do you want the Design Center directory added to your
  179.     path in the AUTOEXEC.BAT file?  (This must be done for 
  180.     the Design Center to execute properly)
  181.   endDialog
  182.   if [yesOrNo1] = y
  183.     modifyAutoexecBat
  184.       addPathComponent [installationDirectory] at beginning
  185.     endModifyAutoexecBat
  186.   endif
  187.  
  188.   dialog [yesOrNo1] useHeader "Modify AUTOEXEC.BAT?"
  189.     Do you want the PSPICELIB environment variable set to the
  190.     Design Center library directory in the AUTOEXEC.BAT file?
  191.   endDialog
  192.   if [yesOrNo1] = y
  193.     modifyAutoexecBat
  194.       addOrChangeLineWith (SET,PSPICELIB,=) as "SET PSPICELIB=[installationDirectory]\lib" at end
  195.     endModifyAutoexecBat
  196.   endif
  197.  
  198.   ;; install msim.ini in Windows directory, modify LIBPATH and BACKUP
  199.   if Windows
  200.  
  201. [pointMSIMINI]
  202.     if fileExists [windowsDirectory]\msim.ini
  203.       [string3] := MSIM.BAK
  204.       dialog [string3] useHeader "Modifying MSIM.INI"
  205.         The MSIM.INI file is about to be installed in the
  206.         Windows directory, however a previous version of MSIM.INI 
  207.         has been detected. Please enter a backup file name for
  208.         the previous version of MSIM.INI to be saved as: 
  209.       endDialog  
  210.     endif
  211.   
  212.     if [string3] = blankString
  213.     else
  214.       if fileExists [windowsDirectory]\[string3]
  215.         dialog [yesOrNo1] useHeader "Modifying MSIM.INI"
  216.           The file [windowsDirectory]\[string3] already exists.
  217.           Do you want to write over it?
  218.         endDialog
  219.         if [yesOrNo1] = n
  220.           goto [pointMSIMINI]
  221.         else
  222.           deleteFiles from [windowsDirectory]
  223.             [string3]
  224.           endDeleteFiles
  225.         endif
  226.       endif
  227.       renameFile [windowsDirectory]\msim.ini to [string3]
  228.     endif
  229.   
  230.     copyFiles from [installationDirectory] to [windowsDirectory]
  231.       msim.ini
  232.       *.pif
  233.     endCopyFiles
  234.   
  235.     deleteFiles from [installationDirectory]
  236.       msim.ini
  237.       *.pif
  238.     endDeleteFiles
  239.   
  240.     [array1][1] := SCHEMATICS
  241.     [array1][2] := LIBPATH
  242.     [array1][3] := [installationDirectory]\LIB
  243.     [array1][4] := [windowsDirectory]\MSIM.INI
  244.     writePrivateProfileString using [array1]
  245.   
  246.     [array1][1] := SCHEMATICS
  247.     [array1][2] := BACKUP
  248.     [array1][3] := [installationDirectory]\BACKUP
  249.     [array1][4] := [windowsDirectory]\MSIM.INI
  250.     writePrivateProfileString using [array1]
  251.   endif  ;; if windows
  252. endif  ;; if [number1] = 1
  253.  
  254. if [number1] = 1
  255.   dialog [yesOrNo1] useHeader "Run SETUPDEV.EXE"
  256.     Do you want to run the DOS SETUPDEV.EXE program to 
  257.     create a PSPICE.DEV file that sets up the monitor and 
  258.     printer for the DOS programs PARTS.EXE and STMED.EXE?
  259.   endDialog
  260.   if [yesOrNo1] = y
  261.     run  [installationDirectory]\setupdev.exe -d [installationDirectory]\pspice.dev
  262.   endif  
  263.  
  264.   ;; [number1] always set to installation menu choice (1 == full install)
  265.   dialog useHeader "Design Center Installation"
  266.     Your Design Center installation is now complete.  You
  267.     must reboot the computer for changes to your AUTOEXEC.BAT,
  268.     CONFIG.SYS, and/or Windows *.INI files to take effect.  
  269.  
  270.     Please use Notepad to view the README.DOC
  271.     and README.SCM files.
  272.  
  273.   endDialog
  274. else
  275.   dialog useHeader "Partial Installation"
  276.     Your partial installation is now complete.
  277.   endDialog
  278.   goto [pointSTART]
  279. endif
  280.  
  281. soLong                                 ;; exit installation pgm
  282.  
  283.  
  284.  
  285. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  286. ;;
  287. ;; Purpose
  288. ;;   Allow user to copy one file from compressed disks.
  289. ;;
  290. ;; Returned value
  291. ;;
  292. ;; Discussion
  293. ;;   File is only put in queue, must still be a 'getQuedFiles' call
  294. ;;
  295. ;; Author
  296. ;;   kws - 03 Dec 90 - created
  297. ;;
  298. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  299. procedure copyOneFile
  300. [pointCOPYFILE]
  301.   dialog [string1] useHeader "Extracting a file from installation Disks"
  302.     Please enter the name of the file you wish to copy
  303.     from the installation disks (press ENTER to exit):
  304.   endDialog
  305.  
  306.   if [string1] = blankString
  307.     exit
  308.   endif
  309.  
  310.   if [string1] contains \
  311.     popup Please enter just the file name with no path.
  312.     goto [pointCOPYFILE]
  313.   endif
  314.  
  315.   if lengthOf [string1] > 12
  316.     popup The file name is too long.
  317.     goto [pointCOPYFILE]
  318.   endif
  319.  
  320.   if fileIsInLibrary [string1]
  321.   else
  322.     popup Can't find that file name on the installation disks.
  323.     goto [pointCOPYFILE]
  324.   endif
  325.  
  326.   queFiles
  327.     [string1]
  328.   endQueFiles
  329.  
  330. endProcedure
  331.  
  332.  
  333.  
  334. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  335. ;;
  336. ;; Purpose
  337. ;;   Install device equation files (display msg if not found).
  338. ;;
  339. ;; Returned value
  340. ;;
  341. ;; Discussion
  342. ;;   Uses 'fileIsInLibrary' to check if device equation files on disks
  343. ;;
  344. ;; Author
  345. ;;   kws - 03 Dec 90 - created
  346. ;;
  347. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  348. procedure installDevicEquations
  349.   ;; check for a device equation file on the disks
  350.   if fileIsInLibrary DEVEQU.BAT
  351.     queFileGroup 60                 
  352.   else
  353.     popup "Device Equation files not found."
  354.   endif
  355.  
  356. endProcedure
  357.  
  358.  
  359.  
  360. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  361. ;;
  362. ;; Purpose
  363. ;;   Install Filter Designer files (display msg if not found).
  364. ;;
  365. ;; Returned value
  366. ;;
  367. ;; Discussion
  368. ;;   Uses 'fileIsInLibrary' to check if filter designer files on disks
  369. ;;
  370. ;; Author
  371. ;;   kws - 03 Dec 90 - created
  372. ;;
  373. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  374. procedure installFilterDesigner
  375.   ;; check for a filter designer file on the disks
  376.   if fileIsInLibrary filter.exe
  377.     queFileGroup
  378.   else
  379.     popup "Filter Designer files not found."
  380.   endif
  381.  
  382. endProcedure
  383.  
  384.  
  385.  
  386. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  387. ;;
  388. ;; Purpose
  389. ;;   Initialize windows at start of install
  390. ;;
  391. ;; Returned value
  392. ;;
  393. ;; Discussion
  394. ;;
  395. ;; Author
  396. ;;   kws - 03 Dec 90 - created
  397. ;;
  398. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  399. procedure initializeInstall
  400.   setTopLineTo MicroSim Design Center Installation (ESC to quit)
  401.  
  402.   setBackdrop off
  403.   setDefaultBitmap off
  404.  
  405.   if windows
  406.     setAttentionAttrTo blackOnWhite
  407.     setScreenAttrTo blackOnWhite
  408.     setBackgroundColor 192 192 192 192 192 192
  409.     setDithering off
  410.   endif
  411.  
  412.   showWindow maximize
  413.   clearScreen
  414.  
  415.   setSupportInformation
  416.     For assistance please call the MicroSim Product
  417.     Support Group or the MicroSim Technical Support
  418.     group at (714) 837-0790
  419.  
  420.     MicroSim Corporation
  421.     20 Fairbanks
  422.     Irvine, CA   92718
  423.  
  424.     Fax: (714) 455-0554
  425.   endSetSupportInformation
  426.  
  427. endProcedure
  428.  
  429.  
  430.  
  431. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  432. ;;
  433. ;; Purpose
  434. ;;   Abort installation
  435. ;;
  436. ;; Returned value
  437. ;;
  438. ;; Discussion
  439. ;;   Put any cleanup funcs here.
  440. ;;
  441. ;; Author
  442. ;;   kws - 03 Dec 90 - created
  443. ;;
  444. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  445. procedure abortInstall
  446.   popup Design Center installation program aborted.
  447.   soLong
  448. endProcedure
  449.  
  450.  
  451.  
  452. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  453. ;;
  454. ;; Purpose
  455. ;;   Exit installation
  456. ;;
  457. ;; Returned value
  458. ;;
  459. ;; Discussion
  460. ;;   Put any cleanup funcs here.
  461. ;;
  462. ;; Author
  463. ;;   kws - 03 Dec 90 - created
  464. ;;
  465. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  466. procedure exitInstall
  467.   soLong
  468. endProcedure
  469.  
  470.  
  471.  
  472. endScript
  473.