Changeset 38636 in vbox for trunk/src/libs/xpcom18a4/java
- Timestamp:
- Sep 5, 2011 1:49:45 PM (13 years ago)
- Location:
- trunk/src/libs/xpcom18a4/java
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
r31598 r38636 147 147 { 148 148 #if defined(VBOX_PATH_APP_PRIVATE_ARCH) && defined(VBOX_PATH_SHARED_LIBS) 149 rv = RTR3Init ();150 #else 151 const char * home = nsnull;149 rv = RTR3InitDll(0); 150 #else 151 const char *pszHome = nsnull; 152 152 const char *jhome = nsnull; 153 153 jstring path = nsnull; … … 164 164 { 165 165 path = (jstring)env->CallObjectMethod(aVBoxBinDirectory, getPathMID); 166 home = jhome = env->GetStringUTFChars(path, nsnull);167 } 168 169 if ( home == nsnull)170 home = getenv("VBOX_PROGRAM_PATH");171 172 if ( home) {173 size_t len = strlen(home);174 char * exepath = (char *)alloca(len+ 32);175 memcpy( exepath, home, len);176 memcpy( exepath + len, "/javafake", sizeof("/javafake"));177 rv = RTR3Init WithProgramPath(exepath);166 pszHome = jhome = env->GetStringUTFChars(path, nsnull); 167 } 168 169 if (pszHome == nsnull) 170 pszHome = getenv("VBOX_PROGRAM_PATH"); 171 172 if (pszHome) { 173 size_t cchHome = strlen(pszHome); 174 char *pszExePath = (char *)alloca(cchHome + 32); 175 memcpy(pszExePath, pszHome, cchHome); 176 memcpy(pszExePath + cchHome, "/javafake", sizeof("/javafake")); 177 rv = RTR3InitEx(RTR3INIT_VER_CUR, RTR3INIT_FLAGS_DLL, 0, NULL, pszExePath); 178 178 } else { 179 rv = RTR3Init ();179 rv = RTR3InitDll(0); 180 180 } 181 181 -
trunk/src/libs/xpcom18a4/java/tools/genifaces/GenerateJavaInterfaces.cpp
r29179 r38636 874 874 #ifdef VBOX 875 875 #if defined(VBOX_PATH_APP_PRIVATE_ARCH) && defined(VBOX_PATH_SHARED_LIBS) 876 rv = RTR3Init();876 rv = RTR3InitExe(argc, &argv, 0); 877 877 #else 878 const char *home = getenv("VBOX_PROGRAM_PATH");879 if (home) {880 size_t len = strlen(home);881 char *exepath = (char *)alloca(len+ 32);882 memcpy(exepath, home, len);883 memcpy(exepath + len, "/pythonfake", sizeof("/pythonfake"));884 rv = RTR3InitWithProgramPath(exepath);885 886 rv = RTR3Init();887 878 const char *pszHome = getenv("VBOX_PROGRAM_PATH"); 879 if (pszHome) { 880 size_t cchHome = strlen(pszHome); 881 char *pszExePath = (char *)alloca(cchHome + 32); 882 memcpy(pszExePath, pszHome, cchHome); 883 memcpy(pszExePath + cchHome, "/pythonfake", sizeof("/pythonfake")); 884 rc = RTR3InitEx(RTR3INIT_VER_CUR, 0, argc, &argv, pszExePath); 885 } else { 886 rv = RTR3InitExe(argc, &argv, 0); 887 } 888 888 #endif 889 889 #endif
Note:
See TracChangeset
for help on using the changeset viewer.