Fixed an issue which will cause wrong library instances used for constructor re-ordering.
[people/mcb30/basetools.git] / toolsetup.bat
index 8cc3b8a..1429983 100755 (executable)
@@ -40,6 +40,9 @@ popd
 if not defined EDK_TOOLS_PATH set EDK_TOOLS_PATH=%BASE_TOOLS_PATH%\r
 mkdir %EDK_TOOLS_PATH%\Bin\Win32\r
 \r
+if not defined ORIGINAL_PATH set ORIGINAL_PATH=%PATH%\r
+set PATH=%EDK_TOOLS_PATH%\Bin\Win32;%EDK_TOOLS_PATH%\Bin;%ORIGINAL_PATH%\r
+\r
 :path_ok\r
 \r
 if /I "%1"=="-h" goto Usage\r
@@ -52,9 +55,6 @@ if /I "%1"=="build" goto build
 if /I "%1"=="rebuild" goto rebuild\r
 if NOT "%1"=="" goto Usage\r
 \r
-if not defined ORIGINAL_PATH set ORIGINAL_PATH=%PATH%\r
-set PATH=%EDK_TOOLS_PATH%\Bin\Win32;%EDK_TOOLS_PATH%\Bin;%ORIGINAL_PATH%\r
-\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\BootSectImage.exe" goto build\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\build.exe" goto build\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\EfiLdrImage.exe" goto build\r
@@ -73,6 +73,7 @@ IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\TargetTool.exe" goto build
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\TianoCompress.exe" goto build\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\Trim.exe" goto build\r
 IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\VfrCompile.exe" goto build\r
+IF NOT EXIST "%EDK_TOOLS_PATH%\Bin\Win32\Fpd2Dsc.exe" goto build\r
 \r
 :skipbuild\r
 goto end\r
@@ -121,6 +122,10 @@ echo Generating MigrationMsa2Inf.exe
 cd %BASE_TOOLS_PATH%\Source\Python\MigrationMsa2Inf\r
 %PYTHON_FREEZER_PATH%\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8 --install-dir=%EDK_TOOLS_PATH%\Bin\Win32 MigrationMsa2Inf.py > NUL\r
 \r
+echo Generating Fpd2Dsc.exe\r
+cd %BASE_TOOLS_PATH%\Source\Python\Fpd2Dsc\r
+%PYTHON_FREEZER_PATH%\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8 --install-dir=%EDK_TOOLS_PATH%\Bin\Win32 Fpd2Dsc.py > NUL\r
+\r
 popd\r
 echo Done!\r
 goto end\r