mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
Provide a way to update config files[target.txt, tools_def.txt, FrameworkDatabase.db] even they are existed. Using edksetup.bat Reconfig. Give a more detail edksetup.bat help usage.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1773 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3683e55034
commit
2fcfed38cb
@ -119,6 +119,55 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
</if>
|
</if>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="reconfig">
|
||||||
|
<!-- backup all config files -->
|
||||||
|
<if>
|
||||||
|
<available file="Conf/target.txt"/>
|
||||||
|
<then>
|
||||||
|
<echo message="Backup Conf/target.txt to Conf/target.txt.bak" />
|
||||||
|
<copy file="Conf/target.txt" tofile="Conf/target.txt.bak" overwrite="true" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if>
|
||||||
|
<available file="Conf/tools_def.txt"/>
|
||||||
|
<then>
|
||||||
|
<echo message="Backup Conf/tools_def.txt to Conf/tools_def.txt.bak" />
|
||||||
|
<copy file="Conf/tools_def.txt" tofile="Conf/tools_def.txt.bak" overwrite="true" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if>
|
||||||
|
<available file="Conf/FrameworkDatabase.db"/>
|
||||||
|
<then>
|
||||||
|
<echo message="Backup Conf/FrameworkDatabase.db to Conf/FrameworkDatabase.db.bak" />
|
||||||
|
<copy file="Conf/FrameworkDatabase.db" tofile="Conf/FrameworkDatabase.db.bak" overwrite="true" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="Conf/tools_def.template"/>
|
||||||
|
<then>
|
||||||
|
<echo message="Copy file from Conf/tools_def.template to Conf/tools_def.txt" />
|
||||||
|
<copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="true" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="Conf/target.template"/>
|
||||||
|
<then>
|
||||||
|
<echo message="Copy file from Conf/target.template to Conf/target.txt" />
|
||||||
|
<copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="true" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<available file="Conf/FrameworkDatabase.template"/>
|
||||||
|
<then>
|
||||||
|
<echo message="Copy file from Conf/FrameworkDatabase.template to Conf/FrameworkDatabase.db" />
|
||||||
|
<copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db" overwrite="true" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
<subant target="clean" inheritall="false">
|
<subant target="clean" inheritall="false">
|
||||||
<filelist dir="."
|
<filelist dir="."
|
||||||
|
21
edksetup.bat
21
edksetup.bat
@ -15,7 +15,7 @@
|
|||||||
@REM set XMLBEANS_HOME=C:\xmlbeans
|
@REM set XMLBEANS_HOME=C:\xmlbeans
|
||||||
@REM set CYGWIN_HOME=C:\cygwin
|
@REM set CYGWIN_HOME=C:\cygwin
|
||||||
|
|
||||||
@REM usage: edksetup.bat [Rebuild] [ForceRebuild]
|
@REM usage: edksetup.bat [Rebuild] [ForceRebuild] [Reconfig]
|
||||||
@REM if the argument, skip is present, only the paths and the
|
@REM if the argument, skip is present, only the paths and the
|
||||||
@REM test and set of environment settings are performed.
|
@REM test and set of environment settings are performed.
|
||||||
|
|
||||||
@ -90,6 +90,8 @@ echo Resetting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WO
|
|||||||
@if "%1"=="/h" goto Usage
|
@if "%1"=="/h" goto Usage
|
||||||
@if "%1"=="/?" goto Usage
|
@if "%1"=="/?" goto Usage
|
||||||
@if "%1"=="/help" goto Usage
|
@if "%1"=="/help" goto Usage
|
||||||
|
@if "%1"=="ForceRebuild" goto ForceBuild
|
||||||
|
@if "%1"=="Reconfig" goto Reconfig
|
||||||
|
|
||||||
@IF NOT EXIST "Tools\Jars\Common.jar" goto NormalBuild
|
@IF NOT EXIST "Tools\Jars\Common.jar" goto NormalBuild
|
||||||
@IF NOT EXIST "Tools\Jars\PcdTools.jar" goto NormalBuild
|
@IF NOT EXIST "Tools\Jars\PcdTools.jar" goto NormalBuild
|
||||||
@ -131,7 +133,6 @@ echo Resetting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WO
|
|||||||
@IF NOT EXIST "Tools\bin\dlg.exe" goto NormalBuild
|
@IF NOT EXIST "Tools\bin\dlg.exe" goto NormalBuild
|
||||||
|
|
||||||
@if "%1"=="Rebuild" goto NormalBuild
|
@if "%1"=="Rebuild" goto NormalBuild
|
||||||
@if "%1"=="ForceRebuild" goto ForceBuild
|
|
||||||
@if NOT "%1"=="" goto Usage
|
@if NOT "%1"=="" goto Usage
|
||||||
|
|
||||||
goto skipbuild
|
goto skipbuild
|
||||||
@ -250,9 +251,23 @@ set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Bin\MigrationTools.jar
|
|||||||
echo CLASSPATH: %CLASSPATH%
|
echo CLASSPATH: %CLASSPATH%
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
|
:Reconfig
|
||||||
|
@REM
|
||||||
|
@REM Reinstall all config files
|
||||||
|
@REM
|
||||||
|
call ant -f %WORKSPACE%\Tools\build.xml reconfig
|
||||||
|
goto end
|
||||||
|
|
||||||
:Usage
|
:Usage
|
||||||
echo.
|
echo.
|
||||||
echo Usage: %0 [Rebuild] [ForceRebuild]
|
echo Usage: %0 [Rebuild] [ForceRebuild] [Reconfig]
|
||||||
|
echo Rebuild: Incremental build, only build those updated tools;
|
||||||
|
echo ForceRebuild: Rebuild all tools neither updated or not;
|
||||||
|
echo Reconfig: Reinstall target.txt, tools_def.txt, FrameworkDatabase.db.
|
||||||
|
echo.
|
||||||
|
echo Note that target.template, tools_def.template, FrameworkDatabase.template will be
|
||||||
|
echo only copied to target.txt, tools_def.txt, FrameworkDatabase.db respectively if they
|
||||||
|
echo are not existed. Using option [Reconfig] to do the force copy.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
:end
|
:end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user