;
; Kionix SPB driver installer, derived from MS WDK SpbTestTool sample
; Copyright 2011-2015 Kionix, Inc.  All rights reserved.
; Copyright (c) Microsoft Corporation.  All rights reserved.
;

[Version]
Signature = "$Windows NT$"
Class = %ClassName%
ClassGuid = {b4f2027a-f326-4c3b-8e28-80d112a7f7d1}
Provider = %ManufacturerName%
CatalogFile = kxspb.cat
DriverVer=09/14/2015,1.2.8.5

[DestinationDirs]
DefaultDestDir = 12
kxspb_device_coinst_copy = 11

[SourceDisksNames]
1 = %DiskName%

[SourceDisksFiles]
kxspb.sys = 1
WdfCoInstaller01011.dll = 1
kxsdinstall.dll = 1

;;; Class install section

[ClassInstall32]
AddReg = Sensorio_RegistryAdd

[Sensorio_RegistryAdd]
HKR,,,,%ClassName%
HKR,,Icon,,"-22"

;;; Install Section

[Manufacturer]
%ManufacturerName% = Kionix, NTamd64

; Decorated model section take precedence over undecorated 
; ones on XP and later.
[Kionix.NTamd64]
;%kxspb.DeviceDesc% = kxspb_device, ACPI\kxspb
%kxtj9.DeviceDesc% = kxspb_device, ACPI\KIOX0008
%kxtj2.DeviceDesc% = kxspb_device, ACPI\KIOX0009
%kxcj9.DeviceDesc% = kxspb_device, ACPI\KIOX000A
%kxtj9_legacy.DeviceDesc% = kxspb_device, ACPI\SMO8500

[kxspb_device.NT]
CopyFiles = KMDriverCopy

[kxspb_device.NT.hw]
AddReg = kxspb_addreg

[kxspb_device.NT.Wdf]
KmdfService = kxspb, kxspb_wdfsect

[kxspb_wdfsect]
KmdfLibraryVersion = 1.11

[KMDriverCopy]
kxspb.sys,,0x4000    ; COPYFLG_IN_USE_RENAME

[kxspb_addreg]
HKR, , "UnitCount", 0x10001, 1
; Set to 1 to connect the first interrupt resource found, 0 to leave
; disconnected
HKR, Unit00, "ConnectInterrupt", 0x10001, 0
HKR, Unit00, "Model", 0, "kxtj9"

; coinstaller installation
[kxspb_device.NT.CoInstallers]
AddReg = kxspb_coinst_addreg
CopyFiles = kxspb_device_coinst_copy

[kxspb_coinst_addreg]
HKR,,CoInstallers32,0x10000, "WdfCoInstaller01011.dll,WdfCoInstaller", "kxsdinstall.dll,KxsdInstall"

[kxspb_device_coinst_copy]
WdfCoInstaller01011.dll
kxsdinstall.dll,,0x4000    ; COPYFLG_IN_USE_RENAME

;-------------- Service installation
[kxspb_device.nt.Services]
AddService = kxspb, %SPSVCINST_ASSOCSERVICE%, kxspb_service_inst

; -------------- kxspb driver install sections
[kxspb_service_inst]
DisplayName = %kxspb.SVCDESC%
ServiceType = 1        ; SERVICE_KERNEL_DRIVER
StartType = 3        ; SERVICE_DEMAND_START 
ErrorControl = 1        ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\kxspb.sys
LoadOrderGroup = Base

[Strings]
SPSVCINST_ASSOCSERVICE = 2
ManufacturerName = "Kionix, Inc."
ClassName = "Sensor I/O devices"
DiskName = "Kionix SPB Driver Installation Disk"
;kxspb.DeviceDesc = "Kionix SPB Driver"
kxspb.SVCDESC = "Kionix SPB Service"
kxtj9.DeviceDesc = "Kionix KXTJ9 3-axis accelerometer SPB"
kxtj2.DeviceDesc = "Kionix KXTJ2 3-axis accelerometer SPB"
kxcj9.DeviceDesc = "Kionix KXCJ9 3-axis accelerometer SPB"
kxtj9_legacy.DeviceDesc = "Kionix KXTJ9 3-axis accelerometer SPB"
