home *** CD-ROM | disk | FTP | other *** search
INI File | 1992-01-29 | 12.8 KB | 473 lines |
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Purpose
- ;; Installation script for MicroSim Design Center
- ;; under Windows 3.0
- ;;
- ;; Returned value
- ;;
- ;; Discussion
- ;; Uses Instalit for Windows, by HPI
- ;;
- ;; Author
- ;; kws - 03 Dec 90 - created
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- do initializeInstall
-
- [pointSTART]
- getMenuChoice
- Install complete Design Center.
- Partial Installation.
- Exit Installation program.
- endGetMenuChoice
-
- inCase choice is
- =1: queAllFiles
- [number1] := 1
- =2: [number1] := 2
- =3: do exitInstall
- endInCase
-
- if [number1] = 2
- [point2NDMENU]
- ;; user has selected a partial install
- ;; [number1] always set to installation menu choice (1 == full install)
- getMenuChoice
- Install PSpice and PSpice libraries only.
- Install Probe only.
- Install Schematics and Schematics libraries only.
- Install Stimulus Editor only.
- Install Parts only.
- Install Device Equation Files (if purchased).
- Install Filter Design Files (if purchased).
- Copy one file from the installation disks.
- Go back to main menu.
- Exit Installation program.
- endGetMenuChoice
-
- inCase choice is
- =1: queFileGroup 10 ;; pspice and libs
- queFileGroup 11
- [number1] := 2
- =2: queFileGroup 20 ;; probe
- [number1] := 3
- =3: queFileGroup 30 ;; schematics and libs
- queFileGroup 31
- [number1] := 4
- =4: queFileGroup 40 ;; stmed
- [number1] := 5
- =5: queFileGroup 50 ;; parts
- [number1] := 6
- =6: do installDeviceEquations ;; device equations
- [number1] := 7
- =7: do installFilterDesigner ;; filter designer
- [number1] := 8
- =8: do copyOneFile
- [number1] := 9
- goto [point2NDMENU]
- =9: goto [pointSTART]
- =10: do exitInstall
- endInCase
- endif
-
- [pointGETDIRECTORY]
-
- ;; Check for hard disk A: (NEC) or C:
- if driveIsPresent A
- if driveIsRemoveable A
- determineInstallationDirectory C:\MSIM requireFixed noCreate
- else
- determineInstallationDirectory A:\MSIM requireFixed noCreate
- endif
- else
- determineInstallationDirectory requireFixed noCreate
- endif
-
-
- if directoryExists [installationDirectory]
- dialog [yesOrNo1] useHeader "Delete Existing Files"
- The directory [installationDirectory] already exists.
-
- Select 'Yes' to copy new files to this directory,
- overwriting files of the same name, like WPROBE.EXE, etc.
- Select 'No' to specify a different installation directory.
-
- endDialog
-
- if [yesOrNo1] = n
- goto [pointGETDIRECTORY]
- endif
- endIf
-
- if [number1] = 1
- ;; [number1] always set to installation menu choice (1 == full install)
- if freeSpaceOnDrive installationDrive < queSize
- dialog [yesOrNo1] useHeader "Installation Error"
- Insufficient space on this disk drive, need at least
- queSize bytes. Do you wish to select another drive?
- endDialog
- if [yesOrNo1] = y
- goto [pointGETDIRECTORY]
- else
- do abortInstall
- endif
- endif
- endif
-
- if [number1] = 1
- ;; get *.iff, readme.*, and msim.ini while we have disk #1 in the drive
- copyFiles
- msim.ini
- readme.*
- *.iff
- endCopyFiles
- endif
-
- ;; copy all user selected files now
- getQuedFiles onePerLine noInsertionPrompt
-
- createDirectoryIfNecessary [installationDirectory]\BACKUP
-
- setCompletionStatusTo finished
-
- ;; install program groups if in Windows and doing a full install
- if Windows
- if [number1] = 1
- dialog [yesOrNo1] useHeader "Design Center Group"
- Do you want to create a Design Center group with
- icons for the programs (PSpice, Probe, etc.)?
- endDialog
-
- if [yesOrNo1] = y
- if fileIsInLibrary FILTER.EXE
- buildProgramGroup "Design Center" MSIM.GRP replace
- [installationDirectory]\psched.exe "Schematics" [installationDirectory]\psched.exe
- [installationDirectory]\wpspice.exe "PSpice" [installationDirectory]\wpspice.exe
- [installationDirectory]\wprobe.exe "Probe" [installationDirectory]\wprobe.exe
- [installationDirectory]\stmed.exe "Stimulus Editor" [windowsDirectory]\progman.exe
- [installationDirectory]\parts.exe "Parts" [windowsDirectory]\progman.exe
- [installationDirectory]\filter.exe "Filter Designer" [windowsDirectory]\progman.exe
- endBuildProgramGroup
- else
- buildProgramGroup "Design Center" MSIM.GRP replace
- [installationDirectory]\psched.exe "Schematics" [installationDirectory]\psched.exe
- [installationDirectory]\wpspice.exe "PSpice" [installationDirectory]\wpspice.exe
- [installationDirectory]\wprobe.exe "Probe" [installationDirectory]\wprobe.exe
- [installationDirectory]\stmed.exe "Stimulus Editor" [windowsDirectory]\progman.exe
- [installationDirectory]\parts.exe "Parts" [windowsDirectory]\progman.exe
- endBuildProgramGroup
- endif
- endif
- endif
-
- if protectedMode
- else
- dialog useHeader "Installation Warning"
- You are currently running in real mode.
- The MicroSim Design Center requires
- Windows to be run in protected mode.
- endDialog
- endif
- endif ;; if windows
-
- ;; noSysFileConfirmation
-
- if [number1] = 1
- dialog [yesOrNo1] useHeader "Modify AUTOEXEC.BAT?"
- Do you want the Design Center directory added to your
- path in the AUTOEXEC.BAT file? (This must be done for
- the Design Center to execute properly)
- endDialog
- if [yesOrNo1] = y
- modifyAutoexecBat
- addPathComponent [installationDirectory] at beginning
- endModifyAutoexecBat
- endif
-
- dialog [yesOrNo1] useHeader "Modify AUTOEXEC.BAT?"
- Do you want the PSPICELIB environment variable set to the
- Design Center library directory in the AUTOEXEC.BAT file?
- endDialog
- if [yesOrNo1] = y
- modifyAutoexecBat
- addOrChangeLineWith (SET,PSPICELIB,=) as "SET PSPICELIB=[installationDirectory]\lib" at end
- endModifyAutoexecBat
- endif
-
- ;; install msim.ini in Windows directory, modify LIBPATH and BACKUP
- if Windows
-
- [pointMSIMINI]
- if fileExists [windowsDirectory]\msim.ini
- [string3] := MSIM.BAK
- dialog [string3] useHeader "Modifying MSIM.INI"
- The MSIM.INI file is about to be installed in the
- Windows directory, however a previous version of MSIM.INI
- has been detected. Please enter a backup file name for
- the previous version of MSIM.INI to be saved as:
- endDialog
- endif
-
- if [string3] = blankString
- else
- if fileExists [windowsDirectory]\[string3]
- dialog [yesOrNo1] useHeader "Modifying MSIM.INI"
- The file [windowsDirectory]\[string3] already exists.
- Do you want to write over it?
- endDialog
- if [yesOrNo1] = n
- goto [pointMSIMINI]
- else
- deleteFiles from [windowsDirectory]
- [string3]
- endDeleteFiles
- endif
- endif
- renameFile [windowsDirectory]\msim.ini to [string3]
- endif
-
- copyFiles from [installationDirectory] to [windowsDirectory]
- msim.ini
- *.pif
- endCopyFiles
-
- deleteFiles from [installationDirectory]
- msim.ini
- *.pif
- endDeleteFiles
-
- [array1][1] := SCHEMATICS
- [array1][2] := LIBPATH
- [array1][3] := [installationDirectory]\LIB
- [array1][4] := [windowsDirectory]\MSIM.INI
- writePrivateProfileString using [array1]
-
- [array1][1] := SCHEMATICS
- [array1][2] := BACKUP
- [array1][3] := [installationDirectory]\BACKUP
- [array1][4] := [windowsDirectory]\MSIM.INI
- writePrivateProfileString using [array1]
- endif ;; if windows
- endif ;; if [number1] = 1
-
- if [number1] = 1
- dialog [yesOrNo1] useHeader "Run SETUPDEV.EXE"
- Do you want to run the DOS SETUPDEV.EXE program to
- create a PSPICE.DEV file that sets up the monitor and
- printer for the DOS programs PARTS.EXE and STMED.EXE?
- endDialog
- if [yesOrNo1] = y
- run [installationDirectory]\setupdev.exe -d [installationDirectory]\pspice.dev
- endif
-
- ;; [number1] always set to installation menu choice (1 == full install)
- dialog useHeader "Design Center Installation"
- Your Design Center installation is now complete. You
- must reboot the computer for changes to your AUTOEXEC.BAT,
- CONFIG.SYS, and/or Windows *.INI files to take effect.
-
- Please use Notepad to view the README.DOC
- and README.SCM files.
-
- endDialog
- else
- dialog useHeader "Partial Installation"
- Your partial installation is now complete.
- endDialog
- goto [pointSTART]
- endif
-
- soLong ;; exit installation pgm
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Purpose
- ;; Allow user to copy one file from compressed disks.
- ;;
- ;; Returned value
- ;;
- ;; Discussion
- ;; File is only put in queue, must still be a 'getQuedFiles' call
- ;;
- ;; Author
- ;; kws - 03 Dec 90 - created
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- procedure copyOneFile
- [pointCOPYFILE]
- dialog [string1] useHeader "Extracting a file from installation Disks"
- Please enter the name of the file you wish to copy
- from the installation disks (press ENTER to exit):
- endDialog
-
- if [string1] = blankString
- exit
- endif
-
- if [string1] contains \
- popup Please enter just the file name with no path.
- goto [pointCOPYFILE]
- endif
-
- if lengthOf [string1] > 12
- popup The file name is too long.
- goto [pointCOPYFILE]
- endif
-
- if fileIsInLibrary [string1]
- else
- popup Can't find that file name on the installation disks.
- goto [pointCOPYFILE]
- endif
-
- queFiles
- [string1]
- endQueFiles
-
- endProcedure
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Purpose
- ;; Install device equation files (display msg if not found).
- ;;
- ;; Returned value
- ;;
- ;; Discussion
- ;; Uses 'fileIsInLibrary' to check if device equation files on disks
- ;;
- ;; Author
- ;; kws - 03 Dec 90 - created
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- procedure installDevicEquations
- ;; check for a device equation file on the disks
- if fileIsInLibrary DEVEQU.BAT
- queFileGroup 60
- else
- popup "Device Equation files not found."
- endif
-
- endProcedure
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Purpose
- ;; Install Filter Designer files (display msg if not found).
- ;;
- ;; Returned value
- ;;
- ;; Discussion
- ;; Uses 'fileIsInLibrary' to check if filter designer files on disks
- ;;
- ;; Author
- ;; kws - 03 Dec 90 - created
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- procedure installFilterDesigner
- ;; check for a filter designer file on the disks
- if fileIsInLibrary filter.exe
- queFileGroup
- else
- popup "Filter Designer files not found."
- endif
-
- endProcedure
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Purpose
- ;; Initialize windows at start of install
- ;;
- ;; Returned value
- ;;
- ;; Discussion
- ;;
- ;; Author
- ;; kws - 03 Dec 90 - created
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- procedure initializeInstall
- setTopLineTo MicroSim Design Center Installation (ESC to quit)
-
- setBackdrop off
- setDefaultBitmap off
-
- if windows
- setAttentionAttrTo blackOnWhite
- setScreenAttrTo blackOnWhite
- setBackgroundColor 192 192 192 192 192 192
- setDithering off
- endif
-
- showWindow maximize
- clearScreen
-
- setSupportInformation
- For assistance please call the MicroSim Product
- Support Group or the MicroSim Technical Support
- group at (714) 837-0790
-
- MicroSim Corporation
- 20 Fairbanks
- Irvine, CA 92718
-
- Fax: (714) 455-0554
- endSetSupportInformation
-
- endProcedure
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Purpose
- ;; Abort installation
- ;;
- ;; Returned value
- ;;
- ;; Discussion
- ;; Put any cleanup funcs here.
- ;;
- ;; Author
- ;; kws - 03 Dec 90 - created
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- procedure abortInstall
- popup Design Center installation program aborted.
- soLong
- endProcedure
-
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Purpose
- ;; Exit installation
- ;;
- ;; Returned value
- ;;
- ;; Discussion
- ;; Put any cleanup funcs here.
- ;;
- ;; Author
- ;; kws - 03 Dec 90 - created
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- procedure exitInstall
- soLong
- endProcedure
-
-
-
- endScript
-