[Files]

//----DLL
//+++++++
SetReqFile,%Install_sys%,%Distlang%,%FallBack%,%target_sys%

FileCopy,%Install_sys%\*.acm,%target_sys%
FileCopy,%Install_sys%\dm*,%target_sys%
FileCopy,%Install_sys%\%Distlang%\dm*.mui,%target_sys%\%Distlang%

If,%Arch%,=,x86,Then
	ReqFile,audiodev.dll,1
Else
	SetReqFile,%Install_wow%,%Distlang%,%FallBack%,%target_wow%
	ReqFile,audiodev.dll
End

SetReqFile,%Install_sys%,%Distlang%,%FallBack%,%target_sys%
ReqFile,audioeng.dll
ReqFile,audiokse.dll
ReqFile,audioses.dll,1
ReqFile,audiosrv.dll,1
ReqFile,avrt.dll
ReqFile,batmeter.dll,1
ReqFile,d3d9.dll
ReqFile,dciman32.dll
ReqFile,d3d10core.dll
ReqFile,ddrawex.dll
ReqFile,dpnaddr.dll
ReqFile,dpnathlp.dll
ReqFile,dpnhpast.dll
ReqFile,dpnhupnp.dll
ReqFile,dpnlobby.dll
ReqFile,dsdmo.dll,1
ReqFile,dsound.dll,1
If,ExistFile,%Install_sys%\dswave.dll,Then,ReqFile,dswave.dll
ReqFile,dxgi.dll
ReqFile,dxtmsft.dll
ReqFile,dxtrans.dll
ReqFile,dxva2.dll
ReqFile,encapi.dll
ReqFile,ksuser.dll
ReqFile,mcicda.dll,1
ReqFile,mciseq.dll,1
ReqFile,mciwave.dll,1
ReqFile,midimap.dll,1
ReqFile,mmci.dll,1
ReqFile,mmcico.dll
ReqFile,mmcndmgr.dll,1
ReqFile,mmcshext.dll,1
ReqFile,mmcss.dll,1
ReqFile,mmdevapi.dll,1
If,ExistFile,%Install_sys%\mmsystem.dll,Then,ReqFile,mmsystem.dll,1
If,ExistFile,%Install_sys%\msacm.dll,Then,ReqFile,msacm.dll,1
ReqFile,msacm32.dll,1
ReqFile,msdmo.dll
ReqFile,msyuv.dll
ReqFile,sbe.dll
ReqFile,sbeio.dll
ReqFile,SndVolSSO.dll,1
ReqFile,stobject.dll,1
ReqFile,winmm.dll,1

// Windows 7
// ---------
If,%NT%,=,6.1,Then
	ReqFile,d2d1.dll
	ReqFile,d3d8thk.dll
	ReqFile,d3d10.dll
	ReqFile,d3d10_1.dll
	ReqFile,d3d10_1core.dll
	ReqFile,d3d10level9.dll
	ReqFile,d3d10warp.dll
	ReqFile,d3d11.dll
	ReqFile,mmres.dll,1	
	ReqFile,sberes.dll,1
	ReqFile,umpo.dll,1
End

// Windows Vista
// -------------
If,%NT%,=,6.0,Then
	FileCopy,%Install_sys%\AdvancedInstallers\cmiv2.dll,%target_sys%\AdvancedInstallers\
	If,%Arch%,=,x86,Then
		ReqFile,audioeng.dll
	Else
		SetReqFile,%Install_wow%,%Distlang%,%FallBack%,%target_wow%
		ReqFile,audioeng.dll
	End
End

//----SONSTIGE DATEIEN / OTHER FILES
//++++++++++++++++++++++++++++++++++
SetReqFile,%Install_sys%,%Distlang%,%FallBack%,%target_sys%
ReqFile,bdaplgin.ax
ReqFile,mpeg2data.ax
ReqFile,mpg2splt.ax
ReqFile,MSDvbNP.ax

ReqFile,msacm32.drv,1
If,ExistFile,%Install_sys%\sound.drv,Then,ReqFile,sound.drv,1
ReqFile,wdmaud.drv,1

ReqFile,audiodg.exe,1
ReqFile,SndVol.exe,1
ReqFile,SoundRecorder.exe,1

If,ExistFile,%Install_sys%\mmtask.tsk,Then,ReqFile,mmtask.tsk,1

//----TREIBER / DRIVERS
//+++++++++++++++++++++
ReqFile,mmsys.cpl,1

If,%Arch%,=,x86,Then
	Set,%DriverArch%,x86
Else
	Set,%DriverArch%,amd64
End

// Windows Vista
// -------------
If,%OS%,=,WinVista,Then
	If,%Arch%,=,x86,Then
		Set,%hdss_Ext%,68189ccc
		// SP0
		If,%SP%,=,SP0,Then
			Set,%mmec_Ext%,8ac7060813a4d0d2
			Set,%audc_Ext%,7469022ae7b4af06
			Set,%hdab_Ext%,55037da4
			Set,%hdau_Ext%,2e4e0e52
			Set,%wdmu_Ext%,9ce240de
			Set,%wdma_Ext%,1493ef6e
		End
		// SP1
		If,%SP%,=,SP1,Then
			Set,%mmec_Ext%,8cfdc804108fe1a6
			Set,%audc_Ext%,769fc426e49fbfda
			Set,%hdab_Ext%,d3db50b3
			Set,%hdau_Ext%,2e4e0e52
			Set,%wdmu_Ext%,93fdc0a6
			Set,%wdma_Ext%,e9a56ed0
		End
		// SP2
		If,%SP%,=,SP2,Then
			Set,%mmec_Ext%,8ee941100db1acf2
			Set,%audc_Ext%,788b3d32e1c18b26
			Set,%hdab_Ext%,9689af2f
			Set,%hdau_Ext%,6740f89c
			Set,%wdmu_Ext%,dc7189cc
			Set,%wdma_Ext%,84db3286
		End
	Else
		Set,%hdss_Ext%,9a2282ac
		// SP0
		If,%SP%,=,SP0,Then
			Set,%mmec_Ext%,e91c6387c8ed52dc
			Set,%audc_Ext%,d2be5faa9cfd3110
			Set,%hdab_Ext%,870d6384
			Set,%hdau_Ext%,6057f432
			Set,%wdmu_Ext%,ceec26be
			Set,%wdma_Ext%,469dd54e
		End
		// SP1
		If,%SP%,=,SP1,Then
			Set,%mmec_Ext%,e91c6387c8ed52dc
			Set,%audc_Ext%,d2be5faa9cfd3110
			Set,%hdab_Ext%,c415a8e2
			Set,%hdau_Ext%,6057f432
			Set,%wdmu_Ext%,cb86604b
			Set,%wdma_Ext%,ef351a85
		End
		// SP2
		If,%SP%,=,SP2,Then
			Set,%mmec_Ext%,eb07dc93c60f1e28
			Set,%audc_Ext%,d4a9d8b69a1efc5c
			Set,%hdab_Ext%,b8759e2a
			Set,%hdau_Ext%,ef59685d
			Set,%wdmu_Ext%,7c79e8af
			Set,%wdma_Ext%,6ca05e42
		End
	End
End

// Windows 7
// ---------
If,%OS%,=,Win7,Then
	If,%Arch%,=,x86,Then
		Set,%hdss_Ext%,x86_neutral_3f3a26225c0b8f9c
		Set,%mmec_Ext%,8cd41e2771e37717
		// SP0
		If,%SP%,=,SP0,Then
			Set,%audc_Ext%,76761a4a45f3554b
			Set,%hdab_Ext%,x86_neutral_349139f09f579763
			Set,%hdau_Ext%,x86_neutral_9781e9d72e255b2e
			Set,%wdmu_Ext%,x86_neutral_3436210257797730
			Set,%wdma_Ext%,x86_neutral_aed2a4456700dfde
		Else
		// SP1
			Set,%audc_Ext%,78a72e1242e1d8e5
			Set,%hdab_Ext%,x86_neutral_77479a4820fb8643
			Set,%hdau_Ext%,x86_neutral_5a5e688ecb9e273f
			Set,%wdmu_Ext%,x86_neutral_a721e4f3907a2769
			Set,%wdma_Ext%,x86_neutral_aed2a4456700dfde
		End
	Else
		Set,%hdss_Ext%,amd64_neutral_330a593eb888237c
		Set,%mmec_Ext%,e8f2b9ab2a40e84d
		// SP0
		If,%SP%,=,SP0,Then
			Set,%audc_Ext%,d294b5cdfe50c681
			Set,%hdab_Ext%,amd64_neutral_c8d90bd70af55772
			Set,%hdau_Ext%,amd64_neutral_cb351613c92a9f31
			Set,%wdmu_Ext%,amd64_neutral_c81656b241a238c8
			Set,%wdma_Ext%,amd64_neutral_423894ded0ba8fdf
		Else
		// SP1
			Set,%audc_Ext%,d4c5c995fb3f4a1b
			Set,%hdab_Ext%,amd64_neutral_4b99fffee061ff26
			Set,%hdau_Ext%,amd64_neutral_ce7bc199c85ae0a0
			Set,%wdmu_Ext%,amd64_neutral_7bb325bca8ea1218
			Set,%wdma_Ext%,amd64_neutral_423894ded0ba8fdf
		End
	End
End

Set,%mmec%,%DriverArch%_microsoft-windows-audio-mmecore-other_31bf3856ad364e35_6.%WIM_MINOR%.%WIM_BUILD%.%WIM_SPBUILD%_none_%mmec_Ext%
Set,%audc%,%DriverArch%_microsoft-windows-audio-audiocore_31bf3856ad364e35_6.%WIM_MINOR%.%WIM_BUILD%.%WIM_SPBUILD%_none_%audc_Ext%
Set,%hdab%,hdaudbus.inf_%hdab_Ext%
Set,%hdau%,hdaudio.inf_%hdau_Ext%
Set,%hdss%,hdaudss.inf_%hdss_Ext%
Set,%wdmu%,wdma_usb.inf_%wdmu_Ext%
Set,%wdma%,wdmaudio.inf_%wdma_Ext%

DirCopy,%Install_sys%\DriverStore\FileRepository\%hdss%,					%target_win%\inf

FileCopy,%Install_sys%\DriverStore\FileRepository\%hdab%\hdaudbus.inf,		%target_win%\inf
FileCopy,%Install_sys%\DriverStore\FileRepository\%hdab%\hdaudbus.sys,		%target_sys%\Drivers

FileCopy,%Install_sys%\DriverStore\FileRepository\%hdau%\hdaudio.inf,		%target_win%\inf
FileCopy,%Install_sys%\DriverStore\FileRepository\%hdau%\HdAudio.sys,		%target_win%\inf
FileCopy,%Install_sys%\DriverStore\FileRepository\%hdau%\HdAudio.sys,		%target_sys%\Drivers

FileCopy,%Install_sys%\DriverStore\FileRepository\%wdmu%\wdma_usb.inf,		%target_win%\inf
FileCopy,%Install_sys%\DriverStore\FileRepository\%wdmu%\USBAUDIO.sys,		%target_sys%\Drivers

FileCopy,%Install_sys%\DriverStore\FileRepository\%wdma%\drmk.sys,			%target_sys%\Drivers\drmk.sys
FileCopy,%Install_sys%\DriverStore\FileRepository\%wdma%\drmkaud.sys,		%target_sys%\Drivers\drmkaud.sys
FileCopy,%Install_sys%\DriverStore\FileRepository\%wdma%\portcls.sys,		%target_sys%\Drivers\portcls.sys
FileCopy,%Install_sys%\DriverStore\FileRepository\%wdma%\SysFxUI.dll,		%target_sys%\SysFxUI.dll
FileCopy,%Install_sys%\DriverStore\FileRepository\%wdma%\wdmaudio.inf,		%target_sys%\wdmaudio.inf
FileCopy,%Install_sys%\DriverStore\FileRepository\%wdma%\WMALFXGFXDSP.dll,	%target_sys%\WMALFXGFXDSP.dll

FileCopy,%Install_win%\inf\ks.inf,											%target_win%\inf

If,ExistFile,%Install_win%\winsxs\%audc%\EncDump.dll,Then,					FileCopy,%Install_win%\winsxs\%audc%\EncDump.dll,%target_sys%\EncDump.dll
If,ExistFile,%Install_win%\winsxs\%mmec%\gm.dls,Then,						FileCopy,%Install_win%\winsxs\%mmec%\gm.dls,%target_sys%
If,ExistFile,%Install_win%\winsxs\%mmec%\audmigplugin.dll,Then,				FileCopy,%Install_win%\winsxs\%mmec%\audmigplugin.dll,%target_sys%
