home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / CHIP_CD_1998_11_PL.iso / software / drivers / funtv / MCT.INF < prev    next >
Encoding:
INI File  |  1996-06-25  |  30.3 KB  |  906 lines

  1. ;;************************************************************************
  2. ;;  Copyright (c) 1992, 1993. Media Computer Technologies, Inc.
  3. ;;  All Rights Reserved.
  4. ;;  This source code and related information are copyrighted
  5. ;;  proprietory technology of Media Computer Technologies Inc.
  6. ;;  ("MCTI") released under a specific license for its
  7. ;;  confidentiality and protection as MCTI's trade secret.
  8. ;;
  9. ;;  Unauthorized disclosure, exposure, duplication, copying,
  10. ;;  distribution or any other use then that specifically
  11. ;;  authorized by MCTI is strictly prohibited.
  12. ;;
  13. ;;  Filename: mct.inf
  14. ;;
  15. ;;  Description:
  16. ;;      This is a installation program for Video Manager Plus Application
  17. ;;      and MCTelevision (tuner) program.
  18. ;;
  19. ;;            C H A N G E   R E C O R D
  20. ;;
  21. ;;   Date   Initials          Description
  22. ;; -------- -------- --------------------------------------------------
  23. ;; 04/29/95 Bhupen    Updated.
  24. ;;    05/10/95    Satish    Added MPEG Remote application.
  25. ;; 07/27/95    Satish    Modified to update RZMPEG.INI file.
  26. ;; 08/24/95    Satish    Modofied to update the HelpFile names.
  27. ;; 02/01/96    Satish     Added support for Philips1216MF in Tuner section (-tuner) option.
  28. ;;                           Modified to select the first board by default.
  29. ;; 05/30/96    Tang    Modified for AVer FunRTV card
  30. ;;
  31. ;;************************************************************************
  32.  
  33. ;;----------------------
  34. ;; OEM Defined string
  35. ;;----------------------
  36. DefineVariables
  37. Text [CompanyName] := AVerMedia TECHNOLOGIES, Inc.
  38. Text [CompanyLogoFile] := funtv.bmp
  39. Text [GroupName] := AVer FunTV
  40. Text [ProductName] := AVer FunTV
  41.  
  42. ;; Video Application
  43. Text [VMPProdName] := TV/Video Capture
  44. Text [VMPExeFileName] := MVPAPP.EXE
  45. Text [AudioExeFileName] := AVERAUD.EXE
  46. Text [TargetIniFileName] := MVP131DF.INI
  47. Text [MVMDefaultBinFileName] := MVP131DF.BIN
  48. Text [TargetUsrFileName] := MVP131.INI
  49. Text [MVMBinFileName] := MVP131.BIN
  50. Text [VMPIconName] := "TV/Video Capture"
  51. Text [VMPIniFileName] :=
  52. Text [MVMIniFileName] :=
  53.  
  54. Text [TVHelpFileName] :=
  55. Text [MPEGHelpFileName] :=
  56.  
  57. Text [TVRemoteProdName] := TV Remote Control
  58. Text [TVRemoteIconName] := "TV Remote"
  59. Text [TunerExeFileName] :=
  60. Text [TVRemoteExeFileName] :=
  61.  
  62. Text [MsgDispProdName] := Message Dispatcher
  63. Text [MsgDispExeFileName] := MSGDISP.EXE
  64. Text [MsgDispDataFileName] := MSGDISP.DTA
  65. Text [MsgDispIconName] := "Message Dispatcher"
  66.  
  67. Directory [VMPInstalDirPath] := \FUNTV\MVPAPP
  68. Directory [VMPWorkDirPath]
  69.  
  70. ;; AVI (Video For Windows) Drivers, 03/05/96 [AVerMedia]
  71. Logical [AVIDriver] := Y
  72. Text [AVIDRVProdName] := AVI Drivers
  73. Text [CaptureDriver] := MCTCAP.DRV
  74. Text [CodecDriver] := MCTCOD.DRV
  75. Number [VideoFormatID] := 1
  76. Number [DrawFormatID] := 3
  77. Text [CaptureDrvDesc] := AVer FunTV AVI Capture Driver
  78. Text [CodecDrvDesc] := AVer FunTV AVI Codec/Draw Driver
  79.  
  80. Text [DebugExeFileName] := DEBUGGER.EXE
  81. Text [DebugIconName] := FunTV Debugger
  82. Text [FMAppExeFileName] := FMTUNER.EXE
  83. Text [FMAppIconName] := FM Radio
  84.  
  85.  
  86. ;;-----------------------------------------
  87. ;; DO NOT CHANGE SCRIPT BEYOUND THIS LINE
  88. ;;-----------------------------------------
  89. Number [IOConfigNo] := 1
  90. Number [TunerHWType] := 1
  91. Number [TunerTableNo] := 1
  92. Number [HighLight] := 1
  93. Number [VMPFileSize]
  94. Number [BoardType] := 1
  95. Text [TitleString]
  96. Text [IOIndex1] := B18
  97. Text [IOIndex2] := B28
  98. Text [IOData1] := B1A
  99. Text [IOData2] := B2A
  100. Text [IOIndex]
  101. Text [IOData]
  102. Text [TestDLL] := HWTEST.DLL
  103. ;; 05.27.96 Tang
  104. Number [CountryType] := 1
  105. Number [CordY] := 170
  106. EndDefineVariables
  107.  
  108. ;;03.05.96 Tang [TitleString] := [VMPProdName]
  109. If [AVIDriver] = Y
  110. [TitleString] := [VMPProdName] and AVI Drivers
  111. else
  112. [TitleString] := [VMPProdName]
  113. Endif
  114.  
  115. Do SetupINSTALIT
  116.  
  117. [Point2]
  118. Do SelectBoard
  119.  
  120. if [BoardType] == -1
  121.     Dialog WhiteOnBlue
  122.         Please select the board you have in your system.
  123.         Press ESC to exit installation.
  124.     EndDialog
  125.  
  126.     GoTo [Point2]
  127. EndIf
  128.  
  129. Dialog @xy(Center,[CordY]) WhiteOnBlue
  130.  
  131.     Thanks for purchasing [ProductName] from
  132.     [CompanyName]
  133.  
  134.     Please make sure that the [ProductName]
  135.     is installed properly in your system.
  136.     Refer to the User's Manual for cabling and jumper settings.
  137.  
  138. EndDialog
  139.  
  140. ;; Dialog @xy(Center,150) ;;MaxX/2
  141. ;; EndDialog
  142.  
  143. ;;03.05.96 Tang added for AVI Drivers
  144. if [AVIDriver] = Y
  145.     [Point1]
  146.  
  147.     GetMenuChoice @xy(Center,170) Highlight [HighLight]
  148.     1.Install [VMPProdName] software
  149.         ; 1.Install "[VMPProdName]" software,
  150.         ;    TV Remote and TV/Video Capture
  151.     2.Install [AVIDRVProdName]
  152.         ; 2.Install "[AVIDRVProdName]" for
  153.         ;    Microsoft's Video for Windows
  154.     3.Exit
  155.         ; 3.Exit installation program
  156.     EndGetMenuChoice
  157.  
  158.     InCase Choice is
  159.     =1:  Do VMAppInstall
  160.  
  161.     =2:  Do AVIDRVInstall
  162.  
  163.     =3:  Do ByeBye
  164.     EndInCase
  165.  
  166.     GoTo [Point1]
  167. else
  168.     [Point2]
  169.  
  170.     GetMenuChoice @xy(Center,170) Highlight [HighLight]
  171.     1.Install [VMPProdName]
  172.         ; 1.Install "[VMPProdName]" software,
  173.         ;    TV Remote and TV/Video Capture
  174.     2.Exit
  175.         ; 2.Exit installation program
  176.     EndGetMenuChoice
  177.  
  178.     InCase Choice is
  179.     =1:  Do VMAppInstall
  180.  
  181.     =2:  Do ByeBye
  182.     EndInCase
  183.  
  184.     GoTo [Point2]
  185. endif
  186. ;;03.05.96 Tang added for AVI Drivers
  187.  
  188. Procedure VMAppInstall
  189.     [HighLight] := 2
  190.  
  191.     ;;Do UnInstall
  192.  
  193.     ;;------------------------------------------
  194.     ;; Install VM+ Application
  195.     ;;------------------------------------------
  196.     ;; Find the disk space requirement for Application
  197.     [VMPFileSize] := SizeofFile [VMPExeFileName]
  198.     [VMPFileSize] := [VMPFileSize] +SizeofFile [AudioExeFileName]
  199.     [VMPFileSize] := [VMPFileSize] +SizeofFile [TunerExeFileName]
  200.     [VMPFileSize] := [VMPFileSize] +SizeofFile [TVRemoteExeFileName]
  201.     [VMPFileSize] := [VMPFileSize] +SizeofFile [MsgDispExeFileName]
  202.     [VMPFileSize] := [VMPFileSize] +SizeofFile [MsgDIspDataFileName]
  203.     [VMPFileSize] := [VMPFileSize] +SizeofFile [TVHelpFileName]
  204. ;;      [VMPFileSize] := [VMPFileSize] +SizeofFile [DebugExeFileName]
  205.  
  206.     ;; Find the disk space requirement for DLL
  207.     [Number9] := SizeofFile MVP131.DLL
  208.     [Number9] := [Number9] + SizeofFile VIC.DLL + 20480
  209. ;; 03.04.96 Tang added
  210.     [Number9] := [Number9] + SizeofFile FRTV.DLL
  211.     [Number9] := [Number9] + 2*SizeofFile [MVMIniFileName]
  212.  
  213.  
  214.     ;; Make sure enough space is available
  215.     [Number1] := FreeSpaceOnDrive [WindowsDirectory]
  216.  
  217.     if [Number1] < [Number9]
  218.         Dialog PressAKey  @(center, [CordY]) UseHeader "No Disk Space"
  219.             Installation needs [Number9] bytes in the Windows drive.
  220.             Available space is [Number1] bytes.
  221.             Aborting [VMPProdName] Installation.
  222.         EndDialog
  223.  
  224.         Exit
  225.     endif
  226.  
  227.     [String7] := "[ProductName] Base I/O Address"
  228.     [String8] := "  B&18/B1A  hex"
  229.     [String9] := "  B&28/B2A  hex"
  230.     DialogBox @xy(center, center) 188 90           UseHeader "Base I/O Address Selection" Returns [Number5] BorDlg
  231.         Font           "Helv" 8
  232.         CTEXT          @xy( 10,10) 170 10 [String7]
  233.         BorRadioButtonGroup Uses [IOConfigNo]
  234.             RadioButton   @xy( 58, 26) 70 10 [String8]
  235.             RadioButton   @xy( 58, 40) 70 10 [String9]
  236.             BorPushButton  @xy(74, 62) 38 14 "OK" Ok
  237.     EndDialogBox
  238.  
  239.     if [IOConfigNo] = 3
  240.         Dialog PressAKey @(center, center)        UseHeader "Other I/O Address"
  241.             .L If you want to use different I/O Addresses other than
  242.             .L B18/B1A and B28/B2A for your [ProductName],
  243.             .L you need to manually modify the Index and Data
  244.             .L entries under [MVP131] section in [TargetUsrFileName].
  245.             .L
  246.             .L Example: To set the I/O address to B38/B3A, modify
  247.             .L           [MVP131] section in [TargetUsrFileName] as
  248.             .L           follows:
  249.             .L
  250.             .L                   [MVP131]
  251.             .L                   Index=B38
  252.             .L                   Data=B3A
  253.  
  254.         EndDialog
  255.     else
  256.         if [IOConfigNo] = 1
  257.         [IOIndex] := [IOIndex1]
  258.         [IOData] := [IOData1]
  259.         endif
  260.  
  261.         if [IOConfigNo] = 2
  262.         [IOIndex] := [IOIndex2]
  263.         [IOData] := [IOData2]
  264.         endif
  265.  
  266.     endif
  267.  
  268.     Do SelectSystemParam
  269.  
  270.     DetermineInstallationDrive [VMPFileSize] RequireFixed
  271.     DetermineInstallationDirectory InstallationDrive:[VMPInstalDirPath] [VMPFileSize]
  272.     [VMPWorkDirPath] := [InstallationDirectory]
  273.     ChangeDirectoryTo [InstallationDirectory]
  274.  
  275.     Do InstallVideoApp
  276.     Do InstallTunerApp
  277.     Do InstallMsgDisp
  278.  
  279.     ;;------------------------------------------
  280.     ;;  Wrap up
  281.     ;;------------------------------------------
  282.     [YesOrNo1] := Y
  283.  
  284. EndProcedure
  285.  
  286.  
  287. Procedure ByeBye
  288.  
  289.   ;;Dialog PressAKey WhiteOnBrown
  290.   if [YesOrNo1] = Y
  291.     Dialog @xy(Center,[CordY]) [YesOrNo1] WhiteOnBrown
  292.         Thanks for choosing [ProductName] from
  293.         [CompanyName]
  294.  
  295.         Please restart Windows before running the application.
  296.         Do you want to restart Windows now?
  297.     EndDialog
  298.     if [YesOrNo1] = Y
  299.         Reboot Windows
  300.     Endif
  301.   else
  302.     Dialog @xy(Center,[CordY]) PressAKey WhiteOnBrown
  303.         You have not installed the [ProductName] from
  304.         [CompanyName]
  305.     EndDialog
  306.   EndIf
  307.   SoLong Quietly
  308.  
  309. EndProcedure
  310.  
  311. Procedure  DDENonFatalErrorTrap
  312. ;; Do nothing
  313. EndProcedure
  314.  
  315.  
  316. Procedure SetupINSTALIT
  317.  
  318.         SetTopLineTo INSTALL [TitleString] Software (Press Esc to exit)
  319.  
  320.   ;; Load/set    Bitmaps here
  321.  
  322.   ;; While it is not documented anywhere else it is true that FreeSpaceOnDrive
  323.   ;; considers only the first character of its first parameter (in this case
  324.   ;; the drive letter of the temporary directory).
  325.   [number1] := FreeSpaceOnDrive ShadowDirectory
  326.   If [number1] < 25000
  327.     popup There is insufficient space on the TEMP drive for installation.
  328.     SoLong
  329.   EndIf
  330.  
  331.   LoadBitMap 1 [CompanyLogoFile] @xy(5,5)
  332.   ShowBitMap 1
  333.  
  334.   SetDefaultBitmap off
  335.   SetBackGroundColor 255 255 255 255 255 255
  336.   ShowWindow Maximized
  337.  
  338. EndProcedure
  339.  
  340. Procedure SelectBoard
  341.  
  342. ;; 06.03.96 Tang added for AVer FunTV [AVerMedia]
  343.     [BoardType] := 2
  344.  
  345.     if [BoardType] = 1
  346.         [VMPIniFileName] := 8tv131.ini
  347.         [MVMIniFileName] := 8tv131.bin
  348.         [ProductName] := "AVer FunTV"
  349.         [VMPProdName] := "TV/Video Capture"
  350.         [TunerExeFileName] := TUNERAPP.EXE
  351.         [TVRemoteExeFileName] := REMOTE.EXE
  352.     endif
  353.  
  354.     if [BoardType] = 2
  355.         [VMPIniFileName] := 16tv131.ini
  356.         [MVMIniFileName] := 16tv131.bin
  357.         [ProductName] := "AVer FunTV"
  358.         [VMPProdName] := "TV/Video Capture"
  359.         [TunerExeFileName] := TUNERAPP.EXE
  360.         [TVRemoteExeFileName] := REMOTE.EXE
  361.     endif
  362.  
  363. EndProcedure
  364.  
  365.  
  366. Procedure UnInstall
  367.     ModifyTextFile [WindowsDirectory]\system.ini NoBackup
  368.         AddOrChangeLineWith ([MCT's VMPlus],,) as "[MCT's VMPlus]" at end
  369.         InSection [MCT's VMPlus]
  370.             AddOrChangeLineWith (UserIniFileName,=,) as "UserIniFileName=" at end
  371.             AddOrChangeLineWith (DefaultIniFileName,=,) as "DefaultIniFileName=" at end
  372.             AddOrChangeLineWith (VMPAppClass,=,) as "VMPAppClass=" at end
  373.             AddOrChangeLineWith (MCTAudioAppClass,=,) as "MCTAudioAppClass=" at end
  374.             AddOrChangeLineWith (MessageDataFile,=,) as "MessageDataFile=" at end
  375.             AddOrChangeLineWith (VRemoteClass,=,) as "VRemoteClass=" at end
  376.             AddOrChangeLineWith (TunerAppClass,=,) as "TunerAppClass=" at end
  377.     EndModifyTextFile
  378.  
  379. EndProcedure
  380.  
  381. ;; -------------------------------------
  382. ;; Install the Video Application.
  383. ;; -------------------------------------
  384. Procedure InstallVideoApp
  385.     CopyFiles
  386.       [VMPExeFileName]
  387.       [AudioExeFileName]
  388. ;;        [DebugExeFileName]
  389. ;;        [FMAppExeFileName]
  390.     EndCopyFiles
  391.  
  392.     [Number1] := LengthOf [TVHelpFileName]
  393.     if [Number1] > 0
  394.     CopyFiles
  395.         [TVHelpFileName]
  396.     EndCopyFiles
  397.     Endif
  398.  
  399.     Dialog 2000 @(center, center) UseHeader "[VMPProdName] Installation"
  400.         Copying DLLs to window's system directory
  401.         One moment, please.
  402.     EndDialog
  403.  
  404.   ;; Copy *.dll files to windows
  405.     CopyFiles to [WindowsSystemDirectory]
  406.         mvp131.dll
  407.         vic.dll
  408.         frtv.dll
  409.         ;;msmixmgr.dll
  410.     EndCopyFiles
  411.  
  412.  
  413.     Dialog 2000 @(center, center) UseHeader "[VMPProdName] Installation"
  414.         Copying INI files to windows directory
  415.         One moment, please.
  416.     EndDialog
  417.  
  418.     ;; Copy *.ini and *.usr to Windows directory
  419.     CopyFiles to [WindowsDirectory]
  420.         [VMPIniFileName] AS [TargetIniFileName]
  421.         [VMPIniFileName] AS [TargetUsrFileName]
  422.         [MVMIniFileName] AS [MVMBinFileName]
  423.         [MVMIniFileName] AS [MVMDefaultBinFileName]
  424.     EndCopyFiles
  425.  
  426.     if [IOConfigNo] < 3
  427.         ;; Change the Index entry to B18, B28 or user define in the vmplus.usr file
  428.         ModifyTextFile [WindowsDirectory]\[TargetUsrFileName] NoBackup
  429.             InSection [MVP131]
  430.             AddOrChangeLineWith (Index,=,) as "Index=[IOIndex]" at end
  431.             AddOrChangeLineWith (Data,=,) as "Data=[IOData]" at end
  432.         EndModifyTextFile
  433.     endif
  434.  
  435.     ;; Change the ConfigFile entry in default file.
  436.     ModifyTextFile [WindowsDirectory]\[TargetUsrFileName] NoBackup
  437.         InSection [MVP131]
  438.         AddOrChangeLineWith (ConfigFile,=,) as "ConfigFile=[MVMBinFileName]" at end
  439.     EndModifyTextFile
  440.  
  441.     ;; Change the HelpFile entry in default file.
  442.     [Number1] := LengthOf [TVHelpFileName]
  443.     if [Number1] > 0
  444.         ModifyTextFile [WindowsDirectory]\[TargetUsrFileName] NoBackup
  445.             InSection [MCT]
  446.             AddOrChangeLineWith (HelpFileName,=,) as "HelpFileName=[VMPWorkDirPath]\[TVHelpFileName]" at end
  447.         EndModifyTextFile
  448.     Endif
  449.  
  450.     ;; Update class entries in the system.ini file
  451.     ModifyTextFile [WindowsDirectory]\system.ini NoBackup
  452.         AddOrChangeLineWith ([MCT's VMPlus],,) as "[MCT's VMPlus]" at end
  453.         InSection [MCT's VMPlus]
  454.             AddOrChangeLineWith (UserIniFileName,=,) as "UserIniFileName=[WindowsDirectory]\[TargetUsrFileName]" at end
  455.             AddOrChangeLineWith (DefaultIniFileName,=,) as "DefaultIniFileName=[WindowsDirectory]\[TargetIniFileName]" at end
  456.             AddOrChangeLineWith (VMPAppClass,=,) as "VMPAppClass=[VMPWorkDirPath]\[VMPExeFileName]" at end
  457.             AddOrChangeLineWith (MCTAudioAppClass,=,) as "MCTAudioAppClass=[VMPWorkDirPath]\[AudioExeFileName]" at end
  458.     EndModifyTextFile
  459.  
  460.     ;; Set VMP Application Icon
  461.     [String1] := [VMPWorkDirPath]\[VMPExeFileName]
  462. ;; 03.05.96 Tang added [AVerMedia]
  463. ;;      [String2] := [VMPWorkDirPath]\[DebugExeFileName]
  464.  
  465.     ;; Create Group and program item
  466.     ProgramManagerDDE
  467.     CreateGroup ([GroupName])
  468.     DeleteItem ([VMPIconName])
  469.     AddItem ([String1], [VMPIconName], [String1])
  470. ;; 03.05.96 Tang added [AVerMedia]
  471. ;;      AddItem ([String2], [DebugIconName], [String2])
  472. ;; 03.05.96 Tang added [AVerMedia]
  473.     ShowGroup ([GroupName], 1)
  474.     EndProgramManagerDDE
  475.  
  476. EndProcedure
  477.  
  478. ;;------------------------------------------
  479. ;; Install Message Dispatcher Application
  480. ;;------------------------------------------
  481. Procedure InstallMsgDisp
  482.     ;; Stop message dispatcher if it is running first
  483.     LoadDLL [DLL1] [InstallFromDirectory][TestDLL]
  484.     CallDLL [DLL1] StopMSGDispatcher
  485.     UnloadDLL [DLL1]
  486.  
  487.     ChangeDirectoryTo [InstallationDirectory]
  488.  
  489.     Dialog 2000 @(center, center) UseHeader "[MsgDispProdName] Installation"
  490.         Copying Message dispatcher to [InstallationDirectory] directory
  491.         One moment, please.
  492.     EndDialog
  493.  
  494.     CopyFiles
  495.       [MsgDispExeFileName]
  496.       [MsgDispDataFileName]
  497.     EndCopyFiles
  498.  
  499.     ;; Update class entries in the system.ini file
  500.     ModifyTextFile [WindowsDirectory]\system.ini NoBackup
  501.         AddOrChangeLineWith ([MCT's VMPlus],,) as "[MCT's VMPlus]" at end
  502.         InSection [MCT's VMPlus]
  503.             AddOrChangeLineWith (MessageDataFile,=,) as "MessageDataFile=[VMPWorkDirPath]\[MsgDispDataFileName]" at end
  504.     EndModifyTextFile
  505.  
  506.     ;; Set Message Dispatcher Application Icon
  507.     [String1] := [VMPWorkDirPath]\[MsgDispExeFileName]
  508.  
  509.     ;; Create Group and program item
  510.     ProgramManagerDDE
  511.     CreateGroup (Startup)
  512.     DeleteItem ([MsgDispIconName])
  513.     AddItem ([String1], [MsgDispIconName], [String1])
  514.     ;;ShowGroup (Startup, 1)
  515.     EndProgramManagerDDE
  516.  
  517. EndProcedure
  518.  
  519. ;;------------------------------------------
  520. ;; Install TVRemote Application
  521. ;;------------------------------------------
  522. Procedure InstallTunerApp
  523.     [Number1] := LengthOf [TunerExeFileName]
  524.     if [Number1] > 0
  525.         ChangeDirectoryTo [InstallationDirectory]
  526.  
  527.         Dialog 2000 @(center, center) UseHeader "[TVRemoteProdName] Installation"
  528.             Copying TV  Control to [InstallationDirectory] directory
  529.             One moment, please.
  530.         EndDialog
  531.  
  532.         CopyFiles
  533.         [TunerExeFileName]
  534.         [TVRemoteExeFileName]
  535.         EndCopyFiles
  536.  
  537. ;; 05.28.96 Tang modified
  538. ;;          if [CommandLine1] = "-tuner"
  539.             ModifyTextFile [WindowsDirectory]\[TargetUsrFileName] NoBackup
  540.                 InSection [TUNER]
  541.                     AddOrChangeLineWith (HardwareType,=,) as "HardwareType=[TunerHWType]" at end
  542.                     AddOrChangeLineWith (CurrentTable,=,) as "CurrentTable=[TunerTableNo]" at end
  543.             EndModifyTextFile
  544. ;;          endif
  545.         if [TunerHWType] = 3 .OR. [TunerHWType] = 6 .OR. [TunerHWType] = 12
  546.             ModifyTextFile [WindowsDirectory]\[TargetUsrFileName] NoBackup
  547.                 InSection [MVP131]
  548.                     AddOrChangeLineWith (VideoWidth,=,) as "VideoWidth=768" at end
  549.                     AddOrChangeLineWith (VideoHeight,=,) as "VideoHeight=576" at end
  550.                     AddOrChangeLineWith (InvPortWidth,=,) as "InvPortWidth=760" at end
  551.                     AddOrChangeLineWith (InvPortHeight,=,) as "InvPortHeight=576" at end
  552.                 InSection [KS0122]
  553.                     AddOrChangeLineWith (Reg4,=,) as "Reg4=0B" at end
  554.                 InSection [VIDEOSOURCE1]
  555.                     AddOrChangeLineWith (System,=,) as "System=PAL" at end
  556.                     AddOrChangeLineWith (VideoWidth,=,) as "VideoWidth=768" at end
  557.                     AddOrChangeLineWith (VideoHeight,=,) as "VideoHeight=576" at end
  558.                     AddOrChangeLineWith (IVPWidth,=,) as "IVPWidth=760" at end
  559.                     AddOrChangeLineWith (IVPHeight,=,) as "IVPHeight=576" at end
  560.                     AddOrChangeLineWith (IVPOffsetHorz,=,) as "IVPOffsetHorz=24" at end
  561.                     AddOrChangeLineWith (IVPOffsetVert,=,) as "IVPOffsetVert=17" at end
  562.                     AddOrChangeLineWith (IVPStartHorz,=,) as "IVPStartHorz=28" at end
  563.                     AddOrChangeLineWith (IVPStartVert,=,) as "IVPStartVert=17" at end
  564.                 InSection [VIDEOSOURCE2]
  565.                     AddOrChangeLineWith (System,=,) as "System=PAL" at end
  566.                     AddOrChangeLineWith (VideoWidth,=,) as "VideoWidth=768" at end
  567.                     AddOrChangeLineWith (VideoHeight,=,) as "VideoHeight=576" at end
  568.                     AddOrChangeLineWith (IVPWidth,=,) as "IVPWidth=760" at end
  569.                     AddOrChangeLineWith (IVPHeight,=,) as "IVPHeight=576" at end
  570.                     AddOrChangeLineWith (IVPOffsetHorz,=,) as "IVPOffsetHorz=24" at end
  571.                     AddOrChangeLineWith (IVPOffsetVert,=,) as "IVPOffsetVert=17" at end
  572.                     AddOrChangeLineWith (IVPStartHorz,=,) as "IVPStartHorz=28" at end
  573.                     AddOrChangeLineWith (IVPStartVert,=,) as "IVPStartVert=17" at end
  574.             EndModifyTextFile
  575.         endif
  576. ;; for PAL-M
  577.         if [TunerHWType] = 1 .AND. [CountryType] = 4
  578.             ModifyTextFile [WindowsDirectory]\[TargetUsrFileName] NoBackup
  579.                 InSection [MVP131]
  580.                     AddOrChangeLineWith (VideoWidth,=,) as "VideoWidth=640" at end
  581.                     AddOrChangeLineWith (VideoHeight,=,) as "VideoHeight=480" at end
  582.                     AddOrChangeLineWith (InvPortWidth,=,) as "InvPortWidth=640" at end
  583.                     AddOrChangeLineWith (InvPortHeight,=,) as "InvPortHeight=480" at end
  584.                 InSection [KS0122]
  585.                     AddOrChangeLineWith (Reg2,=,) as "Reg2=A0" at end
  586.                     AddOrChangeLineWith (Reg4,=,) as "Reg4=0E" at end
  587.                 InSection [VIDEOSOURCE2]
  588.                     AddOrChangeLineWith (System,=,) as "System=PAL-M" at end
  589.                     AddOrChangeLineWith (VideoWidth,=,) as "VideoWidth=640" at end
  590.                     AddOrChangeLineWith (VideoHeight,=,) as "VideoHeight=480" at end
  591.                     AddOrChangeLineWith (IVPWidth,=,) as "IVPWidth=640" at end
  592.                     AddOrChangeLineWith (IVPHeight,=,) as "IVPHeight=480" at end
  593.             EndModifyTextFile
  594.         endif
  595. ;; 05.28.96 Tang modified
  596.  
  597.         ;; Update class entries in the system.ini file
  598.         ModifyTextFile [WindowsDirectory]\system.ini NoBackup
  599.             AddOrChangeLineWith ([MCT's VMPlus],,) as "[MCT's VMPlus]" at end
  600.             InSection [MCT's VMPlus]
  601.                 AddOrChangeLineWith (VRemoteClass,=,) as "VRemoteClass=[VMPWorkDirPath]\[TVRemoteExeFileName]" at end
  602.                 AddOrChangeLineWith (TunerAppClass,=,) as "TunerAppClass=[VMPWorkDirPath]\[TunerExeFileName]" at end
  603.         EndModifyTextFile
  604.  
  605.         ;; Set TV Remote Application Icon
  606.         [String1] := [VMPWorkDirPath]\[TVRemoteExeFileName]
  607.  
  608.         ;; Create Group and program item
  609.         ProgramManagerDDE
  610.         CreateGroup ([GroupName])
  611.         DeleteItem ([TVRemoteIconName])
  612.         AddItem ([String1], [TVRemoteIconName], [String1])
  613.         ShowGroup ([GroupName], 1)
  614.         EndProgramManagerDDE
  615.     EndIf
  616.  
  617. EndProcedure
  618.  
  619.  
  620. ;; 03/05/96 Tang added for AVI drivers [AVerMedia]
  621. Procedure AVIDRVInstall
  622.  
  623.     [HighLight] := 3
  624.  
  625.     Dialog [YesOrNo1] @(center, center) UseHeader "Installation"
  626.  
  627.             .L Please make sure that the "[VMPProdName]" and
  628.             .L "Video For Windows" applications are installed properly in your
  629.             .L system before installing the [AVIDRVProdName].
  630.             .L Do you want to install the AVI Drivers now?
  631.  
  632.     EndDialog
  633.  
  634.     If [YesOrNo1] = NoCharacter
  635.         GoTo [Point1]
  636.     endif
  637.  
  638.     ;; Find the disk space requirement for AVI drivers installation
  639.     [AVIDRVSize] := SizeofFile [CaptureDriver]+20480
  640.     [AVIDRVSize] := [AVIDRVSize] +SizeofFile [CodecDriver]
  641.  
  642.     [Number1] := FreeSpaceOnDrive [WindowsDirectory]
  643.  
  644.     if [Number1] < [AVIDRVSize]
  645.         Dialog PressAKey  @(center, [CordY]) UseHeader "No Disk Space"
  646.             Installation needs [AVIDRVSize] bytes in the Windows drive.
  647.             Available space is [Number1] bytes.
  648.             Aborting [AVIDRVProdName] Installation.
  649.         EndDialog
  650.  
  651.         Exit
  652.     endif
  653.  
  654.     Dialog 2000 @(center, center) UseHeader "[AVIDRVProdName] Installation"
  655.         Copying driver files to window's system directory.
  656.         One moment, please.
  657.     EndDialog
  658.  
  659.     ;; Copy *.DRV files to Windows's system directory
  660.     CopyFiles to [WindowsSystemDirectory]
  661.         [CaptureDriver]
  662.         [CodecDriver]
  663.     EndCopyFiles
  664.  
  665.     Dialog 2000 @(center, center) UseHeader "[AVIDRVProdName] Installation"
  666.         Updating INI files in your Windows directory.
  667.         One moment, please.
  668.     EndDialog
  669.  
  670.     ;; Update or add driver entries in the system.ini file
  671.     ModifyTextFile [WindowsDirectory]\system.ini NoBackup
  672.         InSection [drivers]
  673.         AddOrChangeLineWith (msvideo,=,) as "msvideo=[WindowsSystemDirectory]\[CaptureDriver]" at end
  674.         AddOrChangeLineWith (VIDS.DRAW,=,) as "VIDS.DRAW=[WindowsSystemDirectory]\[CodecDriver]" at end
  675.         AddOrChangeLineWith (VIDC.MR16,=,) as "VIDC.MR16=[WindowsSystemDirectory]\[CodecDriver]" at end
  676.         AddOrChangeLineWith (VIDC.MR24,=,) as "VIDC.MR24=[WindowsSystemDirectory]\[CodecDriver]" at end
  677.         AddOrChangeLineWith (VIDC.MY41,=,) as "VIDC.MY41=[WindowsSystemDirectory]\[CodecDriver]" at end
  678.         AddOrChangeLineWith (VIDC.MY42,=,) as "VIDC.MY42=[WindowsSystemDirectory]\[CodecDriver]" at end
  679.         AddOrChangeLineWith (VIDC.MC16,=,) as "VIDC.MC16=[WindowsSystemDirectory]\[CodecDriver]" at end
  680.         AddOrChangeLineWith (VIDC.MC24,=,) as "VIDC.MC24=[WindowsSystemDirectory]\[CodecDriver]" at end
  681.         ;; For backward compatibility with Ring Zero Drivers
  682.         AddOrChangeLineWith (VIDC.R0R6,=,) as "VIDC.R0R6=[WindowsSystemDirectory]\[CodecDriver]" at end
  683.         AddOrChangeLineWith (VIDC.R0R8,=,) as "VIDC.R0R8=[WindowsSystemDirectory]\[CodecDriver]" at end
  684.         AddOrChangeLineWith (VIDC.R0M6,=,) as "VIDC.R0M6=[WindowsSystemDirectory]\[CodecDriver]" at end
  685.         AddOrChangeLineWith (VIDC.R0M8,=,) as "VIDC.R0M8=[WindowsSystemDirectory]\[CodecDriver]" at end
  686.         AddOrChangeLineWith (VIDC.R0Y1,=,) as "VIDC.R0Y1=[WindowsSystemDirectory]\[CodecDriver]" at end
  687.         AddOrChangeLineWith (VIDC.R0Y2,=,) as "VIDC.R0Y2=[WindowsSystemDirectory]\[CodecDriver]" at end
  688.     EndModifyTextFile
  689.  
  690.     ;; Update/add [MCT's VMPlus] section and related entries
  691.     ModifyTextFile [WindowsDirectory]\system.ini NoBackup
  692.         AddOrChangeLineWith ([MCT's VMPlus],,) as "[MCT's VMPlus]" at end
  693.         InSection [MCT's VMPlus]
  694.         AddOrChangeLineWith (UserIniFileName,=,) as "UserIniFileName=[WindowsDirectory]\[TargetUsrFileName]" at end
  695.         AddOrChangeLineWith (DefaultIniFileName,=,) as "DefaultIniFileName=[WindowsDirectory]\[TargetIniFileName]" at end
  696.         AddOrChangeLineWith (VideoFormat,=,) as "VideoFormat=[VideoFormatID]" at end
  697.         AddOrChangeLineWith (DrawFormat,=,) as "DrawFormat=[DrawFormatID]" at end
  698.     EndModifyTextFile
  699.  
  700.     if FileExists [WindowsDirectory]\mmtools.ini
  701.         ;; Update/add [VidCap] section and related entries
  702.         ModifyTextFile [WindowsDirectory]\mmtools.ini NoBackup
  703.             if InSection [VidCap]
  704.             AddOrChangeLineWith (OverlayWindow,=,) as "OverlayWindow=Yes" at end
  705.             else
  706.             AddOrChangeLineWith ([VidCap],,) as "[VidCap]" at end
  707.             InSection [VidCap]
  708.             AddOrChangeLineWith (OverlayWindow,=,) as "OverlayWindow=Yes" at end
  709.         EndModifyTextFile
  710.     endif
  711.  
  712.     ;; Update/add entries in control.ini file
  713.     ModifyTextFile [WindowsDirectory]\control.ini NoBackup
  714.         if InSection [drivers.desc]
  715.            AddOrChangeLineWith ([CaptureDriver],=,) as "[WindowsSystemDirectory]\[CaptureDriver]=[CaptureDrvDesc]" at end
  716.            AddOrChangeLineWith ([CodecDriver],=,) as "[WindowsSystemDirectory]\[CodecDriver]=[CodecDrvDesc]" at end
  717.         else
  718.            AddOrChangeLineWith ([drivers.desc],,) as "[drivers.desc]" at end
  719.            InSection [drivers.desc]
  720.            AddOrChangeLineWith ([CaptureDriver],=,) as "[WindowsSystemDirectory]\[CaptureDriver]=[CaptureDrvDesc]" at end
  721.            AddOrChangeLineWith ([CodecDriver],=,) as "[WindowsSystemDirectory]\[CodecDriver]=[CodecDrvDesc]" at end
  722.     EndModifyTextFile
  723.  
  724.     ;; Display the driver installed OK dialog box
  725.     Dialog PressAKey @(center, center)    UseHeader "Installed OK"
  726.         .L Video For Windows "[AVIDRVProdName]" has been installed
  727.         .L successfully for [ProductName].
  728.         .L Please make sure that the IRQ number configured for the
  729.         .L AVI Capture Driver matches with the IRQ jumper setting.
  730.         .L For more information, please refer to the User's Manual.
  731.     EndDialog
  732.  
  733. EndProcedure
  734. ;; 03/05/96 Tang added for AVI drivers [AVerMedia]
  735.  
  736.  
  737. ;; 05/27/96 Tang added for different Video Systems [AVerMedia]
  738. Procedure SelectSystemParam
  739.  
  740.     [String10] := "Country: (If not in the list, choose the one w/ same system as yours.)"
  741.  
  742.     [String11] := " Australia (1)"
  743.     [String12] := " Austria   (1)"
  744.     [String13] := " Belgium   (1)"
  745.     [String14] := " Brazil    (6)"
  746.     [String15] := " Canada    (3)"
  747.     [String16] := " China     (5)"
  748.     [String17] := " Denmark   (1)"
  749.     [String18] := " Finland   (1)"
  750.     [String19] := " Germany   (1)"
  751.     [String20] := " HongKong  (4)"
  752.     [String21] := " Iceland   (1)"
  753.     [String22] := " India     (1)"
  754.     [String23] := " Indonesia (1)"
  755.     [String24] := " Ireland   (4)"
  756.     [String25] := " Italy     (1)"
  757.     [String26] := " Japan       (2)"
  758.     [String27] := " Korea,South (3)"
  759.     [String28] := " Kuwait      (1)"
  760.     [String29] := " Malaysia    (1)"
  761.     [String30] := " Malta       (1)"
  762.     [String31] := " Netherlands (1)"
  763.     [String32] := " New Zealand (1)"
  764.     [String33] := " Norway      (1)"
  765.     [String34] := " Philippines (3)"
  766.     [String35] := " Portugal    (1)"
  767.     [String36] := " Rumania     (5)"
  768.     [String37] := " Saudi Arabia(1)"
  769.     [String38] := " Singapore   (1)"
  770.     [String39] := " South Africa(4)"
  771.     [String40] := " Spain       (1)"
  772.     [String41] := " Sweden      (1)"
  773.     [String42] := " Switzerland (1)"
  774.     [String43] := " Taiwan      (3)"
  775.     [String44] := " Thailand    (1)"
  776.     [String45] := " United Arab (1)"
  777.     [String46] := " United Kingdom(4)"
  778.     [String47] := " U.S.A       (3)"
  779.     [String48] := " Yugoslavia  (1)"
  780.  
  781.     [String4] := " 1: PAL-B/G/H  "
  782.     [String5] := " 2: NTSC-Japan "
  783.     [String6] := " 3: NTSC       "
  784.     [String7] := " 4: PAL-I      "
  785.     [String8] := " 5: PAL-D/K    "
  786.     [String9] := " 6: PAL-M      "
  787.  
  788.     [CountryType] := 37
  789.     DialogBox @xy(center, center) 300 214        UseHeader "TV System Type Selection" Returns [Number6] BorDlg
  790.     Font           "Courier New" 8
  791.     LTEXT          @xy( 10,10) 280 10 [String10]
  792.     BorRadioButtonGroup Uses [CountryType]
  793.         RadioButton   @xy( 25, 26)  80 10 [String11]
  794.         RadioButton   @xy( 25, 36)  80 10 [String12]
  795.         RadioButton   @xy( 25, 46)  80 10 [String13]
  796.         RadioButton   @xy( 25, 56)  80 10 [String14]
  797.         RadioButton   @xy( 25, 66)  80 10 [String15]
  798.         RadioButton   @xy( 25, 76)  80 10 [String16]
  799.         RadioButton   @xy( 25, 86)  80 10 [String17]
  800.         RadioButton   @xy( 25, 96)  80 10 [String18]
  801.         RadioButton   @xy( 25, 106) 80 10 [String19]
  802.         RadioButton   @xy( 25, 116) 80 10 [String20]
  803.         RadioButton   @xy( 25, 126) 80 10 [String21]
  804.         RadioButton   @xy( 25, 136) 80 10 [String22]
  805.         RadioButton   @xy( 25, 146) 80 10 [String23]
  806.         RadioButton   @xy( 25, 156) 80 10 [String24]
  807.         RadioButton   @xy( 25, 166) 80 10 [String25]
  808.         RadioButton   @xy( 105, 26)  80 10 [String26]
  809.         RadioButton   @xy( 105, 36)  80 10 [String27]
  810.         RadioButton   @xy( 105, 46)  80 10 [String28]
  811.         RadioButton   @xy( 105, 56)  80 10 [String29]
  812.         RadioButton   @xy( 105, 66)  80 10 [String30]
  813.         RadioButton   @xy( 105, 76)  80 10 [String31]
  814.         RadioButton   @xy( 105, 86)  80 10 [String32]
  815.         RadioButton   @xy( 105, 96)  80 10 [String33]
  816.         RadioButton   @xy( 105, 106) 80 10 [String34]
  817.         RadioButton   @xy( 105, 116) 80 10 [String35]
  818.         RadioButton   @xy( 105, 126) 80 10 [String36]
  819.         RadioButton   @xy( 105, 136) 80 10 [String37]
  820.         RadioButton   @xy( 105, 146) 80 10 [String38]
  821.         RadioButton   @xy( 105, 156) 80 10 [String39]
  822.         RadioButton   @xy( 105, 166) 80 10 [String40]
  823.         RadioButton   @xy( 185, 26)  80 10 [String41]
  824.         RadioButton   @xy( 185, 36)  80 10 [String42]
  825.         RadioButton   @xy( 185, 46)  80 10 [String43]
  826.         RadioButton   @xy( 185, 56)  80 10 [String44]
  827.         RadioButton   @xy( 185, 66)  80 10 [String45]
  828.         RadioButton   @xy( 185, 76)  80 10 [String46]
  829.         RadioButton   @xy( 185, 86)  80 10 [String47]
  830.         RadioButton   @xy( 185, 96)  80 10 [String48]
  831.         RTEXT          @xy( 185, 116) 80 10 [String4]
  832.         RTEXT          @xy( 185, 126) 80 10 [String5]
  833.         RTEXT          @xy( 185, 136) 80 10 [String6]
  834.         RTEXT          @xy( 185, 146) 80 10 [String7]
  835.         RTEXT          @xy( 185, 156) 80 10 [String8]
  836.         RTEXT          @xy( 185, 166) 80 10 [String9]
  837.         BorPushButton  @xy(125, 180) 38 14 "OK" Ok
  838.     EndDialogBox
  839.  
  840. ;; NTSC
  841.     if [CountryType] = 5 .OR. [CountryType] = 17 .OR. [CountryType] = 24 .OR. [CountryType] = 33 .OR. [CountryType] = 37
  842.         [TunerHWType] := 1
  843.         [TunerTableNo] := 1
  844.     endif
  845.  
  846. ;; PAL-B/G/H
  847.     if [CountryType] = 1 .OR. [CountryType] = 2 .OR. [CountryType] = 3 .OR. [CountryType] = 7
  848.         [TunerHWType] := 3
  849.         [TunerTableNo] := 5
  850.     endif
  851.     if [CountryType] = 8 .OR. [CountryType] = 9 .OR. [CountryType] = 11 .OR. [CountryType] = 12
  852.         [TunerHWType] := 3
  853.         [TunerTableNo] := 5
  854.     endif
  855.     if [CountryType] = 13 .OR. [CountryType] = 15 .OR. [CountryType] = 18 .OR. [CountryType] = 19
  856.         [TunerHWType] := 3
  857.         [TunerTableNo] := 5
  858.     endif
  859.     if [CountryType] = 20 .OR. [CountryType] = 21 .OR. [CountryType] = 22 .OR. [CountryType] = 23
  860.         [TunerHWType] := 3
  861.         [TunerTableNo] := 5
  862.     endif
  863.     if [CountryType] = 25 .OR. [CountryType] = 27 .OR. [CountryType] = 28 .OR. [CountryType] = 30
  864.         [TunerHWType] := 3
  865.         [TunerTableNo] := 5
  866.     endif
  867.     if [CountryType] = 31 .OR. [CountryType] = 32 .OR. [CountryType] = 34 .OR. [CountryType] = 35
  868.         [TunerHWType] := 3
  869.         [TunerTableNo] := 5
  870.     endif
  871.     if [CountryType] = 38
  872.         [TunerHWType] := 3
  873.         [TunerTableNo] := 5
  874.     endif
  875.  
  876. ;; PAL-I
  877.     if [CountryType] = 10 .OR. [CountryType] = 14 .OR. [CountryType] = 29 .OR. [CountryType] = 36
  878.         [TunerHWType] := 6
  879.         [TunerTableNo] := 8
  880.     endif
  881.  
  882. ;; PAL-D/K
  883.     if [CountryType] = 6 .OR. [CountryType] = 26
  884.         [TunerHWType] := 6
  885.         [TunerTableNo] := 8
  886.     endif
  887.  
  888. ;; PAL-M
  889.     if [CountryType] = 4
  890.         [TunerHWType] := 1
  891.         [TunerTableNo] := 1
  892.     endif
  893.  
  894. ;; NTSC-Japan
  895.     if [CountryType] = 16
  896.         [TunerHWType] := 4
  897.         [TunerTableNo] := 3
  898.     endif
  899.  
  900. EndProcedure
  901. ;; 05/27/96 Tang added for different Video Systems [AVerMedia]
  902.  
  903.  
  904. EndScript
  905.  
  906.