/*  Installation for the Domestic and International version of OrCAD/MOD  */

@DefineProject
    @Name       = "OrCAD/MOD"
    @Version    = "V4.03n"
@EndProject

@DefineVars
    @Dir @ORCADPROJ = "\\ORCAD"
    @Dir @ORCADEXE = "\\ORCADEXE"
    @Dir @ORCADESP = "\\ORCADESP"
@EndVars

@GetOption
    @Cls
                        Select one of the following items:


















 NOTE: If you haven't installed MOD Release IV from these disks yet don't
       choose any of the reinstallation choices, choose the standard install.
          @Option 1 = " Standard   Installation of MOD Release IV    PRODUCT files"
          @Option 2 = "          Reinstallation of MOD Release IV EXECUTABLE files"
          @Option 3 = "          Reinstallation of MOD Release IV   TEMPLATE files"
@EndOption

@If (1 [= @Option || 3 [= @Option)
    @GetOption
        @CheckBox 
        @Cls
        Select one or more DEFINITION files to INSTALL on your HARD DISK.
                             DEFINITION Source Files














    
        The SPACE BAR toggles the selection between yes and no. 
        The arrow keys and PGUP/PGDN keys move the selection up and down.
        'Y' sets all entries to YES, 'N' sets all to NO.
        Press <ENTER> when you have finished selecting.
	    @Option 100 = " ALTERA1.DEF               ALTERA  EP310, EP320 EPLD's"
	    @Option 101 = " ALTERA2.DEF               ALTERA         EP600 EPLD's"
	    @Option 102 = " ALTERA3.DEF               ALTERA         EP900 EPLD's"
	    @Option 103 = " ALTERA4.DEF               ALTERA        EP1800 EPLD's"
	    @Option 104 = "     AMD.DEF                  AMD                PAL's"
	    @Option 105 = "   ATMEL.DEF                ATMEL                PAL's"
	    @Option 106 = " CYPRESS.DEF              CYPRESS                PAL's"
	    @Option 107 = "    DEMO.DEF                 DEMO       TUTORIAL PAL  "
	    @Option 108 = " GAZELLE.DEF              GAZELLE                PAL's"
	    @Option 109 = "  HARRIS.DEF               HARRIS                PAL's"
	    @Option 110 = "     ICT.DEF                  ICT               PEEL's"
	    @Option 111 = "   INTEL.DEF                INTEL               EPLD's"
	    @Option 112 = "   IUDEL.DEF  P-ON RST UNIT DELAY                PAL's"
	    @Option 113 = " LATTICE.DEF              LATTICE                GAL's"
        @Option 121 = " MACH110.DEF                  AMD           110 MACH  "
        @Option 122 = " MACH210.DEF                  AMD           210 MACH  "
	    @Option 114 = "NATIONAL.DEF             NATIONAL                PAL's"
	    @Option 115 = "   RICOH.DEF                RICOH                PAL's"
	    @Option 116 = " SAMSUNG.DEF              SAMSUNG                PAL's" 
	    @Option 117 = "     SGS.DEF          SGS-THOMSON                GAL's"
	    @Option 118 = "SIGNETIC.DEF            SIGNETICS                PAL's"
	    @Option 119 = "      TI.DEF    TEXAS INSTRUMENTS                PAL's"
	    @Option 120 = "    UDEL.DEF           UNIT DELAY                PAL's"
	    @Option 123 = "UDELM110.ENC  P-ON RST UNIT DELAY       AMD 110 MACH  "
	    @Option 124 = "UDELM210.ENC  P-ON RST UNIT DELAY       AMD 210 MACH  "
        /*  Last option is 124 (IUD AMD MACH) */
    @EndOption
@EndIf

@If (1 [= @Option || 3 [= @Option)
    @GetOption
        @CheckBox 
        @Cls

        @If ( 100 [= @Option )
	        @Option 200 = " ALTERA1.DEF               ALTERA  EP310, EP320 EPLD's"
        @EndIf
        @If ( 101 [= @Option )
	        @Option 201 = " ALTERA2.DEF               ALTERA         EP600 EPLD's"
        @EndIf
        @If ( 102 [= @Option )
	        @Option 202 = " ALTERA3.DEF               ALTERA         EP900 EPLD's"
        @EndIf
        @If ( 103 [= @Option )
	        @Option 203 = " ALTERA4.DEF               ALTERA        EP1800 EPLD's"
        @EndIf
        @If ( 104 [= @Option )
	        @Option 204 = "     AMD.DEF                  AMD                PAL's"
        @EndIf
        @If ( 105 [= @Option )
	        @Option 205 = "   ATMEL.DEF                ATMEL                PAL's"
        @EndIf
        @If ( 106 [= @Option )
	        @Option 206 = " CYPRESS.DEF              CYPRESS                PAL's"
        @EndIf
        @If ( 107 [= @Option )
	        @Option 207 = "    DEMO.DEF                 DEMO       TUTORIAL PAL  "
        @EndIf
        @If ( 108 [= @Option )
	        @Option 208 = " GAZELLE.DEF              GAZELLE                PAL's"
        @EndIf
        @If ( 109 [= @Option )
	        @Option 209 = "  HARRIS.DEF               HARRIS                PAL's"
        @EndIf
        @If ( 110 [= @Option )
	        @Option 210 = "     ICT.DEF                  ICT               PEEL's"
        @EndIf
        @If ( 111 [= @Option )
	        @Option 211 = "   INTEL.DEF                INTEL               EPLD's"
        @EndIf

	        @Option 212 = "   IUDEL.DEF  P-ON RST UNIT DELAY                PAL's"

        @If ( 113 [= @Option )
	        @Option 213 = " LATTICE.DEF              LATTICE                GAL's"
        @EndIf
        @If ( 121 [= @Option )
            @Option 221 = " MACH110.DEF                  AMD           110 MACH  "
        @EndIf
        @If ( 122 [= @Option )
            @Option 222 = " MACH210.DEF                  AMD           210 MACH  "
        @EndIf
        @If ( 114 [= @Option )
	        @Option 214 = "NATIONAL.DEF             NATIONAL                PAL's"
        @EndIf
        @If ( 115 [= @Option )
	        @Option 215 = "   RICOH.DEF                RICOH                PAL's"
        @EndIf
        @If ( 116 [= @Option )
	        @Option 216 = " SAMSUNG.DEF              SAMSUNG                PAL's" 
        @EndIf
        @If ( 117 [= @Option )
	        @Option 217 = "     SGS.DEF          SGS-THOMSON                GAL's"
        @EndIf
        @If ( 118 [= @Option )
	        @Option 218 = "SIGNETIC.DEF            SIGNETICS                PAL's"
        @EndIf
        @If ( 119 [= @Option )
	        @Option 219 = "      TI.DEF    TEXAS INSTRUMENTS                PAL's"
        @EndIf

	        @Option 220 = "    UDEL.DEF           UNIT DELAY                PAL's"

        @If ( 123 [= @Option )
	        @Option 223 = "UDELM110.ENC  P-ON RST UNIT DELAY       AMD 110 MACH  "
        @EndIf
        @If ( 124 [= @Option )
	        @Option 224 = "UDELM210.ENC  P-ON RST UNIT DELAY       AMD 210 MACH  "
        @EndIf
        /*  Last option is 224 (IUD AMD MACH) */

        @Cls
   Select one or more DEFINITION files to INSERT into your TEMPLATE LIBRARY.
                                DEFINITION Files















        The SPACE BAR toggles the selection between yes and no. 
        The arrow keys and PGUP/PGDN keys move the selection up and down.
        'Y' sets all entries to YES, 'N' sets all to NO.
        Press <ENTER> when you have finished selecting.
    @EndOption
@EndIf

@DefineDisk
    @Label = "MOD Disk 1"

    @If ( 1 [= @Option )
        @File       README.MOD
            @Out0k  \\@ORCADESP\\VST\\MOD_INFO.403

        @BeginLib MODDOCS.PLB
            @File *.*
                 @Out0k  \\@ORCADESP\\VST\\*.*
        @EndLib
    @EndIf

    @If ( 1 [= @Option || 2 [= @Option )
        @BeginLib MOD.PLB
             @File        *.EXE
                  @Out0k \\@ORCADEXE\\*.EXE
        @EndLib
    @EndIf

    @If ( 1 [=@Option || 3 [= @option )
        @BeginLib MLIB.PLB
            @If ( 1 [= @Option )
                @File   *.LST
                    @Out0k  \\@ORCADESP\\VST\\*.LST

                @File   DEPLDSIM.NDX
                    @Out0k  \\@ORCADESP\\VST\\LIBRARY\\DEPLDSIM.NDX
                @File   DEPLDSIM.LIB
                    @Out0k  \\@ORCADESP\\VST\\LIBRARY\\DEPLDSIM.LIB
                @File   DEPLDSIM.NDX
                    @Out0k  \\@ORCADESP\\VST\\LIBRARY\\PLDSIM.NDX
                @File   DEPLDSIM.LIB
                    @Out0k  \\@ORCADESP\\VST\\LIBRARY\\PLDSIM.LIB
            @EndIf

            @If ( 3 [= @Option )
                @If (@Exists "@OutDrive:\\@ORCADESP\\VST\\LIBRARY\\PLDSIM.LIB")
                    /*  If option 3 (Reinstall templates) is valid and 
                        PLDSIM.LIB already exists don't reinstall the 
                        library and index files as the user has probably
                        inserted some templates previously and reinstalling
                        the library and index files will overwrite their
                        existing files.
                    */
                @Else
                    /*  If PLDSIM.LIB doesn't exist reinstall the library
                        and index files because they will be needed for
                        the templates to be inserted.
                    */
                    @File   DEPLDSIM.NDX
                        @Out0k  \\@ORCADESP\\VST\\LIBRARY\\DEPLDSIM.NDX
                    @File   DEPLDSIM.LIB
                        @Out0k  \\@ORCADESP\\VST\\LIBRARY\\DEPLDSIM.LIB
                    @File   DEPLDSIM.NDX
                        @Out0k  \\@ORCADESP\\VST\\LIBRARY\\PLDSIM.NDX
                    @File   DEPLDSIM.LIB
                        @Out0k  \\@ORCADESP\\VST\\LIBRARY\\PLDSIM.LIB
                @EndIf
            @EndIf

	        @If ( 100 [= @Option ) 
                @File ALTERA1.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\ALTERA1.DEF
            @EndIf
	        @If ( 101 [= @Option ) 
                @File ALTERA2.DEF           
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\ALTERA2.DEF
            @EndIf
	        @If ( 102 [= @Option ) 
                @File ALTERA3.DEF         
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\ALTERA3.DEF
            @EndIf
	        @If ( 103 [= @Option ) 
                @File ALTERA4.DEF          
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\ALTERA4.DEF
            @EndIf
	        @If ( 104 [= @Option ) 
                @File AMD.DEF         
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\AMD.DEF
            @EndIf
	        @If ( 105 [= @Option ) 
                @File ATMEL.DEF          
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\ATMEL.DEF
            @EndIf
	        @If ( 106 [= @Option ) 
                @File CYPRESS.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\CYPRESS.DEF
            @EndIf
	        @If ( 107 [= @Option ) 
                @File DEMO.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\DEMO.DEF
            @EndIf
	        @If ( 108 [= @Option ) 
                @File GAZELLE.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\GAZELLE.DEF
            @EndIf
	        @If ( 109 [= @Option ) 
                @File HARRIS.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\HARRIS.DEF
            @EndIf
	        @If ( 110 [= @Option ) 
                @File ICT.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\ICT.DEF
            @EndIf
	        @If ( 111 [= @Option ) 
                @File INTEL.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\INTEL.DEF
            @EndIf

            @File IUDEL.DEF
                @Out0K \\@OrCADESP\\VST\\LIBRARY\\IUDEL.DEF

	        @If ( 113 [= @Option ) 
                @File LATTICE.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\LATTICE.DEF
            @EndIf
	        @If ( 114 [= @Option ) 
                @File NATIONAL.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\NATIONAL.DEF
            @EndIf
	        @If ( 115 [= @Option ) 
                @File RICOH.DEF     
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\RICOH.DEF
            @EndIf
	        @If ( 116 [= @Option ) 
                @File SAMSUNG.DEF 
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\SAMSUNG.DEF
            @EndIf
	        @If ( 117 [= @Option ) 
                @File SGS.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\SGS.DEF
            @EndIf
	        @If ( 118 [= @Option ) 
                @File SIGNETIC.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\SIGNETIC.DEF
            @EndIf
	        @If ( 119 [= @Option ) 
                @File TI.DEF
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\TI.DEF
            @EndIf

            @File UDEL.DEF
                @Out0K \\@OrCADESP\\VST\\LIBRARY\\UDEL.DEF

	        @If ( 121 [= @Option ) 
                @File MACH110.ENC
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\MACH110.ENC
            @EndIf
	        @If ( 122 [= @Option ) 
                @File MACH210.ENC
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\MACH210.ENC
            @EndIf
	        @If ( 123 [= @Option ) 
                @File UDELM110.ENC
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\UDELM110.ENC
            @EndIf
	        @If ( 124 [= @Option ) 
                @File UDELM210.ENC
                    @Out0K \\@OrCADESP\\VST\\LIBRARY\\UDELM210.ENC
            @EndIf

        @EndLib
    @EndIf

@EndDisk

@Finish

    @If ( 1 [= @Option || 3 [= @Option )
        @ChDrive @OutDrive

        @If (@Exists "@OutDrive:\\@OrcadPROJ\\Template\\ESP.CFG")
        @ElseIf (@Exists "@OutDrive:\\@OrcadPROJ\\Template\\VST.CFG")
        @ElseIf (@Exists "@OutDrive:\\@OrcadPROJ\\Template\\SDT.CFG")
        @ElseIf (@Exists "@OutDrive:\\@OrcadPROJ\\Template\\PCB.CFG")
        @ElseIf (@Exists "@OutDrive:\\@OrcadPROJ\\Template\\PLD.CFG")
        @Else
            @System "MD @OrcadPROJ"
            @ChDir "@OrCADProj"
            @System "MD TEMPLATE"
        @EndIf

        @ChDir   "@OutDrive:\\@ORCADPROJ\\Template"

        @If (@Exists "VST.BCF")
            @System "COPY VST.bcf @OutDrive:\\@ORCADESP\\VST\\LIBRARY"
        @Else
            @If (@Exists "VST.CFG")
            @Else
                @System "echo PLIB='@OutDrive:@ORCADESP\\VST\\LIBRARY\\' > VST.cfg"
            @EndIf
            @If (@Exists "@OutDrive:\\@ORCADEXE\\VST_C.EXE")
                @System "@OutDrive:\\@ORCADEXE\\VST_C /B"
                @System "COPY VST.bcf @OutDrive:\\@ORCADESP\\VST\\LIBRARY"
            @Else
                @Cls



     Please make sure you install Release IV VST before executing MKMOD.BAT









                @Pause
            @EndIf
        @EndIf

        @System "Echo Rem This Batch file will insert MODEL TEMPLATES into MOD library > \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"

        @If ( 200 [= @Option ) 
            @System "Echo InsrtPLD ALTERA1.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
        @If ( 201 [= @Option ) 
            @System "Echo InsrtPLD ALTERA2.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 202 [= @Option ) 
            @System "Echo InsrtPLD ALTERA3.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 203 [= @Option ) 
            @System "Echo InsrtPLD ALTERA4.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 204 [= @Option ) 
            @System "Echo InsrtPLD AMD.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 205 [= @Option ) 
            @System "Echo InsrtPLD ATMEL.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 206 [= @Option ) 
            @System "Echo InsrtPLD CYPRESS.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 207 [= @Option ) 
            @System "Echo InsrtPLD DEMO.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 208 [= @Option ) 
            @System "Echo InsrtPLD GAZELLE.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 209 [= @Option ) 
            @System "Echo InsrtPLD HARRIS.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 210 [= @Option ) 
            @System "Echo InsrtPLD ICT.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 211 [= @Option ) 
            @System "Echo InsrtPLD INTEL.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf

        @System "Echo InsrtPLD IUDEL.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"

	    @If ( 213 [= @Option ) 
            @System "Echo InsrtPLD LATTICE.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 214 [= @Option ) 
            @System "Echo InsrtPLD NATIONAL.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 215 [= @Option ) 
            @System "Echo InsrtPLD RICOH.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 216 [= @Option ) 
            @System "Echo InsrtPLD SAMSUNG.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 217 [= @Option ) 
            @System "Echo InsrtPLD SGS.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 218 [= @Option ) 
            @System "Echo InsrtPLD SIGNETIC.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 219 [= @Option ) 
            @System "Echo InsrtPLD TI.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf

        @System "Echo InsrtPLD UDEL.DEF >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
 
	    @If ( 221 [= @Option ) 
            @System "Echo InsrtPLD MACH110.ENC >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 222 [= @Option ) 
            @System "Echo InsrtPLD MACH210.ENC >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 223 [= @Option ) 
            @System "Echo InsrtPLD UDELM110.ENC >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf
	    @If ( 224 [= @Option ) 
            @System "Echo InsrtPLD UDELM210.ENC >> \\@OrCADESP\\VST\\LIBRARY\\MKMOD.BAT"
        @EndIf

        @Cls



                            OrCAD Modeling Tools


                           Installation Complete

                   Please read the file     @InDrive:\README.1ST
         for how to compile the PLD definition files you have installed.


        

        @Pause

    @EndIf

    @ChDrive @OutDrive
    @ChDir   "@OutDrive:\\@ORCADPROJ\\Template"

@EndFinish   
