;=============================================================================
;
; Copyright (c) Intel Corporation (2017).
;
; INTEL MAKES NO WARRANTY OF ANY KIND REGARDING THE CODE.  THIS CODE IS
; LICENSED ON AN "AS IS" BASIS AND INTEL WILL NOT PROVIDE ANY SUPPORT,
; ASSISTANCE, INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL DOES NOT
; PROVIDE ANY UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY
; DISCLAIMS ANY WARRANTY OF MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR ANY
; PARTICULAR PURPOSE, OR ANY OTHER WARRANTY.  Intel disclaims all liability,
; including liability for infringement of any proprietary rights, relating to
; use of the code. No license, express or implied, by estoppel or otherwise,
; to any intellectual property rights is granted herein.
;
;=============================================================================

;======================================================================
; Installation INF for the Intel(R) Dynamic Application Loader Host Interface
; Component INF
;======================================================================

[Version]
Signature="$Windows NT$"
Class=SoftwareComponent 
ClassGuid={5c4c3332-344d-483c-8739-259e934c9cc8}
Provider=%ManufacturerName%
CatalogFile=DAL.cat
DriverVer = 05/23/2018,4.0.0.1004

[SourceDisksNames]
1 = %DiskId%

[SourceDisksFiles]
bhPlugin.dll          = 1
bhPluginV2.dll        = 1
JHI.dll               = 1
JHI64.dll             = 1
jhi_service.exe       = 1
SpoolerApplet.dalp    = 1
TEEManagement.dll     = 1
TEEManagement64.dll   = 1
TEETransport.dll      = 1

[DestinationDirs]
DefaultDestDir = 11
DAL_Files.x86  = 16425

;*****************************************
; Install Section
;*****************************************

[Manufacturer]
%ManufacturerName%=Intel, NTamd64

[Intel.NTamd64]
%DALDescription% = DALInstallSection.ntamd64, SWC\3C4852D6-D47B-4F46-B05E-B5EDC1AA440E

[DALInstallSection.ntamd64]
CopyFiles = DAL_Files.x86
CopyFiles = DAL_Files.amd64
AddReg    = DAL_Service_AddReg

[DALInstallSection.ntamd64.Services]
AddService = , 0x00000002
AddService = jhi_service, %SPSVCSINST_STARTSERVICE%, DAL_Service_Inst

; -------------- DAL driver install sections
[DAL_Service_Inst]
DisplayName    = "Intel(R) Dynamic Application Loader Host Interface Service"
Description    = "Intel(R) Dynamic Application Loader Host Interface Service - Allows applications to access the local Intel (R) DAL"
ServiceType    = 0x00000010      ; SERVICE_WIN32_OWN_PROCESS
StartType      = 2               ; SERVICE_AUTO_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
Security       = "D:(A;;LCRP;;;WD)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)"
ServiceBinary  = %11%\jhi_service.exe


[DAL_Service_AddReg]
; Locations
HKLM, "SYSTEM\CurrentControlSet\Services\jhi_service", "FILELOCALE",    %FLG_ADDREG_TYPE_EXPAND_SZ%, %%SystemRoot%%\System32
HKLM, "SYSTEM\CurrentControlSet\Services\jhi_service", "APPLETSLOCALE", %FLG_ADDREG_TYPE_SZ%, "C:\ProgramData\Intel\DAL\Applets"

; Delayed start
; disabled temporarily
;HKLM, "SYSTEM\CurrentControlSet\Services\jhi_service", "DelayedAutostart", %FLG_ADDREG_TYPE_DWORD%, 1

; For event logs translation
HKLM, "SYSTEM\CurrentControlSet\Services\eventlog\Application\IntelDalJhi", "EventMessageFile", %FLG_ADDREG_TYPE_EXPAND_SZ%, %%SystemRoot%%\System32\jhi_service.exe
HKLM, "SYSTEM\CurrentControlSet\Services\eventlog\Application\IntelDalJhi", "TypesSupported", %FLG_ADDREG_TYPE_DWORD%, 7

; --------- Files ----------------------
[DAL_Files.x86]
JHI.dll
TEEManagement.dll

[DAL_Files.amd64]
bhPlugin.dll
bhPluginV2.dll
JHI.dll,JHI64.dll
jhi_service.exe
SpoolerApplet.dalp
TEEManagement.dll,TEEManagement64.dll
TEETransport.dll
JHI64.dll
TEEManagement64.dll

[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
SPSVCSINST_STARTSERVICE= 0x00000800
FLG_ADDREG_TYPE_DWORD=0x00010001
FLG_ADDREG_TYPE_EXPAND_SZ=0x00020000 
FLG_ADDREG_TYPE_SZ=0x00000000 

DALDescription="Intel(R) Dynamic Application Loader Host Interface"
DiskId = "Intel(R) Dynamic Application Loader Host Interface Installation Disk"
ManufacturerName="Intel"
