MipSdkRedist.psm1

$unmanaged = @(
'boost_chrono-vc120-mt-1_57.dll',
'boost_regex-vc120-mt-1_57.dll',
'boost_serialization-vc120-mt-1_57.dll',
'boost_system-vc120-mt-1_57.dll',
'boost_thread-vc120-mt-1_57.dll',
'CoreToolkits.dll',
'cudart64_101.dll',
'icudt48.dll',
'icuin48.dll',
'icuio48.dll',
'icule48.dll',
'iculx48.dll',
'icutu48.dll',
'icuuc48.dll',
'IMV1.dll',
'libmfxaudiosw64.dll',
'libmfxsw64.dll',
'mfc120.dll',
'Mm025.dll',
'msvcp120.dll',
'msvcr120.dll',
'nppc64_10.dll',
'nppicom64_10.dll',
'ServerCommandServiceClient.dll',
'ToolkitFactoryProvider.dll',
'ToolkitSourcePlugin_mm025.dll',
'VideoOS.Toolkit.PInvoke.dll',
'xerces-c-vc120_3_2.dll',
'xqilla-vc120_234.dll')



$MipSdkPath = (Get-Item "$PSScriptRoot\bin").FullName
if ($ENV:Path -notlike "*$MipSdkPath*") {
    $ENV:Path = "$($ENV:Path);$MipSdkPath"
}

foreach ($dll in Get-ChildItem "$MipSdkPath\*.dll") {
    if ($unmanaged -contains $dll.Name) {
        continue
    }
    try {
        $null = [System.Reflection.Assembly]::LoadFrom($dll.FullName)
    } catch {
    }
}

Export-ModuleMember -Variable MipSdkPath