forked from MaxRusov/far-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_bld.bat
57 lines (44 loc) · 1.1 KB
/
_bld.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
set PrjName=%1
shift
set FarVer=3
rem if /i "%1" == "Far3" (
rem set FarVer=3
rem shift
rem ) else (
rem set FarVer=2
rem )
if /i "%1" == "64" (
set Platform=x64
set Compiler=dcc64.exe
shift
) else (
set Platform=x32
set Compiler=dcc32.exe
)
if "%Platform%" == "x32" (
set Bin=Bin%FarVer%
) else (
set Bin=Bin%FarVer%%Platform%
)
if exist ..\MixLib (
set Root=..
) else (
set Root=..\..
)
if "%BinFolder%" == "" (
set Dest=%Root%\%Bin%\%PrjName%
) else (
set Dest=%Root%\%Bin%\%BinFolder%
)
set Units=%Root%\xUnits\DCC%Platform%\%PrjName%
if exist %PrjName%.cfg del %PrjName%.cfg
if not exist %Units% md %Units%
if not exist %Dest% md %Dest%
set ResDef=-dFar%FarVer% -d%Platform%
if exist %PrjName%.rc brcc32 %ResDef% %PrjName%.rc || exit
if exist %PrjName%A.rc brcc32 %ResDef% %PrjName%A.rc || exit
if exist %PrjName%W.rc brcc32 %ResDef% %PrjName%W.rc || exit
%Compiler% -B -N%Units% -E%Dest% -dFar%FarVer% %PrjName%.dpr %1 %2 %3 %4 %5 %6 %7 %8 %9 || exit
if exist Doc copy Doc\* %Dest% >nul
if exist DocW copy DocW\* %Dest% >nul
if exist Doc%FarVer% copy Doc%FarVer%\* %Dest% >nul