forked from calibre2opds/calibre2opds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetenv.cmd.sample
113 lines (96 loc) · 3.58 KB
/
setenv.cmd.sample
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
@echo OFF
rem calibre2opds setenv.cmd sample file
rem ~~~~~~~~~~~~~~~~~~~~~~~------------
rem A sample of a suitable setenv.cmd Batch file to set up the environment
rem build the calibre2opds program when running under Windows.
rem
rem INSTRUCTIONS:
rem ~~~~~~~~~~~~
rem - Copy the file to one called 'setenv.cmd' in the same folder
rem - Edit the following environment variables to suit your system
rem (or alternatively set them up at the system properties level)
rem The values given show a typical set as an example
set M2_HOME=C:\Program Files\Maven
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27
set SVN_HOME=C:\Program Files\SubVersion
set ZIPPROG=zip
rem NOTES:
rem 1. The zip program is specified above without a path as it is
rem located on the system search path. If this is not the case
rem then a full path to the program needs to be specified.
rem =========================================================
rem YOU SHOULD NOT NEED TO CHANGE THE REMAINDER OF THIS FILE
rem The checks are just to make sure that the settings above
rem seem to be sensible.
rem =========================================================
set C2O_ENV=
cls
echo Build calibre2opds
echo ~~~~~~~~~~~~~~~~~~
:CHECK_M2_HOME
if not "%M2_HOME%" == "" goto M2_HOME_SET
echo ERROR: The M2_HOME environe=ment variable is not set.
echo This needs to point to where Maven has been installed.
echo A typical value might be something like:
echo set M2_HOME=C:\Program Files\Maven
set C2O_ENV=BAD
goto CHECK_JAVA_HOME
:M2_HOME_SET
if EXIST "%M2_HOME%" goto M2_HOME_FOUND
echo M2_HOME=%M2_HOME%
echo ERROR: Maven not found at location specified by M2_HOME
set C2O_ENV=BAD
goto CHECK_JAVA_HOME
:M2_HOME_FOUND
PATH=%PATH%;%M2_HOME%\bin
:CHECK_JAVA_HOME
if not "%JAVA_HOME" == "" goto JAVA_HOME_SET
echo ERROR: The JAVA_HOME environment variable is not set.
echo This needs to point to where the Java SDK has been installed.
echo A typical value might be something like:
echo set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27
set C2O_ENV=BAD
goto CHECK_SVN_HOME
:JAVA_HOME_SET
if EXIST "%JAVA_HOME%" goto JAVA_HOME_FOUND
echo JAVA_HOME=%JAVA_HOME%
echo ERROR: Java SDK not found at location specified by JAVA_HOME
set C2O_ENV=BAD
goto CHECK_SVN_HOME
JAVA_:HOME_FOUND
PATH=%PATH%;%JAVA_HOME%\bin
:CHECK_SVN_HOME
if not "%SVN_HOME%" == "" got SVN_HOME_SET
echo ERROR: The SVN_HOME environment variable is not set.
echo This needs to point to where Subversion has been installed.
echo A typical value might be something like:
echo set SVN_HOME=C:\Program Files\SubVersion
set C2O_ENV=BAD
goto CHECK_OK
:SVN_HOME_SET
if EXIST "%SVN_HOME%" goto SVN_HOME_FOUND
echo SVN_HOME=%SVN_HOME%
echo ERROR: Subversion not found at location specified by SVN_HOME
set C2O_ENV=BAD
goto CHECK_OK
:SVN_HOME_FOUND
if EXIST "%SVN_HOME%\bin\svnversion.exe" goto SVNVERSION_FOUND
echo SVN_HOME=%SVN_HOME%
echo ERROR: Subversion 'svnversion' command not found.
echo You need to install an implementation that provides
echo this as a command line utility. In particular it
echo it is not included with TortoiseSVN in the default
echo installation.
set C2O_ENV=BAD
goto CHECK_OK
:SVNVERION_FOUND
PATH=%PATH%;%SVN_HOME%\bin
:CHECK_OK
if "%C2O_ENV%" == "" goto CHECKS_OK
echo ------ ERRORS IN ENVIRONMENT SETUP -------
echo Please correct errors listed and try again
echo ------------------------------------------
exit /b -1
:CHECKS_OK
echo Dependency Checks OK
exit /b 0