diff --git a/Tools/LaunchTool.cmd b/Tools/LaunchTool.cmd index 4de6cee6..fb908ff6 100644 --- a/Tools/LaunchTool.cmd +++ b/Tools/LaunchTool.cmd @@ -106,7 +106,7 @@ REM Change to Working directory cd /D %IOTADK_ROOT%\Tools call setOEM.cmd doskey /macrofile=alias.txt -set IOT_ADDON_VERSION=4.2 +set IOT_ADDON_VERSION=4.3 echo IOTADK_ROOT : %IOTADK_ROOT% echo ADK_VERSION : %ADK_VERSION% diff --git a/Tools/bsptools/CHTx64/convert.cmd b/Tools/bsptools/CHTx64/convert.cmd new file mode 100644 index 00000000..438b140c --- /dev/null +++ b/Tools/bsptools/CHTx64/convert.cmd @@ -0,0 +1,50 @@ +@echo off + +goto START + +:Usage +echo Usage: convert +echo Generates the wm.xml file for the inf files and renames the existing pkg.xml to _pkg.xml +echo [/?].................... Displays this usage string. +echo Example: +echo convert +endlocal +exit /b 1 + +:START +setlocal ENABLEDELAYEDEXPANSION +if [%BSP_ARCH%] neq [amd64] ( + echo.%CLRRED%Error: Supported only in amd64.%CLREND% + exit /b 1 +) + +set DST_DIR=%BSPSRC_DIR%\CHTx64 +pushd +cd /D %DST_DIR% +del /s /q *.wm.xml >nul 2>nul +dir *.inf /b /s > %DST_DIR%\inflist.txt + +for /f "delims=" %%i in (%DST_DIR%\inflist.txt) do ( + cd %%~pi + for %%A in (.) do ( set FILENAME=%%~nxA) + move !FILENAME!.pkg.xml !FILENAME!._pkg.xml >nul 2>nul + echo Processing %%~nxi + call inf2pkg.cmd %%i !FILENAME! Intel +) + +popd +del %DST_DIR%\inflist.txt + +call convertpkg %DST_DIR% + +echo Fixing the BSPFM.xml file +powershell -Command "(gc %DST_DIR%\Packages\CHTx64FM.XML) -replace 'Intel.CHT64.OEM', '%%OEM_NAME%%.CHT64.OEM' -replace 'Intel.CHT64.Device', '%%OEM_NAME%%.CHT64.Device' -replace 'FeatureIdentifierPackage=\"true\"', '' | Out-File %DST_DIR%\Packages\CHTx64FM.xml -Encoding utf8" +echo Fixing the TestOEMInput.xml file +powershell -Command "(gc %DST_DIR%\OEMInputSamples\TestOEMInput.xml) -replace '%%BSPSRC_DIR%%', '%%BLD_DIR%%' -replace 'CHTx64\\Packages','MergedFMs' | Out-File %DST_DIR%\OEMInputSamples\TestOEMInput.xml -Encoding utf8" +echo Fixing the RetailOEMInput.xml file +powershell -Command "(gc %DST_DIR%\OEMInputSamples\RetailOEMInput.xml) -replace '%%BSPSRC_DIR%%', '%%BLD_DIR%%' -replace 'CHTx64\\Packages','MergedFMs' | Out-File %DST_DIR%\OEMInputSamples\RetailOEMInput.xml -Encoding utf8" + +endlocal + +echo Conversions done +exit /b 0