Changeset 431
- Timestamp:
- Oct 2, 2014, 1:13:59 AM (11 years ago)
- Location:
- trunk/icedtea-web
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/icedtea-web/Config.kmk
r423 r431 9 9 PACKAGE_NAME := icedtea-web 10 10 PACKAGE_VER_MAJOR := 1 11 PACKAGE_VER_MINOR := 312 PACKAGE_VER_PATCH := 011 PACKAGE_VER_MINOR := 5 12 PACKAGE_VER_PATCH := 1 13 13 PACKAGE_VERSION := $(PACKAGE_VER_MAJOR).$(PACKAGE_VER_MINOR).$(PACKAGE_VER_PATCH) 14 14 PACKAGE_STRING := $(PACKAGE_NAME) $(PACKAGE_VERSION) … … 30 30 #ICEDTEA_WEB_DATA_DIR := /@unixroot/usr/share/$(PACKAGE_NAME) 31 31 32 ICEDTEA_WEB_JRE = icedtea_web_jre_dir()32 ICEDTEA_WEB_JRE = "" 33 33 34 34 # … … 39 39 # - we want full privileges 40 40 # 41 LAUNCHER_BOOTCLASSPATH = \"-Xbootclasspath/a:%s/netx.jar$(RHINO_RUNTIME)\", \ 42 icedtea_web_data_dir() 43 PLUGIN_BOOTCLASSPATH = \"-Xbootclasspath/a:%s/netx.jar;%s/plugin.jar$(RHINO_RUNTIME)\", \ 44 icedtea_web_data_dir(), icedtea_web_data_dir() 41 LAUNCHER_BOOTCLASSPATH = \"-Xbootclasspath/a:%s/netx.jar$(RHINO_RUNTIME)\" 42 PLUGIN_BOOTCLASSPATH = \"-Xbootclasspath/a:@DATADIR@/netx.jar;@DATADIR@/plugin.jar$(RHINO_RUNTIME)\" 45 43 46 44 # Fake update version to work with the Deployment Toolkit script used by Oracle -
trunk/icedtea-web/netx/Makefile.kmk
r381 r431 61 61 (cd $(netx_0_OUTDIR); \ 62 62 $(PATH_BOOTSTRAP_JDK)/bin/jar cfm $(netx_JARFILE) \ 63 $(netx_MANIFEST) javax/jnlp net )63 $(netx_MANIFEST) javax/jnlp net sun) 64 64 65 65 netx: $$(netx_JARFILE) -
trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.cc
r429 r431 221 221 222 222 #ifdef __OS2__ 223 struct QueueProcessorData224 {225 PluginRequestProcessor *processor;226 bool stopRequested;227 };228 229 223 static QueueProcessorData queue_processor_data1 = { NULL, false }; 230 224 static QueueProcessorData queue_processor_data2 = { NULL, false }; … … 314 308 } 315 309 } 310 #ifdef __OS2___ 311 custom_jre = icedtea_web_jre_dir(); 312 if (custom_jre.length()) 313 return custom_jre+"/bin/java"; 314 #endif 316 315 return appletviewer_default_executable; 317 316 } … … 327 326 } 328 327 } 329 return appletviewer_default_rtjar; 328 #ifdef __OS2___ 329 custom_jre = icedtea_web_jre_dir(); 330 if (custom_jre.length()) 331 return custom_jre+"/lib/rt.jar"; 332 #endif 333 return appletviewer_default_rtjar; 330 334 } 331 335 … … 513 517 if (socketpair (AF_LOCAL, SOCK_STREAM, 0, in_pipe) == -1) 514 518 { 515 PLUGIN_ERROR _TWO("Failed to create input pipe", strerror (errno));519 PLUGIN_ERROR ("Failed to create input pipe", strerror (errno)); 516 520 np_error = NPERR_GENERIC_ERROR; 517 521 goto cleanup_in_pipe; … … 550 554 if (socketpair (AF_LOCAL, SOCK_STREAM, 0, out_pipe) == -1) 551 555 { 552 PLUGIN_ERROR _TWO("Failed to create output pipe", strerror (errno));556 PLUGIN_ERROR ("Failed to create output pipe", strerror (errno)); 553 557 np_error = NPERR_GENERIC_ERROR; 554 558 goto cleanup_out_pipe; … … 1594 1598 } 1595 1599 1600 #ifdef __OS2__ 1601 { 1602 std::string path = PLUGIN_BOOTCLASSPATH; 1603 static const std::string datadir = "@DATADIR@"; 1604 size_t pos = 0; 1605 while ((pos = path.find(datadir, pos)) != std::string::npos) { 1606 path.replace(pos, datadir.length(), icedtea_web_data_dir()); 1607 pos += datadir.length(); 1608 } 1609 command_line.push_back(path); 1610 } 1611 #else 1596 1612 command_line.push_back(PLUGIN_BOOTCLASSPATH); 1613 #endif 1597 1614 // set the classpath to avoid using the default (cwd). 1598 1615 command_line.push_back("-classpath"); … … 1617 1634 command_line.push_back("sun.applet.PluginMain"); 1618 1635 #ifdef __OS2__ 1619 command_line.push_back( (std::ostrstream() << out_pipe[1]).str());1620 command_line.push_back( (std::ostrstream() << in_pipe[1]).str());1636 command_line.push_back(static_cast<std::ostringstream &>(std::ostringstream() << out_pipe[1]).str()); 1637 command_line.push_back(static_cast<std::ostringstream &>(std::ostringstream() << in_pipe[1]).str()); 1621 1638 #else 1622 1639 command_line.push_back(out_pipe_name); … … 2443 2460 2444 2461 #ifdef __OS2__ 2445 // pthread_cancel() isn't implemented on OS ?2, so use an old good flag2462 // pthread_cancel() isn't implemented on OS/2, so use an old good flag 2446 2463 queue_processor_data1.stopRequested = true; 2447 2464 queue_processor_data2.stopRequested = true; 2448 2465 queue_processor_data3.stopRequested = true; 2449 p thread_cond_broadcast(&cond_message_available);2466 plugin_req_proc->cancelWait(); 2450 2467 #else 2451 2468 pthread_cancel(plugin_request_processor_thread1); -
trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.h
r429 r431 107 107 NPError start_jvm_if_needed(); 108 108 109 #ifdef __OS2__ 110 struct QueueProcessorData 111 { 112 PluginRequestProcessor *processor; 113 bool stopRequested; 114 }; 115 #endif 116 109 117 // ID of plug-in thread 110 118 extern pthread_t itnp_plugin_thread_id; -
trunk/icedtea-web/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
r429 r431 643 643 QueueProcessorData *queue_processor_data = (QueueProcessorData *) data; 644 644 PluginRequestProcessor* processor = queue_processor_data->processor; 645 processor->queueProcessorThread(queue_processor_data); 645 646 #else 646 647 PluginRequestProcessor* processor = (PluginRequestProcessor*) data; 648 processor->queueProcessorThread(); 647 649 #endif 648 processor->queueProcessorThread();649 650 return NULL; 650 651 } 651 652 652 653 void 654 #ifdef __OS2__ 655 PluginRequestProcessor::queueProcessorThread(QueueProcessorData *queue_processor_data) 656 #else 653 657 PluginRequestProcessor::queueProcessorThread() 658 #endif 654 659 { 655 660 std::vector<std::string*>* message_parts = NULL; -
trunk/icedtea-web/plugin/icedteanp/IcedTeaPluginRequestProcessor.h
r429 r431 70 70 void* queue_processor(void* data); 71 71 72 #ifdef __OS2__ 73 struct QueueProcessorData; 74 #endif 75 72 76 /** 73 77 * Processes requests made TO the plugin (by java or anyone else) … … 127 131 128 132 /* Thread run method for processing queued messages */ 133 #ifdef __OS2__ 134 void queueProcessorThread(QueueProcessorData *queue_processor_data); 135 void cancelWait() { pthread_cond_broadcast(&cond_message_available); } 136 #else 129 137 void queueProcessorThread(); 138 #endif 130 139 }; 131 140 -
trunk/icedtea-web/plugin/icedteanp/Makefile.kmk
r422 r431 38 38 IcedTeaJavaRequestProcessor.cc \ 39 39 IcedTeaPluginRequestProcessor.cc \ 40 IcedTeaPluginUtils.cc 40 IcedTeaPluginUtils.cc \ 41 IcedTeaParseProperties.cc 41 42 42 43 npicedt_SOURCES.os2 = \ -
trunk/icedtea-web/plugin/icedteanp/java/sun/applet/PluginMain.java
r429 r431 133 133 JNLPRuntime.exit(1); 134 134 } 135 DeploymentConfiguration.move14AndOlderFilesTo15StructureCatched(); 136 if (JavaConsole.isEnabled()) { 137 if ((args.length < 3) || !new File(args[2]).exists()) { 138 OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Warning, although console is on, plugin debug connection do not exists. No plugin information will be displayed in console (only java ones)."); 139 } else { 140 JavaConsole.getConsole().createPluginReader(new File(args[2])); 141 } 142 } 135 143 136 try { 144 137 PluginStreamHandler streamHandler = connect(args); -
trunk/icedtea-web/plugin/icedteanp/os2/OS_OS2_WinOS2.cc
r385 r431 41 41 #include <winuser32.h> // CreateFakeWindowEx and friends 42 42 43 #include "IcedTeaNPPlugin.h" 43 44 #include "IcedTeaPluginUtils.h" 44 45 -
trunk/icedtea-web/plugin/icedteanp/os2/java/sun/applet/PluginMainBase.java
r368 r431 44 44 import java.io.IOException; 45 45 46 import net.sourceforge.jnlp.config.DeploymentConfiguration; 47 import net.sourceforge.jnlp.util.logging.JavaConsole; 48 import net.sourceforge.jnlp.util.logging.OutputController; 49 46 50 class PluginMainBase { 47 51 … … 50 54 51 55 static boolean checkArgs(String args[]) { 52 if (args.length == 2) {56 if (args.length >= 2) { 53 57 inPipe = Integer.valueOf(args[0]).intValue(); 54 58 outPipe = Integer.valueOf(args[1]).intValue(); 55 if (inPipe >= 0 && outPipe >= 0) 59 if (inPipe >= 0 && outPipe >= 0) { 60 DeploymentConfiguration.move14AndOlderFilesTo15StructureCatched(); 61 if (JavaConsole.isEnabled()) { 62 if ((args.length < 3) || !new File(args[2]).exists()) { 63 OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Warning, although console is on, plugin debug connection do not exists. No plugin information will be displayed in console (only java ones)."); 64 } else { 65 JavaConsole.getConsole().createPluginReader(new File(args[2])); 66 } 67 } 56 68 return true; 69 } 57 70 } 58 System.err.println("Invalid pipe descriptors provided. Refusing to proceed.");71 OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Invalid pipe descriptors provided. Refusing to proceed."); 59 72 return false; 60 73 } … … 67 80 FileDescriptor outPipeFD = new FileDescriptor(); 68 81 fdAccess.set(outPipeFD, outPipe); 69 try { 70 streamHandler = new PluginStreamHandler(new FileInputStream(inPipeFD), new FileOutputStream(outPipeFD)); 71 PluginDebug.debug("Streams initialized"); 72 } catch (IOException ioe) { 73 ioe.printStackTrace(); 74 } 82 streamHandler = new PluginStreamHandler(new FileInputStream(inPipeFD), new FileOutputStream(outPipeFD)); 83 PluginDebug.debug("Streams initialized"); 75 84 return streamHandler; 76 85 } -
trunk/icedtea-web/plugin/icedteanp/x11/java/sun/applet/PluginMainBase.java
r368 r431 46 46 47 47 static boolean checkArgs(String args[]) { 48 if (args.length !=2 || !(new File(args[0]).exists()) || !(new File(args[1]).exists())) {49 System.err.println("Invalid pipe names provided. Refusing to proceed.");48 if (args.length < 2 || !(new File(args[0]).exists()) || !(new File(args[1]).exists())) { 49 OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Invalid pipe names provided. Refusing to proceed."); 50 50 return false; 51 } 52 DeploymentConfiguration.move14AndOlderFilesTo15StructureCatched(); 53 if (JavaConsole.isEnabled()) { 54 if ((args.length < 3) || !new File(args[2]).exists()) { 55 OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Warning, although console is on, plugin debug connection do not exists. No plugin information will be displayed in console (only java ones)."); 56 } else { 57 JavaConsole.getConsole().createPluginReader(new File(args[2])); 58 } 51 59 } 52 60 return true; … … 61 69 PluginDebug.debug("Streams initialized"); 62 70 } catch (IOException ioe) { 63 ioe.printStackTrace();71 OutputController.getLogger().log(OutputController.Level.ERROR_ALL,ioe); 64 72 } 65 73 return streamHandler;
Note:
See TracChangeset
for help on using the changeset viewer.