Changeset 392
- Timestamp:
- Jul 16, 2012, 2:54:45 PM (13 years ago)
- Location:
- trunk/icedtea-web
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/icedtea-web/Config.kmk
r376 r392 27 27 28 28 # @todo later 29 ICEDTEA_WEB_JRE_DIR := /@unixroot/usr/lib/jre30 ICEDTEA_WEB_DATA_DIR := /@unixroot/usr/share/$(PACKAGE_NAME)29 #ICEDTEA_WEB_JRE_DIR := /@unixroot/usr/lib/jre 30 #ICEDTEA_WEB_DATA_DIR := /@unixroot/usr/share/$(PACKAGE_NAME) 31 31 32 32 ICEDTEA_WEB_JRE = icedtea_web_jre_dir() -
trunk/icedtea-web/plugin/icedteanp/Makefile.kmk
r381 r392 24 24 -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \ 25 25 -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \ 26 -DICEDTEA_WEB_JRE_DIR="\"$(ICEDTEA_WEB_JRE_DIR)\""\26 $(if $(ICEDTEA_WEB_JRE_DIR),-DICEDTEA_WEB_JRE_DIR="\"$(ICEDTEA_WEB_JRE_DIR)\"") \ 27 27 -DICEDTEA_WEB_JRE="$(ICEDTEA_WEB_JRE)" \ 28 -DICEDTEA_WEB_DATA_DIR="\"$(ICEDTEA_WEB_DATA_DIR)\""\28 $(if $(ICEDTEA_WEB_DATA_DIR),-DICEDTEA_WEB_DATA_DIR="\"$(ICEDTEA_WEB_DATA_DIR)\"") \ 29 29 -DPLUGIN_BOOTCLASSPATH="$(PLUGIN_BOOTCLASSPATH)" 30 30 npicedt_LIBS = $(PATH_GLIB_LIBS) pthread -
trunk/icedtea-web/plugin/icedteanp/os2/OS_OS2.cc
r385 r392 39 39 #define INCL_DOS 40 40 #define INCL_PM 41 #define INCL_ERRORS 41 42 #include <os2.h> 42 43 43 44 #include <stdlib.h> 45 #include <string.h> 44 46 45 47 #include "OS_OS2.h" … … 50 52 const char *home = getenv("ICEDTEA_WEB_DATA"); 51 53 if (!home) 54 { 55 #if !defined(ICEDTEA_WEB_DATA_DIR) 56 // deduce the path from this DLL's name 57 static char buf[CCHMAXPATH] = {0}; 58 if (buf[0] == 0) 59 { 60 BOOL ok = FALSE; 61 HMODULE hmod; 62 ULONG objNum, offset; 63 APIRET rc; 64 rc = DosQueryModFromEIP(&hmod, &objNum, sizeof(buf), buf, &offset, 65 (ULONG)&icedtea_web_data_dir); 66 if (rc == NO_ERROR) 67 { 68 rc = DosQueryModuleName(hmod, sizeof(buf), buf); 69 if (rc == NO_ERROR) 70 { 71 // truncate the extension to get the data dir 72 char *end = strrchr(buf, '.'); 73 if (end) 74 { 75 *end = '\0'; 76 ok = TRUE; 77 } 78 } 79 } 80 if (!ok) 81 strcpy(buf, "."); 82 } 83 home = buf; 84 #else 52 85 home = ICEDTEA_WEB_DATA_DIR; 86 #endif 87 } 53 88 return home; 54 89 } … … 58 93 const char *jre = getenv("ICEDTEA_WEB_JRE"); 59 94 if (!jre) 95 { 96 #if !defined(ICEDTEA_WEB_JRE_DIR) 97 // deduce the path from JAVA.EXE found in PATH 98 static char buf[CCHMAXPATH] = {0}; 99 if (buf[0] == 0) 100 { 101 BOOL ok = FALSE; 102 APIRET rc; 103 rc = DosSearchPath(SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT | 104 SEARCH_CUR_DIRECTORY, 105 "PATH", "JAVA.EXE", buf, sizeof(buf)); 106 if (rc == NO_ERROR) 107 { 108 char *end = strrchr(buf, '\\'); 109 if (end) 110 { 111 *end = '\0'; 112 ok = TRUE; 113 // truncate \bin if present 114 end = strrchr(buf, '\\'); 115 if (end && stricmp(end + 1, "bin") == 0) 116 *end = '\0'; 117 } 118 } 119 if (!ok) 120 strcpy(buf, "."); 121 } 122 jre = buf; 123 #else 60 124 jre = ICEDTEA_WEB_JRE_DIR; 125 #endif 126 } 61 127 return jre; 62 128 }
Note:
See TracChangeset
for help on using the changeset viewer.