home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 November / VPR9611B.ISO / driver / canopus / nt / 3dv_nta / 3dv_nta.lzh / OEMSETUP.INF next >
INI File  |  1996-06-07  |  16KB  |  480 lines

  1. ;-----------------------------------------------------------------------
  2. [Identification]
  3.     OptionType = VIDEO
  4. ;-----------------------------------------------------------------------
  5. [LanguagesSupported]
  6.     ENG
  7.  
  8. ;-----------------------------------------------------------------------
  9. [Options]
  10.     "Canopus S3DV 640x480x8, 60 Hz"   = PW3D,   8,   640,  480, 60, ""
  11.  
  12. ;-----------------------------------------------------------------------
  13. [MiniportDrivers]
  14.     PW3D   = !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_IGNORE, 33, {PW3D},   0, %SystemRoot%\System32\IoLogMsg.dll , 7
  15.  
  16. ;-----------------------------------------------------------------------
  17. [OptionsTextENG]
  18.     "Canopus S3DV 640x480x8, 60 Hz"   = "Power Window 3DV"
  19.  
  20. ;---------------------------------------------------------------------------
  21. [Identify]
  22.     ;
  23.     ;
  24.     read-syms Identification
  25.  
  26.     set Status     = STATUS_SUCCESSFUL
  27.     set Identifier = $(OptionType)
  28.     set Media      = #("Source Media Descriptions", 1, 1)
  29.  
  30.     Return $(Status) $(Identifier) $(Media)
  31.  
  32. ;------------------------------------------------------------------------
  33. ; 2. ReturnOptions:
  34. ;
  35. ; DESCRIPTION:   To return the option list supported by this INF and the
  36. ;                localised text list representing the options.
  37. ;
  38. ;
  39. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  40. ;
  41. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  42. ;                                STATUS_NOLANGUAGE
  43. ;                                STATUS_FAILED
  44. ;
  45. ;                $($R1): Option List
  46. ;                $($R2): Option Text List
  47. ;------------------------------------------------------------------------
  48.  
  49. [ReturnOptions]
  50.     ;
  51.     ;
  52.     set Status        = STATUS_FAILED
  53.     set OptionList     = {}
  54.     set OptionTextList = {}
  55.  
  56.     ;
  57.     ; Check if the language requested is supported
  58.     ;
  59.     set LanguageList = ^(LanguagesSupported, 1)
  60.     Ifcontains(i) $($0) in $(LanguageList)
  61.         goto returnoptions
  62.     else
  63.         set Status = STATUS_NOLANGUAGE
  64.         goto finish_ReturnOptions
  65.     endif
  66.  
  67.     ;
  68.     ; form a list of all the options and another of the text representing
  69.     ;
  70.  
  71. returnoptions = +
  72.     set OptionList     = ^(Options, 0)
  73.     set OptionTextList = ^(OptionsText$($0), 1)
  74.     set Status         = STATUS_SUCCESSFUL
  75.  
  76. finish_ReturnOptions = +
  77.     Return $(Status) $(OptionList) $(OptionTextList)
  78.  
  79.  
  80.  
  81. ;---------------------------------------------------------------------------
  82. ; MapToSupportedOption
  83. ;
  84. ; DESCRIPTION:   To map a hardware detected option to the NT Supported
  85. ;                option which represents it.
  86. ;
  87. ; INPUT:         $($0): Option
  88. ;
  89. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  90. ;                $($R1): Mapped Option
  91. ;
  92. ;---------------------------------------------------------------------------
  93.  
  94. [MapToSupportedOption]
  95.     ;
  96.     set Status = STATUS_FAILED
  97.     set MappedOption = $($0)
  98.  
  99.     ;
  100.     ; If the option is one we can support using one of our standard options
  101.     ; then map it to the standard option else map it to the default option
  102.     ; which is VGA.
  103.     ;
  104.  
  105.     set OptionList = ^(MapOfOptions, 0)
  106.     ifcontains $($0) in $(OptionList)
  107.         set MappedOption = #(MapOfOptions, $($0), 1)
  108.     else
  109.         set MappedOption = "VGA"
  110.     endif
  111.  
  112.     set Status = STATUS_SUCCESSFUL
  113.     Return $(Status) $(MappedOption)
  114.  
  115.  
  116.  
  117. [ServicesEntry]
  118.     CurrentEntry = "" ? $(!LIBHANDLE) GetDevicemapValue Video \Device\Video0
  119.  
  120.  
  121. ;
  122. ; InstallOption:
  123. ;
  124. ; FUNCTION:  To copy files representing Options
  125. ;            To configure the installed option
  126. ;            To update the registry for the installed option
  127. ;
  128. ; INPUT:     $($0):  Language to use
  129. ;            $($1):  OptionID to install
  130. ;            $($2):  SourceDirectory
  131. ;            $($3):  AddCopy  (YES | NO)
  132. ;            $($4):  DoCopy   (YES | NO)
  133. ;            $($5):  DoConfig (YES | NO)
  134. ;
  135. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  136. ;                            STATUS_NOLANGUAGE |
  137. ;                            STATUS_USERCANCEL |
  138. ;                            STATUS_FAILED
  139. ;
  140.  
  141. [InstallOption]
  142.  
  143.     ;
  144.     ; Set default values for
  145.     ;
  146.     set Status       = STATUS_FAILED
  147.     set DrivesToFree = {}
  148.  
  149.     ;
  150.     ; extract parameters
  151.     ;
  152.     set Option   = $($1)
  153.     set SrcDir   = $($2)
  154.     set AddCopy  = $($3)
  155.     set DoCopy   = $($4)
  156.     set DoConfig = $($5)
  157.  
  158.     ;
  159.     ; Check if the language requested is supported
  160.     ;
  161.     set LanguageList = ^(LanguagesSupported, 1)
  162.     Ifcontains(i) $($0) in $(LanguageList)
  163.     else
  164.         set Status = STATUS_NOLANGUAGE
  165.         goto finish_InstallOption
  166.     endif
  167.     read-syms Strings$($0)
  168.  
  169.     ;
  170.     ; check to see if Option is supported.
  171.     ;
  172.  
  173.     set OptionList = ^(Options, 0)
  174.     ifcontains $(Option) in $(OptionList)
  175.     else
  176.         goto finish_InstallOption
  177.     endif
  178.     set OptionList = ""
  179.  
  180.     ;
  181.     ; Option has been defined already
  182.     ;
  183.     set MiniportDriver    = #(Options, $(Option), 1)
  184.     set BitsPerPel        = #(Options, $(Option), 2)
  185.     set XResolution       = #(Options, $(Option), 3)
  186.     set YResolution       = #(Options, $(Option), 4)
  187.     set VRefresh          = #(Options, $(Option), 5)
  188.     set BoardType         = #(Options, $(Option), 6)
  189.  
  190.     set Type              = $(#(MiniportDrivers, $(MiniportDriver), 1))
  191.     set Group             =   #(MiniportDrivers, $(MiniportDriver), 2)
  192.     set ErrorControl      = $(#(MiniportDrivers, $(MiniportDriver), 3))
  193.     set Tag               =   #(MiniportDrivers, $(MiniportDriver), 4)
  194.     set InstalledDisplays =   #(MiniportDrivers, $(MiniportDriver), 5)
  195.     set VgaCompatible     =   #(MiniportDrivers, $(MiniportDriver), 6)
  196.     set EventMessageFile  =   #(MiniportDrivers, $(MiniportDriver), 7)
  197.     set TypesSupported    =   #(MiniportDrivers, $(MiniportDriver), 8)
  198.  
  199.     read-syms ServicesEntry
  200.     detect    ServicesEntry
  201.  
  202. installtheoption = +
  203.  
  204.     ;
  205.     ; Code to add files to copy list
  206.     ;
  207.  
  208.     ifstr(i) $(AddCopy) == "YES"
  209.         set DoActualCopy = NO
  210.         set FileToCheck = #(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  211.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  212.         ifstr(i) $(STATUS) == NO
  213.             set DoActualCopy = YES
  214.             goto addfiles
  215.         endif
  216.         ForListDo $(InstalledDisplays)
  217.             set FileToCheck = #(Files-DisplayDLLs, $($), 2)
  218.             LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
  219.             ifstr(i) $(STATUS) == NO
  220.                 set DoActualCopy = YES
  221.             endif
  222.         EndForListDo
  223.  
  224. addfiles = +
  225.         ifstr(i) $(DoActualCopy) == NO
  226.             shell "subroutn.inf" DriversExist $($0) $(String1)
  227.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  228.                 Debug-Output "VIDEO.INF: shelling DriversExist failed"
  229.                 goto finish_InstallOption
  230.             endif
  231.  
  232.             ifstr(i) $($R0) == STATUS_CURRENT
  233.             else-ifstr(i) $($R0) == STATUS_NEW
  234.                 set DoActualCopy = YES
  235.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  236.                 Debug-Output "VIDEO.INF: User cancelled video installation"
  237.                 goto finish_InstallOption
  238.             else
  239.                 Debug-Output "VIDEO.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  240.                 goto finish_InstallOption
  241.             endif
  242.         endif
  243.  
  244.         ifstr(i) $(DoActualCopy) == YES
  245.  
  246.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  247.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  248.                 Debug-Output "VIDEO.INF: shelling DoAskSourceEx failed"
  249.                 goto finish_InstallOption
  250.             endif
  251.  
  252.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  253.                 set SrcDir = $($R1)
  254.                 ifstr(i) $($R2) != ""
  255.                     set DrivesToFree = >($(DrivesToFree), $($R2))
  256.                 endif
  257.             else
  258.                 Debug-Output "VIDEO.INF: User cancelled asking source."
  259.                 goto finish_InstallOption
  260.             endif
  261.  
  262.             install Install-AddCopyOption
  263.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  264.                 Debug-Output "VIDEO.INF: Adding video files to copy list failed"
  265.                 goto finish_InstallOption
  266.             endif
  267.         else
  268.             set DoCopy = NO
  269.         endif
  270.  
  271.     endif
  272.  
  273.     ifstr(i) $(DoCopy) == "YES"
  274.         read-syms ProgressCopy$($0)
  275.         install Install-DoCopyOption
  276.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  277.             Debug-Output "Copying files failed"
  278.             goto finish_InstallOption
  279.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  280.             set Status = STATUS_USERCANCEL
  281.             goto finish_InstallOption
  282.         endif
  283.     endif
  284.  
  285.     ifstr(i) $(DoConfig) == "YES"
  286.  
  287.         ;
  288.         ; first run a privilege check on modifying the setup node
  289.         ;
  290.  
  291.         shell "registry.inf" CheckSetupModify
  292.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  293.             goto finish_InstallOption
  294.         endif
  295.  
  296.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  297.             goto finish_InstallOption
  298.         endif
  299.  
  300.         ;
  301.         ; first make a new video entry, the entry is created automatically
  302.         ; enabled
  303.         ;
  304.  
  305.         set ServiceNode   = $(MiniportDriver)
  306.         set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  307.  
  308.         set ServicesValues   = { +
  309.                 {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  310.                 {Start,          0, $(!REG_VT_DWORD),     $(!SERVICE_SYSTEM_START) }, +
  311.                 {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  312.                 {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  313.                 {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  314.                 {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  315.                 }
  316.  
  317.         set ParametersValues = { +
  318.                 {InstalledDisplayDrivers,     0, $(!REG_VT_MULTI_SZ), $(InstalledDisplays) }, +
  319.                 {VgaCompatible,               0, $(!REG_VT_DWORD),    $(VgaCompatible)     }, +
  320.                 {DefaultSettings.BitsPerPel,  0, $(!REG_VT_DWORD),    $(BitsPerPel)        }, +
  321.                 {DefaultSettings.XResolution, 0, $(!REG_VT_DWORD),    $(XResolution)       }, +
  322.                 {DefaultSettings.YResolution, 0, $(!REG_VT_DWORD),    $(YResolution)       }  +
  323.                 }
  324.  
  325.         ifstr(i) $(VRefresh) != ""
  326.             set VRefreshValue = {DefaultSettings.VRefresh, 0, $(!REG_VT_DWORD), $(VRefresh)}
  327.             set ParametersValues = >($(ParametersValues), $(VRefreshValue))
  328.         endif
  329.  
  330.         ifstr(i) $(BoardType) != ""
  331.             set PC98BoardTypeValue = {PC98, 0, $(!REG_VT_DWORD), $(BoardType)}
  332.             set ParametersValues = >($(ParametersValues), $(PC98BoardTypeValue))
  333.         endif
  334.  
  335.         set DeviceValues     = {}
  336.         set EventLogValues   = { +
  337.                 {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  338.                 {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  339.                 }
  340.  
  341.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  342.                                                 $(ServicesValues)   +
  343.                                                 $(ParametersValues) +
  344.                                                 $(DeviceValues)     +
  345.                                                 $(EventLogValues)   +
  346.                                                 Device0
  347.  
  348.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  349.             Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  350.             goto finish_InstallOption
  351.         endif
  352.  
  353.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  354.             Debug-Output "MakeServicesEntry failed for video"
  355.             goto finish_InstallOption
  356.         endif
  357.  
  358.         ;
  359.         ;
  360.         ; then disable the previous video entry
  361.         ;
  362.  
  363.         ifstr(i) $(CurrentEntry) != $(MiniportDriver)
  364.             ifstr(i) $(CurrentEntry) != VGA
  365.                 ifstr(i) $(CurrentEntry) != ""
  366.                     shell "registry.inf" ModifyServicesEntry $(CurrentEntry) $(!SERVICE_DISABLED)
  367.  
  368.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  369.                         Debug-Output "Couldn't find DisableServicesEntry in registry.inf"
  370.                         goto errorconfig
  371.                     endif
  372.  
  373.                     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  374.                         Debug-Output "DisableServices entry failed"
  375.                     endif
  376.                 endif
  377.             endif
  378.         endif
  379.  
  380.         goto configdone
  381.  
  382. errorconfig = +
  383.         ifstr(i) $(CurrentEntry) != $(MiniportDriver)
  384.             shell "registry.inf" ModifyServicesEntry $(MiniportDriver) $(!SERVICE_DISABLED)
  385.             ifstr(i) $(CurrentEntry) != ""
  386.                 shell "registry.inf" ModifyServicesEntry $(CurrentEntry) $(!SERVICE_SYSTEM_START)
  387.             endif
  388.         endif
  389.         goto finish_InstallOption
  390.  
  391. configdone = +
  392.  
  393.     endif
  394.  
  395.     set Status = STATUS_SUCCESSFUL
  396.  
  397. finish_InstallOption = +
  398.     ForListDo $(DrivesToFree)
  399.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  400.     EndForListDo
  401.  
  402.     Return $(Status)
  403.  
  404.  
  405. [Install-AddCopyOption]
  406.  
  407.     set STF_VITAL = ""
  408.     ;
  409.     ; Add the files to the copy list
  410.     ;
  411.     AddSectionKeyFileToCopyList   Files-DisplayMiniportDrivers   +
  412.                                   $(MiniportDriver)              +
  413.                                   $(SrcDir)                      +
  414.                                   $(!STF_WINDOWSSYSPATH)\drivers
  415.  
  416.     ForListDo $(InstalledDisplays)
  417.         AddSectionKeyFileToCopyList   Files-DisplayDLLs          +
  418.                                       $($)                       +
  419.                                       $(SrcDir)                  +
  420.                                       $(!STF_WINDOWSSYSPATH)
  421.  
  422.     EndForListDo
  423.  
  424.     exit
  425.  
  426.  
  427. [Install-DoCopyOption]
  428.  
  429.     ;
  430.     ; Copy files in the copy list
  431.     ;
  432.     CopyFilesInCopyList
  433.     exit
  434.  
  435. ;**************************************************************************
  436. ; PROGRESS GUAGE VARIABLES
  437. ;**************************************************************************
  438.  
  439. [ProgressCopyENG]
  440.     ProCaption   = "Windows NT セットアップ"
  441.     ProCancel    = "キャンセル"
  442.     ProCancelMsg = "Windows NT は正しく組み込まれていません。"+
  443.                    "ファイルのコピーを中止しますか?"
  444.     ProCancelCap = "セットアップ メッセージ"
  445.     ProText1     = "コピー元:"
  446.     ProText2     = "コピー先:"
  447.  
  448. [StringsENG]
  449.     String1 = "ディスプレイ"
  450.     String2 = "Windows NT ディスプレイ ドライバ ファイルへのフル パスを入力してくだ"+
  451.               "さい。セットアップ フロッピー ディスクからファイルを組み込む場合は、"+
  452.               "ドライブ パス (A:\ など) を入力してください。"+
  453.               "入力したら[続行]ボタンをクリックしてください。"
  454.  
  455. ;-----------------------------------------------------------------------
  456. ; SOURCE MEDIA DESCRIPTIONS
  457. ; -------------------------
  458. ; The OEM should list all the diskette labels here.  The source media
  459. ; description is used during copy to prompt the user for a diskette
  460. ; if the source is diskettes.
  461. ;
  462. ; Use 1 = "Diskette 1 Label" , TAGFILE = disk1
  463. ;     2 = "Diskette 2 Label" , TAGFILE = disk2
  464. ;     ...
  465. ;-----------------------------------------------------------------------
  466.  
  467. ;--------------------------------------------------------------------
  468. ; THE SECTIONS BELOW SHOULD BE AUTOMATICALLY GENERATED BY THE EXCEL
  469. ; SPREAD SHEETS
  470. ;--------------------------------------------------------------------
  471.  
  472. [Source Media Descriptions]
  473.     1  = "", TAGFILE = disk1
  474.  
  475. [Files-DisplayDLLs]
  476. PW3D = 1, PW3D.DLL, SIZE=98816
  477.  
  478. [Files-DisplayMiniportDrivers]
  479. PW3D = 1, PW3D.SYS, SIZE=46560
  480.