jruby-launcher 1.0.4-java → 1.0.5-java
Sign up to get free protection for your applications and to get access to all the features.
- data/inc/Makefile-conf.mk +3 -2
- data/jvmlauncher.cpp +9 -0
- data/jvmlauncher.h +3 -1
- data/lib/jruby-launcher.rb +1 -1
- data/platformlauncher.cpp +21 -10
- data/platformlauncher.h +1 -1
- data/version.h +1 -1
- metadata +3 -3
data/inc/Makefile-conf.mk
CHANGED
@@ -31,7 +31,8 @@ OBJECTFILES = ${OBJECTDIR}/argparser.o \
|
|
31
31
|
${OBJECTDIR}/jrubyexe.o
|
32
32
|
|
33
33
|
ifdef JAVA_HOME
|
34
|
-
|
34
|
+
JAVA_INCLUDE = $(subst \,/,${JAVA_HOME})/include
|
35
|
+
INCLUDES = -I${JAVA_INCLUDE}
|
35
36
|
endif
|
36
37
|
|
37
38
|
ifdef MINGW
|
@@ -39,7 +40,7 @@ OBJECTFILES += ${OBJECTDIR}/utilsfuncswin.o \
|
|
39
40
|
${OBJECTDIR}/platformlauncher.o \
|
40
41
|
${OBJECTDIR}/jvmlauncher.o \
|
41
42
|
${OBJECTDIR}/jruby.o
|
42
|
-
INCLUDES += -I${
|
43
|
+
INCLUDES += -I${JAVA_INCLUDE}/win32
|
43
44
|
else
|
44
45
|
OBJECTFILES += ${OBJECTDIR}/unixlauncher.o
|
45
46
|
endif
|
data/jvmlauncher.cpp
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3
3
|
*
|
4
|
+
* Copyright 2009-2011 JRuby Team (www.jruby.org).
|
4
5
|
* Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
|
5
6
|
*
|
6
7
|
* The contents of this file are subject to the terms of either the GNU
|
@@ -69,6 +70,14 @@ JvmLauncher::JvmLauncher(const JvmLauncher& orig) {
|
|
69
70
|
JvmLauncher::~JvmLauncher() {
|
70
71
|
}
|
71
72
|
|
73
|
+
void JvmLauncher::setJavaCmd(const string cmdPath) {
|
74
|
+
javaExePath = cmdPath;
|
75
|
+
javaPath = "";
|
76
|
+
javawExePath = javaPath;
|
77
|
+
javaClientDllPath = javaPath;
|
78
|
+
javaServerDllPath = javaPath;
|
79
|
+
}
|
80
|
+
|
72
81
|
bool JvmLauncher::checkJava(const char *path, const char *prefix) {
|
73
82
|
assert(path);
|
74
83
|
assert(prefix);
|
data/jvmlauncher.h
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
/*
|
2
2
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3
3
|
*
|
4
|
-
* Copyright
|
4
|
+
* Copyright 2009-2011 JRuby Team (www.jruby.org).
|
5
|
+
* Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
|
5
6
|
*
|
6
7
|
* The contents of this file are subject to the terms of either the GNU
|
7
8
|
* General Public License Version 2 only ("GPL") or the Common
|
@@ -76,6 +77,7 @@ public:
|
|
76
77
|
void setSuppressConsole(bool val) {
|
77
78
|
suppressConsole = val;
|
78
79
|
}
|
80
|
+
void setJavaCmd(const std::string cmdPath);
|
79
81
|
|
80
82
|
private:
|
81
83
|
JvmLauncher(const JvmLauncher& orig);
|
data/lib/jruby-launcher.rb
CHANGED
data/platformlauncher.cpp
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3
3
|
*
|
4
|
-
* Copyright 2009-
|
4
|
+
* Copyright 2009-2011 JRuby Team (www.jruby.org).
|
5
5
|
* Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
|
6
6
|
*
|
7
7
|
* The contents of this file are subject to the terms of either the GNU
|
@@ -137,20 +137,30 @@ bool PlatformLauncher::start(char* argv[], int argc, DWORD *retCode, const char*
|
|
137
137
|
}
|
138
138
|
}
|
139
139
|
|
140
|
-
|
141
|
-
if (!jvmLauncher.initialize(REQ_JAVA_VERSION)) {
|
142
|
-
logErr(false, true, "Cannot find Java %s or higher.", REQ_JAVA_VERSION);
|
143
|
-
return false;
|
144
|
-
}
|
145
|
-
}
|
140
|
+
prepareOptions();
|
146
141
|
|
147
|
-
|
142
|
+
string java("");
|
148
143
|
|
149
|
-
|
144
|
+
if (getenv("JAVACMD") != NULL) {
|
145
|
+
java = getenv("JAVACMD");
|
146
|
+
jvmLauncher.setJavaCmd(java);
|
147
|
+
separateProcess = true;
|
148
|
+
suppressConsole = false;
|
149
|
+
} else {
|
150
|
+
if (jdkhome.empty()) {
|
151
|
+
if (!jvmLauncher.initialize(REQ_JAVA_VERSION)) {
|
152
|
+
logErr(false, true, "Cannot find Java %s or higher.", REQ_JAVA_VERSION);
|
153
|
+
return false;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
jvmLauncher.getJavaPath(jdkhome);
|
158
|
+
java = jdkhome + "\\bin\\java";
|
159
|
+
}
|
150
160
|
|
151
161
|
if (printCommandLine) {
|
152
162
|
list<string> commandLine;
|
153
|
-
commandLine.push_back(
|
163
|
+
commandLine.push_back(java);
|
154
164
|
addOptionsToCommandLine(commandLine);
|
155
165
|
for (list<string>::iterator it = commandLine.begin(); it != commandLine.end(); it++) {
|
156
166
|
printf("%s\n", it->c_str());
|
@@ -179,6 +189,7 @@ bool PlatformLauncher::run(DWORD *retCode) {
|
|
179
189
|
logMsg("Starting application...");
|
180
190
|
|
181
191
|
jvmLauncher.setSuppressConsole(suppressConsole);
|
192
|
+
|
182
193
|
bool rc = jvmLauncher.start(bootclass.c_str(), progArgs, javaOptions, separateProcess, retCode);
|
183
194
|
if (!separateProcess) {
|
184
195
|
exit(0);
|
data/platformlauncher.h
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3
3
|
*
|
4
|
-
* Copyright 2009-
|
4
|
+
* Copyright 2009-2011 JRuby Team (www.jruby.org).
|
5
5
|
* Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
|
6
6
|
*
|
7
7
|
* The contents of this file are subject to the terms of either the GNU
|
data/version.h
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 5
|
9
|
+
version: 1.0.5
|
10
10
|
platform: java
|
11
11
|
authors:
|
12
12
|
- Nick Sieger
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-11 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|