-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.bat
More file actions
92 lines (73 loc) · 2.36 KB
/
Copy pathcompile.bat
File metadata and controls
92 lines (73 loc) · 2.36 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
::
:: MvxLib, an open source C# library used for communication with Intentia Movex.
:: http://mvxlib.sourceforge.net
::
:: Copyright (C) 2005 - 2007 Mattias Bengtsson
::
:: This library is free software; you can redistribute it and/or
:: modify it under the terms of the GNU Lesser General Public
:: License as published by the Free Software Foundation; either
:: version 2.1 of the License, or (at your option) any later version.
::
:: This library is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
:: Lesser General Public License for more details.
::
:: You should have received a copy of the GNU Lesser General Public
:: License along with this library; if not, write to the Free Software
:: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
::
@ECHO OFF
IF "%1" == "11" GOTO set_11 rem Ms .NET 1.1
IF "%1" == "20" GOTO set_20 rem Ms .NET 2.0
IF "%1" == "40" GOTO set_40 rem Ms .NET 4.0
IF "%1" == "mono" GOTO set_mono rem Mono
ECHO Compiler argument empty or incorrect (remember to use lowercase).
ECHO Use 'compile arg' where arg can be:
ECHO '11' for Microsoft .NET 1.1
ECHO '20' for Microsoft .NET 2.0
ECHO '40' for Microsoft .NET 4.0
ECHO 'mono' for Mono
ECHO.
GOTO set_40
:set_11
ECHO Using .Net Framework 1.1 compiler.
SET DOTNET_VERSION=v1.1.4322
SET DEFINE=NET_1_1
GOTO endset
:set_20
ECHO Using .Net Framework 2.0 compiler.
SET DOTNET_VERSION=v2.0.50727
SET DEFINE=NET_2_0
GOTO endset
:set_40
ECHO Using .Net Framework 4.0 compiler.
SET DOTNET_VERSION=v4.0.30319
SET DEFINE=NET_2_0
GOTO endset
:set_mono
ECHO Using Mono compiler.
SET DEFINE=MONO /r:System.dll
SET COMPILER=mcs
GOTO compile
:endset
SET COMPILER=%WINDIR%\Microsoft.NET\Framework\%DOTNET_VERSION%\csc.exe /nologo
:compile
SET DEBUG=
IF NOT "%2" == "debug" GOTO endset_debug
SET DEBUG=/debug+
:endset_debug
:: Suppress missing XML-comment warnings
SET COMPILER=%COMPILER% /nowarn:1591
ECHO.
SET BINDIR=Bin\
IF NOT EXIST %BINDIR% MKDIR %BINDIR%
CALL %COMPILER% /define:%DEFINE% /target:library /out:%BINDIR%MvxLib.dll /doc:%BINDIR%MvxLib.xml *.cs %DEBUG%
IF ERRORLEVEL 1 GOTO ERR
ECHO *** SUCCESS ***
GOTO end
:err
ECHO *** FAILED ***
PAUSE
:end