-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcleanup.bat
67 lines (49 loc) · 1.26 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
@echo off
cls
echo.*****************************
echo.* Checkmate Source Clean Up *
echo.*****************************
echo.
Echo Removing files not needed for build. Usually left over DCU and temp files.
echo.
del *.map /s
del *.dcu /s
del *.~* /s
del *.ddp /s
del *.sfb /s
del *.ddp /s
del *.~dfm /s
del *.stat /s
echo.
echo Clearing read only attributes from all files and sub folders.
echo.This will remove any read only files.
echo.
attrib *.* -r -a -s -h /s
attrib updates\*.* -r -a -s -h /s
echo.
echo.Checking for CMW.DOF
echo.
IF EXIST "CMW.DOF" GOTO FIXDOF
echo.CMW.DOF file does not exist. Skipping repair.
Goto END
:FIXDOF
echo.Reparing CMW.DOF file ...
echo.
IF EXIST "CMW2.DOF" DEL CMW2.DOF
rem type cmw.dof | findstr /V RunParams= >cmw2.dof
type cmw.dof | repl "RunParams=" "RunParams=-cmw-debugger \nOldRunParams=" IX > cmw2.dof
type cmw2.dof | repl "UnsafeType=1" "UnsafeType=0" I > cmw2.dof
type cmw2.dof | repl "UnsafeCode=1" "UnsafeCode=0" I > cmw2.dof
type cmw2.dof | repl "UnsafeCast=1" "UnsafeCast=0" I > cmw2.dof
echo.
DEL CMW.DOF
RENAME CMW2.DOF CMW.DOF
echo.CMW.DOF Repaired!
echo.
GOTO END
:END
echo.***************************************
echo.* Checkmate Source Clean Up COMPLETED *
echo.***************************************
echo.
Pause