home *** CD-ROM | disk | FTP | other *** search
- ;;***************************************************************
- ;;* This is the setup script for the VBSQL Library
- ;;*
- ;;* Modification History
- ;;*
- ;;* Trish Millines-12/18
- ;;***************************************************************
-
- [Shell Commands]
-
- ;; INITIALIZE THE SETUP
- ;; NOTE: All dialogs are placed in the exact order that they occur
-
- set-title "Microsoft Visual Basic Library for SQL Server Setup"
- Init-System ;; Copy Disincentive's Get Name/Org
- read-syms "General Variables"
- read-syms "Size Variables"
- set-subst QuitText1 = $(QuitText1)
-
- ;; DISPLAY THE WELCOME SCREEN
-
- welcome = read-syms "Welcome Variables"
- set-subst QuitText1 = $(QuitText1)
- ui start QUIT
- ifstr $(DLGEVENT) == "CONTINUE"
- ui pop 1
- else
- exit
- endif
-
-
- ;; LET THE USER SELECT THE APP(S) TO INSTALL
- ;; NOTE: In the future, this will have to be changed as each tool is added
-
- select-features = read-syms "Feature Selection"
- set-subst ChkBoxTitle = $(ChkBoxTitle)
- set CHECK2 = {ON,ON} ;; CHECK the number of check boxes
- set CheckItemsIn = $(CHECK2)
-
- ui start CHECK2
-
- set CHECK2 = $(CheckItemsOut)
- ifstr $(DLGEVENT) == "CONTINUE"
- ifstr $(CHECK2) == {ON,ON}
- set TotalDiskSpaceNeeded = 310000
- set InstallLibrary = "YES"
- set InstallExamples = "YES"
- else-ifstr $(CHECK2) == {ON,OFF}
- set TotalDiskSpaceNeeded = 215000
- set InstallLibrary = "YES"
- set InstallExamples = "NO"
- else-ifstr $(CHECK2) == {OFF,ON}
- set TotalDiskSpaceNeeded = 95000
- set InstallLibrary = "NO"
- set InstallExamples = "YES"
- endif
- ui pop 1
- else ;; $(DLGEVENT) == "EXIT"
- set CurrentDialog = "select-features"
- goto "quit"
- endif
-
-
- ;; GET THE PATH TO INSTALL THE Library ON
-
- get-dest = read-syms "Get Path Variables"
- set-subst GetPText2 = $(GetPText2)
- set-subst HelpText1 = $(HelpText1)
- set EditTextIn = $(DEST)
- set EditFocus = "END"
-
- ui start GETPATH
- set DEST = $(EditTextOut)
-
- ifstr $(DLGEVENT) == "CONTINUE" ;; Did user press Continue
- ui pop 1
- else
- set CurrentDialog = "get-dest" ;; User pressed Quit
- goto "quit"
- endif
-
-
- ;; THIS ROUTINE CHECKS TO SEE IF THE DIRECTORY EXISTS
-
- check-directory-exists = +
- detect "Detect Directory Variables" ;; See if Directory exists
- ifstr $(DirectoryThere) == "NO"
- goto "bad-path"
- endif
-
-
- ;; IF THERE IS NOT ENOUGH DISK SPACE, THEN EXIT
-
- check-disk-space = +
- detect "Detect Disk Variables" ;; Get disk space available
- ifint $(TotalDiskSpaceNeeded) >= $(SpaceLeft)
- worksta-info = read-syms "Not Enough Disk Space"
- set-subst InfoText1 = $(InfoText1)
- ui start INFO3
- exit
- endif
-
-
- ;; THIS DIALOG IS DISPLAYED WHILE FILE COPY IS GOING ON
-
- inst = install "Install Script"
- ifstr $(STF_INSTALL_OUTCOME) == "STF_SUCCESS"
- read-syms "Exit-Success Message Variables"
- else-ifstr $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
- read-syms "Exit-UserQuit Message Variables"
- else
- read-syms "Exit-Failure Message Variables"
- endif
-
- ui start INFO1
- ui pop 1
- exit
-
-
- ;; THIS DIALOG IS FOR WHEN USER PRESSES QUIT EARLY
-
- quit = read-syms "Quit Variables"
- ui start QUIT
- ifstr $(DLGEVENT) == "CONTINUE"
- ui pop 1
- goto $(CurrentDialog)
- else
- exit
- endif
-
-
- ;; THIS DIALOG IS FOR WHEN THE DIRECTORY DOESN'T EXIST
-
- bad-path = read-syms "Bad Path Variables"
- set-subst GetPTitle = $(GetPTitle)
- set-subst GetPText2 = $(GetPText2)
- ui start QUIT
- ifstr(I) $(DLGEVENT) == "CONTINUE" ;; User wants to create directory
- ui pop 1
- set NewDir = "YES"
- goto "check-disk-space"
- else ;; User doesn't want to create new dir
- ui pop 1
- goto "get-dest" ;; Go get a new path
- endif
-
- ;; ************** DESCRIPTION OF FILES ****************
-
- [Source Media Descriptions]
- 1 = "Visual Basic Library for SQL Server"
-
- ;; NOTE: For each release of the product, the DATE and VERSION values must be set
-
- [Library]
- 1,vbsql.vb_,SIZE=75000,RENAME=vbsql.vbx,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- [IncludeFile]
- 1,vbsql.b_,SIZE=2200,RENAME=vbsql.bi,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- [SqlDLLs]
- 1,w3dblib.dl_,SIZE=157000,BACKUP="w3dblib.oss",RENAME=w3dblib.dll,DATE=1992-03-13,SETTIMESTAMP
- 1,dbnmp3.dl_,SIZE=8000,BACKUP="dbnmp3.oss",RENAME=dbnmp3.dll,DATE=1992-03-13,SETTIMESTAMP
- [GenCode]
- 1,login.frm,SIZE=3800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,chngdb.frm,SIZE=1300,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,vbsqlgen.bas,SIZE=12000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,genglob.bas,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,about.frm,SIZE=600,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- [Cursors]
- 1,cursors.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,cursors.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,cursors.bas,SIZE=23000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,cursors.frm,SIZE=19000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- [Browse]
- 1,blogin.frm,SIZE=4500,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,browse.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,browse.frm,SIZE=11000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,browse.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,browse.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- [Text]
- 1,text.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,text.frm,SIZE=13000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,text.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,text.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- [Image]
- 1,image.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,image.frm,SIZE=13000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,image.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,image.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- [Query]
- 1,vbquery.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,vbquery.frm,SIZE=4500,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,query.frm,SIZE=3900,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,rpc.frm,SIZE=7000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
- 1,vbquery.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
-
- ;; ************** ACTUAL INSTALL SCRIPT ******************
-
- [Install Script]
-
- Ifstr $(NewDir) == "YES" ;; If directory doesn't exist
- CreateDir $(DEST)
- endif
- Ifstr $(InstallLibrary) == "YES" ;; If installing library
- CreateDir $(DEST)\bin
- CreateDir $(DEST)\dblib
- CreateDir $(DEST)\dblib\include
- endif
- Ifstr $(InstallExamples) == "YES" ;; If installing examples
- CreateDir $(DEST)\dblib
- CreateDir $(DEST)\dblib\vsamples
- CreateDir $(DEST)\dblib\vsamples\gencode
- CreateDir $(DEST)\dblib\vsamples\cursors
- CreateDir $(DEST)\dblib\vsamples\browse
- CreateDir $(DEST)\dblib\vsamples\text
- CreateDir $(DEST)\dblib\vsamples\image
- CreateDir $(DEST)\dblib\vsamples\vbquery
- endif
-
- ;; THIS SECTION WILL COPY THE FILES TO THE DISK
-
- Ifstr $(InstallLibrary) == "YES" ;; If installing library
- AddSectionFilestoCopyList "Library" $(STF_SRCDIR) $(DEST)\bin
- CopyFilesInCopyList
- AddSectionFilestoCopyList "IncludeFile" $(STF_SRCDIR) $(DEST)\dblib\include
- CopyFilesInCopyList
- AddSectionFilestoCopyList "SqlDLLs" $(STF_SRCDIR) $(DEST)\bin
- CopyFilesInCopyList
- endif
- Ifstr $(InstallExamples) == "YES" ;; If installing examples
- AddSectionFilestoCopyList "GenCode" $(STF_SRCDIR) $(DEST)\dblib\vsamples\gencode
- CopyFilesInCopyList
- AddSectionFilestoCopyList "Cursors" $(STF_SRCDIR) $(DEST)\dblib\vsamples\cursors
- CopyFilesInCopyList
- AddSectionFilestoCopyList "Browse" $(STF_SRCDIR) $(DEST)\dblib\vsamples\browse
- CopyFilesInCopyList
- AddSectionFilestoCopyList "Text" $(STF_SRCDIR) $(DEST)\dblib\vsamples\text
- CopyFilesInCopyList
- AddSectionFilestoCopyList "Image" $(STF_SRCDIR) $(DEST)\dblib\vsamples\image
- CopyFilesInCopyList
- AddSectionFilestoCopyList "Query" $(STF_SRCDIR) $(DEST)\dblib\vsamples\vbquery
- CopyFilesInCopyList
- endif
-
- exit
-
-
- ;; THIS SECTION DEFINES ALL THE VARIABLES USED IN THE DIALOGS, ETC.
-
- [General Variables]
- HelpTitle="Visual Basic Library for SQL Server Installation Help"
- HContBut="&OK"
-
- [Size Variables]
- TotalDiskSpaceNeeded=310000
-
- [Quit Variables]
- QuitTitle="Quit Visual Basic Library for SQL Server Installation"
- QuitText1 = "The Visual Basic Library for SQL Server may not be properly installed. If you quit Setup now, "+
- "you may have to run Setup again.\n\n"+
- "Are you sure you wish to cancel? Choose Exit Setup, or choose Resume "+
- "to return to the previous installation option."
- QContBut="&Resume"
- QExitBut="E&xit Setup"
-
- [Bad Path Variables]
- QuitTitle= "Visual Basic Library for SQL Server Installation"
- QuitText1 = "The directory you have entered does not exist.\n"+
- "Would you like to create it?"
- QExitBut="&No"
- QContBut="&Yes"
-
- [Welcome Variables]
- QuitTitle="Welcome"
- QuitText1 = "Welcome to Visual Basic Library for SQL Server Setup\n\n"+
- "This Setup program will install the Visual Basic Library for SQL Server and examples on your computer. "+
- "Simply follow the instructions.\n\n"+
- "To quit the Setup program at any time, choose Exit Setup. "+
- "When you see a Help button, you can choose it to get help.\n\n"+
- "Choose the Continue button or press ENTER to go on"
- QContBut="&Continue"
- QExitBut="E&xit Setup"
-
- [Feature Selection]
- ExitBut="E&xit"
- ContBut="&Continue"
- HelpBut="&Help"
- ChkBoxTitle = "Visual Basic Library for SQL Server Custom Setup"
- ChkBoxText1 = "Choose which feature(s) that you wish to be installed on "+
- "your hard disk."
- ChkBoxText2 = "Turn features on or off by selecting them."
- Checks = {ON} ;; Simply add default settings separated by commas
- CheckBox1 = "&1 - Visual Basic Library for SQL Server"
- CheckBox2 = "&2 - Examples"
- HelpText1 = "Checking a feature will install it on your hard disk."
-
-
- [Get Path Variables]
- ExitBut="E&xit"
- ContBut="&Continue"
- HelpBut="&Help"
- DEST = C:\SQL
- GetPTitle = "Visual Basic Library for SQL Server Installation"
- GetPLabel = "&Path:"
- GetPText1 = "Setup installs files on your hard disk. Choose the "+
- "location where you want to install the library and example files."
- GetPText2 = "If you do not want to use the suggested location, use "+
- "the BACKSPACE key to delete characters, and then type the drive "+
- "and directory where you want to install the library and examples"
- GetPathMessBoxTitle = "Install Location Error"
- GetPathMessBoxText = "The location you have chosen to install the library and examples "+
- "is invalid. Please check the drive and/or directory name."
- HelpTitle = "Help for Install Location"
- HelpText1 = "To change the location on your hard disk where you want "+
- "to install the library and examples, you need to specify a drive letter "+
- "(usually 'C') followed by a colon and a backslash (:\\), and then "+
- "the directory name you want. For example, Setup suggests you use "+
- "the location 'C:\SQL'."
-
- [Not Enough Disk Space]
- ExitBut="E&xit"
- HelpBut="&Help"
- ContBut="&Retry"
- InfoTitle= "Workstation Information"
- InfoText1= "Available Disk Space = "$(SpaceLeft)" bytes\n"+
- "Disk Space Needed = approx. "$(TotalDiskSpaceNeeded)" bytes\n\n"+
- "Setup has detected that, there is not enough disk\n"+
- "space to install the files. Choose\n"+
- "Retry if you would like to select another drive.\n"+
- "Choose Exit Setup to Exit the installation"
- HelpText1 = "To install on a different hard disk, choose 'Retry'.\n"+
- "Insert a new path including the drive letter."
-
- [Exit-Failure Message Variables]
- InfoTitle="Visual Basic Library for SQL Server Installation"
- InfoText1="The Visual Basic Library for SQL Server may not be properly installed."+
- "\n\nYou may have to run Setup again"
- ContBut="E&xit"
-
- [Exit-Success Message Variables]
- InfoTitle="Visual Basic Library for SQL Server Installation"
- InfoText1="The Visual Basic Library for SQL Server has successfully been installed."+
- "\n\nEnsure that your PATH variable in the autoexec.bat file points to the VBSQL.VBX file"
- ContBut="E&xit"
-
- [Exit-UserQuit Message Variables]
- InfoTitle="Visual Basic Library for SQL Server Installation"
- InfoText1 = "The Visual Basic Library for SQL Server may not be properly installed. If you quit Setup now, "+
- "you mat have to run Setup again.\n\n"+
- "Are you sure you wish to cancel? Choose Exit Setup, or choose Resume "+
- "to return to the previous installation option."
- ContBut="E&xit"
-
- [Detect Disk Variables]
- SpaceLeft = "-" ? DETCMD.DLL GetFreeSpaceDrive $(DEST)
- LocalHardDrives = "-" ? DETCMD.DLL GetAllValidLocalHardDrives
-
- [Detect Directory Variables]
- DirectoryThere = "-" ? DETCMD.DLL DoesDirExist $(DEST)
-