From 8260746d7f736791bfd7466418059c22850e00a7 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 18 Dec 2017 00:49:25 -0700 Subject: [PATCH] Simplified Build scripts for Kit and PE * If the script doesn't exist when called then an :UnknownError is called * Checking if it exists and jumping to an additional error is a bit redundant * dandi_set_env check remains to alert the tech WADK is missing --- Build Kit.cmd | 9 --------- Build PE.cmd | 11 ++--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Build Kit.cmd b/Build Kit.cmd index 8d82bb60..d50b9209 100644 --- a/Build Kit.cmd +++ b/Build Kit.cmd @@ -7,10 +7,6 @@ setlocal title Wizard Kit: Build Tool call :CheckFlags %* -:LaunchPrep -rem Verifies the environment before launching item -if not exist ".bin\Scripts\build_kit.ps1" (goto ErrorBuildKitMissing) - :PrepNewKit rem Copy base files to a new folder OUT_KIT robocopy /e .bin OUT_KIT\.bin @@ -43,11 +39,6 @@ for %%f in (%*) do ( @exit /b 0 :: Errors :: -:ErrorBuildKitMissing -echo. -echo ERROR: build_kit.ps1 script not found. -goto Abort - :ErrorUnknown echo. echo ERROR: Encountered an unknown error. diff --git a/Build PE.cmd b/Build PE.cmd index 4c49be8a..4b539697 100644 --- a/Build PE.cmd +++ b/Build PE.cmd @@ -8,13 +8,11 @@ title Wizard Kit: Windows PE Build Tool call :CheckFlags %* call :CheckElevation || goto Exit call :FindKitsRoot || goto ErrorKitNotFound -set "dandi_set_env=%adk_root%\Deployment Tools\DandISetEnv.bat" -set "ps_script=%~dp0\.bin\Scripts\build_pe.ps1" :LaunchPrep -rem Verify scripts exists +rem Update environment using WADK script +set "dandi_set_env=%adk_root%\Deployment Tools\DandISetEnv.bat" if not exist "%dandi_set_env%" (goto ErrorKitNotFound) -if not exist "%ps_script%" (goto ErrorPSScriptMissing) call "%dandi_set_env%" || goto ErrorUnknown :EnsureCRLF @@ -93,11 +91,6 @@ echo. echo ERROR: Windows ADK installation not found. goto Abort -:ErrorPSScriptMissing -echo. -echo ERROR: build_pe.ps1 script not found. -goto Abort - :ErrorUnknown echo. echo ERROR: Encountered an unknown error.