[go: up one dir, main page]

Menu

[1c8847]: / build.bat  Maximize  Restore  History

Download this file

127 lines (96 with data), 3.0 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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@echo off
rem VirtuaWin (virtuawin.sourceforge.net)
rem build - VirtuaWin build script for Microsoft cmd.
rem
rem Copyright (c) 2006-2014 VirtuaWin (VirtuaWin@home.se)
rem
rem See the file VirtuaWin.c for copying and conditions.
rem
set TARGET=
set DTARGET=
set LOGFILE=
set LOGFILEA=
set OPTIONS=
set MAKEFILE=
:build_option
if "%1." == "." goto build_cont
if "%1" == "-C" set TARGET=clean
if "%1" == "-d" set DTARGET=alld
if "%1" == "-h" goto build_help
if "%1" == "-l" goto build_logf
if "%1" == "-la" goto build_logfa
if "%1" == "-m" goto build_mkfl
if "%1" == "-S" set TARGET=spotless
if "%1" == "-u" set OPTIONS=%OPTIONS% vwUNICODE=1
if "%1" == "-vd" set OPTIONS=%OPTIONS% vwVERBOSED=1
shift
goto build_option
:build_logf
shift
set LOGFILE=%1
shift
goto build_option
:build_logfa
shift
set LOGFILEA=%1
shift
goto build_option
:build_mkfl
shift
set MAKEFILE=%1
shift
goto build_option
:build_cont
if "%TARGET%." == "." set TARGET=%DTARGET%
if "%MAKEFILE%" == "Makefile" set goto build_unxmake
set MAKE=nmake -nologo
if NOT "%MAKEFILE%." == "." goto build_make
if "%VCINSTALLDIR%." == "." goto build_vc6
set MAKEFILE=win32v9.mak
if NOT "%VCINSTALLDIR:8\VC=%" == "%VCINSTALLDIR%" set MAKEFILE=win32v8.mak
goto build_make
:build_vc6
set MAKEFILE=win32v6.mak
if NOT "%MSVCDir%." == "." goto build_make
echo ERROR: Failed to identify C compiler, please setup compiler environment or use -m option
echo.
goto build_exit
:build_unxmake
set MAKE=make
:build_make
if "%LOGFILE%." == "." goto build_applog
echo %MAKE% -f %MAKEFILE% %OPTIONS% %TARGET% > %LOGFILE% 2>&1
%MAKE% -f %MAKEFILE% %OPTIONS% %TARGET% > %LOGFILE% 2>&1
goto build_exit
:build_applog
if "%LOGFILEA%." == "." goto build_nolog
echo %MAKE% -f %MAKEFILE% %OPTIONS% %TARGET% >> %LOGFILEA% 2>&1
%MAKE% -f %MAKEFILE% %OPTIONS% %TARGET% >> %LOGFILEA% 2>&1
goto build_exit
:build_nolog
echo %MAKE% -f %MAKEFILE% %OPTIONS% %TARGET%
%MAKE% -f %MAKEFILE% %OPTIONS% %TARGET%
goto build_exit
:build_help
echo Usage: build [options]
echo.
echo Where options can be:-
echo -C : Build clean.
echo -d : For debug build (output is VirtuaWinD.exe).
echo -h : For this help page.
echo -l {logfile}
echo : Set the compile log file.
echo -la {logfile}
echo : Append the compile log to the given file.
echo -m {makefile}
echo Sets the makefile to use where {makefile} can be:-
echo Makefile Build using Cygwin, MinGW or Linux GNU GCC
echo win32v6.mak Build using MS VC version 6
echo win32v8.mak Build using MS VC version 8 (2005)
echo win32v9.mak Build using MS VC version 9 onwards
echo -S : Build clean spotless.
echo -u : Build with UNICODE support.
echo -vd : Build with debug verbosity logging (large output).
echo.
echo If you change the build options used do a clean build (build -C) first.
:build_exit