forked from xinpengdr/MySQL-Front
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Cleanup.bat
75 lines (60 loc) · 3.47 KB
/
Cleanup.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@ECHO OFF
REM ****************************************************************************
SET CleanRootPath=%CD%
SET CleanImagesPath=%CleanRootPath%\Images
SET CleanImagesPureFlatPath=%CleanImagesPath%\PureFlat
SET CleanSourcePath=%CleanRootPath%\Source
SET ClearSourceSynEditPath=%CleanSourcePath%\SynEdit
SET ClearSourceBCHexEditorPath=%CleanSourcePath%\BCHexEditor
SET ClearSourceFastMMPath=%CleanSourcePath%\FastMM
SET ClearSourceMySQLPath=%CleanSourcePath%\MySQL
SET ClearSourceQueryBuilderPath=%CleanSourcePath%\QueryBuilder
SET ClearSourceShellBrowserPath=%CleanSourcePath%\ShellBrowser
SET ClearSourceSynopsePDFPath=%CleanSourcePath%\SynopsePDF
SET ClearSourceVCLPath=%CleanSourcePath%\VCL
SET ClearSourceWin32Path=%CleanSourcePath%\Win32
SET CleanPublishPath=%CleanRootPath%\Publish
SET CleanTempPath=%CleanRootPath%\Temp
REM ****************************************************************************
CD "%CleanRootPath%"
if exist "%CleanPublishPath%" RMDIR /S /Q "%CleanPublishPath%"
if exist "%CleanTempPath%" RMDIR /S /Q "%CleanTempPath%"
if not exist "%CleanImagesPureFlatPath%" MKDIR "%CleanImagesPureFlatPath%"
if not exist "%ClearSourceFastMMPath%\Bin" MKDIR "%ClearSourceFastMMPath%\Bin"
if not exist "%ClearSourceMySQLPath%\Source" MKDIR "%ClearSourceMySQLPath%\Source"
if not exist "%ClearSourceSynEditPath%\Source" MKDIR "%ClearSourceSynEditPath%\Source"
if not exist "%ClearSourceSynEditPath%\Bin" MKDIR "%ClearSourceSynEditPath%\Bin"
if not exist "%ClearSourceBCHexEditorPath%\Source" MKDIR "%ClearSourceBCHexEditorPath%\Source"
if not exist "%ClearSourceBCHexEditorPath%\Resource" MKDIR "%ClearSourceBCHexEditorPath%\Resource"
if not exist "%ClearSourceBCHexEditorPath%\Bin" MKDIR "%ClearSourceBCHexEditorPath%\Bin2"
if not exist "%ClearSourceQueryBuilderPath%\Source" MKDIR "%ClearSourceQueryBuilderPath%\Source"
if not exist "%ClearSourceQueryBuilderPath%\Resource" MKDIR "%ClearSourceQueryBuilderPath%\Resource"
if not exist "%ClearSourceQueryBuilderPath%\Bin" MKDIR "%ClearSourceQueryBuilderPath%\Bin"
if not exist "%ClearSourceShellBrowserPath%\Source" MKDIR "%ClearSourceShellBrowserPath%\Source"
if not exist "%ClearSourceShellBrowserPath%\Resource" MKDIR "%ClearSourceShellBrowserPath%\Resource"
if not exist "%ClearSourceShellBrowserPath%\Bin" MKDIR "%ClearSourceShellBrowserPath%\Bin"
if not exist "%ClearSourceSynopsePDFPath%\Source" MKDIR "%ClearSourceSynopsePDFPath%\Source"
if not exist "%ClearSourceSynopsePDFPath%\Resource" MKDIR "%ClearSourceSynopsePDFPath%\Resource"
if not exist "%ClearSourceSynopsePDFPath%\Bin" MKDIR "%ClearSourceSynopsePDFPath%\Bin"
if not exist "%ClearSourceVCLPath%\Source" MKDIR "%ClearSourceVCLPath%\Source"
if not exist "%ClearSourceWin32Path%\Source" MKDIR "%ClearSourceWin32Path%\Source"
MKDIR "%CleanTempPath%"
if exist "%CleanSourcePath%\FastMM\FastMM_FullDebugMode.dll" COPY "%CleanSourcePath%\FastMM\FastMM_FullDebugMode.dll" "%CleanTempPath%" > nul
for /D /R %%I in (*) do (
if exist "%%I\__history" RMDIR /S /Q %%I\__history"
if exist "%%I\*.~dsk" DEL "%%I\*.~dsk"
if exist "%%I\*.drc" DEL %%I\*.drc"
if exist "%%I\*.dproj.local" DEL %%I\*.dproj.local"
if exist "%%I\*.identcache" DEL "%%I\*.identcache"
if exist "%%I\*.tvsconfig" DEL "%%I\*.tvsconfig"
if exist "%%I\*.vlb" DEL %%I\*.vlb"
)
CHOICE /M "Clean built packages"
if Errorlevel 2 goto End
if Errorlevel 1 goto CleanAll
goto End
:CleanAll
for /D /R %%I in (*) do (
if exist "%%I\Bin\*" DEL /Q "%%I\Bin\*"
)
:End