home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / miront35 / oemsetup.inf < prev   
INI File  |  1995-05-18  |  17KB  |  386 lines

  1. [Identification]
  2.     OptionType = VIDEO
  3.  
  4. [LanguagesSupported]
  5.     ENG
  6.  
  7. [ProgressCopyENG]
  8.     ProCaption   = "Windows NT Setup"
  9.     ProCancel    = "Cancel"
  10.     ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
  11.                    "to cancel copying files?"
  12.     ProCancelCap = "Setup Message"
  13.     ProText1     = "Copying:"
  14.     ProText2     = "To:"
  15.  
  16. [StringsENG]
  17.     String1 = "Display"
  18.     String2 = "Please enter the full path to the Windows NT Display "+
  19.               "driver files.  If you want to install files from the "+
  20.               "original Setup floppy disks, type a drive letter (such "+
  21.               "as A:) and Setup will prompt you for the correct disk.  "+
  22.               "Then choose Continue."
  23.  
  24. [Source Media Descriptions]
  25.     1 = "miro.plus high-speed drivers setup disk #1.00", TAGFILE = miro100
  26.  
  27. [OptionsTextENG]
  28.     "crystal2" = "miroCRYSTAL (TWINFACE)"
  29.     "crystals" = "miroCRYSTAL (single screen)"
  30.  
  31. [Options]
  32.     "crystals" = crystals
  33.     "crystal2" = crystal2
  34.  
  35. [MiniportDrivers]
  36.     crystals = crystals, !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {crystals}, 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {},    noconfig
  37.     crystal2 = crystal2, !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {crystal2}, 0, "%SystemRoot%\System32\IoLogMsg.dll" , 6, 1, {cpl}, twinconfig
  38.  
  39. [Files-DisplayDLLs]
  40.     crystals = 1, CRYSTALS.DLL, SIZE=110000
  41.     crystal2 = 1, CRYSTAL2.DLL, SIZE=110000
  42.  
  43. [Files-DisplayMiniportDrivers]
  44.     crystals = 1, CRYSTALS.SYS, SIZE=70000
  45.     crystal2 = 1, CRYSTAL2.SYS, SIZE=70000
  46.  
  47. [Files-Other]
  48.     cpl      = 1, CRYSTAL2.CPL, SIZE=70000
  49.  
  50. [OpenGLDrivers]
  51.  
  52. [Identify]
  53.     read-syms Identification
  54.     set Status     = STATUS_SUCCESSFUL
  55.     set Identifier = $(OptionType)
  56.     set Media      = #("Source Media Descriptions", 1, 1)
  57.     Return $(Status) $(Identifier) $(Media)
  58.  
  59. [ServicesEntry]
  60.     CurrentEntry = "" ? $(!LIBHANDLE) GetDevicemapValue Video \Device\Video0
  61.  
  62. [SystemVariables]
  63.     STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  64.     STF_WINDOWSPATH = "" ? $(!LIBHANDLE) GetWindowsNtDir
  65.  
  66. [InstallOption]
  67.     set Status       = STATUS_FAILED
  68.     set DrivesToFree = {}
  69.     set !Option   = $($1)
  70.     set SrcDir    = $($2)
  71.     set AddCopy   = $($3)
  72.     set DoCopy    = $($4)
  73.     set DoConfig  = $($5)
  74.     set DoInstall = $($6)
  75.     set LanguageList = ^(LanguagesSupported, 1)
  76.     Ifcontains(i) $($0) in $(LanguageList)
  77.     else
  78.         set Status = STATUS_NOLANGUAGE
  79.         goto finish_InstallOption
  80.     endif
  81.     read-syms Strings$($0)
  82.     ifstr(i) $(!Option) != "DETECT"
  83.         set OptionList = ^(Options, 0)
  84.         ifcontains $(!Option) in $(OptionList)
  85.         else
  86.             goto finish_InstallOption
  87.         endif
  88.         set OptionList = ""
  89.         set DriverEntry       =   #(Options, $(!Option), 1)
  90.         set MiniportDriver    =   #(MiniportDrivers, $(DriverEntry), 1)
  91.         set InstalledDisplays =   #(MiniportDrivers, $(DriverEntry), 5)
  92.         set OtherFiles        =   #(MiniportDrivers, $(DriverEntry), 10)
  93.     endif
  94.     read-syms ServicesEntry
  95.     detect    ServicesEntry
  96.     set DriversList        = ^(MiniportDrivers, 0)
  97.     set MiniportDriverList = ^(Files-DisplayMiniportDrivers, 0)
  98.     set DisplayDriverList  = ^(Files-DisplayDLLs, 0)
  99.     set OpenGLDriverList   = ^(OpenGLDrivers, 0)
  100.     set OtherFilesList     = ^(Files-Other, 0)
  101. installtheoption = +
  102.     ifstr(i) $(AddCopy) == "YES"
  103.         ifstr(i) $(!Option) == "DETECT"
  104.             set DoActualCopy = YES
  105.         else
  106.             set DoActualCopy = NO
  107.             set FileToCheck = #(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  108.             LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  109.             ifstr(i) $(STATUS) == NO
  110.                 set DoActualCopy = YES
  111.                 goto addfiles
  112.             endif
  113.             ForListDo $(OtherFiles)
  114.                  ifcontains $($) in $(OtherFilesList)
  115.                     set FileToCheck = #(Files-Other, $($), 2)
  116.                     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
  117.                     ifstr(i) $(STATUS) == NO
  118.                         set DoActualCopy = YES
  119.                         goto addfiles
  120.                     endif
  121.                  endif
  122.             EndForListDo
  123.             ForListDo $(InstalledDisplays)
  124.                 ifcontains $($) in $(DisplayDriverList)
  125.                     set FileToCheck = #(Files-DisplayDLLs, $($), 2)
  126.                     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
  127.                     ifstr(i) $(STATUS) == NO
  128.                         set DoActualCopy = YES
  129.                         goto addfiles
  130.                     endif
  131.                     ifcontains $($) in $(OpenGLDriverList)
  132.                         set FileToCheck = #(Files-DisplayOpenGLDrivers, #(OpenGLDrivers, $($), 1), 2)
  133.                         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
  134.                         ifstr(i) $(STATUS) == NO
  135.                             set DoActualCopy = YES
  136.                             goto addfiles
  137.                         endif
  138.                     endif
  139.                 endif
  140.             EndForListDo
  141.         endif
  142. addfiles = +
  143.         ifstr(i) $(DoActualCopy) == NO
  144.             shell "subroutn.inf" DriversExist $($0) $(String1)
  145.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  146.                 Debug-Output "VIDEO.INF: shelling DriversExist failed"
  147.                 goto finish_InstallOption
  148.             endif
  149.             ifstr(i) $($R0) == STATUS_CURRENT
  150.             else-ifstr(i) $($R0) == STATUS_NEW
  151.                 set DoActualCopy = YES
  152.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  153.                 Debug-Output "VIDEO.INF: User cancelled video installation"
  154.                 goto finish_InstallOption
  155.             else
  156.                 Debug-Output "VIDEO.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  157.                 goto finish_InstallOption
  158.             endif
  159.         endif
  160.         ifstr(i) $(DoActualCopy) == YES
  161.             shell "registry.inf" GetNTSource
  162.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  163.             else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
  164.             else
  165.                 set SrcDir = $($R1)
  166.             endif
  167.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  168.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  169.                 Debug-Output "VIDEO.INF: shelling DoAskSourceEx failed"
  170.                 goto finish_InstallOption
  171.             endif
  172.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  173.                 set SrcDir = $($R1)
  174.                 ifstr(i) $($R2) != ""
  175.                     set DrivesToFree = >($(DrivesToFree), $($R2))
  176.                 endif
  177.             else
  178.                 Debug-Output "VIDEO.INF: User cancelled asking source."
  179.                 goto finish_InstallOption
  180.             endif
  181.             ifstr(i) $(!Option) != "DETECT"
  182.                 install Install-AddCopyOption
  183.             else
  184.                 install Install-AddAllCopy
  185.             endif
  186.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  187.                 Debug-Output "VIDEO.INF: Adding video files to copy list failed"
  188.                 goto finish_InstallOption
  189.             endif
  190.         else
  191.             set DoCopy = NO
  192.         endif
  193.     endif
  194.     ifstr(i) $(DoCopy) == "YES"
  195.         read-syms ProgressCopy$($0)
  196.         install Install-DoCopyOption
  197.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  198.             Debug-Output "Copying files failed"
  199.             goto finish_InstallOption
  200.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  201.             set Status = STATUS_USERCANCEL
  202.             goto finish_InstallOption
  203.         endif
  204.     endif
  205.     ifstr(i) $(DoConfig) == "YES"
  206.         shell "registry.inf" CheckSetupModify
  207.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  208.             goto finish_InstallOption
  209.         endif
  210.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  211.             goto finish_InstallOption
  212.         endif
  213.         ForListDo $(DriversList)
  214.             ifstr(i) $(!Option) == "DETECT"
  215.                 set DriverEntry = $($)
  216.                 set DeviceDescription = ""
  217.                 set ErrorControl      = $(!SERVICE_ERROR_IGNORE)
  218.                 ifcontains #(MiniportDrivers, $(DriverEntry), 1) in $(MiniportDriverList)
  219.                     ifint #(MiniportDrivers, $(DriverEntry), 9) == 1
  220.                         set configDriver = YES
  221.                     else
  222.                         set configDriver = NO
  223.                     endif
  224.                 else
  225.                     set configDriver = NO
  226.                 endif
  227.             else
  228.                 set DeviceDescription = $(!Option)
  229.                 set ErrorControl      = $(#(MiniportDrivers, $(DriverEntry), 4))
  230.                 ifstr(i) $(DriverEntry) == $($)
  231.                     set configDriver = YES
  232.                 else
  233.                     set configDriver = NO
  234.                 endif
  235.             endif
  236.             ifstr(i) $(configDriver) == YES
  237.                 Debug-Output "configuring the miniport driver"
  238.                 set MiniportDriver    =   #(MiniportDrivers, $(DriverEntry), 1)
  239.                 set Type              = $(#(MiniportDrivers, $(DriverEntry), 2))
  240.                 set Group             =   #(MiniportDrivers, $(DriverEntry), 3)
  241.                 set InstalledDisplays =   #(MiniportDrivers, $(DriverEntry), 5)
  242.                 set VgaCompatible     =   #(MiniportDrivers, $(DriverEntry), 6)
  243.                 set EventMessageFile  =   #(MiniportDrivers, $(DriverEntry), 7)
  244.                 set TypesSupported    =   #(MiniportDrivers, $(DriverEntry), 8)
  245.                 set ServiceNode   = $(DriverEntry)
  246.                 set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  247.                 set ServicesValues = { +
  248.                         {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  249.                         {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  250.                         {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  251.                         {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  252.                         }
  253.                 ifstr(i) $(DoInstall) == "YES"
  254.                     set ServicesValues = >($(ServicesValues), +
  255.                             {Start,          0, $(!REG_VT_DWORD),     $(!SERVICE_SYSTEM_START) })
  256.                 else
  257.                     set ServicesValues = >($(ServicesValues), +
  258.                             {Start,          0, $(!REG_VT_DWORD),     $(!SERVICE_DISABLED)     })
  259.                 endif
  260.                 set !ParametersValues = { +
  261.                         {"Device Description",        0, $(!REG_VT_SZ),       $(DeviceDescription) }, +
  262.                         {InstalledDisplayDrivers,     0, $(!REG_VT_MULTI_SZ), $(InstalledDisplays) }, +
  263.                         {VgaCompatible,               0, $(!REG_VT_DWORD),    $(VgaCompatible)     }, +
  264.                         {DefaultSettings.BitsPerPel,  0, $(!REG_VT_DWORD),    0                    }, +
  265.                         {DefaultSettings.VRefresh,    0, $(!REG_VT_DWORD),    0                    }, +
  266.                         {DefaultSettings.Interlaced,  0, $(!REG_VT_DWORD),    0                    }, +
  267.                         {DefaultSettings.XResolution, 0, $(!REG_VT_DWORD),    0                    }, +
  268.                         {DefaultSettings.YResolution, 0, $(!REG_VT_DWORD),    0                    }  +
  269.                         }
  270.                 ifstr(i) $(!Option) != "DETECT"
  271.                     shell "" #(MiniportDrivers, $(DriverEntry), 11)
  272.                 endif
  273.                 set DeviceValues = {}
  274.                 set EventLogValues = { +
  275.                         {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  276.                         {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  277.                         }
  278.                 shell "registry.inf"  MakeServicesEntry $(ServiceNode)       +
  279.                                                         $(ServicesValues)    +
  280.                                                         $(!ParametersValues) +
  281.                                                         $(DeviceValues)      +
  282.                                                         $(EventLogValues)    +
  283.                                                         Device0
  284.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  285.                     Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  286.                     goto finish_InstallOption
  287.                 endif
  288.                 ifstr(i) $($R0) != STATUS_SUCCESSFUL
  289.                     Debug-Output "MakeServicesEntry failed for video"
  290.                     goto finish_InstallOption
  291.                 endif
  292.                 ForListDo $(InstalledDisplays)
  293.                     ifcontains $($) in $(OpenGLDriverList)
  294.                         set KeyPath = { +
  295.                                 {SOFTWARE,       0, $(MaskAllAccess)}, +
  296.                                 {Microsoft,      0, $(MaskAllAccess)}, +
  297.                                 {"Windows NT",   0, $(MaskAllAccess)}, +
  298.                                 {CurrentVersion, 0, $(MaskAllAccess)}, +
  299.                                 {OpenGLDrivers,  0, $(MaskAllAccess)}  +
  300.                                 }
  301.                         set KeyValue = { +
  302.                                 {$($), 0, $(!REG_VT_SZ), #(OpenGLDrivers, $($), 1) } +
  303.                                 }
  304.                         shell "registry.inf" CreateKey $(!REG_H_LOCAL) $(KeyPath) $(KeyValue)
  305.                         Debug-Output "just did an OGL section"
  306.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  307.                             Debug-Output "Couldn't execute CreateKey in registry.inf"
  308.                             goto endInstallOpenGLDriver
  309.                         endif
  310.                         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  311.                             Debug-Output "CreateKey failed for OGLDrivers"
  312.                             goto endInstallOpenGLDriver
  313.                         endif
  314.                         Debug-Output "VIDEO.INF: success installing an ogl entry"
  315.                     endif
  316.                 EndForListDo
  317.             endif
  318.         EndForListDo
  319.     endif
  320.     set Status = STATUS_SUCCESSFUL
  321. finish_InstallOption = +
  322.     ForListDo $(DrivesToFree)
  323.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  324.     EndForListDo
  325.     Return $(Status)
  326.  
  327. [Install-AddCopyOption]
  328.     Debug-Output "adding to copy list"
  329.     set STF_VITAL = ""
  330.  
  331.     AddSectionKeyFileToCopyList   Files-DisplayMiniportDrivers   +
  332.                                   $(MiniportDriver)              +
  333.                                   $(SrcDir)                      +
  334.                                   $(!STF_WINDOWSSYSPATH)\drivers
  335.  
  336.     ForListDo $(OtherFilesList)
  337.         ifcontains $($) in $(OtherFiles)
  338.             Debug-Output "adding other files to copy list"
  339.             AddSectionKeyFileToCopyList   Files-Other                +
  340.                                           $($)                       +
  341.                                           $(SrcDir)                  +
  342.                                           $(!STF_WINDOWSSYSPATH)
  343.         endif
  344.     EndForListDo
  345.  
  346.     ForListDo $(InstalledDisplays)
  347.         ifcontains $($) in $(DisplayDriverList)
  348.             Debug-Output "adding display driver to copy list"
  349.             AddSectionKeyFileToCopyList   Files-DisplayDLLs          +
  350.                                           $($)                       +
  351.                                           $(SrcDir)                  +
  352.                                           $(!STF_WINDOWSSYSPATH)
  353.             ifcontains $($) in $(OpenGLDriverList)
  354.                 Debug-Output "adding opengl driver to copy list"
  355.                 AddSectionKeyFileToCopyList   Files-DisplayOpenGLDrivers +
  356.                                               #(OpenGLDrivers, $($), 1)  +
  357.                                               $(SrcDir)                  +
  358.                                               $(!STF_WINDOWSSYSPATH)
  359.             endif
  360.         endif
  361.     EndForListDo
  362.     exit
  363.  
  364. [Install-AddAllCopy]
  365.     Debug-Output "adding all drivers to copy list"
  366.     set STF_VITAL = ""
  367.     AddSectionFilesToCopyList  Files-DisplayMiniportDrivers   +
  368.                                $(SrcDir)                      +
  369.                                $(!STF_WINDOWSSYSPATH)\drivers
  370.     AddSectionFilesToCopyList  Files-DisplayDLLs            +
  371.                                $(SrcDir)                    +
  372.                                $(!STF_WINDOWSSYSPATH)
  373.     exit
  374.  
  375. [Install-DoCopyOption]
  376.     CopyFilesInCopyList
  377.     exit
  378.  
  379. [noconfig]
  380.     return
  381.  
  382. [twinconfig]
  383.     set !ParametersValues = >($(!ParametersValues), +
  384.       {"PrimaryMonitorIsLeft", 0, $(!REG_VT_DWORD), 0})
  385.     return
  386.