This repository was archived by the owner on Mar 14, 2019. It is now read-only.
forked from mimecorg/webissues-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.bat
131 lines (100 loc) · 2.57 KB
/
configure.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
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
127
128
129
130
131
@echo off
set prefix="C:\Program Files\WebIssues Client\1.0"
set config=release
set syssqlite=no
set msvc=no
set incdir=
set libdir=
if exist .\webissues.pro goto arg_loop
echo *** ERROR: cannot find project file in current directory.
goto end
:arg_loop
if "%1" == "" goto arg_done
if "%1" == "-prefix" goto arg_prefix
if "%1" == "-debug" goto arg_debug
if "%1" == "-system-sqlite" goto arg_syssqlite
if "%1" == "-msvc" goto arg_msvc
if "%1" == "-I" goto arg_incdir
if "%1" == "-L" goto arg_libdir
if "%1" == "-help" goto show_usage
if "%1" == "--help" goto show_usage
if "%1" == "/?" goto show_usage
echo *** ERROR: Unrecognized option '%1'
goto show_usage
:arg_prefix
set prefix=%2
shift
goto arg_next
:arg_debug
set config=debug
goto arg_next
:arg_syssqlite
set syssqlite=yes
goto arg_next
:arg_msvc
set msvc=yes
goto arg_next
:arg_incdir
set incdir="QMAKE_INCDIR += %2"
shift
goto arg_next
:arg_libdir
set libdir="QMAKE_LIBDIR += %2"
shift
goto arg_next
:arg_next
shift
goto arg_loop
:show_usage
echo Usage: configure [-prefix DIR] [-debug] [-system-sqlite] [-msvc]
echo [-I DIRS] [-L DIRS]
echo.
echo Options:
echo.
echo -prefix DIR Set the instalation directory to DIR
echo (default: C:\Program Files\WebIssues Client\1.0)
echo -debug Build with debugging symbols
echo -system-sqlite Use system SQLite library
echo -msvc Generate Visual Studio solution
echo -I DIRS Specify additional include directories
echo -L DIRS Specify additional library directories
goto end
:arg_done
echo Testing for qmake...
set QMAKE=
qmake -v >nul 2>nul
if errorlevel 1 goto test_qtdir
set QMAKE=qmake
goto qmake_found
:test_qtdir
if "%QTDIR%" == "" goto no_qmake
"%QTDIR%\bin\qmake" -v >nul 2>nul
if errorlevel 1 goto no_qmake
set QMAKE=%QTDIR%\bin\qmake
goto qmake_found
:no_qmake
echo *** ERROR: Cannot find 'qmake' in your PATH.
goto end
:qmake_found
echo Writing configuration file...
echo # this file was generated by configure.bat >config.pri
echo CONFIG += %config% >>config.pri
echo PREFIX = %prefix:\=\\% >>config.pri
if "%syssqlite%" == "yes" echo CONFIG += system-sqlite >>config.pri
if "%msvc%" == "yes" goto gen_msvc
echo Generating Makefiles...
"%QMAKE%" -recursive %incdir% %libdir%
if errorlevel 1 goto qmake_failed
echo.
echo Configure finished. Run 'make' or 'nmake' now.
goto end
:gen_msvc
echo Generating Visual Studio solution...
"%QMAKE%" -tp vc -recursive %incdir% %libdir%
if errorlevel 1 goto qmake_failed
echo.
echo Configure finished.
goto end
:qmake_failed
echo *** ERROR: Running 'qmake' failed.
:end