; Copyright(c) 2015-2023 Yamaha Corporation
;
; YamahaAEDriver.inf
;

[Version]
Signature="$Windows NT$"
Class = SoftwareComponent
ClassGuid = {5c4c3332-344d-483c-8739-259e934c9cc8} ; TODO: edit ClassGuid
Provider=%ManufacturerName%
CatalogFile=YamahaAEDriver.cat
DriverVer = 07/15/2023,14.0.6.0

[Manufacturer]
%ManufacturerName% = YAED.Base, NTamd64

[YAED.Base.NTamd64]
%DeviceName%=MyDevice_Install, Root\YamahaAEDriver ; TODO: edit hw-id

[SourceDisksNames]
1 = %DiskName%

[SourceDisksFiles]
YamahaAEDriver.dll=1
YAE_AEnet.dll=1
AERemoteDevice-Desc.xml=1
AERemoteService_SCPD.xml=1
PlayControlService_SCPD.xml=1
SSOControlService_SCPD.xml=1
YAEAVTransportService_SCPD.xml=1
YAEContentDirectoryService_SCPD.xml=1
YAESLnchr.exe=1
YamahaAEService.exe=1
YamahaAEService.xml=1
YamahaAEDriverEvtlogMsg.dll=1

; ================= WDF Interface Installation ============================

[MyDevice_Install.NT.Interfaces]
AddInterface={6d0939e3-4ce7-43b7-934e-581f2b942ff4},,WDFInterfaceInstall

[WDFInterfaceInstall]
AddProperty=PrivilegedProperties

[PrivilegedProperties]
{026e516e-b814-414b-83cd-856d6fef4822},6,0x11,,1
;{026e516e-b814-414b-83cd-856d6fef4822}, 8, 0x2012,, %CustomCapability%

; =================== UMDF Device ==================================

[MyDevice_Install.NT]
CopyFiles=COMDriverCopy
CopyFiles = File.Common
CopyFiles=UMDriverCopy
;AddReg = YamahaAEDriver_COMAddReg
;AddReg = PresetAddReg

[MyDevice_Install.NT.hw]
AddReg = YamahaAEDriver_AddReg

[MyDevice_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall

[MyDevice_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg
AddReg=YamahaAEDriver_Eventlog_Addreg
CopyFiles = CoInstallers_CopyFiles

[MyDevice_Install.NT.Wdf]
UmdfService=YamahaAEDriver,YamahaAEDriver_Install
UmdfServiceOrder=YamahaAEDriver
;UmdfMethodNeitherAction = Copy
;UmdfKernelModeClientPolicy = AllowKernelModeClients

[YamahaAEDriver_Install]
UmdfLibraryVersion = 2.15.0
ServiceBinary=%12%\UMDF\YamahaAEDriver.dll
;DriverCLSID={6d0939e3-4ce7-43b7-934e-581f2b942ff4}

[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys
LoadOrderGroup = Base

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WUDFCoinstaller.dll"

[CoInstallers_CopyFiles]

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
COMDriverCopy = 11,%AppName%
File.Common = 11,%AppName%
;COMDriverCopy = 16422,%AppName%
;File.Common = 16422,%AppName%

[COMDriverCopy]
YAE_AEnet.dll

[File.Common]
AERemoteDevice-Desc.xml
AERemoteService_SCPD.xml
PlayControlService_SCPD.xml
SSOControlService_SCPD.xml
YAEAVTransportService_SCPD.xml
YAEContentDirectoryService_SCPD.xml
YAESLnchr.exe
YamahaAEService.exe
YamahaAEService.xml
YamahaAEDriverEvtlogMsg.dll

[UMDriverCopy]
YamahaAEDriver.dll

[YamahaAEDriver_AddReg]
HKR, Yamaha, "OperatingMode",, "Default" ; FLG_ADDREG_TYPE_SZ
HKR, Yamaha, "OperatingParams",, "None" ; FLG_ADDREG_TYPE_SZ

[YamahaAEDriver_Eventlog_Addreg]
HKLM,System\CurrentControlSet\Services\Eventlog\Application\YamahaAEDriver,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\"%AppName%"\YamahaAEDriverEvtlogMsg.dll"
HKLM,System\CurrentControlSet\Services\Eventlog\Application\YamahaAEDriver,TypesSupported,0x00010001,7

;[YamahaAEDriver_COMAddReg]
;HKCR,AERemoteDevice.AERemoteDevice,,,"AERemoteDevice Class"
;HKCR,AERemoteDevice.AERemoteDevice\CurVer,,,"AERemoteDevice.AERemoteDevice.1"
;HKCR,AERemoteDevice.AERemoteDevice.1,,,"AERemoteDevice Class"
;HKCR,AERemoteDevice.AERemoteDevice.1\CLSID,,,"{F88016FF-D342-4CC4-B4CB-3BC334DAFA50}"
;HKCR,CLSID\{F88016FF-D342-4CC4-B4CB-3BC334DAFA50},,,"AERemoteService Class"
;HKCR,CLSID\{F88016FF-D342-4CC4-B4CB-3BC334DAFA50}\InprocServer32,,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\"%AppName%"\YAE_AEnet.dll"
;HKCR,CLSID\{F88016FF-D342-4CC4-B4CB-3BC334DAFA50}\InprocServer32,ThreadingModel,,"Apartment"
;HKCR,CLSID\{F88016FF-D342-4CC4-B4CB-3BC334DAFA50}\Programmable,,%FLG_ADDREG_KEYONLY%
;HKCR,CLSID\{F88016FF-D342-4CC4-B4CB-3BC334DAFA50}\TypeLib,,,"{5AB86E7F-A5F1-4BA4-82E8-B1B75695EBE3}"
;HKCR,CLSID\{F88016FF-D342-4CC4-B4CB-3BC334DAFA50}\Version,,,"1.0"

;[PresetAddReg]
;HKR,SOFTWARE\Yamaha APO,,0x00000012
;HKR,SOFTWARE\Yamaha APO\{97682193-F226-4EBB-A5EC-52B35DD7E459},,0x00000012
;HKR,SOFTWARE\Yamaha APO\{57952558-1EFE-49cc-8E3F-D2CD32D29849},,0x00000012

;[PresetAddReg.Security]
;"D:AR(A;CI;KA;;;SY)(A;CI;KA;;;BA)(A;CI;KA;;;S-1-5-32-545)"

; =================== Generic ==================================

[Strings]
ManufacturerName="Yamaha" ; TODO: add ManufacturerName
DiskName = "YamahaAEDriver Installation Disk"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName="YAMAHA AudioEngine Settings"
AppName = "YamahaAEDriver"
REG_EXPAND_SZ = 0x00020000
FLG_ADDREG_KEYONLY = 0x00000010
;CustomCapability = "Yamaha.AudioEngineDriver_q536wpkpf5cy2" ; TODO: set YourStorePubId to q536wpkpf5cy2
