From 92a975e01d1d6e24be8b3e7c56dbfb09bf1ccf79 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Tue, 30 May 2023 02:33:56 +0200 Subject: [PATCH] Disable sun.applet javadocs and plugin man page for --disable-pluginjar --- Makefile.am | 8 ++-- .../jnlp/util/docprovider/TextsProvider.java | 42 +++++++++++-------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/Makefile.am b/Makefile.am index d762c002b..88c18f501 100644 --- a/Makefile.am +++ b/Makefile.am @@ -241,8 +241,7 @@ export NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \ net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \ net.sourceforge.jnlp.runtime net.sourceforge.jnlp.security \ net.sourceforge.jnlp.security.viewer net.sourceforge.jnlp.services \ - net.sourceforge.jnlp.tools net.sourceforge.jnlp.util \ - sun.applet + net.sourceforge.jnlp.tools net.sourceforge.jnlp.util if ENABLE_PLUGINJAR export ICEDTEAPLUGIN_TARGET = stamps/liveconnect-dist.stamp @@ -251,6 +250,7 @@ export PLUGIN_SRCDIR=$(TOP_SRC_DIR)/plugin/icedteanp export JSOBJECT_DIRS = netscape export SUN_DIR = sun export SUN_APPLET_DIRS = sun/applet +export SUN_APPLET_PKGS = sun.applet export PLUGIN_PKGS = sun.applet netscape.security netscape.javascript export LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java export LIVECONNECT_DIR = $(JSOBJECT_DIRS) $(SUN_APPLET_DIRS) @@ -898,7 +898,7 @@ stamps/generate-docs.stamp: stamps/netx.stamp mkdir "$$PLAIN_DOCS_TARGET_DIR" ; \ mkdir "$$MAN_DOCS_TARGET_DIR" ; \ HTML_DOCS_INDEX="$$HTML_DOCS_TARGET_DIR/index.html" ; \ - TP_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.util.docprovider.TextsProvider" ; \ + TP_COMMAND="$(SYSTEM_JRE_DIR)/bin/java --add-exports=java.base/sun.security.action=ALL-UNNAMED -DPLUGIN_JAR=$(PLUGIN_JAR) -cp $(NETX_DIR) net.sourceforge.jnlp.util.docprovider.TextsProvider" ; \ TP_TAIL="false $(FULL_VERSION)" ; \ LANG_BACKUP=$$LANG ; \ echo "$(PLUGIN_VERSION)" > "$$HTML_DOCS_INDEX" ; \ @@ -1189,7 +1189,7 @@ if ENABLE_DOCS -windowtitle 'IcedTea-Web: NetX ' \ -header 'IcedTea-Web
NetX
' \ $(call composeclasspath, $(MSLINKS_JAR) $(TAGSOUP_JAR) $(RHINO_JAR)) \ - $(NETX_PKGS) + $(NETX_PKGS) $(SUN_APPLET_PKGS) endif mkdir -p stamps touch stamps/netx-docs.stamp diff --git a/netx/net/sourceforge/jnlp/util/docprovider/TextsProvider.java b/netx/net/sourceforge/jnlp/util/docprovider/TextsProvider.java index 941b3e377..3269a54c1 100644 --- a/netx/net/sourceforge/jnlp/util/docprovider/TextsProvider.java +++ b/netx/net/sourceforge/jnlp/util/docprovider/TextsProvider.java @@ -498,12 +498,14 @@ public static void generateHtmlTexts(String encoding, File dir, boolean allowCon os.flush(); } } - JavaWsTextsProvider javaws = new JavaWsTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand); - ItwebSettingsTextsProvider itws = new ItwebSettingsTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand); - PolicyEditorTextsProvider pe = new PolicyEditorTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand); - IcedTeaWebTextsProvider itw = new IcedTeaWebTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand); - ItwebPluginTextProvider pl = new ItwebPluginTextProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand); - TextsProvider[] providers = new TextsProvider[]{javaws, itws, pe, itw, pl}; + ArrayList providers = new ArrayList(); + providers.add(new JavaWsTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand)); + providers.add(new ItwebSettingsTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand)); + providers.add(new PolicyEditorTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand)); + providers.add(new IcedTeaWebTextsProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand)); + if (!System.getProperty("PLUGIN_JAR", "").isEmpty()) { + providers.add(new ItwebPluginTextProvider(encoding, new HtmlFormatter(allowContext, allowLogo, includeXmlHeader), titles, expand)); + } for (TextsProvider provider : providers) { provider.setAuthorFilePath(authorFileFromUserInput); provider.writeToDir(dir); @@ -516,12 +518,14 @@ public static void generateManText(String encoding, File dir, boolean expand) th } public static void generateManText(String encoding, File dir, boolean titles, boolean expand) throws IOException { - JavaWsTextsProvider javaws = new JavaWsTextsProvider(encoding, new ManFormatter(), titles, expand); - ItwebSettingsTextsProvider itws = new ItwebSettingsTextsProvider(encoding, new ManFormatter(), titles, expand); - PolicyEditorTextsProvider pe = new PolicyEditorTextsProvider(encoding, new ManFormatter(), titles, expand); - IcedTeaWebTextsProvider itw = new IcedTeaWebTextsProvider(encoding, new ManFormatter(), titles, expand); - ItwebPluginTextProvider pl = new ItwebPluginTextProvider(encoding, new ManFormatter(), titles, expand); - TextsProvider[] providers = new TextsProvider[]{javaws, itws, pe, itw, pl}; + ArrayList providers = new ArrayList(); + providers.add(new JavaWsTextsProvider(encoding, new ManFormatter(), titles, expand)); + providers.add(new ItwebSettingsTextsProvider(encoding, new ManFormatter(), titles, expand)); + providers.add(new PolicyEditorTextsProvider(encoding, new ManFormatter(), titles, expand)); + providers.add(new IcedTeaWebTextsProvider(encoding, new ManFormatter(), titles, expand)); + if (!System.getProperty("PLUGIN_JAR", "").isEmpty()) { + providers.add(new ItwebPluginTextProvider(encoding, new ManFormatter(), titles, expand)); + } for (TextsProvider provider : providers) { provider.setAuthorFilePath(authorFileFromUserInput); provider.writeToDir(dir); @@ -534,12 +538,14 @@ public static void generatePlainTextDocs(File dir, int lineWidth, boolean expand } public static void generatePlainTextDocs(String encoding, File dir, String indent, int lineWidth, boolean titles, boolean expand) throws IOException { - JavaWsTextsProvider javaws = new JavaWsTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand); - ItwebSettingsTextsProvider itws = new ItwebSettingsTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand); - PolicyEditorTextsProvider pe = new PolicyEditorTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand); - IcedTeaWebTextsProvider itw = new IcedTeaWebTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand); - ItwebPluginTextProvider pl = new ItwebPluginTextProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand); - TextsProvider[] providers = new TextsProvider[]{javaws, itws, pe, itw, pl}; + ArrayList providers = new ArrayList(); + providers.add(new JavaWsTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand)); + providers.add(new ItwebSettingsTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand)); + providers.add(new PolicyEditorTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand)); + providers.add(new IcedTeaWebTextsProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand)); + if (!System.getProperty("PLUGIN_JAR", "").isEmpty()) { + providers.add(new ItwebPluginTextProvider(encoding, new PlainTextFormatter(indent, lineWidth), titles, expand)); + } for(TextsProvider provider : providers){ provider.setAuthorFilePath(authorFileFromUserInput); provider.writeToDir(dir);