home *** CD-ROM | disk | FTP | other *** search
- ''***************************************************************
- ''* This is the setup script for the Visual Basic Library for SQL Server
- ''*
- ''* Modification History
- ''*
- ''* Trish Millines-9/16/92- Upgraded to version 2.0 of Setup
- ''***************************************************************
-
- '$DEFINE DEBUG ''Define for script development/debugging
-
- '$INCLUDE 'setupapi.inc'
- '$INCLUDE 'msdetect.inc'
- '$INCLUDE 'mscpydis.inc' ''System
-
- ''Dialog ID's
- CONST WELCOME = 100
- CONST ASKQUIT = 200
- CONST DESTPATH = 300
- CONST EXITFAILURE = 400
- CONST EXITQUIT = 600
- CONST EXITSUCCESS = 700
- CONST OPTIONS = 800
-
- CONST CUSTHELP = 1000
- CONST WELCOMEHELP = 1200
- CONST PATHHELP = 1100
- CONST NOSELECTION = 1300
-
- CONST CUSTINST = 6200
- CONST TOOBIG = 6300
- CONST BADPATH = 6400
- CONST BILLBOARD = 4545
-
- ''Bitmap ID
- CONST LOGO = 1
-
- ''File Types
- CONST LIBFILES = 1 ''Library files
- CONST BROWSEFILES = 2 ''Browse Example files
- CONST TEXTFILES = 3 ''Text Example files
- CONST IMAGEFILES = 4 ''Image Example files
- CONST CURSORFILES = 5 ''Cursor Example files
- CONST QUERYFILES = 6 ''Query Example files
- CONST PROCFILES = 7 ''Shared Procedure files
- CONST INCLUDEFILE = 8 ''Include file
-
- GLOBAL DEST$ ''Default destination directory.
- GLOBAL WINDRIVE$ ''Windows drive letter.
- GLOBAL WINDOWSDIR$ ''Windows directory
-
- ''CustInst list symbol names
- GLOBAL LIBNEEDS$ ''Library needs
- GLOBAL BROWSENEEDS$ ''Browse Example needs
- GLOBAL IMAGENEEDS$ ''Image Example needs
- GLOBAL TEXTNEEDS$ ''Text Example needs
- GLOBAL CURSORNEEDS$ ''Cursor Example needs
- GLOBAL QUERYNEEDS$ ''Query Example needs
- GLOBAL PROCNEEDS$ ''Shared procedures needs
- GLOBAL EXTRACOSTS$ ''List of extra costs to add per drive
- GLOBAL BIGLIST$ ''List of option files cost calc results (boolean)
-
- ''Dialog list symbol names
- GLOBAL CHECKSTATES$
- GLOBAL STATUSTEXT$
- GLOBAL DRIVETEXT$
-
- DECLARE SUB AddOptFilesToCopyList (ftype%)
- DECLARE SUB RecalcOptFiles (ftype%)
- DECLARE SUB RecalcPath
- DECLARE SUB SetDriveStatus
- DECLARE SUB SetProcStatus
- DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
- DECLARE FUNCTION BitmapCntrlInit LIB "mscuistf.dll" as INTEGER
- DECLARE FUNCTION NeedProcFiles () AS INTEGER
-
- INIT:
- CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
- HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
- SQLTOOLS$ = "SQL Server Tools"
- SetBitmap CUIDLL$, LOGO
- SetTitle "Microsoft Visual Basic for SQL Server Tools Setup"
-
- szInf$ = GetSymbolValue("STF_SRCINFPATH")
- IF szInf$ = "" THEN
- szInf$ = GetSymbolValue("STF_CWDDIR") + "VBSQL.INF"
- END IF
- ReadInfFile szInf$
-
- WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
- WINDOWSDIR$ = GetWindowsDir()
- DEST$ = WINDRIVE$ + ":\sql"
-
- ''CustInst list symbols
- CHECKSTATES$ = "CheckItemsState"
- STATUSTEXT$ = "StatusItemsText"
- DRIVETEXT$ = "DriveStatusText"
- FOR i% = 1 to 7 STEP 1
- AddListItem CHECKSTATES$, "ON"
- NEXT i%
- FOR i% = 1 to 7 STEP 1
- AddListItem STATUSTEXT$, ""
- NEXT i%
- FOR i% = 1 to 7 STEP 1
- AddListItem DRIVETEXT$, ""
- NEXT i%
- ReplaceListItem DRIVETEXT$, 7, DEST$
-
- ''Disk cost list symbols
- LIBNEEDS$ = "LibraryNeeds"
- BROWSENEEDS$ = "BrowseNeeds"
- IMAGENEEDS$ = "ImageNeeds"
- TEXTNEEDS$ = "TextNeeds"
- CURSORNEEDS$ = "CursorNeeds"
- QUERYNEEDS$ = "QueryNeeds"
- PROCNEEDS$ = "ProcNeeds"
- EXTRACOSTS$ = "ExtraCosts"
- BIGLIST$ = "BigList"
- FOR i% = 1 to 7 STEP 1
- AddListItem BIGLIST$, ""
- NEXT i%
- FOR i% = 1 TO 26 STEP 1
- AddListItem EXTRACOSTS$, "0"
- NEXT i%
-
- RecalcPath
- SetDriveStatus
-
- WELCOME:
- sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", WELCOMEHELP, HELPPROC$)
- IF sz$ = "CONTINUE" THEN
- UIPop 1
- WELCOMEL1:
- IF InitSystem(1, "", 0) = 0 THEN
- GOSUB ASKQUIT
- GOTO WELCOMEL1
- END IF
- ELSE
- GOSUB ASKQUIT
- GOTO WELCOME
- END IF
-
- GETPATH:
- SetSymbolValue "EditTextIn", DEST$
- SetSymbolValue "EditFocus", "END"
- GETPATHL1:
- sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", PATHHELP, HELPPROC$)
- DEST$ = GetSymbolValue("EditTextOut")
-
- IF sz$ = "CONTINUE" THEN
- IF IsDirWritable(DEST$) = 0 THEN
- GOSUB BADPATH
- GOTO GETPATHL1
- END IF
- UIPop 1
- ELSEIF sz$ = "REACTIVATE" THEN
- GOTO GETPATHL1
- ELSE
- GOSUB ASKQUIT
- GOTO GETPATH
- END IF
-
- CUSTINST:
- ReplaceListItem DRIVETEXT$, 7, DEST$
- sz$ = UIStartDlg(CUIDLL$, CUSTINST, "FCustInstDlgProc", CUSTHELP, HELPPROC$)
-
- IF sz$ = "CONTINUE" THEN
- ''Install only if it will fit.
- FOR i% = 1 to 7 STEP 1
- IF GetListItem(BIGLIST$, i%) <> "" THEN
- GOSUB TOOBIG
- GOTO CUSTINST
- END IF
- NEXT i%
- UIPop 1
- GOTO CHECKSELECT
- ELSEIF sz$ = "PATH" THEN
- GOTO GETPATH
- ELSEIF sz$ = "REACTIVATE" THEN
- RecalcPath
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK1" THEN
- RecalcOptFiles LIBFILES
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK2" THEN
- RecalcOptFiles BROWSEFILES
- SetProcStatus
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK3" THEN
- RecalcOptFiles TEXTFILES
- SetProcStatus
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK4" THEN
- RecalcOptFiles IMAGEFILES
- SetProcStatus
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK5" THEN
- RecalcOptFiles CURSORFILES
- SetProcStatus
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK6" THEN
- RecalcOptFiles QUERYFILES
- SetProcStatus
- SetDriveStatus
- GOTO CUSTINST
- ELSE
- GOSUB ASKQUIT
- GOTO CUSTINST
- END IF
-
- CHECKSELECT:
- noselect% = 0
- IF GetListItem(CHECKSTATES$, LIBFILES) = "OFF" and NeedProcFiles() = 0 THEN
- noselect% = 1
- END IF
-
- IF noselect% = 1 then 'If they didn't select anything
- sz$ = UIStartDlg(CUIDLL$, NOSELECTION, "FInfo0DlgProc", 0, "")
- UIPop 1
- GOTO CUSTINST
- END IF
-
- CREATEDEST:
-
- SrcDir$ = GetSymbolValue("STF_SRCDIR")
- CreateDir DEST$, cmoVital ''Create the destination directory
- i% = SetSizeCheckMode(scmOff)
- DESTSAVE$ = DEST$ ''Save dest directory as the root path
- SetCopyGaugePosition 100, 100
-
- COPYLIBFILES:
- ClearCopyList ''Clear the copy list
- IF GetListItem(CHECKSTATES$, LIBFILES) = "ON" THEN
- DEST$ = DESTSAVE$ + "\bin"
- CreateDir DEST$, cmoVital ''Create the bin directory
- AddSectionFilesToCopyList "LibFiles", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
-
- DEST$ = DESTSAVE$ + "\dblib"
- CreateDir DEST$, cmoVital ''Create the dblib directory
- DEST$ = DEST$ + "\include"
- CreateDir DEST$, cmoVital ''Create the include directory
- AddSectionFilesToCopyList "IncludeFile", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
- END IF
-
- CHECKSAMPLES:
- If NeedProcFiles() = 1 THEN ''See if installing any examples
- DEST$ = DESTSAVE$ + "\dblib"
- CreateDir DEST$, cmoVital ''Create the dblib directory
- DEST$ = DEST$ + "\vsamples"
- CreateDir DEST$, cmoVital ''Create the vsamples directory
- SAMPDEST$ = DEST$
- DEST$ = SAMPDEST$ + "\gencode"
- CreateDir DEST$, cmoVital ''Create the destination directory
- AddSectionFilesToCopyList "ProcedureFiles", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
- END IF
-
- COPYBROWSEFILES:
- IF GetListItem(CHECKSTATES$, BROWSEFILES) = "ON" THEN
- DEST$ = SAMPDEST$ + "\browse"
- CreateDir DEST$, cmoVital ''Create the destination directory
- AddSectionFilesToCopyList "BrowseFiles", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
- END IF
-
- COPYTEXTFILES:
- IF GetListItem(CHECKSTATES$, TEXTFILES) = "ON" THEN
- DEST$ = SAMPDEST$ + "\text"
- CreateDir DEST$, cmoVital ''Create the destination directory
- AddSectionFilesToCopyList "TextFiles", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
- END IF
-
- COPYIMAGEFILES:
- IF GetListItem(CHECKSTATES$, IMAGEFILES) = "ON" THEN
- DEST$ = SAMPDEST$ + "\image"
- CreateDir DEST$, cmoVital ''Create the destination directory
- AddSectionFilesToCopyList "ImageFiles", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
- END IF
-
- COPYCURSORFILES:
- IF GetListItem(CHECKSTATES$, CURSORFILES) = "ON" THEN
- DEST$ = SAMPDEST$ + "\cursors"
- CreateDir DEST$, cmoVital ''Create the destination directory
- AddSectionFilesToCopyList "CursorFiles", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
- END IF
-
- COPYQUERYFILES:
- IF GetListItem(CHECKSTATES$, QUERYFILES) = "ON" THEN
- DEST$ = SAMPDEST$ + "\vbquery"
- CreateDir DEST$, cmoVital ''Create the destination directory
- AddSectionFilesToCopyList "QueryFiles", SrcDir$, DEST$
- CopyFilesInCopyList ''Copy the files
- ClearCopyList ''Clear the copy list
- END IF
-
-
- QUIT:
- ON ERROR GOTO ERRQUIT
-
- IF ERR = 0 THEN
- dlg% = EXITSUCCESS
- ELSEIF ERR = STFQUIT THEN
- dlg% = EXITQUIT
- ELSE
- dlg% = EXITFAILURE
- END IF
- QUITL1:
- sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
- IF sz$ = "REACTIVATE" THEN
- GOTO QUITL1
- END IF
- UIPop 1
-
- END
-
- ERRQUIT:
- i% = DoMsgBox("Setup sources were corrupted, call product support!", "Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
- END
-
- TOOBIG:
- sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "")
- IF sz$ = "REACTIVATE" THEN
- RecalcPath
- SetDriveStatus
- GOTO TOOBIG
- END IF
- UIPop 1
- RETURN
-
- BADPATH:
- sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
- IF sz$ = "REACTIVATE" THEN
- GOTO BADPATH
- END IF
- UIPop 1
- RETURN
-
-
-
- ASKQUIT:
- sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
-
- IF sz$ = "EXIT" THEN
- UIPopAll
- ERROR STFQUIT
- ELSEIF sz$ = "REACTIVATE" THEN
- GOTO ASKQUIT
- ELSE
- UIPop 1
- END IF
- RETURN
-
- '**
- '** Purpose:
- '** Adds the specified option files to the copy list.
- '** Arguments:
- '** ftype% - type of files to add, one of the following:
- '** ADMINFILES, OBJFILES, BASEFILES
- '** Returns:
- '** none.
- '*************************************************************************
- SUB AddOptFilesToCopyList (ftype%) STATIC
-
- SrcDir$ = GetSymbolValue("STF_SRCDIR")
-
- IF ftype% = PROCFILES THEN
- AddSectionFilesToCopyList "ProcedureFiles", SrcDir$, DEST$
- ELSEIF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
- IF ftype% = LIBFILES THEN
- AddSectionFilesToCopyList "LibFiles", SrcDir$, DEST$
- AddSectionFilesToCopyList "IncludeFile", SrcDir$, DEST$
- ELSEIF ftype% = BROWSEFILES THEN
- AddSectionFilesToCopyList "BrowseFiles", SrcDir$, DEST$
- ELSEIF ftype% = IMAGEFILES THEN
- AddSectionFilesToCopyList "ImageFiles", SrcDir$, DEST$
- ELSEIF ftype% = TEXTFILES THEN
- AddSectionFilesToCopyList "TextFiles", SrcDir$, DEST$
- ELSEIF ftype% = CURSORFILES THEN
- AddSectionFilesToCopyList "CursorFiles", SrcDir$, DEST$
- ELSEIF ftype% = QUERYFILES THEN
- AddSectionFilesToCopyList "QueryFiles", SrcDir$, DEST$
- END IF
- SrcDir$ = ""
- END IF
- END SUB
-
- '**
- '** Purpose:
- '** Recalculates disk space for the given option files and sets
- '** the status info symbol "StatusItemsText".
- '** Arguments:
- '** ftype% - type of files to add, one of the following:
- '** LIBFILES, BROWSEFILES, IMAGEFILES, TEXTFILES, CURSORFILES,
- '** QUERYFILES, PROCFILES
- '** Returns:
- '** none.
- '*************************************************************************
- SUB RecalcOptFiles (ftype%) STATIC
- CursorSave% = ShowWaitCursor()
- ClearCopyList
- AddOptFilesToCopyList ftype%
- DESTSAVE$ = DEST$
-
- fExtra% = 0
- IF ftype% = LIBFILES THEN
- ListSym$ = LIBNEEDS$
- IF GetListItem(CHECKSTATES$, LIBFILES) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- ELSEIF ftype% = BROWSEFILES THEN
- ListSym$ = BROWSENEEDS$
- DEST$ = DEST$ + "\dblib\vsamples\browse"
- IF GetListItem(CHECKSTATES$, BROWSEFILES) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- ELSEIF ftype% = IMAGEFILES THEN
- ListSym$ = IMAGENEEDS$
- IF GetListItem(CHECKSTATES$, IMAGEFILES) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- ELSEIF ftype% = TEXTFILES THEN
- ListSym$ = TEXTNEEDS$
- IF GetListItem(CHECKSTATES$, TEXTFILES) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- ELSEIF ftype% = CURSORFILES THEN
- ListSym$ = CURSORNEEDS$
- IF GetListItem(CHECKSTATES$, CURSORFILES) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- ELSEIF ftype% = QUERYFILES THEN
- ListSym$ = QUERYNEEDS$
- IF GetListItem(CHECKSTATES$, QUERYFILES) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- ELSEIF ftype% = PROCFILES THEN
- ListSym$ = PROCNEEDS$
- END IF
-
- StillNeed& = GetCopyListCost(EXTRACOSTS$, ListSym$, "")
-
- cost& = 0
- FOR i% = 1 TO 26 STEP 1
- cost& = cost& + VAL(GetListItem(ListSym$, i%))
- NEXT i%
- ReplaceListItem STATUSTEXT$, ftype%, STR$(cost& / 1024) + " K"
-
- IF StillNeed& > 0 THEN
- ReplaceListItem BIGLIST$, ftype%, "YES"
- ELSE
-
- ReplaceListItem BIGLIST$, ftype%, ""
- END IF
-
- IF fExtra% THEN
- ReplaceListItem EXTRACOSTS$, ndrive%, "0"
- END IF
- RestoreCursor CursorSave%
- ListSym$ = ""
- DEST$ = DESTSAVE$
- END SUB
-
- '**
- '** Purpose:
- '** Recalculates disk space and sets option status info according
- '** to the current destination path.
- '** Arguments:
- '** none.
- '** Returns:
- '** none.
- '*************************************************************************
- SUB RecalcPath STATIC
-
- CursorSave% = ShowWaitCursor()
-
- RecalcOptFiles LIBFILES
- RecalcOptFiles PROCFILES
- RecalcOptFiles IMAGEFILES
- RecalcOptFiles TEXTFILES
- RecalcOptFiles CURSORFILES
- RecalcOptFiles QUERYFILES
- RecalcOptFiles BROWSEFILES
-
- RestoreCursor CursorSave%
- END SUB
-
-
- '**
- '** Purpose:
- '** Sets drive status info according to latest disk space calcs.
- '** Arguments:
- '** none.
- '** Returns:
- '** none.
- '*************************************************************************
- SUB SetDriveStatus STATIC
-
- drive$ = MID$(DEST$, 1, 1)
- ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
- cost& = VAL(GetListItem(LIBNEEDS$, ndrive%)) + VAL(GetListItem(BROWSENEEDS$, ndrive%)) + VAL(GetListItem(IMAGENEEDS$, ndrive%))
- cost& = cost& + VAL(GetListItem(TEXTNEEDS$, ndrive%)) + VAL(GetListItem(CURSORNEEDS$, ndrive%))
- cost& = cost& + VAL(GetListItem(QUERYNEEDS$, ndrive%)) + VAL(GetListItem(PROCNEEDS$, ndrive%))
- free& = GetFreeSpaceForDrive(drive$)
-
- ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
- ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
- ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
-
- IF drive$ = WINDRIVE$ THEN
- ReplaceListItem DRIVETEXT$, 4, ""
- ReplaceListItem DRIVETEXT$, 5, ""
- ReplaceListItem DRIVETEXT$, 6, ""
- ELSE
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- cost& = VAL(GetListItem(LIBNEEDS$, ndrive%)) + VAL(GetListItem(BROWSENEEDS$, ndrive%)) + VAL(GetListItem(IMAGENEEDS$, ndrive%))
- cost& = cost& + VAL(GetListItem(TEXTNEEDS$, ndrive%)) + VAL(GetListItem(CURSORNEEDS$, ndrive%))
- cost& = cost& + VAL(GetListItem(QUERYNEEDS$, ndrive%)) + VAL(GetListItem(PROCNEEDS$, ndrive%))
- IF cost& = 0 THEN
- ReplaceListItem DRIVETEXT$, 4, ""
- ReplaceListItem DRIVETEXT$, 5, ""
- ReplaceListItem DRIVETEXT$, 6, ""
- ELSE
- free& = GetFreeSpaceForDrive(WINDRIVE$)
- ReplaceListItem DRIVETEXT$, 4, WINDRIVE$ + ":"
- ReplaceListItem DRIVETEXT$, 5, STR$(cost& / 1024) + " K"
- ReplaceListItem DRIVETEXT$, 6, STR$(free& / 1024) + " K"
- END IF
- END IF
- END SUB
-
- '**
- '** Purpose:
- '** Appends a file name to the end of a directory path,
- '** inserting a backslash character as needed.
- '** Arguments:
- '** szDir$ - full directory path (with optional ending "\")
- '** szFile$ - filename to append to directory
- '** Returns:
- '** Resulting fully qualified path name.
- '*************************************************************************
- FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
- IF szDir$ = "" THEN
- MakePath = szFile$
- ELSEIF szFile$ = "" THEN
- MakePath = szDir$
- ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
- MakePath = szDir$ + szFile$
- ELSE
- MakePath = szDir$ + "\" + szFile$
- END IF
- END FUNCTION
-
- '**
- '** Purpose:
- '** Checks to see if we need to consider the common procedure files
- '** for either copying or checking disk space.
- '**
- '** Arguments: NONE
- '** Returns:
- '** 1 if need it or 0 if don't. Based on if any of the
- '** example files were picked
- '*************************************************************************
- FUNCTION NeedProcFiles () STATIC AS INTEGER
- NeedProcFiles = 0
- IF GetListItem(CHECKSTATES$, BROWSEFILES) = "ON" THEN
- NeedProcFiles = 1
- ELSEIF GetListItem(CHECKSTATES$, TEXTFILES) = "ON" THEN
- NeedProcFiles = 1
- ELSEIF GetListItem(CHECKSTATES$, IMAGEFILES) = "ON" THEN
- NeedProcFiles = 1
- ELSEIF GetListItem(CHECKSTATES$, CURSORFILES) = "ON" THEN
- NeedProcFiles = 1
- ELSEIF GetListItem(CHECKSTATES$, QUERYFILES) = "ON" THEN
- NeedProcFiles = 1
- END IF
- END FUNCTION
-
- '**
- '** Purpose:
- '** Changes the status of the Procedure files to ON or OFF
- '** based on if any of the examples were chosen.
- '**
- '** Arguments: NONE
- '** Returns: NONE
- '*************************************************************************
- SUB SetProcStatus STATIC
-
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- IF NeedProcFiles () = 0 THEN
- ReplaceListItem STATUSTEXT$, 7, "0 K"
- ReplaceListItem PROCNEEDS$, ndrive%, "0"
- ELSE
- RecalcOptFiles PROCFILES
- END IF
- END SUB
-