home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGS / HANDWRIT.ZIP / HNDWRTR1.ZIP / STFSETUP.IN_ < prev    next >
Text File  |  1993-10-26  |  48KB  |  1,253 lines

  1. ; CICs WINDOWS FOR PENS VERSION 1.0 Install
  2. ; GM - Oct 4, 1993
  3. ; GM - Oct 8, 1993
  4. ;    Fixed bug in selecting COM2.            : deb : 10/12/1993
  5. ;    Added CIC Readme.                : deb : 10/25/1993
  6. ; GM - Oct 26, 1993
  7. ;
  8. ;This is the Microsoft Windows for Pens Installation File.  It is a script
  9. ;based on the GUI Setup Toolkit version 1.0.  Complete documentation for
  10. ;the GUI Setup Toolkit version 1.0 is included in the Windows for Pens
  11. ;OAK.  This file is comprised of 4 sections.  Their titles and generals
  12. ;descriptions follow:
  13. ;
  14. ;Variables - This sections defines variables used throughout the rest of
  15. ;the script file.  
  16. ;
  17. ;Dialog String Definitions - all strings displayed in dialogs during the
  18. ;setup procedure are defined here.
  19. ;
  20. ;The User Interface - This portion of setup can be considered 
  21. ;"pre-processing".  It gets information from the user, generates
  22. ;configuration flags for file lists, in genreal, determines how the
  23. ;rest of setup is going to proceed.
  24. ;
  25. ;The File Description Part - a list of file sizes and descriptions that 
  26. ;define what is on the distribution disks.
  27. ;
  28. ;The Install Script Part - This builds the lists of files to be installed 
  29. ;(a common GUI Setup Toolkit Procedure) and performs the installation.
  30. ;
  31. ;NOTE 1:  This .INF file was orriginally configured to support a number of 
  32. ;different installation scenarios.  Namely, those in which the program
  33. ;can't know a lot about the target hardware.   All of the user input
  34. ;scripts in the User Interface section are keyed off of a variable
  35. ;called "AskStupidQuestions" which is defined to be FALSE because
  36. ;the vast majority of OEMS know the precise nature of their installation
  37. ;requirements.    Hence, you will notice a number of clauses that
  38. ;begine ifstr $(AskStupidQuestions).  These clauses can be considered
  39. ;"commented out".
  40.  
  41. ;NOTE 2:  This file also relies on functions defined in STFSETUP.C in 
  42. ;\POAK\SOURCE\SETUP\CUSTOM.
  43.  
  44.  
  45.  
  46. ;******************************************************************
  47. ;********************* THE VARIABLES PART *************************
  48. ;******************************************************************
  49.  
  50. [General Variables]
  51.    BAD_SYS_INI ="FALSE"       ; Set to TRUE by the WExclusionList routine 
  52.                               ; if we can't write system.ini [386Enh]
  53.  
  54.    MOUSE = yesmouse.drv       ; default mouse driver to write to system.ini, 
  55.    DRIVER = ccpen.drv         ; [boot] default tablet driver
  56.    VMD    = ccpen.386         ; ditto
  57.    ComPort    = 1             ; default ComPort
  58.  
  59.    ComPortBUT = 1             ; default radio button choice on ComPort Dialog
  60.  
  61.    UseMouse = "NO"            ; If "NO", user will not be using a mouse
  62.  
  63.    KeyboardChoice = 1         ; 2 means a keyboard is sometimes present.  
  64.                               ; Note that an OEM that always has a keyboard 
  65.                               ; present should set this value to 1.  
  66.                               ; An OEM that never has a keyboard present 
  67.                               ; should set it to 3.
  68.  
  69.    VideoPenDrv = "vgap.drv"   ; The default pen video driver
  70.    FoundVidMatch = "FALSE"    ; Flag for whether or not we matched the video driver
  71.    VideoDrv = "vga.drv"       ; The default non-pen video driver (these should match)
  72.  
  73.    AskStupidQuestions = "TRUE"  ; If TRUE user will be asked a series of
  74.                                 ; questions about configuration.  
  75.                 
  76.  
  77.    SHIPDATE   ="1993-10-08"     ; Every installed file is tagged with this 
  78.                                 ; date
  79.  
  80.    BackupHelpFiles = "FALSE"    ; If TRUE, current Windows help files will 
  81.                                 ; get backed up to a RESTORE directory off
  82.                                 ; of the Windows root directory.  Note that
  83.                                 ; this requires a lot of disk space!
  84.  
  85.    ReplaceHelpFiles = "TRUE"    ; If TRUE, new help files will get installed
  86.                                 ; Leave false to retail current "non-pen"
  87.                                 ; helpfiles
  88.  
  89.    OutOfSpace = "FALSE"         ; Set by "GetCopyListCost" below
  90.  
  91. ;
  92. ;****** Define common button labels used in dialogs
  93. ;
  94.    ContBut    = "&Continue"
  95.    ExitBut    = "E&xit"
  96.    BackBut    = "&Back"
  97.    HelpBut    = "&Help"
  98.  
  99.    HelpTitle  = "Help"
  100.    HContBut   = "&OK"
  101.  
  102.    QuitTitle  = "Quit Setup"
  103.    QuitText1  = "\nMicrosoft Windows for Pen Computing has not been properly installed.  Run the setup program in its entirety to install Microsoft Windows for Pen Computing.\n\nIf you need assistance, please contact your hardware vendor."
  104.    QContBut   = "&Resume"
  105.    QExitBut   = "E&xit"
  106.  
  107.    ProgmanGroup = "Microsoft Pen Tools"
  108.  
  109.  
  110. ; These symbols that are not necessarily used inside of STFSETUP.INF, but
  111. ; they are required by STFSETUP.C.  DO NOT REMOVE.
  112.  
  113.    PenName = pen
  114.    PenwinName = penwindows
  115.    MouseDrv = mouse.drv
  116.    PenDrv = foo.drv
  117.    YesMouse = YESMOUSE.DRV
  118.    MSMouse = MSMOUSE.DRV
  119.  
  120.    REMOVE_SUCCEEDED = FALSE
  121.    NOTEIT_REG = FAILURE
  122.    HAS_PEN = NO
  123.    HAS_PENWIN = NO
  124.    USING_MSMOUSE = NO
  125.    PEN_COLOR = 0
  126.    FoundDLL = FALSE
  127.  
  128. ;
  129. ;****** Lists used within this file
  130. ;
  131.    Runtime_List = {"Bin-Files","Notebook-Files","Ole-Files","Note-it-Files"}
  132.    RemoveDOSList = {"winoldap.mod", "winoa386.mod" }
  133.    ExList  = {"ccpen.386","wacom.386","scriptel.386","sanyo.386","ncr.386"}
  134.    VidList = {"8514P.DRV","SVGAP.DRV","VGAP.DRV","V7VGAP.DRV","VGAMONOP.DRV","XGAP.DRV"}
  135.    VMD     = "ccpen.386"
  136.  
  137. ;
  138. ;****** Names of the INI files that we write or modify
  139. ;
  140.    SYS_INI = "system.ini"
  141.    PEN_INI = "penwin.ini"
  142.    CPL_INI = "control.ini"
  143.    WIN_INI = "win.ini"
  144.  
  145. ;
  146. ;****** This is the list of keyboard drivers that we have a 
  147. ;       matching skb driver for.  Be sure that this list is 
  148. ;       in sync with the [Intl-Skb] list located below.
  149. ;
  150. [Keyboard-Drv]
  151.    kbdbe.dll
  152.    kbdca.dll
  153.    kbdda.dll
  154.    kbddv.dll
  155.    kbdfc.dll
  156.    kbdfi.dll
  157.    kbdfr.dll
  158.    kbdgr.dll
  159.    kbdic.dll
  160.    kbdit.dll
  161.    kbdla.dll
  162.    kbdne.dll
  163.    kbdno.dll
  164.    kbdpo.dll
  165.    kbdsf.dll
  166.    kbdsg.dll
  167.    kbdsp.dll
  168.    kbdsw.dll
  169.    kbduk.dll
  170.    kbdusx.dll
  171.  
  172. ;
  173. ;****** This is the list of video drivers that we support.  
  174. ;       Be sure that this list is in sync with the [Video-Pen-Drv] 
  175. ;       list located below.  Also, be sure it remains in alpha-numeric
  176. ;       order!!
  177. ;
  178. [Video-Drv]
  179.    8514.drv      
  180.    ega.drv       
  181.    egahibw.drv   
  182.    egamono.drv   
  183.    olibw.drv     
  184.    hercules.drv  
  185.    plasma.drv    
  186.    supervga.drv  
  187.    tiga.drv      
  188.    vga.drv       
  189.    v7vga.drv     
  190.    vgamono.drv   
  191.    xga.drv       
  192.  
  193. ;
  194. ;****** The following variables are set by calls to DETCMD.DLL based on 
  195. ;       the user's current configuration.  The DETCMD.DLL interface is
  196. ;       described in the GUI Setup Toolkit Documentation.
  197. ;
  198. [Detect Variables]
  199.    WinDir = "C:\WINDOWS\" ? DETCMD.DLL,GetWindowsDir
  200.    SystemDir = "C:\WINDOWS\SYSTEM\" ? DETCMD.DLL,GetWindowsSysDir
  201.    DiskSpaceAvail = "0" ? DETCMD.DLL,GetFreeSpaceDrive c
  202.    WinVer = "{"0","0"}" ? DETCMD.DLL,GetWindowsVersion
  203.    DriversLine = "" ? DETCMD.DLL,GetIniSectionKeyString system.ini boot drivers
  204.    MouseDrv    = "" ? DETCMD.DLL,GetIniSectionKeyString system.ini boot mouse.drv
  205.    ShellString = "" ? DETCMD.DLL,GetIniSectionKeyString system.ini boot shell
  206.    PenDrv      = "" ? DETCMD.DLL,GetIniSectionKeyString system.ini drivers pen
  207.    Width       = "1" ? DETCMD.DLL,GetIniSectionKeyString win.ini windows BorderWidth
  208.    KeyboardDll = "" ? DETCMD.DLL, GetIniSectionKeyString system.ini keyboard keyboard.dll 
  209.    CurVideoDriver = "" ? DETCMD.DLL, GetIniSectionKeyString system.ini boot display.drv 
  210.    ControlHelpExist = "YES" ? DETCMD.DLL, DoesFileExist $(WinDir)"control.hlp"
  211.    WintutorExist = "YES" ? DETCMD.DLL, DoesFileExist $(WinDir)"wintutor.exe"
  212.    PenwinDllExist = "YES" ? DETCMD.DLL, DoesFileExist $(WinDir)"penwin.dll"
  213.    DoesiCountryExist = "" ? DETCMD.DLL, DoesIniSectionKeyExist win.ini intl iCountry
  214.  
  215. ;
  216. ;****** These two detect commands set a numbered list of variables.
  217. ;       Used in a loop for detecting whether or not a series of files exist.
  218. ;       For example, during setup the presence or absence of the .HLP files
  219. ;       shipped in Windows for Pens is determined using the function below.
  220. ;          
  221. [FindFile]
  222.    "FindFile"$(#) = "YES" ? DETCMD.DLL, DoesFileExist $(WinDir)$($)
  223.  
  224. [FindSysFile]
  225.    "FindSysFile"$(#) = "YES" ? DETCMD.DLL, DoesFileExist $(SystemDir)$($)
  226.  
  227.  
  228. ;******************************************************************
  229. ;********************* Dialog String Definitions ******************
  230. ;******************************************************************
  231.  
  232. [Welcome Variables]
  233.    InfoTitle  = "Welcome"
  234.    InfoText1  = "\n             Microsoft Windows for Pen Computing\n                            Version 1.00a\n\n                           April 24, 1992\n               Copyright (C) 1992 Microsoft Corp.\n                          All rights reserved."
  235.    HelpText1  = "This installation procedure will setup Microsoft Windows for Pen Computing on your computer."
  236.    STF_BACK_ENABLED = "NO"
  237.  
  238. [Overwrite Variables]
  239.    InfoTitle  = "Old Installation"
  240.    InfoText1  = "Setup has detected a previous installation of Microsoft Windows for Pen Computing.  If you continue, setup will reinstall and overwrite all previously installed files."
  241.    HelpText1  = "Setup has detected a previous installation of Microsoft Windows for Pen Computing.  If you choose to continue, setup will overwrite all Microsoft Windows for Pen Computing files currently on your hard disk.  If you choose Exit, setup will be aborted."
  242.    STF_BACK_ENABLED = "NO"
  243.  
  244. [Keyboard Option Variables]
  245.    ContBut    = "&Continue"
  246.    ExitBut    = "E&xit"
  247.    RadioTitle = "Running MS-DOS Applications"
  248.    RadioText1 = "\nSelect your computer's keyboard configuration."
  249.    RadioText2 = "Certain MS-DOS applications require keyboard input.  If your computer has no physical keyboard at the time, you will not be able to proceed or even return to Windows."
  250.    RBut1      = "&A keyboard is permanently attached"
  251.    RBut2      = "A &keyboard may be available"
  252.    RBut3      = "&No keyboard is used with the computer"
  253.    HelpText1  = "Please see the documentation for more information."
  254.    STF_BACK_ENABLED = "NO"
  255.    OptionsGreyed = {}
  256.  
  257. [Com Port Variables]
  258.    RadioTitle = "Serial Ports"
  259.    RadioText1 = "\nChoose the COM port that your tablet will be plugged into."
  260.    RadioText2 = "The input device must be plugged into one of the above COM ports."
  261.    RBut1      = "COM &1"
  262.    RBut2      = "COM &2"
  263.    RBut3      = "COM &3"
  264.    RBut4      = "COM &4"
  265.    HelpText1  = "Most computers will only have one COM port (COM1).  You may have to remove a peripheral device if your COM port is in use.  See your hardware manual for location of the COM ports."
  266.    STF_BACK_ENABLED = "NO"
  267.    OptionsGreyed = {}
  268.  
  269.  
  270. [Use Mouse Variables]
  271.    ContBut    = "&Both"
  272.    ExitBut    = "&Pen Only"
  273.    InfoTitle  = "Using the Mouse"
  274.    InfoText1  = "\nIf you plan on using both a mouse and a tablet at the same time, please choose BOTH below.  If not, choose PEN ONLY.  Please see the README.TXT file for more information."
  275.    HelpText1  = "If your system will not have both the mouse and tablet installed the same time, setup will install a custom mouse driver to ensure that a cursor will be displayed."
  276.    STF_BACK_ENABLED = "NO"
  277.  
  278. [Version MB Variables]
  279.    STF_MB_TYPE  = 1
  280.    STF_MB_ICON  = 3
  281.    STF_MB_DEF   = 1
  282.    STF_MB_TITLE = "Windows Version Error"
  283.    STF_MB_TEXT  = "You must install Windows 3.10 or greater first."
  284.  
  285. [Bad-SysIni Variables]
  286.    STF_MB_TYPE  = 1
  287.    STF_MB_ICON  = 2
  288.    STF_MB_DEF   = 1
  289.    STF_MB_TITLE = "System.ini"
  290.    STF_MB_TEXT  = "Setup was unable to modify the [386Enh] section of your SYSTEM.INI file.  Contact your hardware vendor for more information."
  291.  
  292. [Bad-NoteIt-Reg Variables]
  293.    STF_MB_TYPE  = 1
  294.    STF_MB_ICON  = 2
  295.    STF_MB_DEF   = 1
  296.    STF_MB_TITLE = "Note-It"
  297.    STF_MB_TEXT  = "Setup was unable to register the Note-It Application."
  298.  
  299. [Unkwn Kbd Variables]
  300.    STF_MB_TYPE  = 1
  301.    STF_MB_ICON  = 2
  302.    STF_MB_DEF   = 1
  303.    STF_MB_TITLE = "Keyboard Driver"
  304.    STF_MB_TEXT  = "Cannot set the proper On-Screen Keyboard driver.  Microsoft Windows for Pen Computing does not have an On-Screen Keyboard driver that matches your installed keyboard driver. Default is USA keyboard."
  305.  
  306. [Unkwn Vid Variables]
  307.    STF_MB_TYPE  = 1
  308.    STF_MB_ICON  = 2
  309.    STF_MB_DEF   = 1
  310.    STF_MB_TITLE = "Video Driver"
  311.    STF_MB_TEXT  = "Cannot set the proper pen aware video driver.  Microsoft Windows for Pen Computing does not have a video driver for your hardware. Please contact your display hardware manufacturer."
  312.  
  313.  
  314. [No Space MB Variables]
  315.    STF_MB_TYPE  = 1
  316.    STF_MB_ICON  = 3
  317.    STF_MB_DEF   = 1
  318.    STF_MB_TITLE = "Disk Space Error"
  319.    STF_MB_TEXT  = "Not enough free space on this hard disk.\n"$(TotalNeeded)" needed, "$(TotalFree)" free."
  320.  
  321.  
  322. [Exit-Success Message Variables]
  323.    InfoTitle  = "Setup Complete"
  324.    InfoText1  = "\nMicrosoft Windows for Pen Computing has been successfully installed.\n\nRestart Windows to begin using Microsoft Windows for Pen Computing."
  325.    ContBut    = "E&xit"
  326.    STF_BACK_ENABLED = "NO"
  327.  
  328. [Exit-UserQuit Message Variables]
  329.    InfoTitle  = "Setup Early Exit"
  330.         InfoText1  = "\nMicrosoft Windows for Pen Computing has not been properly installed.  Run the setup program in its entirety to install Microsoft Windows for Pen Computing.\n\nIf you need assistance, please contact your hardware vendor."
  331.    ContBut    = "E&xit"
  332.    STF_BACK_ENABLED = "NO"
  333.  
  334.  
  335. [Exit-Failure Message Variables]
  336.    InfoTitle  = "Setup Early Exit"
  337.    InfoText1  = "\nSetup Failed!\n\nPlease contact your hardware vendor for assistance."
  338.    ContBut    = "E&xit"
  339.    STF_BACK_ENABLED = "NO"
  340.  
  341. ;******************************************************************
  342. ;****************** THE USER INTERFACE PART ***********************
  343. ;******************************************************************
  344.  
  345.  
  346. [Shell Commands]
  347.       set-title  "CIC Handwriter Setup"        ; Background Window Title
  348.       read-syms  "General Variables"     ; Get Variable Assignments
  349.       detect     "Detect Variables"      ; Do normal dectection stuff
  350.  
  351. ;****** Check for the presence of help files
  352. ;
  353.       ForListDo ^(Backup-31-Files,2)
  354.          detect "FindFile"
  355.       EndForListDo
  356.  
  357. ;****** Check for the presence of *.mod files
  358. ;
  359.       ForListDo ^(OldApp-Files,2)
  360.          detect "FindSysFile"
  361.       EndForListDo
  362.  
  363.  
  364. ;****** Set a few choice variables for future use
  365. ;
  366.       set ProofDir = $(WinDir)"MSAPPS\PROOF\"
  367.       set NoteItDir = $(WinDir)"MSAPPS\NOTE-IT\"
  368.       set DEST     = $(WinDir)                 ; default for destination dir
  369.       set REST     = $(DEST)"RESTORE"
  370.       set New386   = "device="$(VMD)       ; Assumes VMD written to system dir
  371. ;
  372. ;****** The following 3 "ui start" commands execute dialog routines 
  373. ;       defined in STFSETUP.C  (see stfsetup.c for code)
  374.  
  375. ifstr $(AskStupidQuestions) == "TRUE"
  376. check-msmouse = ui start YCheckCurMouse   ; sets USING_MSMOUSE
  377. endif
  378. check-drivers = ui start ZCheckDrivers    ; sets HAS_PEN & HAS_PENWIN
  379. get-color     = ui start VGetColors       ; gets window text color
  380.  
  381.  
  382. ;
  383. ;***** Only show the welcome dialog if user is not in ADMIN mode.
  384. ;      Admin mode is set by giving a "/a" on the command line.
  385. ;      This parameter should only be given by the stub.exe routine
  386. ;      (run when our setup is chained to Windows setup).
  387. ;
  388. ;      We do not want our welcome dialog or exit dialog to show
  389. ;      if we are running within Windows setup.
  390.  
  391. ifstr $(STF_MODE) != "ADMIN"
  392. welcome = read-syms  "Welcome Variables"
  393.  
  394.       ui  start  INFO3
  395.  
  396.       ifstr      $(DLGEVENT) == "CONTINUE"
  397.          ui pop 1
  398.       else   ;;  $(DLGEVENT) == "EXIT"
  399.          set  CurrentDialog = "welcome"
  400.          goto "quit"
  401.       endif
  402. endif
  403.  
  404. ifstr $(PenwinDllExist) == "YES"
  405. Overwrite = read-syms  "Overwrite Variables"
  406.  
  407.       ui  start  INFO3
  408.  
  409.       ifstr      $(DLGEVENT) == "CONTINUE"
  410.          ui pop 1
  411.       else   ;;  $(DLGEVENT) == "EXIT"
  412.          set  CurrentDialog = "Overwrite"
  413.          goto "quit"
  414.       endif
  415. endif
  416.  
  417. ;****** Check the version number of Windows.  This should never
  418. ;       get called since the user should not be able to run the 
  419. ;       stfsetup.exe routine if in < win31.  But just in case ...
  420. ;
  421. check-version = set MajorWinVer = *($(WinVer),1)
  422.                 IfInt $(MajorWinVer) == 3
  423.                          IfInt *($(WinVer), 2) < 10
  424.                                 goto wrong-version
  425.                         EndIf
  426.                 Else
  427.                         goto wrong-version
  428.                 EndIf
  429.  
  430.                 ;; Version OK, fall through
  431.  
  432. ;
  433. ;***** Ask about the presence of a keyboard.  Note:  Since it is assumed
  434. ;      that the OEM shipping a pen computer understands whether that 
  435. ;      computer will or will not have a keyboard - there is no need to
  436. ;      prompt the user for this information.
  437. ;
  438. ;ifstr $(AskStupidQuestions) == "TRUE"
  439. ;keyboard-option = read-syms  "Keyboard Option Variables"
  440. ;      set RadioDefault = $(KeyboardChoice)
  441. ;
  442. ;      ui  start  RADIO3
  443. ;
  444. ;      set KeyboardChoice = $(ButtonChecked)
  445. ;                ifstr      $(DLGEVENT) == "CONTINUE"
  446. ;         ui pop 1
  447. ;      else   ;;  $(DLGEVENT) == "EXIT"
  448. ;         set  CurrentDialog = "keyboard-option"
  449. ;         goto "quit"
  450. ;      endif
  451. ;endif
  452.  
  453.  
  454. ;
  455. ;****** Determine the correct on-screen keyboard dll (SKB*.DLL) to install 
  456. ;       via the users current SYSTEM.INI keyboard .dll (found in the 
  457. ;       [keyboard] section of SYSTEM.INI).
  458. ;
  459. int-kbd   =    ifstr $(KeyboardDll) != ""
  460.          IfContains(I) $(KeyboardDll) IN ^(Keyboard-Drv,1)
  461.             ForListDo ^(Keyboard-Drv,1)
  462.                IfStr(I) $(KeyboardDll) == $($)
  463.                   set ListIndex = $(#)
  464.                   set FoundDLL = "TRUE"
  465.                   GoTo "FoundSKB"
  466.                endif
  467.                  EndForListDo
  468.          else
  469.             ;unknown kbd dll
  470.             read-syms  "Unkwn Kbd Variables"
  471.             ui start MESSAGEBOX
  472.          endif
  473. FoundSKB =   endif
  474.  
  475. ;
  476. ;****** Determine the correct video driver to install 
  477. ;       via the users current SYSTEM.INI display.drv (found in the 
  478. ;       [boot] section of SYSTEM.INI).
  479. ;
  480. vid-drv= IfContains(I) $(CurVideoDriver) IN ^(Video-Drv,1)
  481.  
  482.             ; Found one of the drivers we have a match for
  483.  
  484.             ForListDo ^(Video-Drv,1)     ; walk the list of windows video drvs
  485.                IfStr(I) $(CurVideoDriver) == $($) ; look for list item that matches
  486.                   set VideoListIndex = $(#)    ; save its location in the list
  487.                   ForListDo ^(Video-Pen-Drv,2) ; walk the list of pen video drivers
  488.                      IfInt $(VideoListIndex) == $(#) ; look for correct location
  489.                         set VideoPenDrv = $($)       ; set pen video driver
  490.                         set FoundVidMatch = "TRUE"
  491.                         GoTo "FoundVid"              ; jump out of this mess
  492.                      EndIf
  493.                   EndForListDo
  494.                endif
  495.             EndForListDo
  496.          Else-IfContains(I) $(CurVideoDriver) IN ^(Video-Pen-Drv,2) 
  497.  
  498.             ; Found one of our drivers, update it.
  499.  
  500.             ForListDo ^(Video-Pen-Drv,2)  ; walk the list of pen video drivers
  501.                IfStr(I) $(CurVideoDriver) == $($)  ; look for list item that matches
  502.                   set VideoListIndex = $(#)     ; save its location in the list
  503.                   set VideoPenDrv = $($)        ; set pen video driver
  504.                   set FoundVidMatch = "TRUE"
  505.                   GoTo "FoundVid"
  506.                endif
  507.             EndForListDo
  508.          Else
  509.  
  510.             ;unknown Video Driver
  511.  
  512.             read-syms  "Unkwn Vid Variables"
  513.             ui start MESSAGEBOX
  514.  
  515. FoundVid= endif
  516.  
  517.  
  518. ;
  519. ;****** If an OEM does not know which COM port a peripheral will be attached
  520. ;       to, use this dialog box to get the information from the user.
  521. ;
  522. ;       Also, determine whether said user intends to use a mouse at the same
  523. ;       time as the peripheral.  This determines which mouse driver should
  524. ;       be copied to the mouse.drv= line in the [boot] section of SYSTEM.INI
  525. ;
  526.  
  527. ifstr $(AskStupidQuestions) == "TRUE"
  528. com-port =    read-syms "Com Port Variables"
  529.                 set RadioDefault = $(ComPortBUT)
  530.  
  531.       ui  start  RADIO2
  532.  
  533.       set ComPortBUT = $(ButtonChecked)
  534.       ifint $(ComPortBUT) == 1
  535.               set ComPort = 1    ; have to do this since variables are strings & I can't do math on them
  536.       else
  537.               set ComPort = 2
  538.       endif
  539.       ifstr      $(DLGEVENT) == "CONTINUE"
  540.          ui pop 1
  541.          ;; goto "get-dest"  ;; fall through
  542.       else   ;;  $(DLGEVENT) == "EXIT"
  543.          set  CurrentDialog = "com-port"
  544.          goto "quit"
  545.       endif
  546.  
  547. ;
  548. ;***** Ask if they will be using a mouse & tablet at the same time.  This
  549. ;      determines which driver will be put on the mouse.drv= line in the
  550. ;      [boot] section of SYSTEM.INI.
  551. ;
  552. ;      Only ask this question if they are NOT running nomouse.drv. 
  553. ;      A "pen only" response to this question will result in their
  554. ;      mouse driver being set to the value of $(MOUSE) from the top
  555. ;      of this file.  A "both" response results in the mouse driver
  556. ;      line being unmodified.
  557. ;
  558. use-mouse = ifstr(i) $(MouseDrv) != "nomouse.drv"
  559.                read-syms  "Use Mouse Variables"
  560.                set UseMouse = "NO"
  561.                ui  start  INFO3
  562.                ifstr      $(DLGEVENT) == "CONTINUE"
  563.                   ui pop 1
  564.                   set UseMouse = "YES"
  565.                else   ;;  $(DLGEVENT) == "EXIT"
  566.                   ui pop 1
  567.                   set UseMouse = "NO"
  568.                endif
  569.             endif
  570. endif ; AskStupidQuestions
  571.  
  572.  
  573. ;
  574. ;*****  Now that the preliminaries are out of the way we can
  575. ;       start to install files!!!
  576. ;
  577. inst =  IfStr $(OutOfSpace) != "TRUE"
  578.  
  579. ;****** First, back up the existing files we want saved to the RESTORE
  580. ;       directory.
  581. ;
  582. ;       Possibilities include the *.MOD files, any .INI files modified by 
  583. ;       setup, and the .HLP files if the BackupHelpFiles variable is set to
  584. ;       true.
  585. ;
  586.       install  "Backup Script" 
  587.             IfStr $(OutOfSpace) != "TRUE"
  588.                ifstr $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  589.                   read-syms  "Exit-UserQuit Message Variables"
  590.                   ui start INFO1
  591.                   ui pop 1
  592.                   exit
  593.                else-ifstr $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  594.                   read-syms  "Exit-Failure Message Variables"
  595.                   ui start INFO1
  596.                   ui pop 1
  597.                   exit
  598.                endif
  599.             Else
  600.                goto "no-space"
  601.             EndIf
  602. ;
  603. ;****** Now the fun part ... Open the user's system.ini file and try to
  604. ;       remove any *OLD* .386 devices found there (from previous pen installs)
  605. ;       The list of OLD files is called ExList
  606. ;
  607. ;       If you're absolutely sure that the user will never have any other 
  608. ;       driver on his machine, you can comment out this call
  609. ;
  610.       ui start WExclusionList
  611.       IfStr $(BAD_SYS_INI) == "TRUE"
  612.          read-syms "Bad-SysIni Variables"
  613.          ui start MESSAGEBOX
  614.       EndIf
  615.    EndIf
  616.  
  617. ;
  618. ;****** Remove the *.mod files (based on keyboard availiblity).  This
  619. ;       is set at the top of STFSETUP.INF in the "General Variables"
  620. ;       section to 2 by default.
  621. ;
  622.    IfInt $(KeyboardChoice) != 1
  623.            ForListDo $(RemoveDOSList)
  624.          set RemoveFile = $(SystemDir)$($)
  625.          ui start URemoveFile
  626.            EndForListDo
  627.    EndIf
  628.  
  629. ;
  630. ;****** Remove WINTUTOR.EXE if it exists because it is not compatible
  631. ;       with the pen.  It is replaced with the Pen CBT.
  632. ;
  633. ifstr $(WintutorExist) == "YES"
  634.    set RemoveFile = $(WinDir)"WINTUTOR.EXE"
  635.    ui start URemoveFile
  636. endif
  637.  
  638. ;
  639. ;****** The actual install script
  640. ;
  641.    install  "Install Script"
  642.    IfStr $(OutOfSpace) != "TRUE"
  643.       ifstr $(STF_INSTALL_OUTCOME) == "STF_SUCCESS"
  644.          ui start XRegisterNoteIt
  645.          ifstr(i) $(NOTEIT_REG) == "FAILURE"
  646.             read-syms "Bad-NoteIt-Reg Variables"
  647.             ui start MESSAGEBOX
  648.          endif
  649.  
  650. ifstr $(STF_MODE) != "ADMIN"
  651. ;
  652. ;****** Don't show exit dialog if within Windows setup
  653. ;
  654.          read-syms  "Exit-Success Message Variables"
  655.          ui start INFO1
  656.          ui pop 1
  657. endif
  658.       else-ifstr $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  659.          read-syms  "Exit-UserQuit Message Variables"
  660.          ui start INFO1
  661.          ui pop 1
  662.       else   ;;  $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  663.          read-syms  "Exit-Failure Message Variables"
  664.          ui start INFO1
  665.          ui pop 1
  666.       endif
  667.    Else
  668.       goto "no-space"
  669.    EndIf
  670.  
  671.    exit
  672.  
  673.  
  674. quit = ui  start  QUIT
  675.  
  676.       ifstr(i) $(DLGEVENT) == "CONTINUE"
  677.          ui   pop 1
  678.          goto $(CurrentDialog)
  679.       else
  680.          exit
  681.       endif
  682.  
  683.  
  684. wrong-version = read-syms "Version MB Variables"
  685.            ui start MESSAGEBOX
  686.            exit
  687.  
  688.  
  689. no-space = read-syms "No Space MB Variables"
  690.            ui start MESSAGEBOX
  691.            exit
  692.  
  693.  
  694. ;*************************************************************************
  695. ;********************* THE FILE DESCRIPTION PART *************************
  696. ;*************************************************************************
  697.  
  698. ;
  699. ;***** General Notes: 
  700. ;        - Try to keep sizes up to date.  They are used by GetCopyListCost
  701. ;          to determine if there is disk space available
  702. ;        - VERSION should always be accurate since it is used by VER.DLL
  703. ;          to decide whether it needs to install a new version of the file.
  704. ;          This number is the same as that used in the Windows 3.1 Version
  705. ;          stamping of the file concerned.
  706. ;        - If you specify DEST you should also probably specify ROOT, 
  707. ;          otherwise the file gets installed in a subdir of the same 
  708. ;          name as the source of the file.
  709. ;
  710. ;            ie if source is a:\drivers\tablet.drv and destination is 
  711. ;               \WinDir.  It will actually get installed in \WinDir\drivers
  712. ;               unless ROOT is specifed.
  713.  
  714.  
  715. [Source Media Descriptions]
  716.         1 = "Microsoft Windows for Pen Computing Disk 1", TAGFILE = "DISK1"
  717.         2 = "Microsoft Windows for Pen Computing Disk 2", TAGFILE = "DISK2"
  718.         3 = "Microsoft Windows for Pen Computing Disk 3", TAGFILE = "DISK3"
  719.         5 = "Backup Existing Files"
  720.  
  721. [Bin-Files]
  722.         1, PENWIN.INI,     SIZE=778    ,  DEST=$(WinDir), BACKUP="penwin.bak", OVERWRITE=NEVER, ROOT
  723.         2, BASICS.HLP,     SIZE=30391
  724.         2, CONTROL.HLP,    SIZE=159941 ,  DEST=$(WinDir), ROOT
  725.         1, CPCAL.CPL,      SIZE=20944  ,  VERSION="01,00,5001"
  726.         1, CPHW.CPL,       SIZE=44176  ,  VERSION="01,00,5003"
  727.         1, CPPEN.CPL,      SIZE=14320  ,  VERSION="01,00,5001"
  728.         1, MAINDICT.DLL,   SIZE=12304  ,  VERSION="01,00,5006"
  729.         1, MSSPELL.DLL,    SIZE=76800  ,  VERSION="01,00,00,00", DEST=$(ProofDir), ROOT
  730.         1, MSSP_AM.LEX,    SIZE=176839 ,  DEST=$(ProofDir), ROOT
  731.  
  732.         1, PENHOOK.DLL,    SIZE=5440   ,  VERSION="01,00,5003"
  733.         1, PENPAL.EXE,     SIZE=131168 ,  VERSION="01,00,5005"
  734.         1, PENPAL.HLP,     SIZE=48513
  735.  
  736.         1, PENWIN.DLL,     SIZE=131168 ,  VERSION="01,00,5011"
  737.         1, ROTATE.DRV,     SIZE=83536  ,  DEST=$(SystemDir), ROOT
  738.         1, SFORM.EXE,      SIZE=12288
  739.         1, SHAPEREC.DLL,   SIZE=5632   ,  VERSION="01,00,5000", DEST=$(SystemDir), ROOT
  740.         1, SKB.EXE,        SIZE=8736   ,  VERSION="01,00,5002"
  741.         1, TRAINER.EXE,    SIZE=8944   ,  VERSION="01,00,5002"
  742.         1, USERDICT.DLL,   SIZE=11136  ,  VERSION="01,00,5006"
  743.         1, WINTUTOR.EXE,   SIZE=212368 ,  VERSION="01,00,5002", DEST=$(WinDir), ROOT
  744.  
  745. ;   MS Reco
  746.  
  747. ;;        1, MARS.DLL,       SIZE=146736 ,  VERSION="01,00,5010"
  748. ;;        1, MARS.HLP,       SIZE=28372  ,  DEST=$(WinDir), ROOT
  749. ;;        1, MARS.MOB,       SIZE=139600
  750.  
  751. ;   CIC Reco files
  752.  
  753.         3, EDIC1.bin,   SIZE=1082
  754.         3, EDIC2.bin,   SIZE=4205
  755.         3, EDIC3.bin,   SIZE=4199
  756.         3, EDIC4.bin,   SIZE=1390
  757.         3, GDIC1.bin,   SIZE=2030
  758.         3, LDIC1.bin,   SIZE=21686
  759.         3, LDIC2.bin,   SIZE=25117
  760.         3, LDIC3.bin,   SIZE=6177
  761.         3, LDIC4.bin,   SIZE=382
  762.         3, MDIC1.bin,   SIZE=195
  763.         3, MDIC2.bin,   SIZE=274
  764.         3, CICREC.DLL,  SIZE=6103
  765.         3, CICREC32.DLL,SIZE=595642
  766.         3, CICWL.TXT,   SIZE=5070
  767.  
  768.         3, CICTRAIN.EXE,SIZE=56320
  769.  
  770.         1, CICRDME.WRI ,SIZE=2048
  771.  
  772. [WinCom-Files]
  773.         1, WIN.COM,        SIZE=46988  ,  DEST=$(WinDir), ROOT, OVERWRITE="ALWAYS"
  774.  
  775. [Rotate-Files]
  776.         1, CPROT.CPL,      SIZE=15872  ,  VERSION="01,00,5001"
  777.  
  778. [YESMOUSE-Files]
  779.         1, YESMOUSE.DRV, SIZE=416 , DEST=$(SystemDir), ROOT
  780.  
  781. [Pen-Driver-Files]
  782.         1, ccpen.386,     SIZE=10640 , DEST=$(SystemDir), ROOT
  783.         1, ccpen.DRV,     SIZE=14540 , DEST=$(SystemDir), ROOT
  784.  
  785.  
  786. [Ole-Files]
  787.         2, PENCLI.DLL,    SIZE=86016 ,  DEST=$(SystemDir), ROOT, VERSION="01,03,00,00"
  788.         2, PENSVR.DLL,    SIZE=26624 ,  DEST=$(SystemDir), ROOT, VERSION="01,03,00,00"
  789.  
  790. [Notebook-Files]
  791.         2, NOTEBOOK.INI,  SIZE=29,     DEST=$(WinDir), ROOT
  792.         2, NOTEBOOK.HLP,  SIZE=64170
  793.         2, GSDLL.DLL,     SIZE=26352 , VERSION="01,00,5018,00"
  794.         2, NOTEBOOK.EXE,  SIZE=225216, VERSION="01,00,5018,00"
  795.         2, TEXTOBJ.EXE,   SIZE=217488, VERSION="01,00,5018,00"
  796.         2, TODLL.DLL,     SIZE=10508 , VERSION="01,00,5018,00"
  797.  
  798. [Note-it-Files]
  799.         2, NOTE-IT.EXE,   SIZE=59696 , VERSION="02,00,00,00", DEST=$(NoteItDir), ROOT
  800.         2, NOTE-IT.HLP,   SIZE=26616 , DEST=$(NoteItDir), ROOT
  801.  
  802. ; The following must be in the same order as the list in 
  803. ; the [Keyboard-Drv] section above
  804. ;
  805. [Intl-Skbs]            
  806.    2, SKBBE.DLL, SIZE=3056
  807.    2, SKBCA.DLL, SIZE=3056
  808.    2, SKBDA.DLL, SIZE=3056
  809.    2, SKBDV.DLL, SIZE=3056
  810.    2, SKBFC.DLL, SIZE=3056
  811.    2, SKBFI.DLL, SIZE=3056
  812.    2, SKBFR.DLL, SIZE=3056
  813.    2, SKBGR.DLL, SIZE=2960
  814.    2, SKBIC.DLL, SIZE=3056
  815.    2, SKBIT.DLL, SIZE=3056
  816.    2, SKBLA.DLL, SIZE=3056
  817.    2, SKBNE.DLL, SIZE=3056
  818.    2, SKBNO.DLL, SIZE=3056
  819.    2, SKBPO.DLL, SIZE=3056
  820.    2, SKBSF.DLL, SIZE=3056
  821.    2, SKBSG.DLL, SIZE=2960
  822.    2, SKBSP.DLL, SIZE=3056
  823.    2, SKBSW.DLL, SIZE=3056
  824.    2, SKBUK.DLL, SIZE=3056
  825.    2, SKBUSX.DLL, SIZE=3056
  826.  
  827. ;
  828. ; The following must be in the same order as the list in 
  829. ; the [Video-Drv] section above
  830. ;
  831. [Video-Pen-Drv]            
  832.    3, 8514P.DRV   , SIZE=92624,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  833.    3, EGAP.DRV    , SIZE=71792,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  834.    3, EGAHIBWP.DRV, SIZE=45488,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  835.    3, EGAMONOP.DRV, SIZE=45584,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  836.    3, OLIBWP.DRV  , SIZE=49936,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  837.    3, HERCP.DRV   , SIZE=49520,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  838.    3, PLASMAP.DRV , SIZE=49376,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  839.    3, SVGAP.DRV   , SIZE=73824,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  840.    3, TIGAP.DRV   , SIZE=75056,  VERSION="03,0,0,0",    DEST=$(SystemDir), ROOT
  841.    3, VGAP.DRV    , SIZE=73856,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  842.    3, V7VGAP.DRV  , SIZE=101872, VERSION="03,10,0,0",   DEST=$(SystemDir), ROOT
  843.    3, VGAMONOP.DRV, SIZE=45312,  VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  844.    3, XGAP.DRV    , SIZE=141312, VERSION="03,10,0,103", DEST=$(SystemDir), ROOT
  845.  
  846. ;
  847. ; The following get backed up to the RESTORE directory
  848. ;    
  849. [Special-Case-Files]
  850.         5, SYSTEM.INI  SIZE=10000,  !SETTIMESTAMP
  851.         5, CONTROL.INI SIZE=10000,  !SETTIMESTAMP
  852.         5, WIN.INI     SIZE=10000,  !SETTIMESTAMP
  853.  
  854. [WinComBackup]
  855.         5, WIN.COM     SIZE=50000,  !SETTIMESTAMP
  856.  
  857. [Wintutor]
  858.         5, WINTUTOR.EXE, SIZE=124416, !SETTIMESTAMP
  859.  
  860. [Control-Help]
  861.         5, CONTROL.HLP ,  SIZE=121672, !SETTIMESTAMP
  862.  
  863. [OldApp-Files]
  864.         5, WINOLDAP.MOD,  SIZE=31232, !SETTIMESTAMP
  865.         5, WINOA386.MOD,  SIZE=49248, !SETTIMESTAMP
  866.  
  867. [NewApp-Files]
  868.         1, WINOLDAP.MOD,  SIZE=30720 , DEST=$(SystemDir), ROOT
  869.         1, WINOA386.MOD,  SIZE=49376 , DEST=$(SystemDir), ROOT, VERSION="03,10,00,103"
  870.  
  871.  
  872. ;
  873. ; Make sure that the following list matches the Backup-31-Files list
  874. ;
  875. [Replace-31-Files]   
  876.         2, CALC.HLP,     SIZE=21233  ,   DEST=$(WinDir), ROOT
  877.         2, CHARMAP.HLP,  SIZE=8103   ,   DEST=$(WinDir), ROOT
  878.         2, CLIPBRD.HLP,  SIZE=21327  ,   DEST=$(WinDir), ROOT
  879.         2, GLOSSARY.HLP, SIZE=43882  ,   DEST=$(WinDir), ROOT
  880.         2, HPPCL5A.HLP,  SIZE=31293  ,   DEST=$(SystemDir), ROOT
  881.         2, HPPCL5OP.HLP, SIZE=12100  ,   DEST=$(SystemDir), ROOT
  882.         2, MPLAYER.HLP,  SIZE=14186  ,   DEST=$(WinDir), ROOT
  883.         2, NOTEPAD.HLP,  SIZE=22550  ,   DEST=$(WinDir), ROOT
  884.         2, PACKAGER.HLP, SIZE=24641  ,   DEST=$(WinDir), ROOT
  885.         2, PBRUSH.HLP,   SIZE=60628  ,   DEST=$(WinDir), ROOT
  886.         2, PIFEDIT.HLP,  SIZE=42446  ,   DEST=$(WinDir), ROOT
  887.         2, POWER.HLP,    SIZE=13179  ,   DEST=$(SystemDir), ROOT
  888.         2, PRINTMAN.HLP, SIZE=54142  ,   DEST=$(WinDir), ROOT
  889.         2, PROGMAN.HLP,  SIZE=48009  ,   DEST=$(WinDir), ROOT
  890.         2, PSCRIPT.HLP,  SIZE=43369  ,   DEST=$(SystemDir), ROOT
  891.         2, REGEDIT.HLP,  SIZE=24049  ,   DEST=$(WinDir), ROOT
  892.         2, SETUP.HLP,    SIZE=51721  ,   DEST=$(WinDir), ROOT
  893.         2, SL.HLP,       SIZE=15688  ,   DEST=$(SystemDir), ROOT
  894.         2, SOL.HLP,      SIZE=14606  ,   DEST=$(WinDir), ROOT
  895.         2, SOUNDREC.HLP, SIZE=19000  ,   DEST=$(WinDir), ROOT
  896.         2, TERMINAL.HLP, SIZE=50748  ,   DEST=$(WinDir), ROOT
  897.         2, TTY.HLP,      SIZE=15523  ,   DEST=$(SystemDir), ROOT
  898.         2, UNIDRV.HLP,   SIZE=30572  ,   DEST=$(SystemDir), ROOT
  899.         2, WINFILE.HLP,  SIZE=88532  ,   DEST=$(WinDir), ROOT
  900.         2, WINHELP.HLP,  SIZE=44534  ,   DEST=$(WinDir), ROOT
  901.         2, WINMINE.HLP,  SIZE=13166  ,   DEST=$(WinDir), ROOT
  902.         2, WRITE.HLP,    SIZE=58755  ,   DEST=$(WinDir), ROOT
  903.  
  904. ;
  905. ; Make sure that the following list matches the Replace-31-Files list
  906. ;
  907. [Backup-31-Files] 
  908.         5, CALC.HLP            , SIZE=18076  , !SETTIMESTAMP
  909.         5, CHARMAP.HLP         , SIZE=10797  , !SETTIMESTAMP
  910.         5, CLIPBRD.HLP         , SIZE=13071  , !SETTIMESTAMP
  911.         5, GLOSSARY.HLP        , SIZE=46570  , !SETTIMESTAMP
  912.         5, SYSTEM\HPPCL5A.HLP  , SIZE=21805  , !SETTIMESTAMP
  913.         5, SYSTEM\HPPCL5OP.HLP , SIZE=13195  , !SETTIMESTAMP
  914.         5, MPLAYER.HLP         , SIZE=12896  , !SETTIMESTAMP
  915.         5, NOTEPAD.HLP         , SIZE=13894  , !SETTIMESTAMP
  916.         5, PACKAGER.HLP        , SIZE=21156  , !SETTIMESTAMP
  917.         5, PBRUSH.HLP          , SIZE=40269  , !SETTIMESTAMP
  918.         5, PIFEDIT.HLP         , SIZE=33270  , !SETTIMESTAMP
  919.         5, SYSTEM\POWER.HLP    , SIZE=13100  , !SETTIMESTAMP
  920.         5, PRINTMAN.HLP        , SIZE=40880  , !SETTIMESTAMP
  921.         5, PROGMAN.HLP         , SIZE=30911  , !SETTIMESTAMP
  922.         5, SYSTEM\PSCRIPT.HLP  , SIZE=43793  , !SETTIMESTAMP
  923.         5, REGEDIT.HLP         , SIZE=22681  , !SETTIMESTAMP
  924.         5, SETUP.HLP           , SIZE=41453  , !SETTIMESTAMP
  925.         5, SYSTEM\SL.HLP       , SIZE=15841  , !SETTIMESTAMP
  926.         5, SOL.HLP             , SIZE=13753  , !SETTIMESTAMP
  927.         5, SOUNDREC.HLP        , SIZE=17686  , !SETTIMESTAMP
  928.         5, TERMINAL.HLP        , SIZE=36279  , !SETTIMESTAMP
  929.         5, SYSTEM\TTY.HLP      , SIZE=14666  , !SETTIMESTAMP
  930.         5, SYSTEM\UNIDRV.HLP   , SIZE=31429  , !SETTIMESTAMP
  931.         5, WINFILE.HLP         , SIZE=76855  , !SETTIMESTAMP
  932.         5, WINHELP.HLP         , SIZE=26960  , !SETTIMESTAMP
  933.         5, WINMINE.HLP         , SIZE=12754  , !SETTIMESTAMP
  934.         5, WRITE.HLP           , SIZE=36971  , !SETTIMESTAMP
  935.  
  936.  
  937.  
  938. ;*************************************************************************
  939. ;********************* THE INSTALL SCRIPT PART ***************************
  940. ;*************************************************************************
  941.  
  942. ;
  943. ;  This is the script that actually copies all files that need to be
  944. ;  backed up to the RESTORE directory
  945. ;
  946. [Backup Script]
  947.    set STF_DATE = $(SHIPDATE)
  948.    set STF_OVERWRITE = NEVER
  949.  
  950.    CreateDir  $(DEST)
  951.    CreateDir  $(REST)
  952.  
  953.    AddSectionFilesToCopyList  "Special-Case-Files"  $(WinDir)  $(REST)
  954.    IfStr $(WintutorExist) == "YES"
  955.       AddSectionFilesToCopyList  "Wintutor"  $(WinDir)  $(REST) 
  956.    EndIf
  957. ;
  958. ; Commented this out for the tablet release.  No help files should
  959. ; be backed up to the RESTORE directory for this release.
  960. ;
  961. ;   IfStr $(ControlHelpExist) == "YES"
  962. ;      AddSectionFilesToCopyList  "Control-Help"  $(WinDir)  $(REST) 
  963. ;   EndIf
  964.  
  965.  
  966.    IfInt $(KeyboardChoice) != 1
  967.       ForListDo ^(OldApp-Files,2)
  968.          ifstr $("FindSysFile"$(#)) == "YES"
  969.             AddNthSectionFileToCopyList "OldApp-Files"  $(#)  $(SystemDir)  $(REST) 
  970.          endif
  971.       EndForListDo
  972.    EndIf
  973. ;
  974. ; BackupHelpFiles should be FALSE for the tablet release
  975. ;
  976.    IfStr $(BackupHelpFiles) == "TRUE"
  977.       ForListDo ^(Backup-31-Files,2)
  978.          ifstr $("FindFile"$(#)) == "YES"
  979.             AddNthSectionFileToCopyList "Backup-31-Files"  $(#)  $(WinDir)  $(REST) 
  980.          endif
  981.       EndForListDo
  982.    EndIf
  983.  
  984. ;
  985. ; Give them the groovy new win.com if their video can take it
  986. ;
  987.    IfContains(I) $(VideoPenDrv) IN $(VidList)
  988.       AddSectionFilesToCopyList  "WinComBackup"  $(WinDir)  $(REST) 
  989.    Endif
  990.  
  991.    ; 
  992.    ; Given the copy list created above, how much disk space to we need
  993.    ; and how much do we have?
  994.    ;
  995.    SetupGetCopyListCost FreePerDisk ClusterPerDisk TotalFree
  996.    GetCopyListCost      AddNeeded TotalFree TotalNeeded FreePerDisk ClusterPerDisk TroublePairs NeededPerDisk ExtraCosts
  997.  
  998.  
  999.    ;
  1000.    ; If we ain't got the space, put out of here after setting flag so that
  1001.    ; user gets warned.  Else, DO IT
  1002.    ;
  1003.    IfInt $(TotalNeeded) > $(TotalFree)
  1004.       set OutOfSpace = "TRUE"
  1005.       exit
  1006.    Else
  1007.       CopyFilesInCopyList
  1008.    EndIf
  1009.  
  1010.    exit
  1011.  
  1012.  
  1013. ;
  1014. ;  The following is the workhorse of the installation script.
  1015. ;
  1016. [Install Script]
  1017.  
  1018.     ClearCopyList               ; In case this is the second time through
  1019.     set STF_OVERWRITE = ALWAYS
  1020.  
  1021.     ; Build copy lists section by section for penwin runtime
  1022.     ForListDo $(Runtime_List)
  1023.          AddSectionFilesToCopyList   $($)  $(STF_SRCDIR) $(DEST) DATE=$(SHIPDATE) SETTIMESTAMP
  1024.     EndForListDo
  1025.  
  1026.     ; grab the drivers
  1027.     AddSectionFilesToCopyList  "Pen-Driver-Files" $(STF_SRCDIR)  $(DEST) DATE=$(SHIPDATE) SETTIMESTAMP
  1028.  
  1029.     ; get the right mouse driver
  1030.     IfStr $(UseMouse) == "NO"
  1031.             AddSectionFilesToCopyList  "YESMOUSE-Files"  $(STF_SRCDIR)  $(DEST) DATE=$(SHIPDATE) SETTIMESTAMP
  1032.     EndIf
  1033.  
  1034.     ; Get the .MOD files
  1035.     IfInt $(KeyboardChoice) != 1
  1036.             AddSectionFilesToCopyList  "NewApp-Files"  $(STF_SRCDIR)  $(DEST) DATE=$(SHIPDATE) SETTIMESTAMP
  1037.     EndIf
  1038.  
  1039.     ; ... and the international on screen keyboard file
  1040.     ifstr $(KeyboardDll) != ""
  1041.       ifstr $(FoundDLL) == "TRUE"
  1042.          AddNthSectionFileToCopyList "Intl-Skbs"  $(ListIndex)  $(STF_SRCDIR)  $(DEST) DATE=$(SHIPDATE) SETTIMESTAMP
  1043.       EndIf
  1044.     EndIf
  1045.  
  1046.     ; ... and the video driver
  1047.     ifstr $(FoundVidMatch) == "TRUE"
  1048.        AddNthSectionFileToCopyList "Video-Pen-Drv"  $(VideoListIndex)  $(STF_SRCDIR)  $(DEST) DATE=$(SHIPDATE) SETTIMESTAMP
  1049.     endif
  1050.  
  1051.    ; ... and the help files... maybe
  1052.  
  1053.    IfStr $(ReplaceHelpFiles) == "TRUE"
  1054.       ForListDo ^(Replace-31-Files,2)
  1055.          ifstr $("FindFile"$(#)) == "YES"
  1056.             AddNthSectionFileToCopyList "Replace-31-Files"  $(#)  $(STF_SRCDIR) $(WinDir)
  1057.          endif
  1058.       EndForListDo
  1059.    EndIf
  1060.  
  1061.    ; .... Add the rotate control panel applet only if they are using VGAP.DRV
  1062.  
  1063.    IfStr(I) $(VideoPenDrv) == "vgap.drv"
  1064.       AddSectionFilesToCopyList  "Rotate-Files"  $(STF_SRCDIR)  $(DEST) DATE=$(SHIPDATE) SETTIMESTAMP
  1065.    EndIf
  1066.  
  1067. ;
  1068. ; Give them the groovy new win.com if their video can take it
  1069. ;
  1070.    IfContains(I) $(VideoPenDrv) IN $(VidList)
  1071.       AddSectionFilesToCopyList  "WinCom-Files"  $(STF_SRCDIR) $(DEST)  DATE=$(SHIPDATE) SETTIMESTAMP
  1072.    Endif
  1073.  
  1074.    ; 
  1075.    ; Given the copy list created above, how much disk space to we need
  1076.    ; and how much do we have?
  1077.    ;
  1078.    SetupGetCopyListCost FreePerDisk ClusterPerDisk TotalFree
  1079.    GetCopyListCost      AddNeeded TotalFree TotalNeeded FreePerDisk ClusterPerDisk TroublePairs NeededPerDisk ExtraCosts
  1080.  
  1081.  
  1082.    ;
  1083.    ; If we ain't got the space, put out of here after setting flag so that
  1084.    ; user gets warned.  Else, DO IT
  1085.    ;
  1086.    IfInt $(TotalNeeded) > $(TotalFree)
  1087.       set OutOfSpace = "TRUE"
  1088.       exit
  1089.    Else
  1090.       CopyFilesInCopyList
  1091.    EndIf
  1092.  
  1093.  
  1094. ;
  1095. ;   The following section modifies the SYSTEM.INI file with the appropriate
  1096. ;   flags
  1097. ;
  1098.    set INI = $(WinDir)$(SYS_INI)
  1099.  
  1100. ;
  1101. ;  If we are running within the Windows 3.1 Setup, we need to fool progman 
  1102. ;  into thinking that it is not the shell...  So... set the shell= line in 
  1103. ;  SYSTEM.INI to SETUP.EXE.  Also, don't allow startup group items to
  1104. ;  run.  We're gonna undo all of this... but for now... its done.
  1105. ;
  1106.  
  1107. ifstr $(STF_MODE) == "ADMIN"
  1108.         ReplaceIniKeyValue $(INI)  "boot"  "shell"  "setup.exe" V
  1109.         ReplaceIniKeyValue $(WinDir)"progman.ini"  "settings"  "startup"  "no" V
  1110. endif
  1111.     ifstr $(FoundVidMatch) == "TRUE"
  1112.         CreateIniKeyValue $(INI)  "boot"  "display.drv"    $(VideoPenDrv)  O V
  1113.     endif
  1114.         CreateIniKeyValue $(INI)  "boot"  "PenWinErrors"  "1"              O V
  1115.     ifstr $(HAS_PEN) == "NO"
  1116.         AppendIniKeyValue $(INI)  "boot"  "drivers"      "pen"               V
  1117.     endif
  1118.     ifstr $(HAS_PENWIN) == "NO"
  1119.         AppendIniKeyValue $(INI)  "boot"  "drivers"      "penwindows"        V
  1120.     endif
  1121.     ifstr $(USING_MSMOUSE) == "YES"
  1122.         CreateIniKeyValue $(INI)  "boot"  "mouse.drv"  "mouse.drv"         O
  1123.     endif
  1124.     ifstr $(UseMouse) == "NO"
  1125.         CreateIniKeyValue $(INI)  "boot"  "mouse.drv"  $(YesMouse)         O
  1126.     endif
  1127.  
  1128.     ifstr $(FoundVidMatch) == "TRUE"
  1129.         ReplaceIniKeyValue $(INI)  "boot.description"  "display.drv"  $(VideoPenDrv)" (Pen Video Driver)" V
  1130.     endif
  1131.  
  1132.         CreateIniKeyValue $(INI)  "drivers"    "pen"          $(DRIVER)    O V
  1133.         CreateIniKeyValue $(INI)  "drivers"    "penwindows"   "penwin.dll" O V
  1134.  
  1135.     ifstr(I) $(VideoPenDrv) == "vgap.drv"
  1136.         CreateIniKeyValue $(INI)  "Display Driver"  "DisplayOrientation"  "0" O
  1137.         CreateIniKeyValue $(INI)  "Display Driver"  "OrientableDrivers"  "vgap.drv,rotate.drv,,rotate.drv" O V
  1138.     endif
  1139.  
  1140. ;  *** NOTE ***  If a com port has been chose by the user, the following line
  1141. ;  must be uncommented so that the info gets written to SYSTEM.INI
  1142.  
  1143. ;;      CreateIniKeyValue $(INI) "Pen Driver" "Com2"        $(ComPort) O V
  1144.  
  1145.         CreateIniKeyValue $(INI) "Pen Driver" "PenTab"      "DrawingBoardII" O
  1146.         CreateIniKeyValue $(INI) "Pen Driver" "PenCOM"      $(ComPort) O
  1147.         CreateIniKeyValue $(INI) "Pen Driver" "Pressure"    "1"        O
  1148. ;;      CreateIniKeyValue $(INI) "Pen Driver" "PressDown"   "6"        O
  1149.         CreateIniKeyValue $(INI) "Pen Driver" "SideButtons" "2"        O
  1150.  
  1151. ;
  1152. ; *************** The PENWIN.INI mods
  1153. ;
  1154.    set INI = $(WinDir)$(PEN_INI)
  1155. ;
  1156. ;  ********* Remove the hardcoded stuff from penwin.ini
  1157. ;
  1158.         RemoveIniKey      $(INI)  "Dictionary List" "c:\pensdk\bin\maindict.dll"
  1159. ;;        RemoveIniKey      $(INI)  "Recognizer List" "c:\pensdk\bin\mars.dll"
  1160.         RemoveIniKey      $(INI)  "Recognizer List" "c:\pensdk\bin\cicrec.dll"
  1161.  
  1162.         RemoveIniKey      $(INI)  "MsSpell"         "c:\pensdk\bin\msspell.dll"
  1163.         RemoveIniSection  $(INI)  "*User 1.Dictionary List"
  1164.  
  1165.    ReplaceIniKeyValue $(INI) "Current" "InkColor" $(PEN_COLOR) V
  1166. ;
  1167. ;****** Add the new stuff back in
  1168. ;
  1169. ;;        CreateIniKeyValue $(INI)  "*User 1"         "Recognizer"  $(DEST)"MARS.DLL" O
  1170.         CreateIniKeyValue $(INI)  "*User 1"         "Recognizer"  $(DEST)"CICREC.DLL" O
  1171.         CreateIniKeyValue $(INI)  "Dictionary List"               $(DEST)"MAINDICT.DLL"  "" O
  1172.         CreateIniKeyValue $(INI)  "*User 1.Dictionary List" "0" $(DEST)"MAINDICT.DLL" O
  1173. ;;        CreateIniKeyValue $(INI)  "Recognizer List"               $(DEST)"MARS.DLL"  "" O
  1174.         CreateIniKeyValue $(INI)  "Recognizer List"               $(DEST)"CICREC.DLL"  "" O
  1175.  
  1176.  
  1177.         CreateIniKeyValue $(INI)  "MsSpell"               $(ProofDir)"MSSPELL.DLL"  "" O
  1178.         CreateIniKeyValue $(INI)  "MsMainDict"            "enuMain"  $(ProofDir)"MSSP_AM.LEX" O
  1179.  
  1180.  
  1181.    ifInt $(KeyboardChoice) == 1
  1182.            CreateIniKeyValue $(INI)  "MS-DOS"  "EnableMSDOS"  "1" O V
  1183.         Else-IfInt $(KeyboardChoice) == 2
  1184.            CreateIniKeyValue $(INI)  "MS-DOS"  "EnableMSDOS"  "2" O V
  1185.         Else-IfInt $(KeyboardChoice) == 3
  1186.            CreateIniKeyValue $(INI)  "MS-DOS"  "EnableMSDOS"  "0" O V
  1187.    EndIf
  1188.  
  1189. ;
  1190. ; *************** The CONTROL.INI mods
  1191. ;
  1192.    set INI = $(WinDir)$(CPL_INI)
  1193.  
  1194.  
  1195.         CreateIniKeyValue $(INI)  "MMCPL"  "cppen"   $(DEST)"CPPEN.CPL" O
  1196.         CreateIniKeyValue $(INI)  "MMCPL"  "cphw"    $(DEST)"CPHW.CPL" O
  1197.         CreateIniKeyValue $(INI)  "MMCPL"  "cpcal"   $(DEST)"CPCAL.CPL" O
  1198.         IfStr(I) $(VideoPenDrv) == "vgap.drv"
  1199.            CreateIniKeyValue $(INI)  "MMCPL"  "cprot"   $(DEST)"CPROT.CPL" O
  1200.    Endif
  1201. ;
  1202. ; *************** The WIN.INI mods
  1203. ;
  1204.    set INI = $(WinDir)$(WIN_INI)
  1205.  
  1206.    IfInt $(Width) < 5
  1207.       ReplaceIniKeyValue $(INI)  "windows"  "BorderWidth"  5 V
  1208.    EndIf
  1209.  
  1210.         ReplaceIniKeyValue $(INI)  "windows"  "DoubleClickWidth"  35 V
  1211.         ReplaceIniKeyValue $(INI)  "windows"  "DoubleClickHeight" 35 V
  1212.  
  1213.  
  1214.    ; if the iCountry value does not exist, write it
  1215.  
  1216.    ifstr(i) $(DoesiCountryExist) == "NO"     
  1217.         CreateIniKeyValue $(INI)  "Intl" "iCountry"  "1" V
  1218.    endif
  1219.  
  1220.  
  1221. ;  The following two lines will set the color for Windows Help links
  1222. ;  to black.  Certain integrated displays have trouble displaying the
  1223. ;  default green color.
  1224. ;
  1225. ;        CreateIniKeyValue $(INI)  "Windows Help"  "JumpColor"   "000 000 000" O
  1226. ;        CreateIniKeyValue $(INI)  "Windows Help"  "PopUpColor"   "000 000 000" O
  1227.  
  1228.  
  1229.         CreateProgManGroup $(ProgmanGroup), ""
  1230.         ShowProgManGroup   $(ProgmanGroup)  1
  1231.  
  1232.         CreateProgManItem   "StartUp" "Pen Palette" $(DEST)"penpal.exe" O
  1233.  
  1234.         CreateProgManItem $(ProgmanGroup) "Learning Pen Basics" $(WinDir)"wintutor.exe" O
  1235.         CreateProgManItem $(ProgmanGroup) "Notebook"            $(DEST)"Notebook.exe" O
  1236.         CreateProgManItem $(ProgmanGroup) "Pen Palette"         $(DEST)"penpal.exe" O
  1237.         CreateProgManItem $(ProgmanGroup) "Sample Form"         $(DEST)"sform.exe" O
  1238.         CreateProgManItem $(ProgmanGroup) "On-Screen Keyboard"  $(DEST)"skb.exe" O
  1239. ;;        CreateProgManItem $(ProgmanGroup) "Trainer"             $(DEST)"trainer.exe" O
  1240.  
  1241.         CreateProgManItem $(ProgmanGroup) "CIC Trainer"         $(DEST)"CICTRAIN.EXE" O
  1242.         CreateProgManItem $(ProgmanGroup) "CIC Readme"          $(DEST)"WRITE.EXE CICRDME.WRI" O
  1243. ;  
  1244. ;  Now, if we are running under Windows setup, undo all of the shell and
  1245. ;  progman.ini mucking we did above...
  1246. ;
  1247. ifstr $(STF_MODE) == "ADMIN"
  1248.         ReplaceIniKeyValue $(WinDir)$(SYS_INI)  "boot"  "shell"  $(ShellString) V
  1249.         RemoveIniKey      $(WinDir)"progman.ini"  "settings"  "startup"
  1250. endif
  1251.     exit 
  1252.