jruby-launcher 1.0.6-java → 1.0.7-java
Sign up to get free protection for your applications and to get access to all the features.
- data/jvmlauncher.cpp +23 -1
- data/lib/jruby-launcher.rb +1 -1
- data/spec/launcher_spec.rb +2 -2
- data/version.h +1 -1
- metadata +3 -3
data/jvmlauncher.cpp
CHANGED
@@ -206,7 +206,29 @@ bool JvmLauncher::isVersionString(const char *str) {
|
|
206
206
|
return *end == '\0';
|
207
207
|
}
|
208
208
|
|
209
|
-
bool JvmLauncher::startInProcJvm(const char *mainClassName, std::list<std::string>
|
209
|
+
bool JvmLauncher::startInProcJvm(const char *mainClassName, std::list<std::string> mbcs_args, std::list<std::string> mbcs_options) {
|
210
|
+
|
211
|
+
std::list<std::string> args;
|
212
|
+
for (std::list<std::string>::iterator it = mbcs_args.begin(); it != mbcs_args.end(); ++it) {
|
213
|
+
wchar_t wstr[2048];
|
214
|
+
UINT cp = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
|
215
|
+
MultiByteToWideChar(cp, 0, it->c_str(), -1, wstr, sizeof(wstr) / sizeof(wchar_t));
|
216
|
+
int mb_size = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
|
217
|
+
char *mbstr = (char*)malloc(mb_size);
|
218
|
+
WideCharToMultiByte(CP_UTF8, 0, wstr, -1, mbstr, mb_size, NULL, NULL);
|
219
|
+
args.push_back(mbstr);
|
220
|
+
}
|
221
|
+
|
222
|
+
std::list<std::string> options;
|
223
|
+
for (std::list<std::string>::iterator it = mbcs_options.begin(); it != mbcs_options.end(); ++it) {
|
224
|
+
wchar_t wstr[2048];
|
225
|
+
UINT cp = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
|
226
|
+
MultiByteToWideChar(cp, 0, it->c_str(), -1, wstr, sizeof(wstr) / sizeof(wchar_t));
|
227
|
+
int mb_size = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
|
228
|
+
char *mbstr = (char*)malloc(mb_size);
|
229
|
+
WideCharToMultiByte(CP_UTF8, 0, wstr, -1, mbstr, mb_size, NULL, NULL);
|
230
|
+
options.push_back(mbstr);
|
231
|
+
}
|
210
232
|
|
211
233
|
class Jvm {
|
212
234
|
public:
|
data/lib/jruby-launcher.rb
CHANGED
data/spec/launcher_spec.rb
CHANGED
@@ -12,10 +12,10 @@ describe "JRuby native launcher" do
|
|
12
12
|
it "should print help message" do
|
13
13
|
args = jruby_launcher_args("-Xhelp 2>&1")
|
14
14
|
args.detect{|l| l =~ /JRuby Launcher usage/}.should be_true
|
15
|
-
args
|
15
|
+
args.should include("-X")
|
16
16
|
args = jruby_launcher_args("-X 2>&1")
|
17
17
|
args.detect{|l| l =~ /JRuby Launcher usage/}.should be_true
|
18
|
-
args
|
18
|
+
args.should include("-X")
|
19
19
|
end
|
20
20
|
|
21
21
|
it "should use $JAVACMD when JAVACMD is specified" do
|
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
|
+
- 7
|
9
|
+
version: 1.0.7
|
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-
|
18
|
+
date: 2011-02-08 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|