diff options
Diffstat (limited to 'Tools/buildbot/clean.bat')
-rw-r--r-- | Tools/buildbot/clean.bat | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Tools/buildbot/clean.bat b/Tools/buildbot/clean.bat index c69bf56..6890453 100644 --- a/Tools/buildbot/clean.bat +++ b/Tools/buildbot/clean.bat @@ -1,8 +1,29 @@ -@rem Used by the buildbot "clean" step.
-call "%VS100COMNTOOLS%vsvars32.bat"
-@echo Deleting test leftovers ...
-rmdir /s /q build
-cd PCbuild
-msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x86
-msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x86
-cd ..
+@echo off
+rem Used by the buildbot "clean" step.
+
+setlocal
+set root=%~dp0..\..
+set pcbuild=%root%\PCbuild
+
+if "%1" == "x64" (
+ set vcvars_target=x86_amd64
+ set platform=x64
+) else (
+ set vcvars_target=x86
+ set platform=Win32
+)
+
+call "%pcbuild%\env.bat" %vcvars_target%
+
+echo.Attempting to kill Pythons...
+msbuild /v:m /nologo /target:KillPython "%pcbuild%\pythoncore.vcxproj" /p:Configuration=Release /p:Platform=%platform% /p:KillPython=true
+
+echo Deleting .pyc/.pyo files ...
+del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo"
+
+echo Deleting test leftovers ...
+rmdir /s /q "%root%\build"
+
+echo Deleting build
+msbuild /v:m /nologo /target:clean "%pcbuild%\pcbuild.proj" /p:Configuration=Release /p:Platform=%platform%
+msbuild /v:m /nologo /target:clean "%pcbuild%\pcbuild.proj" /p:Configuration=Debug /p:Platform=%platform%
|