home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a025 / 10.ddi / STFSETUP.IN_ / STFSETUP.bin
Encoding:
Text File  |  1992-03-12  |  13.2 KB  |  358 lines

  1. ;;***************************************************************
  2. ;;* This is the setup script for the VBSQL Library
  3. ;;*
  4. ;;* Modification History
  5. ;;*
  6. ;;* Trish Millines-12/18
  7. ;;***************************************************************
  8.  
  9. [Shell Commands]
  10.  
  11. ;; INITIALIZE THE SETUP
  12. ;; NOTE: All dialogs are placed in the exact order that they occur
  13.  
  14.     set-title  "Microsoft Visual Basic Library for SQL Server Setup"
  15.     Init-System              ;;  Copy Disincentive's Get Name/Org
  16.     read-syms "General Variables"
  17.     read-syms "Size Variables"
  18.     set-subst QuitText1 = $(QuitText1)
  19.  
  20. ;; DISPLAY THE WELCOME SCREEN
  21.  
  22. welcome = read-syms "Welcome Variables"
  23.   set-subst QuitText1 = $(QuitText1)
  24.   ui start QUIT
  25.   ifstr   $(DLGEVENT) == "CONTINUE"
  26.      ui pop 1
  27.   else
  28.      exit
  29.   endif
  30.  
  31.  
  32. ;; LET THE USER SELECT THE APP(S) TO INSTALL
  33. ;; NOTE: In the future, this will have to be changed as each tool is added
  34.  
  35. select-features = read-syms "Feature Selection"
  36.   set-subst ChkBoxTitle = $(ChkBoxTitle)
  37.   set CHECK2 = {ON,ON}    ;; CHECK the number of check boxes
  38.   set CheckItemsIn = $(CHECK2)
  39.  
  40.   ui start CHECK2
  41.  
  42.   set CHECK2 = $(CheckItemsOut)
  43.   ifstr   $(DLGEVENT) == "CONTINUE"
  44.      ifstr $(CHECK2) == {ON,ON}
  45.     set TotalDiskSpaceNeeded = 310000
  46.     set InstallLibrary = "YES"
  47.     set InstallExamples = "YES"
  48.      else-ifstr $(CHECK2) == {ON,OFF}
  49.     set TotalDiskSpaceNeeded = 215000
  50.     set InstallLibrary = "YES"
  51.     set InstallExamples = "NO"
  52.      else-ifstr $(CHECK2) == {OFF,ON}
  53.     set TotalDiskSpaceNeeded = 95000
  54.     set InstallLibrary = "NO"
  55.     set InstallExamples = "YES"
  56.      endif
  57.      ui pop 1
  58.   else       ;; $(DLGEVENT) == "EXIT"
  59.      set CurrentDialog = "select-features"
  60.      goto "quit"
  61.   endif
  62.  
  63.  
  64. ;; GET THE PATH TO INSTALL THE Library ON
  65.  
  66. get-dest = read-syms "Get Path Variables"
  67.   set-subst GetPText2 = $(GetPText2)
  68.   set-subst HelpText1 = $(HelpText1)
  69.   set EditTextIn = $(DEST)
  70.   set EditFocus = "END"
  71.  
  72.   ui start GETPATH
  73.   set DEST  = $(EditTextOut)
  74.  
  75.   ifstr $(DLGEVENT) == "CONTINUE"       ;; Did user press Continue
  76.      ui pop 1
  77.   else
  78.      set CurrentDialog = "get-dest"       ;; User pressed Quit
  79.      goto "quit"
  80.   endif
  81.  
  82.  
  83. ;; THIS ROUTINE CHECKS TO SEE IF THE DIRECTORY EXISTS
  84.  
  85. check-directory-exists = +
  86.   detect "Detect Directory Variables"       ;; See if Directory exists
  87.   ifstr $(DirectoryThere) == "NO"
  88.     goto "bad-path"
  89.   endif
  90.  
  91.  
  92. ;; IF THERE IS NOT ENOUGH DISK SPACE, THEN EXIT
  93.  
  94. check-disk-space = +
  95. detect "Detect Disk Variables"           ;; Get disk space available
  96. ifint $(TotalDiskSpaceNeeded) >= $(SpaceLeft)
  97.     worksta-info = read-syms "Not Enough Disk Space"
  98.     set-subst InfoText1 = $(InfoText1)
  99.     ui start INFO3
  100.     exit
  101. endif
  102.  
  103.  
  104. ;; THIS DIALOG IS DISPLAYED WHILE FILE COPY IS GOING ON
  105.  
  106. inst = install "Install Script"
  107.   ifstr $(STF_INSTALL_OUTCOME) == "STF_SUCCESS"
  108.      read-syms "Exit-Success Message Variables"
  109.   else-ifstr $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  110.      read-syms "Exit-UserQuit Message Variables"
  111.   else
  112.      read-syms "Exit-Failure Message Variables"
  113.   endif
  114.  
  115.   ui start INFO1
  116.   ui pop 1
  117.   exit
  118.  
  119.  
  120. ;; THIS DIALOG IS FOR WHEN USER PRESSES QUIT EARLY
  121.  
  122. quit = read-syms "Quit Variables"
  123.   ui start QUIT
  124.   ifstr   $(DLGEVENT) == "CONTINUE"
  125.      ui pop 1
  126.      goto  $(CurrentDialog)
  127.   else
  128.      exit
  129.   endif
  130.  
  131.  
  132. ;; THIS DIALOG IS FOR WHEN THE DIRECTORY DOESN'T EXIST
  133.  
  134. bad-path = read-syms "Bad Path Variables"
  135.   set-subst GetPTitle = $(GetPTitle)
  136.   set-subst GetPText2 = $(GetPText2)
  137.   ui start QUIT
  138.   ifstr(I) $(DLGEVENT) == "CONTINUE"       ;; User wants to create directory
  139.      ui pop 1
  140.      set NewDir = "YES"
  141.      goto "check-disk-space"
  142.   else                       ;; User doesn't want to create new dir
  143.      ui pop 1
  144.      goto "get-dest"               ;; Go get a new path
  145.   endif
  146.  
  147. ;;          **************  DESCRIPTION OF FILES ****************
  148.  
  149. [Source Media Descriptions]
  150.     1 = "Visual Basic Library for SQL Server"
  151.  
  152. ;; NOTE: For each release of the product, the DATE and VERSION values must be set
  153.  
  154. [Library]
  155.     1,vbsql.vb_,SIZE=75000,RENAME=vbsql.vbx,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  156. [IncludeFile]
  157.     1,vbsql.b_,SIZE=2200,RENAME=vbsql.bi,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  158. [SqlDLLs]
  159.     1,w3dblib.dl_,SIZE=157000,BACKUP="w3dblib.oss",RENAME=w3dblib.dll,DATE=1992-03-13,SETTIMESTAMP
  160.     1,dbnmp3.dl_,SIZE=8000,BACKUP="dbnmp3.oss",RENAME=dbnmp3.dll,DATE=1992-03-13,SETTIMESTAMP
  161. [GenCode]
  162.     1,login.frm,SIZE=3800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  163.     1,chngdb.frm,SIZE=1300,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  164.     1,vbsqlgen.bas,SIZE=12000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  165.     1,genglob.bas,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  166.     1,about.frm,SIZE=600,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  167. [Cursors]
  168.     1,cursors.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  169.     1,cursors.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  170.     1,cursors.bas,SIZE=23000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  171.     1,cursors.frm,SIZE=19000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  172. [Browse]
  173.     1,blogin.frm,SIZE=4500,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  174.     1,browse.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  175.     1,browse.frm,SIZE=11000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  176.     1,browse.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  177.     1,browse.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  178. [Text]
  179.     1,text.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  180.     1,text.frm,SIZE=13000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  181.     1,text.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  182.     1,text.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  183. [Image]
  184.     1,image.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  185.     1,image.frm,SIZE=13000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  186.     1,image.ico,SIZE=800,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  187.     1,image.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  188. [Query]
  189.     1,vbquery.mak,SIZE=200,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  190.     1,vbquery.frm,SIZE=4500,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  191.     1,query.frm,SIZE=3900,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  192.     1,rpc.frm,SIZE=7000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  193.     1,vbquery.bas,SIZE=22000,DATE=1992-03-13,SETTIMESTAMP,VERSION="4,20,00"
  194.  
  195. ;;          **************  ACTUAL INSTALL SCRIPT ******************
  196.  
  197. [Install Script]
  198.  
  199. Ifstr $(NewDir) == "YES"         ;; If directory doesn't exist
  200.   CreateDir $(DEST)
  201. endif
  202. Ifstr $(InstallLibrary) == "YES"    ;; If installing library
  203.   CreateDir $(DEST)\bin
  204.   CreateDir $(DEST)\dblib
  205.   CreateDir $(DEST)\dblib\include
  206. endif
  207. Ifstr $(InstallExamples) == "YES"       ;; If installing examples
  208.   CreateDir $(DEST)\dblib
  209.   CreateDir $(DEST)\dblib\vsamples
  210.   CreateDir $(DEST)\dblib\vsamples\gencode
  211.   CreateDir $(DEST)\dblib\vsamples\cursors
  212.   CreateDir $(DEST)\dblib\vsamples\browse
  213.   CreateDir $(DEST)\dblib\vsamples\text
  214.   CreateDir $(DEST)\dblib\vsamples\image
  215.   CreateDir $(DEST)\dblib\vsamples\vbquery
  216. endif
  217.  
  218. ;; THIS SECTION WILL COPY THE FILES TO THE DISK
  219.  
  220. Ifstr $(InstallLibrary) == "YES"    ;; If installing library
  221.    AddSectionFilestoCopyList "Library" $(STF_SRCDIR) $(DEST)\bin
  222.    CopyFilesInCopyList
  223.    AddSectionFilestoCopyList "IncludeFile" $(STF_SRCDIR) $(DEST)\dblib\include
  224.    CopyFilesInCopyList
  225.    AddSectionFilestoCopyList "SqlDLLs" $(STF_SRCDIR) $(DEST)\bin
  226.    CopyFilesInCopyList
  227. endif
  228. Ifstr $(InstallExamples) == "YES"       ;; If installing examples
  229.    AddSectionFilestoCopyList "GenCode" $(STF_SRCDIR) $(DEST)\dblib\vsamples\gencode
  230.    CopyFilesInCopyList
  231.    AddSectionFilestoCopyList "Cursors" $(STF_SRCDIR) $(DEST)\dblib\vsamples\cursors
  232.    CopyFilesInCopyList
  233.    AddSectionFilestoCopyList "Browse" $(STF_SRCDIR) $(DEST)\dblib\vsamples\browse
  234.    CopyFilesInCopyList
  235.    AddSectionFilestoCopyList "Text" $(STF_SRCDIR) $(DEST)\dblib\vsamples\text
  236.    CopyFilesInCopyList
  237.    AddSectionFilestoCopyList "Image" $(STF_SRCDIR) $(DEST)\dblib\vsamples\image
  238.    CopyFilesInCopyList
  239.    AddSectionFilestoCopyList "Query" $(STF_SRCDIR) $(DEST)\dblib\vsamples\vbquery
  240.    CopyFilesInCopyList
  241. endif
  242.  
  243. exit
  244.  
  245.  
  246. ;; THIS SECTION DEFINES ALL THE VARIABLES USED IN THE DIALOGS, ETC.
  247.  
  248. [General Variables]
  249.   HelpTitle="Visual Basic Library for SQL Server Installation Help"
  250.   HContBut="&OK"
  251.  
  252. [Size Variables]
  253.   TotalDiskSpaceNeeded=310000
  254.  
  255. [Quit Variables]
  256.   QuitTitle="Quit Visual Basic Library for SQL Server Installation"
  257.   QuitText1 = "The Visual Basic Library for SQL Server may not be properly installed. If you quit Setup now, "+
  258.           "you may have to run Setup again.\n\n"+
  259.               "Are you sure you wish to cancel? Choose Exit Setup, or choose Resume "+
  260.               "to return to the previous installation option."
  261.   QContBut="&Resume"
  262.   QExitBut="E&xit Setup"
  263.  
  264. [Bad Path Variables]
  265.   QuitTitle= "Visual Basic Library for SQL Server Installation"
  266.   QuitText1 = "The directory you have entered does not exist.\n"+
  267.           "Would you like to create it?"
  268.   QExitBut="&No"
  269.   QContBut="&Yes"
  270.  
  271. [Welcome Variables]
  272.   QuitTitle="Welcome"
  273.   QuitText1 = "Welcome to Visual Basic Library for SQL Server Setup\n\n"+
  274.           "This Setup program will install the Visual Basic Library for SQL Server and examples on your computer. "+
  275.               "Simply follow the instructions.\n\n"+
  276.               "To quit the Setup program at any time, choose Exit Setup. "+
  277.               "When you see a Help button, you can choose it to get help.\n\n"+
  278.           "Choose the Continue button or press ENTER to go on"
  279.   QContBut="&Continue"
  280.   QExitBut="E&xit Setup"
  281.  
  282. [Feature Selection]
  283.   ExitBut="E&xit"
  284.   ContBut="&Continue"
  285.   HelpBut="&Help"
  286.   ChkBoxTitle = "Visual Basic Library for SQL Server Custom Setup"
  287.   ChkBoxText1 = "Choose which feature(s) that you wish to be installed on "+
  288.              "your hard disk."
  289.   ChkBoxText2 = "Turn features on or off by selecting them."
  290.   Checks      = {ON} ;; Simply add default settings separated by commas
  291.   CheckBox1   = "&1 - Visual Basic Library for SQL Server"
  292.   CheckBox2   = "&2 - Examples"
  293.   HelpText1 = "Checking a feature will install it on your hard disk."
  294.  
  295.  
  296. [Get Path Variables]
  297.   ExitBut="E&xit"
  298.   ContBut="&Continue"
  299.   HelpBut="&Help"
  300.   DEST = C:\SQL
  301.   GetPTitle = "Visual Basic Library for SQL Server Installation"
  302.   GetPLabel = "&Path:"
  303.   GetPText1 = "Setup installs files on your hard disk.  Choose the "+
  304.           "location where you want to install the library and example files."
  305.   GetPText2 = "If you do not want to use the suggested location, use "+
  306.                   "the BACKSPACE key to delete characters, and then type the drive "+
  307.           "and directory where you want to install the library and examples"
  308.   GetPathMessBoxTitle = "Install Location Error"
  309.   GetPathMessBoxText = "The location you have chosen to install the library and examples "+
  310.                               "is invalid.  Please check the drive and/or directory name."
  311.   HelpTitle = "Help for Install Location"
  312.   HelpText1 = "To change the location on your hard disk where you want "+
  313.     "to install the library and examples, you need to specify a drive letter "+
  314.     "(usually 'C') followed by a colon and a backslash (:\\), and then "+
  315.     "the directory name you want.  For example, Setup suggests you use "+
  316.     "the location 'C:\SQL'."
  317.  
  318. [Not Enough Disk Space]
  319.   ExitBut="E&xit"
  320.   HelpBut="&Help"
  321.   ContBut="&Retry"
  322.   InfoTitle= "Workstation Information"
  323.   InfoText1= "Available Disk Space  = "$(SpaceLeft)" bytes\n"+
  324.          "Disk Space Needed    = approx. "$(TotalDiskSpaceNeeded)" bytes\n\n"+
  325.          "Setup has detected that, there is not enough disk\n"+
  326.          "space to install the files.  Choose\n"+
  327.          "Retry if you would like to select another drive.\n"+
  328.          "Choose Exit Setup to Exit the installation"
  329.   HelpText1 = "To install on a different hard disk, choose 'Retry'.\n"+
  330.           "Insert a new path including the drive letter."
  331.  
  332. [Exit-Failure Message Variables]
  333.   InfoTitle="Visual Basic Library for SQL Server Installation"
  334.   InfoText1="The Visual Basic Library for SQL Server may not be properly installed."+
  335.             "\n\nYou may have to run Setup again"
  336.   ContBut="E&xit"
  337.  
  338. [Exit-Success Message Variables]
  339.   InfoTitle="Visual Basic Library for SQL Server Installation"
  340.   InfoText1="The Visual Basic Library for SQL Server has successfully been installed."+
  341.         "\n\nEnsure that your PATH variable in the autoexec.bat file points to the VBSQL.VBX file"
  342.   ContBut="E&xit"
  343.  
  344. [Exit-UserQuit Message Variables]
  345.   InfoTitle="Visual Basic Library for SQL Server Installation"
  346.   InfoText1 = "The Visual Basic Library for SQL Server may not be properly installed. If you quit Setup now, "+
  347.               "you mat have to run Setup again.\n\n"+
  348.               "Are you sure you wish to cancel? Choose Exit Setup, or choose Resume "+
  349.               "to return to the previous installation option."
  350.   ContBut="E&xit"
  351.  
  352. [Detect Disk Variables]
  353.     SpaceLeft = "-" ? DETCMD.DLL GetFreeSpaceDrive $(DEST)
  354.     LocalHardDrives = "-" ? DETCMD.DLL GetAllValidLocalHardDrives
  355.  
  356. [Detect Directory Variables]
  357.     DirectoryThere = "-" ? DETCMD.DLL DoesDirExist $(DEST)
  358.