home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 4 Drivers
/
04-Drivers.zip
/
kipp212.zip
/
RUNOS2.INF
< prev
Wrap
Text File
|
1995-10-04
|
19KB
|
733 lines
;;
;; Installation script for KIPP 2.12 DRIVER files
;;
;; NOTE: This program must be 'compiled' by 'awk' using the
;; 'build.awk' program. The 'compiler' supports the
;; following C-style preprocessor commands:
;;
;; #include "file-name"
;; #define FLAG
;; #ifdef FLAG Nesting of #ifdef or #ifndef is
;; #ifndef FLAG not allowed
;; #else No parameter, but rest of line
;; #endif ignored, allowing "#endif FLAG"
;;
;; The awk/builder ('compiler') also allows arguments
;; on the command line to define flags:
;;
;; AWK -F BUILD.AWK MAIN.STF WIN > KIPP20.INF
;;
;;
;; Variable definitions for KIPPII installation script
;;
DefineVariables
Number [TmpCount] := 0 ;; Temporary count.
Number [NumEngs] := 0 ;; Number of engines currently configured.
Number [CurEng] := 0 ;; Current engine.
Number [NumKIPPSW] := 0 ;; Number of configured KIPP S/W engines.
Number [Num910] := 0 ;; Number of configured KF-910 engines.
Number [MaxEngines] := 4
Number [Menu1] := 1 ;; Kofax Toolkit/Driver Installation menu
Number [Menu2] := 1 ;; Kofax Scanner Configuration
Number [Menu3] := 1 ;; Select Target Directories menu
Number [Menu4] := 1 ;; Kofax Software Installation menu
Number [Menu5] := 1 ;; Kofax Engine Type to Add menu
Number [Menu11] := 1
Number [Menu12] := 1
Number [Flag] := 0 ;; Has the configuration changed?
Number [InstallBIN] := 0 ;; Did we install to the BIN directory?
Number [NeedFFPort] := 0 ;; Does this printer need an external
;; port for the Form-Feed?
Number [IsMCA] := 0 ;; Is this machine a Micro Channel Architecture machine?
Number [PBoard] := 0
Number [PrinterPort] := 0
Number [PrinterMem] := 0
Number [SBoard] := 0
Text [FileBIC_CFG] := ""
Text [FileBIC_CMD] := ""
Text [FileLOADFW] := ""
Text [FileKIPPCFG_CFG] := ""
Text [FileBICLDR] := ""
Text [PMake] := ""
Text [PModel] := ""
Text [PModelId] := ""
Text [PPort] := ""
Text [PDesc] := ""
Text [SMake] := ""
Text [SModel] := ""
Text [SDesc] := ""
Text [SOptions] := ""
Text [Type] := ""
Text [IOPorts] := ""
Text [Interrupt] := ""
Text [LogicalName] := ""
Text [CommandFile] := ""
Text [Engine1] := ""
Text [Peri1] := ""
Text [TempText21] := ""
Text [Engine2] := ""
Text [Peri2] := ""
Text [TempText22] := ""
Text [Engine3] := ""
Text [Peri3] := ""
Text [TempText23] := ""
Text [Engine4] := ""
Text [Peri4] := ""
Text [TempText24] := ""
Text [OneSpace] := " "
Text [TempText] := ""
Text [MainTitle] := ""
Text [FilePR_INI] := ""
Text [FileSC_INI] := ""
Text [DefPaperSize] := ""
EndDefineVariables
[MainTitle] := "KIPP 2.12 Driver Installation For OS/2"
;;
;; Common exit routine
;;
;;
;; Check if user really wants to exit
;;
Procedure CheckExit
Dialog [YesOrNo1] WhiteOnRed
Do you really want to exit this program?
EndDialog
If [YesOrNo1] = YesCharacter
SoLong
EndIf
EndProcedure
;;
;; Common initialization code
;;
SetAllowExit Off
LetButton <Esc> Do CheckExit
SetMainBorderTo wide
SetTopLineTo [MainTitle]
SetReplacementInquiry off
SetReadOnlyInquiry on
If OS2
Else
Dialog WhiteOnRed
This installation utility is designed
to be run from an OS/2 command shell not
from a DOS command shell.
EndDialog
SoLong
Endif
Dialog
BlankString
Welcome to the Kofax Image Products KIPP
installation procedure. Please read all the
instructions at each step before proceeding.
Pressing the <Esc> key at any time will abort
the installation procedure.
EndDialog
[FileBIC_CFG] := EnvironmentStringFor BICCFG
[String1] := [FileBIC_CFG]
Do BreakPath
[FileKIPPCFG_CFG] := [String3]\KIPPCFG.CFG
Do GetDirsFromKIPPCFG_CFG
If [Dir1] <> BlankString
Dialog [YesOrNo1]
An existing KIPP installation has been found.
The following directories will be used for the
installation unless you wish to change them:
BlankString
Base directory: [InstallationDirectory]
DRIVER directory: [Dir1]
BIN directory: [Dir2]
IMGS directory: [Dir3]
BlankString
Do you wish to use these same directories?
EndDialog
If [YesOrNo1] = NoCharacter
[Dir1] := BlankString
Endif
Endif
If [Dir1] = BlankString
Do SetDirectories
Do GetDir1
Do GetDir2
Do GetDir3
Endif
[Menu1] := 1
:Start
GetMenuChoice Highlight [Menu1] UseHeader "Kofax Driver Installation"
1. View README.TXT File
; This file contains the latest information
; regarding this Kofax product.
2. Change Target directory and drive
; Current target directory is [InstallationDirectory].
3. Install KIPP software
; Create directories as necessary and
; copy driver files, runtime libraries
; and sample programs to your system.
4. Exit
; Exit the program.
EndGetMenuChoice
InCase Choice is
=1:
[Menu1] := 3
LetButton <Esc> Do Nothing
BrowseFile [InstallFromDirectory]README.TXT UseHeader "Kofax README File - Use <Esc> to Exit"
LetButton <Esc> Do CheckExit
GoTo Start
=2:
[Menu1] := 3
Do ChangeDirectories
GoTo Start
=3:
[Menu1] := 4
Do SoftwareInstall
GoTo Start
=4:
Do Finish
EndInCase
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; SETDIRS.STF -- Set/Change the runtime directories.
;;
;;
;; SetDirectories
;;
;; Variable Default Description
;;
;; [ Dir1 ] DRIVER Driver/FW directory
;; [ Dir2 ] BIN Runtime, Tools, Sample programs
;; [ Dir3 ] BIN Sample images
;;
Procedure SetDirectories
[InstallationDirectory] := C:\KIPP
DetermineInstallationDirectory
[Dir1] := [InstallationDirectory]\DRIVER
[Dir2] := [InstallationDirectory]\BIN
[Dir3] := [InstallationDirectory]\BIN
EndProcedure ;; SetDirectories
;;
;; ChangeDirectories
;;
;; o Dir1 -- Driver/FW directory
;; o Dir2 -- Sample programs
;; o Dir3 -- Sample images
;;
Procedure ChangeDirectories
[Menu3] := 1
:ChangeDir_1
GetMenuChoice Highlight [Menu3] UseHeader "Select Target Directories"
1. Change Base Directory and/or Drive
; Current: '[InstallationDirectory]'
; WARNING! All subdirectories will be
; set to back to their default paths
; relative to the base directory.
2. Change Driver Directory
; Current: '[Dir1]'
; Select directory for firmware,
; drivers, and configuration files.
3. Change Runtime Directory
; Current: '[Dir2]'
; Select directory for runtime files,
; tools, and sample programs.
4. Change Sample Images Directory
; Current: '[Dir3]'
; Select directory for sample
; image files.
5. Return to previous menu
EndGetMenuChoice
InCase Choice is
=1:
[Menu3] := 2
Do SetDirectories
GoTo ChangeDir_1
=2:
[Menu3] := 3
Do GetDir1
GoTo ChangeDir_1
=3:
[Menu3] := 4
Do GetDir2
GoTo ChangeDir_1
=4:
[Menu3] := 5
Do GetDir3
GoTo ChangeDir_1
=5:
Exit
EndInCase
EndProcedure ;; ChangeDirectories
Procedure GetDir1
Dialog [Dir1] 63 UseHeader "Select Driver Directory" UpperCase
Select the target directory for firmware, drivers
and firmware loader command files.
EndDialog
EndProcedure ;; GetDir1
Procedure GetDir2
Dialog [Dir2] 63 UseHeader "Select Runtime Directory" UpperCase
Select the target directory for the runtime files, tools,
sample programs and engine configuration files.
EndDialog
EndProcedure ;; GetDir2
Procedure GetDir3
Dialog [Dir3] 63 UseHeader "Select Sample Image Directory" UpperCase
Select the target directory for the sample image files.
EndDialog
EndProcedure ;; GetDir3
;;
;; StripTrailingBackSlash -- Removes any trailing backslash characters from
;; [String1].
;;
;; Inputs: [String1]
;; Outputs: [String1]
;;
;;
Procedure StripTrailingBackSlash
[Number1] := LengthOf [String1]
If [Number1] > 0
[String4] := SubstringOf [String1] from [Number1] to END
DecrementNumber [Number1]
[Number2] := PositionOf "\" in [String4]
If [Number2] > 0
[String1] := SubstringOf [String1] from START to [Number1]
EndIf
Endif
EndProcedure ;; StripTrailingBackSlash
;;
;; Break [String1] into its component parts:
;;
;; [String3] becomes 'DRIVE:\DIR\..\SUBDIR'
;; [String4] becomes 'FILENAME.EXT'
;;
Procedure BreakPath
Do StripTrailingBackSlash
[String4] := [String1]
:BreakPath_1
;;
;; Find File Name Loop
;;
[Number1] := PositionOf "\" in [String4]
If [Number1] > 0
IncrementNumber [Number1]
[String4] := SubstringOf [String4] from [Number1] to END
GoTo BreakPath_1
EndIf
If [String4] = BlankString
[String3] := BlankString
Else
[Number1] := PositionOf [String4] in [String1]
DecrementNumber [Number1]
DecrementNumber [Number1]
[String3] := SubstringOf [String1] from BEGINNING to [Number1]
Endif
EndProcedure ;; BreakPath
;;
;; WriteKIPPCFG
;;
;; Write KIPPCFG.CFG based on current directory settings.
;;
Procedure WriteKIPPCFG
[FileKIPPCFG_CFG] := [Dir2]\KIPPCFG.CFG
CreateDirectoryIfNecessary [Dir2]
DeleteFiles from [Dir2] Quietly
KIPPCFG.CFG
EndDeleteFiles
CreateFile [FileKIPPCFG_CFG]
AppendFile [FileKIPPCFG_CFG]
REM
REM KIPPCFG.CFG - The KIPP Driver Configuration settings file.
REM This file contains the directory settings used by
REM the installation program.
REM WARNING: Do NOT delete or modify this file or the BIC.CFG file.
REM
BASE=[InstallationDirectory]
BIN=[Dir2]
IMGS=[Dir3]
DRIVER=[Dir1]
EndAppendFile
EndProcedure ;; WriteKIPPCFG
;;
;; GETDIRS.STF -- Get the runtime directories from the KIPPCFG.CFG file.
;;
;;
;; Variable Default Description
;;
;; [ Dir1 ] DRIVER Driver/FW directory
;; [ Dir2 ] BIN Runtime, Tools, Sample programs
;; [ Dir3 ] BIN Sample images
;;
;;
;; GetDirsFromKIPPCFG_CFG
;;
;; Read the directories from the KIPPCFG.CFG file.
;; Set [Dir1], [Dir2], and [Dir3].
;;
;;
Procedure GetDirsFromKIPPCFG_CFG
If FileExists [FileKIPPCFG_CFG]
ExamineTextFile [FileKIPPCFG_CFG]
[TmpCount] := LineNumberWith (BASE=,,)
If [TmpCount] > 0
[TempText] := Line [TmpCount]
[TempText] := SubstringOf [TempText] from 6 to end
[InstallationDirectory] := [TempText]
Endif
[TmpCount] := LineNumberWith (DRIVER=,,)
If [TmpCount] > 0
[TempText] := Line [TmpCount]
[Dir1] := SubstringOf [TempText] from 8 to end
Endif
[TmpCount] := LineNumberWith (BIN=,,)
If [TmpCount] > 0
[TempText] := Line [TmpCount]
[Dir2] := SubstringOf [TempText] from 5 to end
Endif
[TmpCount] := LineNumberWith (IMGS=,,)
If [TmpCount] > 0
[TempText] := Line [TmpCount]
[Dir3] := SubstringOf [TempText] from 6 to end
Endif
ForgetTextFile
Else
[InstallationDirectory] := BlankString
[Dir1] := BlankString
[Dir2] := BlankString
[Dir3] := BlankString
EndIf ;; FileExists
EndProcedure ;; GetDirsFromKIPPCFG_CFG
;;
;; Software Install
;;
;; o Select destination directories
;; o Select software groups to be installed
;; o Install software
;;
Procedure SoftwareInstall
[Menu4] := 1
:SWInstall_1
GetMenuChoice Highlight [Menu4] UseHeader "Kofax Software Installation"
1. Complete Software Install
; Proceed with complete installation.
2. Install Selected Software
; Choose software to be installed
; from one or more software groups.
3. Return to previous menu
EndGetMenuChoice
InCase Choice is
=1:
Do InstallAll
[Menu4] := 3
=2:
[Menu4] := 3
Do SelectSoftware
=3:
Exit
EndInCase
GoTo SWInstall_1
EndProcedure ;; SoftwareInstall
;;
;; InstallAll -- install all software.
;;
Procedure InstallAll
Dialog [YesOrNo1] UseHeader "Install All Software"
Ready to install ALL software file groups. This will
extract and copy the files to their target directories.
BlankString
Install Software Now?
EndDialog
If [YesOrNo1] = YesCharacter
OpenCopyWindow
CopyFiles quietly
@7055.ADF
@7054.ADF
README.TXT
EndCopyFiles
CopyFiles to [Dir2]
INSTALL.EXE as KIPPCFG.EXE
EndCopyFiles
CloseCopyWindow
QueAllFiles
GetQuedFiles OnePerLine
Do WriteKIPPCFG
Else
UnQueAllFiles
Endif
EndProcedure ;; InstallAll
;;
;; Select Software
;;
;; o Select software group(s) to be installed
;;
Procedure SelectSoftware
:SelectSW_1
UnQueAllFiles
[InstallBIN] := 1
SetBottomLineTo "Use <SPACE> to select/deselect options, <ENTER> to proceed."
GetMenuChoice PreselectAll AllowIfNone UseHeader "Install Software Group"
Install Driver Files to '[Dir1]'
; Extract and install firmware,
; and driver files.
Install Runtime Files to '[Dir2]'
; Extract and install runtime files,
; tools, and sample programs.
Install Sample Images to '[Dir3]'
; Extract and install sample image files.
EndGetMenuChoice
InCase Choice is
=1:
QueFileGroup 1
=2:
QueFileGroup 2
[InstallBIN] := 1
=3:
QueFileGroup 3
EndInCase
SetBottomLineTo BlankString
If QueSize = 0
Exit
EndIf
Dialog [YesOrNo1] UseHeader "Install Selected Software"
Ready to install selected software file groups. This will
extract and copy the files to their target directories.
BlankString
Install Software Now?
EndDialog
If [YesOrNo1] = YesCharacter
If [InstallBIN] = 1
OpenCopyWindow
CopyFiles to [Dir2]
INSTALL.EXE as KIPPCFG.EXE
EndCopyFiles
CloseCopyWindow
Endif
CopyFiles to [Dir2] quietly
@7055.ADF
@7054.ADF
README.TXT
EndCopyFiles
GetQuedFiles OnePerLine
Do WriteKIPPCFG
Else
UnQueAllFiles
Endif
EndProcedure ;; SelectSoftware
;;
;; RUNAUTO.STF -- KIPP 2.1 installation routines to update the AUTOEXEC.BAT
;; file.
;;
;;
;; UpdateAutoExec
;;
;; Add following items to environment:
;;
;; PATH gets [Dir2]
;;
;; Also: Add LOADFW command to AUTOEXEC.BAT
;;
Procedure UpdateAutoExec
Dialog PressAKey UseHeader "Configuration Instructions"
BlankString
.C*** IMPORTANT INSTRUCTIONS ***
BlankString
Use a text editor to make the following changes to your CONFIG.SYS and
STARTUP.CMD files:
BlankString
CONFIG.SYS:
.I1) Add [Dir2] to your LIBPATH setting.
.I2) Add [Dir2] to your PATH setting.
.I3) Add the line: DEVICE=[Dir2]\BIC.SYS
BlankString
STARTUP.CMD:
.I1) Add a line where appropriate to CALL [Dir2]\LOADFW.
BlankString
For your convenience these instructions have been placed in the file:
.I[Dir2]\CONFIG.DOC.
BlankString
EndDialog
;; Create the file containing the instructions for modifying their configuration files.
;; Use the "ModifyTextFile" command because the "AppendFile" command causes a TRAP 000D
;; when using the bound version 3.05C of Instalit.
CreateFile [Dir2]\CONFIG.DOC
ModifyTextFile [Dir2]\CONFIG.DOC NoClone NoBackup
InsertAtLine END " "
InsertAtLine END "FILE: [Dir2]\CONFIG.DOC"
InsertAtLine END " "
InsertAtLine END "PURPOSE: Provide instructions for configuring your system for use"
InsertAtLine END " with your KIPP-based OS/2 2.x application."
InsertAtLine END " "
InsertAtLine END "INSTRUCTIONS:"
InsertAtLine END " "
InsertAtLine END " Step 0:"
InsertAtLine END " Make sure that you have a boot diskette in case you make a mistake"
InsertAtLine END " while editing your CONFIG.SYS or STARTUP.CMD file."
InsertAtLine END " "
InsertAtLine END " Step 1:"
InsertAtLine END " The directory containing the KIPP DLLs (Dynamic Link Libraries) must be"
InsertAtLine END " in your LIBPATH setting. This can only be set in your CONFIG.SYS file."
InsertAtLine END " "
InsertAtLine END " Modify your CONFIG.SYS file as follows:;"
InsertAtLine END " "
InsertAtLine END " Add [Dir2] to your LIBPATH setting."
InsertAtLine END " "
InsertAtLine END " Step 2:"
InsertAtLine END " The directory containing your KIPP-based application must be in your"
InsertAtLine END " PATH setting. This can be set in your CONFIG.SYS file or in your "
InsertAtLine END " STARTUP.CMD file (This file is found in the same directory as your"
InsertAtLine END " CONFIG.SYS file. If you do NOT have a STARTUP.CMD file you will need to"
InsertAtLine END " modify your CONFIG.SYS file for Step 2.)"
InsertAtLine END " "
InsertAtLine END " Modify your CONFIG.SYS file (our recommendation) or your"
InsertAtLine END " STARTUP.CMD file as follows:"
InsertAtLine END " "
InsertAtLine END " Add [Dir2] to your PATH setting."
InsertAtLine END " "
InsertAtLine END " Step 3:"
InsertAtLine END " If you are using a Kofax hardware controller then you will need"
InsertAtLine END " to modify your CONFIG.SYS file to load the Kofax hardware"
InsertAtLine END " controller device driver as follows:"
InsertAtLine END " "
InsertAtLine END " Add the line: DEVICE=[Dir2]\BIC.SYS"
InsertAtLine END " "
InsertAtLine END " Step 4:"
InsertAtLine END " You will need to modify your STARTUP.CMD file to initialize"
InsertAtLine END " the firmware for the controllers as follows:"
InsertAtLine END " "
InsertAtLine END " Add the line: CALL [Dir2]\LOADFW."
InsertAtLine END " "
InsertAtLine END " Step 5:"
InsertAtLine END " Re-boot your computer."
InsertAtLine END " "
InsertAtLine END "END OF INSTRUCTIONS."
EndModifyTextFile
LetButton <Esc> Do Nothing
BrowseFile [Dir2]\CONFIG.DOC UseHeader "Kofax Configuration Instructions - Use <Esc> to Exit"
LetButton <Esc> Do CheckExit
EndProcedure ;; UpdateAutoExec
;;
;; Finish Installation:
;;
;; o Save Changes, etc.
;;
Procedure Finish
If [Flag] <> 0
Do UpdateAutoExec
EndIf
Dialog
Installation now complete.
BlankString
Please run the configuration program:
BlankString
.IKIPPCFG.EXE in [Dir2].
EndDialog
SoLong
EndProcedure ;; Finish