This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding CHTx64 script and version updated to 4.3 (#231)
- Loading branch information
1 parent
46e6326
commit fcc0748
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |