-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathgo.bat
More file actions
63 lines (48 loc) · 1.33 KB
/
go.bat
File metadata and controls
63 lines (48 loc) · 1.33 KB
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
@echo off
setlocal
rem How to use:
rem go.bat # Same as 32mscoff
rem go.bat 32mscoff # 32-Bit COFF
rem go.bat 64 # 64-Bit
for /f %%a in ('echo prompt $e ^| cmd') do set ESC=%%a
rem You can change the default object model here.
if "%~1" == "64" (
set MODEL=64
) else (
set MODEL=32mscoff
)
call makelib "%~1"
rem This errorlevel check fails on Win9x because of the previous delete.
rem if errorlevel 1 goto failed
if not "%dfl_failed%" == "" goto failed
if dmd_path == "" set dmd_path=%dmd_path%\windows
if "%MODEL%" == "64" (
if not exist "%dmd_path%\bin64\dmd.exe" goto no_dmd
) else if "%MODEL%" == "32mscoff" (
if not exist "%dmd_path%\bin\dmd.exe" goto no_dmd
)
if "%MODEL%" == "64" (
set output_path="%dmd_path%\lib64"
) else if "%MODEL%" == "32mscoff" (
set output_path="%dmd_path%\lib32mscoff"
)
echo.
echo About to move DFL lib files to %ESC%[36m%output_path%%ESC%[0m (Close window or Ctrl+C to stop)
pause
:do_move
pushd source\dfl
move /Y "..\..\bin\dfl*.lib" %output_path%
if errorlevel 1 goto failed
goto completed
:no_dmd
echo dmd_path environment variable not set; cannot copy lib files.
goto failed
:failed
echo.
echo %ESC%[31mgo.bat failed.%ESC%[0m
goto done
:completed
echo.
echo %ESC%[32mgo.bat completed.%ESC%[0m
:done
popd