File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 12
12
#include " argparser.h"
13
13
#include " argnames.h"
14
14
#include " version.h"
15
+ #include " sys/stat.h"
15
16
16
17
#ifndef WIN32
17
18
#include < sys/types.h>
@@ -394,14 +395,31 @@ void ArgParser::prepareOptions() {
394
395
javaOptions.push_back (option);
395
396
396
397
option = OPT_JFFI_PATH;
398
+
399
+ string jniDir;
400
+ #ifdef WIN32
401
+ string newJniDir = platformDir + " \\ lib\\ jni" ;
402
+ string oldJniDir = platformDir + " \\ lib\\ native" ;
403
+ #else
404
+ string newJniDir = platformDir + " /lib/jni" ;
405
+ string oldJniDir = platformDir + " /lib/native" ;
406
+ #endif
407
+
408
+ struct stat jniDirStat;
409
+ if (stat (newJniDir.c_str (), &jniDirStat) == 0 ) {
410
+ jniDir = newJniDir;
411
+ } else {
412
+ jniDir = oldJniDir;
413
+ }
414
+
397
415
#ifdef WIN32
398
- option += (platformDir + " \\ lib \\ jni ;"
399
- + platformDir + " \\ lib \\ jni \\ i386-Windows;"
400
- + platformDir + " \\ lib \\ jni \\ x86_64-Windows" );
416
+ option += (jniDir + " ;"
417
+ + jniDir + " \\ i386-Windows;"
418
+ + jniDir + " \\ x86_64-Windows" );
401
419
#else
402
420
struct utsname name;
403
421
if (uname (&name) == 0 ) {
404
- string ffiBase (platformDir + " /lib/jni " );
422
+ string ffiBase (jniDir );
405
423
string ffiPath = ffiBase;
406
424
DIR* dir = opendir (ffiBase.c_str ());
407
425
struct dirent * ent;
Original file line number Diff line number Diff line change 1
1
module JRubyLauncher
2
- VERSION = "1.0.18.pre1 "
2
+ VERSION = "1.0.18"
3
3
end
Original file line number Diff line number Diff line change 6
6
#ifndef _VERSION_H_
7
7
#define _VERSION_H_
8
8
9
- #define JRUBY_LAUNCHER_VERSION "1.0.18.pre1 "
9
+ #define JRUBY_LAUNCHER_VERSION "1.0.18"
10
10
11
11
#endif // ! _VERSION_H_
You can’t perform that action at this time.
0 commit comments