Commit 552c7febc3fa5c5a3e754493998f9dd2dd72c3a5
1 parent
4634de31
Exists in
master
Ajustes para compilação em windows.
Showing
5 changed files
with
24 additions
and
12 deletions
Show diff stats
configure.ac
... | ... | @@ -245,7 +245,7 @@ if test "$app_cv_java" = "yes" ; then |
245 | 245 | |
246 | 246 | else |
247 | 247 | |
248 | - AC_MSG_NOTICE([jdk is NOT present or disabled.]) | |
248 | + AC_MSG_ERROR([jdk is NOT present or disabled.]) | |
249 | 249 | |
250 | 250 | fi |
251 | 251 | |
... | ... | @@ -275,6 +275,21 @@ AC_SUBST(GTK_LIBS) |
275 | 275 | AC_SUBST(GTK_CFLAGS) |
276 | 276 | AC_SUBST(GTK_VERSION,`$PKG_CONFIG --modversion gtk+-3.0`) |
277 | 277 | |
278 | +dnl --------------------------------------------------------------------------- | |
279 | +dnl Check for lib3270 | |
280 | +dnl --------------------------------------------------------------------------- | |
281 | + | |
282 | +PKG_CHECK_MODULES( [LIB3270], [lib3270], AC_DEFINE(HAVE_LIB3270), AC_MSG_ERROR([Can't find lib3270 devel.])) | |
283 | +AC_SUBST(LIB3270_LIBS) | |
284 | +AC_SUBST(LIB3270_CFLAGS) | |
285 | + | |
286 | +dnl --------------------------------------------------------------------------- | |
287 | +dnl Check for PW3270 | |
288 | +dnl --------------------------------------------------------------------------- | |
289 | + | |
290 | +PKG_CHECK_MODULES( [PW3270], [pw3270], AC_DEFINE(HAVE_PW3270), AC_MSG_ERROR([Can't find lib3270 devel.])) | |
291 | +AC_SUBST(PW3270_LIBS) | |
292 | +AC_SUBST(PW3270_CFLAGS) | |
278 | 293 | |
279 | 294 | dnl --------------------------------------------------------------------------- |
280 | 295 | dnl Check for integer types & library functions | ... | ... |
src/include/java3270.h
src/plugin/Makefile.in
src/plugin/plugin.cc
src/plugin/startstop.cc
... | ... | @@ -170,6 +170,7 @@ bool load_jvm(GtkWidget *widget) { |
170 | 170 | |
171 | 171 | // Dynamically load jvm library to avoid naming and path problems. |
172 | 172 | HMODULE kernel; |
173 | + HMODULE hModule; | |
173 | 174 | HANDLE WINAPI (*AddDllDirectory)(PCWSTR NewDirectory); |
174 | 175 | BOOL WINAPI (*RemoveDllDirectory)(HANDLE Cookie); |
175 | 176 | |
... | ... | @@ -214,19 +215,19 @@ bool load_jvm(GtkWidget *widget) { |
214 | 215 | |
215 | 216 | } else { |
216 | 217 | |
217 | - lib3270_trace_event(v3270_get_session(widget),"Can't find %s: %s","AddDllDirectory",session::win32_strerror(GetLastError()).c_str()); | |
218 | + lib3270_trace_event(v3270_get_session(widget),"Can't find %s: %s","AddDllDirectory",lib3270_win32_strerror(GetLastError())); | |
218 | 219 | |
219 | 220 | } |
220 | 221 | |
221 | 222 | } else { |
222 | 223 | |
223 | - lib3270_trace_event(v3270_get_session(widget),"Can't load %s: %s\n","kernel32.dll",session::win32_strerror(GetLastError()).c_str()); | |
224 | + lib3270_trace_event(v3270_get_session(widget),"Can't load %s: %s\n","kernel32.dll",lib3270_win32_strerror(GetLastError())); | |
224 | 225 | |
225 | 226 | } |
226 | 227 | |
227 | 228 | hModule = LoadLibrary("jvm.dll"); |
228 | 229 | if(!hModule) { |
229 | - lib3270_trace_event(v3270_get_session(widget),"Can't load %s\n","jvm.dll",session::win32_strerror(GetLastError()).c_str()); | |
230 | + lib3270_trace_event(v3270_get_session(widget),"Can't load %s\n","jvm.dll",lib3270_win32_strerror(GetLastError())); | |
230 | 231 | |
231 | 232 | for(size_t f = 0; !hModule && f < G_N_ELEMENTS(dlldir); f++) { |
232 | 233 | |
... | ... | @@ -239,7 +240,7 @@ bool load_jvm(GtkWidget *widget) { |
239 | 240 | gchar *p = g_build_filename(env,dlldir[f].path,"jvm.dll",NULL); |
240 | 241 | hModule = LoadLibrary(p); |
241 | 242 | if(!hModule) { |
242 | - lib3270_trace_event(v3270_get_session(widget),"Can't load %s: %s\n",p,session::win32_strerror(GetLastError()).c_str()); | |
243 | + lib3270_trace_event(v3270_get_session(widget),"Can't load %s: %s\n",p,lib3270_win32_strerror(GetLastError())); | |
243 | 244 | } |
244 | 245 | g_free(p); |
245 | 246 | |
... | ... | @@ -248,7 +249,7 @@ bool load_jvm(GtkWidget *widget) { |
248 | 249 | } |
249 | 250 | |
250 | 251 | if(!hModule) { |
251 | - failed(widget, _( "Can't load java virtual machine" ), "%s", session::win32_strerror(GetLastError()).c_str()); | |
252 | + failed(widget, _( "Can't load java virtual machine" ), "%s", lib3270_win32_strerror(GetLastError())); | |
252 | 253 | } |
253 | 254 | |
254 | 255 | if(kernel) { |
... | ... | @@ -279,7 +280,7 @@ bool load_jvm(GtkWidget *widget) { |
279 | 280 | jint JNICALL (*CreateJavaVM)(JavaVM **, void **, void *) = (jint JNICALL (*)(JavaVM **, void **, void *)) GetProcAddress(hModule,"JNI_CreateJavaVM"); |
280 | 281 | |
281 | 282 | if(!CreateJavaVM) { |
282 | - failed(widget, _( "Can't load java virtual machine creation method" ), "%s", session::win32_strerror(GetLastError()).c_str()); | |
283 | + failed(widget, _( "Can't load java virtual machine creation method" ), "%s", lib3270_win32_strerror(GetLastError())); | |
283 | 284 | return false; |
284 | 285 | } |
285 | 286 | ... | ... |