home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / osdem1.zip / INSTALL.INF < prev    next >
Text File  |  1994-07-28  |  12KB  |  341 lines

  1. ;;*************************************************************************;;
  2. ;; Variables used:                                                         ;;
  3. ;;                                                                         ;;
  4. ;; InstallationDirectory         Directory to install to.                  ;;
  5. ;; YesOrNo9                      Scratch variable.                         ;;
  6. ;; Number1                       Upgrading a previous installation?        ;;
  7. ;;                                  0 - No upgrade.                        ;;
  8. ;;                                  1 - Demo upgrade.                      ;;
  9. ;; Number9                       Scratch variable.                         ;;
  10. ;; Point1                        Ask installation directory question.      ;;
  11. ;;*************************************************************************;;
  12.  
  13. ;; Set up direct mode video.
  14. SetDirectVideo On
  15.  
  16. ;; Set up the system.
  17. ;;SetBackgroundCharTo B0               ;; B0-2 are blocks.
  18. SetScreenAttrTo LightMagentaOnBlue
  19. SetMainBorderTo Single
  20. SetTopLineAttrTo WhiteOnBlack
  21. SetTopLineTo " SourceSafe for OS/2 Demonstration "
  22. SetBottomLineAttrTo WhiteOnBlack
  23. SetBottomLineTo " Press <Ctrl-X> to quit installation "
  24. SetPopupAttrTo WhiteOnMagenta
  25. SetPopupBorderTo Single
  26. SetShadowAttrTo MagentaOnBlack
  27. SetAttentionAttrTo YellowOnRed
  28.  
  29. ;; Set up information displayed on an unexpected error.
  30. SetSupportInformation
  31. For assistance, please call 919/821-4525 Monday-Friday 9-6 EST.
  32.  
  33. Fax support is available at 919/821-5222, 24 hours a day.
  34. EndSetSupportInformation
  35.  
  36. ;; Set it not to query for file replacement.
  37. SetReplacementInquiry Off
  38.  
  39. ;; Turn off the read only warning.
  40. SetReadOnlyInquiry Off
  41.  
  42.  
  43. ;; Welcome dialog box.
  44. Dialog
  45. .c Welcome to the SourceSafe Demonstration Disk!
  46.  
  47.    SourceSafe is a complete system for version control.
  48.    It offers your development process as much automated power
  49.    as some systems costing twice as much--with a speed and
  50.    ease of use unmatched by ANY other system.
  51.  
  52.    This demonstration disk will install a complete SourceSafe
  53.    system onto your hard drive or network, lacking nothing
  54.    of the real product except the User's Manual.  We encourage
  55.    you to use this demonstration in your day-to-day work, since
  56.    this is the best way to become acquainted with SourceSafe.
  57.    After thirty days, when the demonstration expires, you can
  58.    simply stop using the product; or, you can call One Tree
  59.    Software to upgrade to a full license.  Either way, you will
  60.    not lose your code.
  61. EndDialog
  62.  
  63. ;; Get the SourceSafe installation directory.
  64. :Point1
  65. Dialog [InstallationDirectory] 50 UseHeader " Installation directory "
  66.    Please enter the directory you would like to place
  67.    SourceSafe in.  If the directory you specify does
  68.    not exist, it will be created.  For instance, you
  69.    might type R:\SS at this point.
  70. EndDialog
  71.  
  72. ;; Check if the drive is valid.
  73. If DriveIsPresent InstallationDrive
  74. Else
  75.    ;; Report the bad installation drive.
  76.    Dialog UseHeader " Invalid Drive "
  77.       The installation directory you specified is on
  78.       an invalid drive or volume.
  79.  
  80.       If you mistyped the drive letter, hit any key
  81.       to return to the "Installation directory" dialog
  82.       box and enter it again.  If you are confident
  83.       that you typed it correctly, hit Ctrl-X to exit
  84.       INSTALL, and then make sure your drives are
  85.       mapped correctly.
  86.    EndDialog
  87.  
  88.    ;; Get the installation directory again.
  89.    goto Point1
  90. EndIf
  91.  
  92. ;; Create the installation directory (checking if the user has rights).
  93. If DirectoryAllowable [InstallationDirectory]
  94. Else
  95.    ;; Could not create the directory.
  96.    Dialog
  97.       You don't have the necessary network privileges to install
  98.       SourceSafe in the specified directory.
  99.    EndDialog
  100.    goto Point1
  101. EndIf
  102.  
  103. ;; Extract the serialization program so that we can use it.
  104. QueFileGroup 1 To [InstallationDirectory]
  105. GetQuedFiles Quietly
  106.  
  107. ;; Check if this is an upgrade.
  108. [YesOrNo9] := N
  109. If FileExists [InstallationDirectory]\system.ini
  110.    [YesOrNo9] := Y
  111. Endif
  112. If FileExists [InstallationDirectory]\srcsafe.ini
  113.    [YesOrNo9] := Y
  114. Endif
  115. [Number1] := 0
  116. If [YesOrNo9] = Y
  117.    ;; Check if this is a demo installation.
  118.    Run [InstallationDirectory]\serializ.exe -q -m[InstallationDirectory] Quietly
  119.    If OSExitCode <> 1
  120.       Dialog
  121.       This demo disk cannot be used to update a real (non-demo)
  122.       SourceSafe license.
  123.       EndDialog
  124.       goto Point1
  125.    Else
  126.       ;; A demo upgrade.
  127.       [Number1] := 1
  128.    EndIf
  129.  
  130.    ;; Check if the user really means to upgrade.
  131.    Dialog [YesOrNo9] UseHeader " Upgrading "
  132.       Press "Y" to upgrade your previous SourceSafe demo,
  133.       adding SourceSafe 3.0 for OS/2 to your
  134.       existing installation.  Press "N" if you do not wish
  135.       to upgrade.
  136.    EndDialog
  137.  
  138.    ;; If the user did not mean to upgrade, start over.
  139.    If [YesOrNo9] = N
  140.       Dialog
  141.          If you want to completely replace your old installation,
  142.          losing all your previous projects and files, press
  143.          <Ctrl-X> to exit the installation process.  Then delete
  144.          your SourceSafe installation from DOS, and re-run INSTALL.
  145.  
  146.          If you want to create a new SourceSafe installation in
  147.          a different path, leaving the existing installation
  148.          alone, press any key other than <Ctrl-X>.
  149.       EndDialog
  150.       goto Point1
  151.    EndIf
  152. Else
  153.    ;; Check the free space.
  154.    If FreeSpaceOnDrive InstallationDrive < 2048000
  155.       Dialog [YesOrNo9] UseHeader "Warning"
  156.          It appears that there is not enough free space on the
  157.          specified installation drive.  SourceSafe requires at least
  158.          2 meg of free space for a new installation.  If you want to
  159.          Install SourceSafe on that drive, press <Ctrl-X> to exit the
  160.          installation process.  Then free up some space on that drive
  161.          and re-run INSTALL to try again.
  162.  
  163.          If the installation process has improperly determined the
  164.          amount of free space on your drive, you may choose to ignore
  165.          this warning and continue with the installation.
  166.  
  167.          Continue (Y/N)?
  168.       EndDialog
  169.  
  170.       ;; Does the user want to ignore the warning?
  171.       If [YesOrNo9] = N
  172.          goto Point1
  173.       Endif
  174.    EndIf
  175. EndIf
  176.  
  177. ;; Create the directory structure.
  178. CreateDirectoryIfNecessary [InstallationDirectory]\os2
  179. CreateDirectoryIfNecessary [InstallationDirectory]\admin
  180. CreateDirectoryIfNecessary [InstallationDirectory]\data
  181. CreateDirectoryIfNecessary [InstallationDirectory]\data\locks
  182. CreateDirectoryIfNecessary [InstallationDirectory]\temp
  183. CreateDirectoryIfNecessary [InstallationDirectory]\users
  184.  
  185. ;; Queue the appropriate files to the main directory.
  186. If FileExists [InstallationDirectory]\system.ini
  187. Else
  188.    If FileExists [InstallationDirectory]\srcsafe.ini
  189.    Else
  190.       QueFiles To [InstallationDirectory]
  191.          srcsafe.ini
  192.       EndQueFiles
  193.    Endif
  194. EndIf
  195. If FileExists [InstallationDirectory]\users.txt
  196. Else
  197.    QueFiles To [InstallationDirectory]
  198.       users.txt
  199.    EndQueFiles
  200. EndIf
  201.  
  202. ;; Queue the appropriate files to the ADMIN directory.
  203. If FileExists [InstallationDirectory]\admin\ss.ini
  204. Else
  205.    QueFiles To [InstallationDirectory]\admin
  206.       ss.ini
  207.    EndQueFiles
  208. EndIf
  209.  
  210. ;; Queue the appropriate files to the DATA directory.
  211. If FileExists [InstallationDirectory]\data\aaaaaaaa.cnt
  212. Else
  213.    QueFiles To [InstallationDirectory]\data
  214.       aaaaaaaa
  215.       aaaaaaaa.a
  216.       aaaaaaaa.cnt
  217.    EndQueFiles
  218. EndIf
  219. If FileExists [InstallationDirectory]\data\um.dat
  220. Else
  221.    QueFiles To [InstallationDirectory]\data
  222.       um.dat
  223.    EndQueFiles
  224. EndIf
  225.  
  226. If [Number1] = 0
  227.    ;; Queue the appropriate files to the TEMP directory.
  228.    QueFiles To [InstallationDirectory]\temp
  229.       tmp.tmp
  230.    EndQueFiles
  231.  
  232.    ;; Set up the Admin's user directory.
  233.    CreateDirectoryIfNecessary [InstallationDirectory]\users\admin
  234.  
  235.    ;; Set up the Guest's user directory.
  236.    CreateDirectoryIfNecessary [InstallationDirectory]\users\guest
  237.    QueFiles To [InstallationDirectory]\users\guest
  238.    help.c
  239.    EndQueFiles
  240. EndIf
  241.  
  242. ;; Queue OS/2 files.
  243. QueFileGroup 5 To [InstallationDirectory]\os2
  244.  
  245. ;; Get the files that have been queued.
  246. GetQuedFiles NoThermometer
  247.  
  248. ;; This is to get around an installit bug that won't let me queue the same
  249. ;; file to more than 1 place.
  250. If [Number1] = 0
  251.    ;; Admin's SS.INI.
  252.    CopyFiles From [InstallationDirectory]\admin to [InstallationDirectory]\users\admin Quietly
  253.       ss.ini
  254.    EndCopyFiles
  255.  
  256.    ;; Guest's SS.INI.
  257.    CopyFiles From [InstallationDirectory]\admin to [InstallationDirectory]\users\guest Quietly
  258.       ss.ini
  259.    EndCopyFiles
  260.  
  261.    ;; Make the file in the temporary directory read only.
  262.    SetFileAttrTo 21 for [InstallationDirectory]\temp\tmp.tmp
  263. EndIf
  264.  
  265. ;; Serialize the system.
  266. If [Number1] = 0
  267.    Run [InstallationDirectory]\serializ.exe -q -s147-258-369 -m[InstallationDirectory] Quietly
  268.  
  269.    ;; If the serialization failed, run it again, but display the error.
  270.    If OSExitCode > 0
  271.       Run [InstallationDirectory]\serializ.exe -s147-258-369 -m[InstallationDirectory] WhiteOnMagenta
  272.    EndIf
  273. EndIf
  274.  
  275. ;; Move the serialization program into the OS2 directory.
  276. CopyFiles From [InstallationDirectory] to [InstallationDirectory]\os2 Quietly
  277.    serializ.exe
  278. EndCopyFiles
  279. DeleteFiles from [InstallationDirectory] Quietly
  280.    serializ.exe
  281. EndDeleteFiles
  282.  
  283. ;; Update the data directory format.
  284. TextBox @xy(Center,Center)
  285.    Updating the Data directory
  286. EndTextBox
  287. Run [InstallationDirectory]\os2\updini.exe -m[InstallationDirectory] Quietly
  288. Run [InstallationDirectory]\os2\ddconv.exe -m[InstallationDirectory] Quietly
  289. ClearScreen
  290.  
  291. ;; Only do this if we are installing the Macros too.
  292. TextBox @xy(Center,3)
  293.    SourceSafe macros enable you to run SourceSafe commands automatically
  294.    from within your editor or development environment.  Press ENTER now to
  295.    install macros for all the systems listed below.  If you do *not* want
  296.    SourceSafe macros for some environments, use the arrow keys and space
  297.    bar to turn those checks off.  Then press ENTER to confirm your choice.
  298. EndTextBox
  299.  
  300. GetMenuChoice PreselectAll @xy(Center,15) UseHeader " Macros "
  301. Install macros for the Brief editor
  302. Install macros for the Borland C++ integrated environment (IDE)
  303. Install macros for the Multi-Edit editor (before version 7.0)
  304. Install macros for the Multi-Edit editor (version 7.0 or later)
  305. EndGetMenuChoice
  306.  
  307. ;; Get rid of the text box for the menu.
  308. ClearScreen
  309.  
  310. ;; Process the selections.
  311. InCase Choice is
  312.    =1: QueFileGroup 10 To [InstallationDirectory]\macros\brief
  313.    =2: QueFileGroup 11 To [InstallationDirectory]\macros\borlandc
  314.    =3: QueFileGroup 12 To [InstallationDirectory]\macros\multiedt
  315.    =4: QueFileGroup 13 To [InstallationDirectory]\macros\multiedt.7
  316. EndInCase
  317.  
  318. ;; If some files were queued, get them.
  319. If QueSize > 0
  320.    GetQuedFiles NoThermometer
  321. EndIf
  322.  
  323. ;; We have successfully completed the installation.
  324. Dialog
  325.    The installation has completed successfully.  You can now
  326.    immediately start using SourceSafe as the user GUEST, or
  327.    change to the OS2 directory and run SSADMIN.EXE to begin
  328.    adding the real users who will be running SourceSafe.
  329.  
  330.    For a quick look at SourceSafe, it is highly recommended that
  331.    you run through the tutorial included with this demo (in the
  332.    booklet that says "Congratulations!" on the outside).  If you
  333.    do not have the tutorial booklet, you can obtain one at no
  334.    charge by calling One Tree Software at 1-800-397-2323.
  335. EndDialog
  336.  
  337. ChangeDirectoryTo [InstallationDirectory]
  338. SetExitMessageTo "Installation completed successfully."
  339. SoLong
  340. ENDSCRIPT
  341.