Changeset 416


Ignore:
Timestamp:
Feb 11, 2013, 5:11:22 PM (13 years ago)
Author:
dmik
Message:

vendor: Merge icedtea-web v1.3 to current.

Location:
branches/vendor/sourceforge/icedtea-web/current
Files:
514 added
2 deleted
94 edited

Legend:

Unmodified
Added
Removed
  • branches/vendor/sourceforge/icedtea-web/current/AUTHORS

    r348 r416  
    55Deepak Bhole <dbhole@redhat.com>
    66Ricardo Martín Camarero <rickyepoderi@yahoo.es>
     7Danesh Dadachanji <ddadacha@redhat.com>
     8Adam Domurad <adomurad@redhat.com>
    79Thomas Fitzsimmons <fitzsim@redhat.com>
    810Mark Greenwood <mark@dcs.shef.ac.uk>
    9 Andrew John Hughes <gnu_andrew@member.fsf.org, ahughes@redhat.com>
     11Peter Hatina <phatina@redhat.com>
     12Andrew John Hughes <ahughes@redhat.com>
    1013Matthias Klose <doko@ubuntu.com>
     14Michał Górny < mgorny@gentoo.org >
    1115Francis Kung <fkung@redhat.com>
     16Denis Lila <dlila@redhat.com>
    1217DJ Lucas <dj@lucasit.com>
    1318Omair Majid <omajid@redhat.com>
    1419Jon A. Maxwell <jmaxwell@users.sourceforge.net>
     20Thomas Meyer <thomas@m3y3r.de>
     21Saad Mohammad <smohammad@redhat.com>
     22Martin Olsson  <martin@minimum.se>
    1523Andrew Su <asu@redhat.com>
    1624Joshua Sumali <jsumali@redhat.com>
     25Jiri Vanek <jvanek@redhat.com>
    1726Mark Wielaard <mark@klomp.org>
    1827Man Lung Wong <mwong@redhat.com>
  • branches/vendor/sourceforge/icedtea-web/current/ChangeLog

    r348 r416  
    1 2011-08-31  Deepak Bhole <dbhole@redhat.com>
    2 
    3         * NEWS: Prepare for 1.1.2
    4         * configure.ac: Same
     12012-08-27  Deepak Bhole <dbhole@redhat.com>
     2
     3        * configure.ac: Prepare for 1.3
     4        * NEWS: Same
     5
     62012-08-27  Deepak Bhole <dbhole@redhat.com>
     7
     8        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     9        (getAccessControlContextForClassLoading): Catch ClassCircularityErrors and
     10        ignore them (thus denying permission to caller).
     11
     122012-08-13  Jiri Vanek  <jvanek@redhat.com>
     13
     14        * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
     15        (executeProcessUponURL)Fixed wrong call in previous commit which was
     16        causing null process name.
     17        * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java:
     18        Removed unused import.
     19
     202012-08-13  Jiri Vanek  <jvanek@redhat.com>
     21
     22        Reproducers of PR955
     23        * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp:
     24        * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp:
     25        * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp:
     26        * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp:
     27        Test jnlp files with various combinations of locales, reproducers of PR955.
     28        * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp
     29        Jnlp file with which is not affected by PR955 and is helping to catch error in LOCALE changing hack
     30        * tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java:
     31        Reproducer main class, after loading prints out default locale.
     32        * tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java:
     33        Testcases launching above jnlps under various locales.
     34        * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
     35        Added set of methods allowing passing of custom variables to ThreadedProcess.
     36        * tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java:
     37        Added processing of custom variables.
     38
     392012-08-22  Danesh Dadachanji  <ddadacha@redhat.com>
     40
     41        Fix PR955: regression: SweetHome3D fails to run
     42        * NEWS: Added entry for PR955
     43        * netx/net/sourceforge/jnlp/JNLPFile.java: New enum Match that represents
     44        the level of precision to use when matching locales.
     45        (localMatches): Renamed to localeMatches, added matchLevel paramater
     46        and updated conditionals to handle the level of precision specified by it.
     47        (getVendor): New method that returns an information's vendor text.
     48        (getInformation): Added override methods for getTitle and getVendor
     49        that are used by the anonymous class to filter by locale. All three
     50        methods now go through all levels of precision to search for the best
     51        fitted locale.
     52        (getResources), (getResourcesDescs): Updated to check if any level of
     53        precision matches when searching for locales.
     54        (parse): Added call to checkForTitleVendor.
     55        * netx/net/sourceforge/jnlp/Parser.java
     56        (checkForTitleVendor): New method to check for availability of localized
     57        title and vendor from the information tags. Throws ParseException.
     58        (getInfo): Replace loop with foreach loop.
     59        (getInformationDesc): Remove check for present title and vendor.
     60        (getLocale): Variant returned can now use everything after the eigth
     61        element of the locale's string.
     62        * netx/net/sourceforge/jnlp/resources/Messages.properties:
     63        Update missing title and vendor messages to mention localization.
     64        * tests/reproducers/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java:
     65        Update output string as per new changes to Messages internationalizations.
     66        * tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java:
     67        New unit test that checks the localesMatches method in JNLPFile.
     68        * tests/netx/unit/net/sourceforge/jnlp/MockJNLPFile.java:
     69        New class used to create a mock JNLPFile object.
     70        * tests/netx/unit/net/sourceforge/jnlp/ParserTest.java:
     71        New unit test that checks that the return of getTitle and getVendor
     72        have localized information.
     73
     742012-08-21  Jiri Vanek  <jvanek@redhat.com>
     75
     76        * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java:
     77        (sigInt), (sigKill), (sigTerm) new methods for various killing of
     78        processes by kill.
     79        (kill) new method, launching kill process.
     80        (destroyProcess ) is now calling sigInt instead of unwrapped sigTerm.
     81
     822012-08-21  Jiri Vanek  <jvanek@redhat.com>
     83
     84        * launcher/javaws.in: java is now launched by exec
     85
     862012-08-17  Adam Domurad  <adomurad@redhat.com>
     87
     88        Fixes PR588, cookies set in the java cookie jar are now stored properly
     89        * plugin/icedteanp/IcedTeaNPPlugin.cc
     90        (set_cookie_info): New, uses setvalueforurl
     91        (consume_plugin_message): Additional message added allowing
     92        set_cookie_info to be used from the java side.
     93        * plugin/icedteanp/java/sun/applet/PluginCookieManager.java: Now
     94        overrides put method, results in set_cookie_info calls in C++
     95        * plugin/icedteanp/java/sun/applet/PluginMain.java: Passes
     96        PluginStreamHandler to PluginCookieManager to allow C++ side
     97        communication
     98
     992012-08-17  Adam Domurad  <adomurad@redhat.com>
     100
     101        * plugin/icedteanp/IcedTeaNPPlugin.cc
     102        (consume_plugin_message): New, called by consume_message, handles
     103        cookie and proxy info retrieval, and setting cookie info
     104        (consume_message): Call consume_plugin_message for "plugin ..."
     105        messages
     106
     1072012-08-17  Adam Domurad  <adomurad@redhat.com>
     108
     109        Reproducers for PR588, sets persistent and session cookies in the
     110        cookie jar and tries to read them with various means.
     111        * tests/reproducers/signed/SavingCookies/resources/CheckCookie.html:
     112        Print the cookie store contents
     113        * tests/reproducers/signed/SavingCookies/resources/CheckCookieAndGotoClear.html:
     114        Print the cookie store contents, and then go to
     115        ClearPersistentCookie.html with showDocument
     116        * tests/reproducers/signed/SavingCookies/resources/ClearPersistentCookie.html:
     117        Clear the test cookie so it does not interfere with further tests
     118        * tests/reproducers/signed/SavingCookies/resources/SavePersistentCookie.html:
     119        Create a persistent cookie
     120        * tests/reproducers/signed/SavingCookies/resources/SavePersistentCookieAndGotoCheck.html:
     121        Create a persistent cookie and check it with showDocument
     122        * tests/reproducers/signed/SavingCookies/resources/SaveSessionCookie.html:
     123        Create a session cookie
     124        * tests/reproducers/signed/SavingCookies/resources/SaveSessionCookieAndGotoCheck.html:
     125        Create a session cookie and check it with showDocument
     126        * tests/reproducers/signed/SavingCookies/srcs/CheckingCookies.java:
     127        Checks the contents of the cookie store.
     128        Depending on the test, this may go to another page upon completion.
     129        * tests/reproducers/signed/SavingCookies/srcs/SavingCookies.java:
     130        Store cookies in the java cookie store. Depending on the test, this may
     131        go to another page upon completion.
     132        * tests/reproducers/signed/SavingCookies/testcases/SavingCookiesTests.java
     133        Test driver for testing persistent and session cookies in different
     134        ways
     135
     1362012-08-18  Jiri Vanek  <jvanek@redhat.com>
     137
     138        * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: added
     139        VERBOSE_OPTION constant with -verbose value for javaws launching.
     140
     1412012-08-17  Jiri Vanek  <jvanek@redhat.com>
     142
     143        * tests/reproducers/simple/deadlocktest/testcases/DeadLockTestTest.java:
     144        (testDeadLockTestTerminatedBody) removed tests for killed-process and
     145        termination of remaining javas put on correct place.
     146        * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
     147        (executeBrowser)  stout and stderr listeners forwarded to next method in
     148        correct order.
     149
     1502012-08-14  Danesh Dadachanji  <ddadacha@redhat.com>
     151
     152        Small addition to NEWS entry and bug annotation indicating the PR975 fix.
     153        * NEWS: Add entry for PR975
     154        * tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java:
     155        Add bug annotation for PR975.
     156
     1572012-08-14  Danesh Dadachanji  <ddadacha@redhat.com>
     158
     159        Classpaths in jars' manifests are only considered when the applet is run
     160        without using jnlp_href and a JNLP file.
     161        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (activateJars):
     162        Add conditional check for use of jnlp_href.
     163        * tests/reproducers/signed/Classpath.Manifest.Test.Helper/srcs/CheckForClasspath.java:
     164        Applet whose jar is stored in a subdir under the test engine server.
     165        * tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.html:
     166        * tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestAppletTest.jnlp:
     167        * tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestApplicationTest.jnlp:
     168        * tests/reproducers/signed/ClasspathManifestTest/resources/ClasspathManifestJNLPHrefTest.html:
     169        * tests/reproducers/signed/ClasspathManifestTest/srcs/ClasspathManifest.java:
     170        * tests/reproducers/signed/ClasspathManifestTest/srcs/META-INF/MANIFEST.MF:
     171        * tests/reproducers/signed/ClasspathManifestTest/testcases/ClasspathManifestTest.java:
     172        Test if manifest entry is searched for classpath only when in the plugin
     173        is run without using jnlp_href.
     174
     1752012-08-14  Adam Domurad  <adomurad@redhat.com>
     176
     177        Reproducer for allowing unsigned content in META-INF/ folder.
     178        Derives from ReadPropertiesSigned test's signed jar.
     179        * tests/reproducers/custom/UnsignedContentInMETAINF/resources/UnsignedContentInMETAINF.jnlp:
     180        New, runs a modified version of ReadPropertiesSigned.jar (UnsignedContentInMETAINF.jar)
     181        * tests/reproducers/custom/UnsignedContentInMETAINF/srcs/META-INF/unsigned_file_in_metainf:
     182        New, placed into a modified version of ReadPropertiesSigned.jar
     183        (UnsignedContentInMETAINF.jar) so that there is unsigned content in the
     184        META-INF/ folder.
     185        * tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile:
     186        New, creates a modified version of ReadPropertiesSigned.jar, named
     187        UnsignedContentInMETAINF.jar, and places unsigned content inside its
     188        META-INF/ folder
     189        * tests/reproducers/custom/UnsignedContentInMETAINF/testcases/UnsignedContentInMETAINF.java:
     190        Test driver for jnlp file
     191
     1922012-08-14  Adam Domurad  <adomurad@redhat.com>
     193
     194        Unit test for method in JCV, isMetaInfFile()
     195        * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java:
     196        Made isMetaInfFile package-private for testing purposes.
     197        * tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java:
     198        New, tests isMetaInfFile
     199
     2002012-08-07  Adam Domurad  <adomurad@redhat.com>
     201
     202        Fixes PR1106, plugin crashing with firefox + archlinux/gentoo
     203        * plugin/icedteanp/IcedTeaNPPlugin.cc
     204        (initialize_browser_functions): Account for the fact that
     205        browserTable->size can be larger than sizeof(NPNetscapeFuncs)
     206
     2072012-07-31  Jiri Vanek  <jvanek@redhat.com>
     208            Peter Hatina  <phatina@redhat.com>
     209
     210        Introduced configure option --with-gtk=2|3|default to be able
     211        to compile against different version of GTK+ (2.x or 3.x).
     212        * NEWS: mentioned bug fix
     213        * acinclude.m4: (ITW_GTK_CHECK_VERSION) macro for getting GTK+ version
     214        (ITW_GTK_CHECK) macro for checking GTK+ version
     215
     2162012-07-24  Adam Domurad  <adomurad@redhat.com>
     217
     218        CVE-2012-3422, RH840592: Potential read from an uninitialized
     219        memory location.
     220        * plugin/icedteanp/IcedTeaNPPlugin.cc
     221        (get_cookie_info): Only attempt to perform this operation if there is a
     222        valid plugin instance
     223        (get_proxy_info): Only attempt to perform this operation if there is a
     224        valid plugin instance
     225
     2262012-07-24  Adam Domurad  <adomurad@redhat.com>
     227
     228        * plugin/icedteanp/IcedTeaPluginUtils.cc
     229        (IcedTeaPluginUtilities::strSplit): Replace usage of " " with proper
     230        delimiter
     231
     2322012-07-24  Adam Domurad  <adomurad@redhat.com>
     233
     234        Refactor JNLPFile#launchType into its own interface type (as opposed to
     235        Object), LaunchDesc.
     236        * netx/net/sourceforge/jnlp/AppletDesc.java: Add override annotation to
     237        getMainClass().
     238        * netx/net/sourceforge/jnlp/ApplicationDesc.java: Same as above
     239        * netx/net/sourceforge/jnlp/InstallerDesc.java: Same as above
     240        * netx/net/sourceforge/jnlp/JNLPFile.java: Make launchType a
     241        LaunchDesc object. Update getLaunchInfo() accordingly.
     242        * netx/net/sourceforge/jnlp/LaunchDesc.java: New launch description.
     243        * netx/net/sourceforge/jnlp/Parser.java
     244        (getLauncher): Return type changed to LaunchDesc
     245        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Replace
     246        occurences of instanceof with respect to launchType.
     247
     2482012-07-18  Danesh Dadachanji  <ddadacha@redhat.com>
     249
     250        Fix RH838417, Fix RH838559: Disambiguate signed applet security prompt
     251        from certificate warning.
     252        * NEWS: Added entries for RH838417 and RH838559.
     253        * netx/net/sourceforge/jnlp/resources/Messages.properties:
     254        Added SWarnFullPermissionsIgnorePolicy and updated SHttpsUnverified.
     255        * netx/net/sourceforge/jnlp/security/CertWarningPane.java: Display
     256        SWarnFullPermissionsIgnorePolicy if the cert is from a jar and is either
     257        unverified or has a signing error. Also added warning.png to HTTPS dialogs.
     258
     2592012-07-11  Jiri Vanek  <jvanek@redhat.com>
     260
     261        try to close browser before kill it
     262        * tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java:
     263        * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java:
     264        * tests/reproducers/simple/CheckServices/testcases/CheckServicesTests.java
     265        (evaluateSignedApplet) addapted to properly closed browser
     266        * tests/reproducers/simple/CheckServices/srcs/CheckServices.java:
     267        removed fixme section as it shuld work now     
     268        * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java
     269        (destroyProcess) new method, launching kill with SIGTERM before clasical
     270        process.destroy()
     271        * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
     272        removed Set<Thread> terminated, should be removed long ago
     273
     2742012-07-09  Saad Mohammad  <smohammad@redhat.com>
     275
     276        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeExtensions):
     277        Checks and assigns the main-class name prior to the for loop.
     278
     2792012-07-09  Martin Olsson  <martin@minimum.se>
     280
     281        * plugin/icedteanp/IcedTeaPluginUtils.cc: Change calls from g_free
     282        to free when allocated with calloc.
     283        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
     284        (PluginRequestProcessor::call): Make sure args_array doesnt hold
     285        garbage when freed.
     286        (_loadURL): Change calls from g_free to free when allocated with
     287        calloc.
     288
     2892012-07-09  Adam Domurad  <adomurad@redhat.com>
     290
     291        Ignore invalid jar files in applets, like the oracle plugin does.
     292        * netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java:
     293        New exception type for ResourceTracker to throw instead of
     294        IllegalArgumentException
     295        * netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java:
     296        Throws IllegalArgumentDescriptorException instead of
     297        IllegalArgumentException.
     298        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
     299        (isInvalidJar): New, checks for ZipException in new JarFile(...)
     300        (shouldFilterInvalidJars): New, checks if we are in an applet
     301        (initializeResources): if 'shouldFilterInvalidJars()' is true and a jar
     302        is not a valid jar file, the jar is filtered out and normal execution
     303        continues.
     304
     3052012-07-03  Saad Mohammad  <smohammad@redhat.com>
     306
     307        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
     308        (JNLPClassLoader): New constructor that accepts an additional parameter
     309        containing the main class name.
     310        (getInstance): Accepts mainName as parameter to override application's
     311        main class name
     312        (initializeExtensions): Passes in the name of the application's main class
     313        when creating a new JNLPClassLoader instance.
     314        (initializeResources): If the loader owns no jars, it will consider
     315        itself as signed if all of the extension loaders are signed. Also, if the
     316        extension jars have the main class, it will set foundMainJar to true.
     317        (initializeResources): If the main class was not found, check if it was
     318        found within the extension jars.
     319        (checkForMain): Uses the overwritten main class name (if set) when
     320        searching for the main within the jars.
     321        (hasMainJar): Returns true if this loader holds the main jar.
     322        (hasMainInExtensions): Returns true if extension loaders have the main jar
     323        * tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp:
     324        * tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp:
     325        * tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp:
     326        Launching jnlps that use extension jnlp as its resource.
     327        * tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp:
     328        Launching jnlp that directly launches SignedJarResource class.
     329        * tests/jnlp_tests/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp:
     330        Launching jnlp that directly launches SignedJnlpResource class.
     331        * tests/jnlp_tests/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java:
     332        Testcase that tests the launching of jnlp files containing extension jnlps
     333        as resource.
     334        * tests/jnlp_tests/signed/SignedJarResource/resources/SignedJarExtension.jnlp:
     335        Component jnlp file that is used as an extension resource.
     336        * tests/jnlp_tests/signed/SignedJarResource/srcs/SignedJarResource.java:
     337        A simple java class that outputs a string.
     338        * tests/jnlp_tests/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp:
     339        Component jnlp file that is used as an extension resource and does not
     340        match the signed jnlp file.
     341        * tests/jnlp_tests/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp:
     342        Component jnlp file that is used as an extension resource and matches the
     343        signed jnlp file.
     344        * tests/jnlp_tests/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp:
     345        Signed jnlp file.
     346        * tests/jnlp_tests/signed/SignedJnlpResource/srcs/SignedJnlpResource.java:
     347        A simple java class that outputs a string.
     348
     3492012-07-02  Jiri Vanek  <jvanek@redhat.com>
     350
     351        Added missing headers
     352        * tests/reproducers/simple/CreateClassLoader/resources/CreateClassLoader.jnlp:
     353        * tests/reproducers/simple/ReadEnvironment/resources/ReadEnvironment.jnlp:
     354        * tests/reproducers/simple/ReadProperties/resources/ReadProperties1.jnlp:
     355        * tests/reproducers/simple/ReadProperties/resources/ReadProperties2.jnlp:
     356        * tests/reproducers/simple/RedirectStreams/resources/RedirectStreams.jnlp:
     357        * tests/reproducers/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp:
     358        * tests/reproducers/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp:
     359        * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
     360        * tests/test-extensions/net/sourceforge/jnlp/annotations/Bug.java:
     361        * tests/test-extensions/net/sourceforge/jnlp/annotations/KnownToFail.java:
     362        * tests/test-extensions/net/sourceforge/jnlp/annotations/NeedsDisplay.java:
     363        * tests/test-extensions/net/sourceforge/jnlp/annotations/TestInBrowsers.java:
     364        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browser.java:
     365        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserFactory.java:
     366        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTest.java:
     367        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java:
     368        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/Browsers.java:
     369        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chrome.java:
     370        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Chromium.java:
     371        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Epiphany.java:
     372        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Firefox.java:
     373        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/LinuxBrowser.java:
     374        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Midory.java:
     375        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/MozillaFamilyLinuxBrowser.java:
     376        * tests/test-extensions/net/sourceforge/jnlp/browsertesting/browsers/Opera.java:
     377        added license headers
     378
     3792012-07-02  Jiri Vanek  <jvanek@redhat.com>
     380
     381        Makefile adapted to recent (three changelog items) refactoring
     382        * Makefile.am: (JNLP_TESTS_ENGINE_SRCDIR) now points correctly to
     383        test-extensions. (JNLP_TESTS_ENGINE_TESTS_SRCDIR) new variable for
     384        test-extensions-tests. (JNLP_TESTS_SRCDIR) now points to reproducers.
     385        (JNLP_TESTS_ENGINE_TESTS_DIR) new variable for built
     386        JNLP_TESTS_ENGINE_TESTS_SRCDIR
     387        (netx-dist-tests-tests-source-files.txt) new target for list of
     388        content of JNLP_TESTS_ENGINE_TESTS_SRCDIR.
     389        (stamps/netx-dist-tests-tests-compile.stamp) new target for compiling
     390        netx-dist-tests-tests-source-files.txt
     391        (netx-dist-tests-source-files.tx) now depends on
     392        stamps/netx-dist-tests-tests-compile.stamp
     393        ($(REPRODUCERS_CLASS_NAMES)) target is now working in JNLP_TESTS_ENGINE_TESTS_DIR
     394        instead of JNLP_TESTS_ENGINE_DIR
     395        (stamps/run-netx-dist-tests.stamp): added JNLP_TESTS_ENGINE_TESTS_DIR to classpath
     396        (stamps/run-unit-test-code-coverage.stamp), (stamps/run-reproducers-test-code-coverage.stamp)
     397        added JNLP_TESTS_ENGINE_TESTS_DIR to classpath and
     398        JNLP_TESTS_ENGINE_TESTS_SRCDIR to sources path
     399
     4002012-07-02  Jiri Vanek  <jvanek@redhat.com>
     401
     402        All tests from test-extensions extracted to test-extensions-tests.
     403        All inner classes in test-extensions extracted as outer classes
     404        * tests/test-extensions/net/sourceforge/jnlp/ResourcesTest.java:
     405        moved to test-extensions-tests
     406        * tests/test-extensions-tests/net/sourceforge/jnlp/ResourcesTest.java:
     407        new file, copied from test-extensions
     408        * tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java:
     409        all tests from original ServerAccess.java
     410        * tests/test-extensions/net/sourceforge/jnlp/ContentReader.java:
     411        * tests/test-extensions/net/sourceforge/jnlp/LogItem.java:
     412        * tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java:
     413        * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java:
     414        * tests/test-extensions/net/sourceforge/jnlp/ProcessResult.java:
     415        * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java:
     416        * tests/test-extensions/net/sourceforge/jnlp/TestsLogs.java:
     417        * tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java:
     418        * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java:
     419        new files, extracted classes from ServerAccess
     420        * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
     421        extracted tests and inner classes
     422
     4232012-07-02  Jiri Vanek  <jvanek@redhat.com>
     424
     425        hg move tests/netx/jnlp_testsengine/ tests/test-extensions
     426
     4272012-07-02  Jiri Vanek  <jvanek@redhat.com>
     428
     429        hg move tests/jnlp_tests/ tests/reproducers
     430
     4312012-06-29  Jiri Vanek  <jvanek@redhat.com>
     432
     433        Fixed resource tests and Browsers.none behavior
     434        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
     435        Added slash into all executeBrowsers urls.
     436        Added midori and epiphany to simple proxies test.
     437        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java:
     438        Corrected handling of Browsers.none together with -Dmodified.browsers.run switch
     439
     4402012-06-28  Omair Majid  <omajid@redhat.com>
     441
     442        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     443        (findClass): Invoke CodeBaseClassLoader.findClass with a flag to avoid
     444        infinite recursion.
     445        (CodeBaseClassLoader.findClass(String)): Delegate to ...
     446        (CodeBaseClassLoader.findClass(String,boolean)): New method.
     447        * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java
     448        (testParentClassLoaderIsAskedForClasses): New method.
     449
     4502012-06-28 Jiri Vanek <jvanek@redhat.com>
     451
     452        Correctly backup all log files re-writable by emma during code-coverage
     453        * Makefile.am: (EMMA_MODIFIED_FILES) new variable with list of files to
     454        backup/restore. (stamps/run-unit-test-code-coverage.stamp) and
     455        (stamps/run-reproducers-test-code-coverage.stamp) are now iterating over
     456        EMMA_MODIFIED_FILES instead of enumerating them
     457
     4582012-06-28  Jiri Vanek  <jvanek@redhat.com>
     459
     460        Removed repeated re-runing of tests during coverage, stamped pac tests
     461        * Makefile.am: (check-pac-functions) moved to target aliases and replaced
     462        by stamps/check-pac-functions.stamp.
     463        (clean-netx-unit-tests) added removing of  stamps/check-pac-functions.stamp
     464        (stamps/exported-test-certs.stamp): no longer depends on
     465        netx-dist-tests-remove-cert-from-public, logic of it have to be
     466        copy-pasted from here.
     467        (stamps/run-unit-test-code-coverage.stamp): no longer depends on check,
     468        but was added direct dependences
     469
     4702012-06-28  Adam Domurad  <adomurad@redhat.com>
     471
     472        Allow for folders in archive tag.
     473        * netx/net/sourceforge/jnlp/PluginBridge.java:
     474        (PluginBridge) Changes jar -> archive, parse contents with
     475        addArchiveEntries.
     476        (addArchiveEntries) New method. Adds entries ending with / to the list
     477        of folders.
     478        (getCodeBaseFolders) Returns the folders collected by addArchiveEntries
     479        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
     480        (initializeResources) If ran as plugin, add archive tag folders to the
     481        code base loader.
     482
     4832012-06-27  Adam Domurad  <adomurad@redhat.com>
     484
     485        Tests folders in archive tag
     486        * tests/jnlp_tests/custom/AppletFolderInArchiveTag/testcases/AppletFolderInArchiveTagTests.java:
     487        Runs html file in browser
     488        * tests/jnlp_tests/custom/AppletFolderInArchiveTag/srcs/Makefile:
     489        packages compiled source files in folder
     490        * tests/jnlp_tests/custom/AppletFolderInArchiveTag/srcs/AppletFolderInArchiveTag.java:
     491        Simple output to confirm it is running
     492        * tests/jnlp_tests/custom/AppletFolderInArchiveTag/resources/AppletFolderInArchiveTag.html:
     493        Has folder in its archive tag that contains a class file
     494
     4952012-06-26  Jiri Vanek  <jvanek@redhat.com>
     496
     497        Added slipped midori and epiphany to recognized browsers.
     498        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserFactory.java:
     499        (BrowserFactory) added slipped cases for creating Epiphany and Midori singletons
     500
     5012012-06-26  Jiri Vanek  <jvanek@redhat.com>
     502
     503        * Makefile.am:  Most crucial variables exported to be used by custom Makefiles
     504        (CUSTOM_REPRODUCERS): new variable to hold custom name
     505        (ALL_NONCUSTOM_REPRODUCERS): new variable for gathering all except custom reproducers
     506        (ALL_REPRODUCERS): now contains also custom ones
     507        (stamps/junit-jnlp-dist-dirs): now depends also on junit-jnlp-dist-custom.txt
     508        (junit-jnlp-dist-custom.txt): new target scanning for directories in jnlp_tests/custom
     509        and saving them as list for future purposes.
     510        (stamps/netx-dist-tests-prepare-reproducers.stamp): and
     511        ( stamps/change-dots-to-paths.stamp):iterate through ALL_NONCUSTOM_REPRODUCERS
     512        instead of ALL__REPRODUCERS
     513        (stamps/process-custom-reproducers.stamp) : new target for iterating by
     514        junit-jnlp-dist-custom.txt through  jnlp_tests/custom/srcs* and launching
     515        make prepare-reproducer in each.
     516        (clean-custom-reproducers): same as above but launching make clean-reproducer
     517        (run-netx-dist-tests) now depends on stamps/process-custom-reproducers.stamp
     518        (clean-netx-dist-tests): now depends on clean-custom-reproducers and is removing
     519        stamps/netx-dist-tests-copy-resources.stamp
     520        (stamps/netx-dist-tests-copy-resources.stamp): new target extracting
     521        copying of resources from stamps/netx-dist-tests-compile-testcases.stamp
     522        * tests/jnlp_tests/README: described this mechanism a bit
     523
     5242012-06-26 Jiri Vanek <jvanek@redhat.com>
     525
     526        Reproducer for classes which should be loaded before verification but are not
     527        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-hack.jnlp
     528        jnlp launcher of applet variant with injecting new url to classlaoder
     529        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-applet-new.jnlp
     530        jnlp launcher of applet variant with custom classlaoder
     531        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.html
     532        html launcher of applet variant with injecting new url to classlaoder
     533        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-hack.jnlp
     534        jnlp launcher of application variant with injecting new url to classlaoder
     535        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.html
     536        html launcher of applet variant with custom classlaoder
     537        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/resources/InternalClassloaderWithDownloadedResource-new.jnlp
     538        jnlp launcher of application variant with custom classlaoder
     539        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/srcs/InternalClassloaderWithDownloadedResource.java:
     540        Both application and applet reproducing behavior of this bug
     541        * tests/jnlp_tests/signed/InternalClassloaderWithDownloadedResource/testcases/InternalClassloaderWithDownloadedResourceTest.java:
     542        Testcase launching jnlp application, jnlp applet and html applet
     543
     5442012-06-26  Jiri Vanek  <jvanek@redhat.com>
     545
     546        Last hope for not downloaded resources to be verified
     547        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
     548        (getCodeSourceSecurity): will now try to download and verify resource
     549        which was downloaded outside of netx.
     550        (alreadyTried) set for memory of once tried resources to not try again
     551
     5522012-06-25  Adam Domurad  <adomurad@redhat.com>
     553
     554        Small comment cleanup to classes with missing or wrong descriptions.
     555        * plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java:
     556        Comment at top fixed
     557        * plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java:
     558        Same
     559        * plugin/icedteanp/java/sun/applet/PluginException.java: Same
     560        * plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java: Same
     561        * netx/net/sourceforge/jnlp/PluginBridge.java: Add class description.
     562        * plugin/icedteanp/java/sun/applet/PluginCallRequest.java:
     563        Removed FIXME that had already been fixed.
     564
     5652012-06-25  Adam Domurad  <adomurad@redhat.com>
     566
     567        Allow passing of plugin tables and browser tables in NP_Initialize that
     568        are not the expected length but still large enough for our purposes.
     569        * plugin/icedteanp/IcedTeaNPPlugin.cc
     570        (initialize_browser_functions): New function to check size of passed
     571        browser function table, and initialize 'browser_functions' global
     572        variable.
     573        (initialize_plugin_table): New function to check size of passed
     574        plugin function table, and initialize proper plugin callbacks.
     575        (NP_Initialize): Make use of initialization helper functions, get
     576        rid of old size tests and error if the helper functions fail.
     577
     5782012-06-20  Adam Domurad  <adomurad@redhat.com>
     579
     580        * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java
     581        (verifyJar): two for loops made into for-each loops
     582
     5832012-06-19  Jiri Vanek  <jvanek@redhat.com>
     584
     585        various test for browser engine
     586        * tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests.html:
     587        fixed missing parenthesis
     588        * tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests2.html:
     589        new test excluding XslowX for applets
     590        * tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests:
     591        (doubleChrome) test for ensuring that two chrome browsers launched
     592        behind themselves will not cause errors as they were without
     593        criticalFixes patch
     594        (AppletInBrowserTest) and (AppletInBrowserTestXslowX) testing methods
     595        for all browser
     596        * tests/jnlp_tests/simple/AppletTest/testcases/AppletBaseURLTest:
     597        * tests/jnlp_tests/simple/AppletTest/testcases/CheckServicesTests:
     598        * tests/jnlp_tests/simple/AppletTest/testcases/AppletReadsInvalidJarTests:
     599        Included @TestInBrowser instead of plain executeBrowser
     600        * tests/jnlp_tests/simple/deadlocktest/srcs/DeadlockTest.java: improved
     601        to print sometimes something out
     602        * tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
     603        (testDeadLockTestTerminatedBody) enhanced to ensure that not so much is
     604        lost when process is terminated, but showing that something can be lost
     605        (which is correct)
     606        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
     607        (testNonExisitngBrowserWillNotDeadlock) testing taht when no browser is
     608        set, then no deadlock happens as happen before criticalFixes's deadlyException
     609        (testUnexistingProcessWillFailRecognizedly)  is actually testing deadlyException
     610        (testNonExisitngBrowserWillNotCauseMess) some but with annotation which
     611        was also harming output of tool little bit without TestInBrowsersAnnotation fixed.
     612        (testBrowsers2) is testing all browsers configuration without annotation
     613        and (testBrowser3) do the same configuration tests annotation driven
     614        (testBrowser) body of above two methods. Is testing whether used
     615        browsers are correctly linked with latest build
     616        (testBrowsers1) is testing parsing of -D variable
     617        (testListeners) annotated that needs display
     618        * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
     619        annotated with Bug annotation
     620
     6212012-06-19  Jiri Vanek  <jvanek@redhat.com>
     622
     623        introduced possibility to run comfortably applets+html reproducers
     624        * Makefile.am: used BROWSER_TESTS_MODIFICATION variable to pass global
     625        switch from configure
     626        * acinclude.m4: (IT_SET_GLOBAL_BROWSERTESTS_BHAVIOUR) new method
     627        handling --with-browser-tests
     628        * configure.ac: used IT_SET_GLOBAL_BROWSERTESTS_BHAVIOUR
     629        switch and passing  BROWSER_TESTS_MODIFICATION variable to Makefile.
     630        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     631        (currentBrowser) variable holding injected browser for ServerAccess instance
     632        (loggedBrowser) static variable keeping id of (currentBrowser) for static
     633        logging purposes
     634        (modifyMethodWithForBrowser) new function changing the name of method to
     635        "method - browser" for logging purposes
     636        (getBrowserLocation) - returning path to process to be launched when
     637        browser requested
     638        (getBrowserParams) - gathering set default's browser settings
     639        (set/getCurrentBrowsers) - set browser by id/return id of set browser
     640        (set/getCurrentBrowser) - set browser instance /returns instance of
     641        current browser
     642        (executeBrowser) family of methods now cooperate with above methods for
     643        default set browser
     644        (executeBrowser(Browser) family to work with implicit browser
     645        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/TestInBrowsers.java:
     646        annotation for determining which browser(s) to use with annotated method
     647        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/Browser.java:
     648        interface for dealing with various browsers
     649        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserFactory.java:
     650        singleton for mapping configured browsers x requested browser x browsers proxies
     651        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserTest.java:
     652        Forefather of all testcases which have methods to do tests iniside browser.
     653        Is allowing correct annotation -> proxy trasnver to VirtualServer for
     654        selected method and is requesting custom runner from junit framework
     655        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/BrowserTestRunner.java:
     656        custom test Ruuner which is responsible for translating annotation and
     657        run the method mutlipletimes for each requested browser and to name it properly
     658        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/Browsers.java:
     659        enumeration of abstract browsers and theirs sets or subsets.
     660        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/*:
     661        individual browsers proxies and theirs abstractions,namely:
     662        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Opera.java:
     663        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Firefox.java:
     664        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Chrome.java:
     665        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Chromium.java:
     666        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Midori.java:
     667        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/Epiphany.java:
     668        proxies for  browsers as name suggests
     669        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/LinuxBrowser.java:
     670        abstract forefather for all browsers implementing Browser interface. Is
     671        setting /usr/bin as bin path, libjavaplugin.so as default plugin library name,
     672        intorducing stubs for methods (eg 32/64 bit libs)
     673        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/browsertesting/browsers/MozillaFamilyLinuxBrowser:
     674        forefather for all browsers except Opera. Is unifying .mozilla/plugins directories
     675
     6762012-06-15  Jiri Vanek  <jvanek@redhat.com>
     677
     678        * tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests.html:
     679        Added quotes around parameters  of html applet tag.
     680        * tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
     681        Output verification is counting with repeated and probably unfinished outputs.
     682        * tests/jnlp_tests/simple/deadlocktest/srcs/DeadlockTest.java
     683        Is now printing out sentence in intervals to avoid destroy-consume as much as possible
     684        * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
     685        Added bug annotation with threads on distro-pkg-dev
     686
     6872012-06-15  Adam Domurad  <adomurad@redhat.com>
     688
     689        Fixed two memory leaks
     690        * plugin/icedteanp/IcedTeaNPPlugin.cc
     691        (consume_message): Call to g_strsplit matched with call to g_strfreev.
     692        * plugin/icedteanp/IcedTeaPluginUtils.cc
     693        (post): Removed copy of string, which assumed consumer freed string
     694        (which was not true and not always possible)
     695
     6962012-06-11  Danesh Dadachanji  <ddadacha@redhat.com>
     697
     698        PR855: AppletStub getDocumentBase() doesn't return full URL
     699        * NEWS: Added PR855 entry.
     700        * plugin/icedteanp/IcedTeaNPPlugin.cc (plugin_get_documentbase):
     701        Assign documentbase_copy directly to href's value instead of iterating
     702        through the segments to remove the file from the path.
     703        * tests/jnlp_tests/simple/AppletBaseURLTest/srcs/AppletBaseURL.java:
     704        * tests/jnlp_tests/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java:
     705        * tests/jnlp_tests/simple/AppletBaseURLTest/resources/AppletBaseURLTest.html:
     706        * tests/jnlp_tests/simple/AppletBaseURLTest/resources/AppletBaseURLTest.jnlp:
     707        * tests/jnlp_tests/simple/AppletBaseURLTest/resources/AppletJNLPHrefBaseURLTest.html:
     708        New reproducer that checks the URLS that document and codebase
     709        point are correct.
     710
     7112012-06-13  Danesh Dadachanji  <ddadacha@redhat.com>
     712
     713        Update CheckServices reproducer to handle browser testcase.
     714        * tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java:
     715        Added browser test and annotation, refactored asserts into helper method.
     716        * tests/jnlp_tests/simple/CheckServices/resources/CheckPluginServices.html:
     717        New browser test file that runs applet using jnlp_href.
     718
     7192012-06-13  Jiri Vanek  <jvanek@redhat.com>
     720
     721        * tests/junit-runner/JunitLikeXmlOutputListener.java:
     722        Introduced TEST_IGNORED_ATTRIBUTE to mark test as ignored if should be.
     723        * tests/report-styles/jreport.xsl: Applied correct text and style for
     724        tests with attribute ignored.
     725
     7262012-06-12  Adam Domurad  <adomurad@redhat.com>
     727
     728        Fixes PR722, javaws failing to run with unsigned content in META-INF/
     729        * NEWS: Added entry: Fixes PR722
     730        * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Changed
     731        isSignatureRelated => isMetaInfFile. Now all files under META-INF/ are
     732        disregarded in checking the jar signage.
     733
     7342012-06-11  Jiri Vanek  <jvanek@redhat.com>
     735
     736        Implemented xml logging backend
     737        * Makefile.am: (stamps/run-netx-unit-tests.stamp) and
     738        (stamps/run-netx-dist-tests.stamp) removed redirection of streams as
     739        logging is now done in ServerAccess tests extensions
     740        added xsltproc execution above generated xml log
     741        xsltproc generating results html files is now receiving result of above
     742        as parameter
     743        * tests/report-styles/jreport.xsl: log parameter is now accepted, and
     744        if set, then all tests are linking into specified file to show the log
     745        * tests/report-styles/report.css: added styles for new links
     746        * tests/report-styles/index.js: new functions to work for result of below sheet
     747        * tests/report-styles/logs.xsl: new file, sheet to convert xml log to html file
     748        * tests/report-styles/output.css: new file, styles of above html file
     749        * tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
     750        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
     751        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     752        Tests', server's and ProcessAssasin's logs are now redirected to bottleneck
     753        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     754        (LOGS_REPRINT) flag for debugging purposes, will enable reprinting to
     755        stdout/err again
     756        (DEFAULT_LOG_FILE ) default name of xml output
     757        (DEFAULT_STDERR_FILE)(DEFAULT_STDOUT_FILE)(DEFAULT_STDLOGS_FILE) default
     758        values of plain text output files
     759        (*ELEMENT) and( (*ATTRIBUTE) variables keeping repeated names of xml
     760        output parts
     761        (writeXmlLog) method called from Sytsem.hook to save xml log
     762        (addToXmlLog) method to record item to xml structure
     763        (TestsLogs) and (LogItem) inner classes to keep logging information
     764        (log) is now reprinting message with id to std out/err dependently on
     765        (LOGS_REPRINT) but always to internal streams, possilbe exception is thrown
     766        (logException) new method, shortcut to log exception in same way as message
     767        (getTestMethod) now can handle methods inside ServerAccess class too
     768
     7692012-06-11  Adam Domurad  <adomurad@redhat.com>
     770
     771        * NEWS: Added mention of fixing PR518
     772
     7732012-06-07  Saad Mohammad  <smohammad@redhat.com>
     774
     775        Allows the user to configure browser paths and/or disable browsers.
     776        * acinclude.m4 (IT_FIND_BROWSER): Checks if the browser is set to be
     777        disabled, or if the path provided is valid. Otherwise, it locates the
     778        default path to the browser if found on the system.
     779        * configure.ac: Uses IT_FIND_BROWSER to find/configure browsers.
     780
     7812012-06-06  Deepak Bhole <dbhole@redhat.com>
     782
     783        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     784        (getAccessControlContextForClassLoading): Iterate over codebase URLs only
     785        if codeBaseLoader is not null.
     786
     7872012-06-05  Deepak Bhole <dbhole@redhat.com>
     788
     789        PR861: Allow loading from non codebase hosts. Allow code to connect to
     790        hosting server.
     791        * netx/net/sourceforge/jnlp/SecurityDesc.java
     792        (getSandBoxPermissions): Only add host if it is not empty.
     793        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     794        (getPermissions): Add SocketPermission for code source host.
     795        (findLoadedClassAll): Call super methods privileged so that connection to
     796        non codebase hosts can be made.
     797        (findClass): Same.
     798        (findResourcesBySearching): Same. Also use privileged context for enum
     799        operations because the enum is defined on the fly by URLClassLoader and
     800        checks for hosting server connectivity via next().
     801        (getAccessControlContextForClassLoading): New method. Returns a control
     802        context for classloader operations like find/load/etc.
     803        (CodeBaseClassLoader::findClass): Call super methods privileged so that
     804        connection to non codebase hosts can be made.
     805        (CodeBaseClassLoader::findResource): Same.
     806
     8072012-06-05  Jiri Vanek  <jvanek@redhat.com>
     808
     809        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/KnownToFail.java
     810        New file. Annotation for marking failing tests.
     811        * tests/report-styles/jreport.xsl:
     812        * tests/junit-runner/LessVerboseTextListener.java:
     813        * tests/junit-runner/JunitLikeXmlOutputListener.java:  Added counting
     814        and printing of @KnownToFail annotations if presented.
     815        * tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java:
     816        (SpacesCanBeEverywhereRemoteTests1) (SpacesCanBeEverywhereRemoteTests2)
     817        (SpacesCanBeEverywhereRemoteTests3)
     818        * tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java: (testTemplateCDATA)
     819        (testApplicationCDATA)
     820        * tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java:
     821        (testCDataFirstChild) (testCDataSecondChild) (testCommentInAttributes)
     822        * tests/netx/unit/net/sourceforge/jnlp/ParserMalformedXml.java:
     823        (testMalformedArguments) (testTagNotClosed) (testUnquotedAttributes)
     824        marked as KnownToFail
     825
     8262012-06-05  Jiri Vanek  <jvanek@redhat.com>
     827
     828        isDateInRange renamed to isDateInRange_internallForIcedTeaWebTesting
     829        * netx/net/sourceforge/jnlp/runtime/pac-funcs.js: and
     830        * tests/netx/pac/pac-funcs-test.js:
     831        (isDateInRange): Renamed to isDateInRange_internallForIcedTeaWebTesting.
     832        (isDateInRange_internallForIcedTeaWebTesting): New function
     833
     8342012-06-04  Saad Mohammad <smohammad@redhat.com>
     835
     836        Added signed jnlp file tests.
     837        * tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication1.jnlp:
     838        Launching jnlp file that matches the signed jnlp application file.
     839        * tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication2.jnlp:
     840        * tests/jnlp_tests/signed/SignedJnlpApplication/resources/SignedJnlpApplication3.jnlp:
     841        Launching jnlp file that does not match the signed jnlp application file.
     842        * tests/jnlp_tests/signed/SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp:
     843        Signed jnlp application file.
     844        * tests/jnlp_tests/signed/SignedJnlpApplication/srcs/SignedJnlpApplication.java:
     845        A simple java class that outputs a string.
     846        * tests/jnlp_tests/signed/SignedJnlpApplication/testcases/SignedJnlpApplicationTest.java:
     847        Testcase that tests the launching of applications with a signed jnlp
     848        application file.
     849        * tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate1.jnlp:
     850        Launching jnlp file that matches the signed jnlp application template file.
     851        * tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate2.jnlp:
     852        * tests/jnlp_tests/signed/SignedJnlpTemplate/resources/SignedJnlpTemplate3.jnlp:
     853        Launching jnlp file that does not match the signed jnlp application
     854        template file.
     855        * tests/jnlp_tests/signed/SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp:
     856        Signed jnlp application template file.
     857        * tests/jnlp_tests/signed/SignedJnlpTemplate/srcs/SignedJnlpTemplate.java:
     858        A simple java class that outputs a string.
     859        * tests/jnlp_tests/signed/SignedJnlpTemplate/testcases/SignedJnlpTemplateTest.java:
     860        Testcase that tests the launching of applications with a signed jnlp
     861        application template file.
     862        * tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication1.jnlp:
     863        Launching jnlp file that matches the unsigned jnlp application file.
     864        * tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication2.jnlp:
     865        * tests/jnlp_tests/simple/UnsignedJnlpApplication/resources/UnsignedJnlpApplication3.jnlp:
     866        Launching jnlp file that does not match the unsigned jnlp application file.
     867        * tests/jnlp_tests/simple/UnsignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp:
     868        Unsigned jnlp application file.
     869        * tests/jnlp_tests/simple/UnsignedJnlpApplication/srcs/UnsignedJnlpApplication.java:
     870        A simple java class that outputs a string.
     871        * tests/jnlp_tests/simple/UnsignedJnlpApplication/testcases/UnsignedJnlpApplicationTest.java:
     872        Testcase that tests the launching of applications with an unsigned jnlp
     873        application file.
     874        * tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate1.jnlp:
     875        Launching jnlp file that matches the unsigned jnlp application
     876        template file.
     877        * tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate2.jnlp:
     878        * tests/jnlp_tests/simple/UnsignedJnlpTemplate/resources/UnsignedJnlpTemplate3.jnlp:
     879        Launching jnlp file that does not match the unsigned jnlp application
     880        template file.
     881        * tests/jnlp_tests/simple/UnsignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp:
     882        Unsigned jnlp application template file.
     883        * tests/jnlp_tests/simple/UnsignedJnlpTemplate/srcs/UnsignedJnlpTemplate.java:
     884        A simple java class that outputs a string.
     885        * tests/jnlp_tests/simple/UnsignedJnlpTemplate/testcases/UnsignedJnlpTemplateTest.java:
     886        Testcase that tests the launching of applications with an unsigned jnlp
     887        application template file.
     888        * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne1.jnlp:
     889        Launching jnlp file that matches the signed jnlp application file.
     890        * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/resources/SignedJnlpCaseTestOne2.jnlp:
     891        Launching jnlp file that does not match the signed jnlp application file.
     892        * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/srcs/JNLP-INF/aPpLiCaTioN.jnlp:
     893        Signed jnlp application file.
     894        * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/srcs/SignedJnlpCase.java:
     895        A simple java class that outputs a string.
     896        * tests/jnlp_tests/signed/SignedJnlpCaseTestOne/testcases/SignedJnlpCaseOneTest.java:
     897        Testcase that tests the case-sensitivity of the signed jnlp application's
     898        filename.
     899        * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo1.jnlp:
     900        Launching jnlp file that matches the signed jnlp application template file.
     901        * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/resources/SignedJnlpCaseTestTwo2.jnlp:
     902        Launching jnlp file that does not match the signed jnlp application
     903        template file.
     904        * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/srcs/JNLP-INF/aPpLiCaTiOn_tEmPlAte.jnlp:
     905        Signed jnlp application template file.
     906        * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/srcs/SignedJnlpCase.java:
     907        A simple java class that outputs a string.
     908        * tests/jnlp_tests/signed/SignedJnlpCaseTestTwo/testcases/SignedJnlpCaseTwoTest.java:
     909        Testcase that tests the case-sensitivity of the signed jnlp application
     910        template's filename.
     911
     9122012-06-04  Danesh Dadachanji  <ddadacha@redhat.com>
     913
     914        Fix to handle absolute paths passed into jnlp_href's value.
     915        * netx/net/sourceforge/jnlp/PluginBridge.java
     916        (PluginBridge): Uses context of codebase to evaluate jnlp_href's value.
     917        Uses JNLPCreator's create method to make new JNLPFile variables.
     918        New constructor that wraps around the original one, creating a new
     919        JNLPCreator to use.
     920        * netx/net/sourceforge/jnlp/JNLPCreator.java: New strategy pattern class
     921        to be used to wrap around the creation of a JNLPFile. Replace this creator
     922        when unit testing to skip running parsing code.
     923        * tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java:
     924        New class to unit test getEvaluatedJNLPHref.
     925
     9262012-06-04  Adam Domurad  <adomurad@redhat.com>
     927
     928        Added self to AUTHORS.
     929        This patch fixes PR518, ensures null termination of strings based off
     930        of NPVariant results.
     931        * plugin/icedteanp/IcedTeaPluginUtils.h: Added declaration of
     932        NPVariantAsString
     933        * plugin/icedteanp/IcedTeaPluginUtils.cc
     934        (NPVariantAsString): New. Converts an NPVariant to a
     935        std::string, assumes it is a valid NPString.
     936        (isObjectJSArray): Now uses NPVariantAsString, minor cleanup.
     937        * plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
     938        (plugin_get_documentbase): Now uses NPVariantAsString.
     939        * plugin/icedteanp/IcedTeaNPPlugin.cc
     940        (NPVariantToString): Now uses NPVariantAsString, minor cleanup.
     941
     9422012-06-01  Deepak Bhole <dbhole@redhat.com>
     943
     944        PR863: Error passing strings to applet methods in Chromium
     945        * plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
     946        (createJavaObjectFromVariant): Account for length of the characters.
     947        * plugin/icedteanp/IcedTeaNPPlugin.cc (plugin_get_documentbase): Same.
     948        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc (_eval): Print the
     949        string's c_str rather than utf8characters.
     950        * plugin/icedteanp/IcedTeaPluginUtils.cc (printNPVariant): Account for
     951        length of the characters.
     952        (NPVariantToString): Same.
     953        (isObjectJSArray): Same.
     954
     9552012-05-30  Jiri Vanek  <jvanek@redhat.com>
     956
     957        Enabled multiple certificates and extracted variables
     958        * Makefile.am: EXPORTED_TEST_CERT by EXPORTED_TEST_CERT_PREFIX and
     959        EXPORTED_TEST_CERT_SUFFIX for further composition
     960        SIGNED_REPRODUCERS new variable for  iterating through signed reproducers
     961        SIMPLE_REPRODUCERS new variable for  iterating through simple reproducers
     962        ALL_REPRODUCER new variable for  iterating through all reproducers
     963        (junit-jnlp-dist-signed.txt) replaced by
     964        (stamps/junit-jnlp-dist-signed.stamp) which generates
     965        junit-jnlp-dist-signedX.txt for each directory with signed reproducers
     966        (stamps/netx-dist-tests-prepare-reproducers.stamp)
     967        (stamps/change-dots-to-paths.stamp)
     968        (stamps/netx-dist-tests-compile-testcases.stamp)
     969        (run-netx-dist-codecoverage): extracted variables
     970        (clean-netx-dist-tests): iterates through all the list and removes them
     971        (stamps/netx-dist-tests-sign-some-reproducers.stamp): now iterate through
     972        SIGNED_REPRODUCERS and creates special certificate for each member. Each
     973        jar from this directory is then signed by corresponding certificate
     974        (netx-dist-tests-remove-cert-from-public): iterates through all certificates
     975        (stamps/netx-dist-tests-import-cert-to-public): exports each certificate
     976        created during tests preparations
     977        ($(EXPORTED_TEST_CERT)) replaced by stamps/exported-test-certs.stamp which
     978        create for each of SIGNED_REPRODUCERS individual certificate
     979        (tests/jnlp_tests/README): mentioned possibility of multiple certificate
     980
     9812012-05-29  Jiri Vanek  <jvanek@redhat.com>
     982
     983        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (getPermissions):
     984        New rethrow of exceptions and following condition make more accurate.
     985
     9862012-05-29  Jiri Vanek  <jvanek@redhat.com>
     987
     988        Get rid of repeated sout/serr  in reproducers testcases/unit tests and
     989        introduce bottleneck for loging.
     990        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     991        (PROCESS_LOG) static flag for enabling/disabling automatic logging of
     992        statically executed processes.
     993        (logErrorReprint) (logOutputReprint) (logNoReprint) new methods, to call 
     994        logging bottleneck.
     995        (log) main logging bottleneck, reprint message to according stream with
     996        calling test-class and test-method as suffix.
     997        (getTestMethod) new method to analyze calling test-method.
     998        (executeProcess) enhanced for conditional automatic logging of start of
     999        process and outputs of process.
     1000        * tests/jnlp_tests/signed/AppletTestSigned/testcases/AppletTestSignedTests.java:
     1001        * tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java:
     1002        * tests/jnlp_tests/signed/MissingJar/testcases/MissingJarTest.java:
     1003        * tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java:
     1004        * tests/jnlp_tests/signed/Spaces can be everywhere signed/testcases/SpacesCanBeEverywhereTestsSigned.java:
     1005        * tests/jnlp_tests/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java:
     1006        * tests/jnlp_tests/simple/AddShutdownHook/testcases/AddShutdownHookTest.java:
     1007        * tests/jnlp_tests/simple/AllStackTraces/testcases/AllStackTracesTest.java:
     1008        * tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests.java:
     1009        * tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java:
     1010        * tests/jnlp_tests/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java:
     1011        * tests/jnlp_tests/simple/InformationTitleVendorParser/testcases/InformationTitleVendorParserTest.java:
     1012        * tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java:
     1013        * tests/jnlp_tests/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java:
     1014        * tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java:
     1015        * tests/jnlp_tests/simple/RedirectStreams/testcases/RedirectStreamsTest.java:
     1016        * tests/jnlp_tests/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java:
     1017        * tests/jnlp_tests/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java:
     1018        * tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java:
     1019        * tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
     1020        * tests/jnlp_tests/simple/simpletest1/testcases/SimpleTest1Test.java:
     1021        * tests/jnlp_tests/simple/simpletest2/testcases/SimpleTest2Test.java:
     1022        * tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java:
     1023        * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
     1024        * tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java:
     1025        all System.out replaced by ServerAccess.logOutputReprint
     1026        and System.err replaced by ServerAccess.logErrorReprint
     1027
     10282012-05-25  Adam Domurad <adomurad@redhat.com>
     1029
     1030        Changed for-loops over iterators and indices to for-each loops if they
     1031        were sufficient and clearer.
     1032        * netx/net/sourceforge/jnlp/JNLPFile.java: Changed for-loops that could
     1033        be expressed more clearly as for-each loops.
     1034        * netx/net/sourceforge/jnlp/PluginBridge.java: Same
     1035        * netx/net/sourceforge/jnlp/ResourcesDesc.java: Same
     1036        * netx/net/sourceforge/jnlp/cache/CacheUtil.java: Same
     1037        * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java: Same
     1038        * netx/net/sourceforge/jnlp/cache/Resource.java: Same
     1039        * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: Same
     1040        * netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java: Same
     1041        * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java: Same
     1042        * plugin/icedteanp/java/netscape/javascript/JSObject.java: Same
     1043        * plugin/icedteanp/java/sun/applet/JavaConsole.java: Same
     1044        * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Same
     1045
     10462012-05-23  Adam Domurad  <adomurad@redhat.com>
     1047        Removed instances of snprintf where buffer size was not known. Added
     1048        buffer size constant for allocating buffers for numeric conversions.
     1049        * plugin/icedteanp/IcedTeaNPPlugin.cc: Removed usage of snprintf for
     1050        simple blanking of strings. Buffer size was misguided previously.
     1051        Used NUM_STR_BUFFER_SIZE constant to replace magic numbers/
     1052        * plugin/icedteanp/IcedTeaPluginUtils.cc: Made
     1053        NPVariantToString(NPVariant variant, std::string* result) use two
     1054        space indentation. Used NUM_STR_BUFFER_SIZE constant to replace magic
     1055        numbers.
     1056        * plugin/icedteanp/IcedTeaPluginUtils.h: Added constant,
     1057        NUM_STR_BUFFER_SIZE.
     1058
     10592012-05-24  Danesh Dadachanji <ddadacha@redhat.com>
     1060
     1061        Fix use of src dir instead of build dir when whitelisting.
     1062        * Makefile.am (REPRODUCERS_CLASS_WHITELIST): Use abs_top_srcdir
     1063        instead of abs_top_builddir.
     1064
     10652012-05-23  Martin Olsson <martin@minimum.se>
     1066
     1067        * plugin/icedteanp/IcedTeaPluginUtils.cc:
     1068        Tiny fixup for changeset 383; don't do free(stack_variable).
     1069
     10702012-05-20  Jiri Vanek  <jvanek@redhat.com>
     1071
     1072        Reproducers engine enhanced for jars in subdirectories by "." naming convention
     1073        * Makefile.am: (stamps/change-dots-to-paths.stamp) new target to copy jars
     1074        with dots (.jar omitted) to the java-like package/directory structure in
     1075        jnlp_test_server
     1076        (EXPORTED_TEST_CERT) now depends on  stamps/change-dots-to-paths.stamp
     1077        (clean-netx-dist-tests) removes stamps/change-dots-to-paths.stamp too.
     1078
     10792012-05-24  Jiri Vanek  <jvanek@redhat.com>
     1080
     1081        Introduced whitelist for reproducers
     1082        * netx-dist-tests-whitelist: new file, contains regular expressions
     1083        (separated by space) for expr to select testcases which only will be
     1084        run. By default set to all by expression .*
     1085        * Makefile.am: (REPRODUCERS_CLASS_NAMES) When class with testcases is
     1086        going to be included in list, it is at first check for match in whitelist.
     1087        If there is no match, will not be included.
     1088
     10892012-05-24  Martin Olsson <martin@minimum.se>
     1090       
     1091        * plugin/icedteanp/IcedTeaPluginUtils.cc:
     1092        Fix two typos.
     1093
     10942012-05-23  Deepak Bhole <dbhole@redhat.com>
     1095
     1096        * AUTHORS: Added Martin Olsson to list.
     1097
     10982012-05-23  Martin Olsson  <martin@minimum.se>
     1099
     1100        * plugin/icedteanp/IcedTeaNPPlugin.cc:
     1101        Use g_mutex_free instead of g_free to free appletviewer_mutex (fixes
     1102        crash).
     1103
     11042012-05-23  Deepak Bhole <dbhole@redhat.com>
     1105
     1106        * ChangeLog: Converted spaces to tabs in an older entry
     1107
     11082012-05-23  Jiri Vanek  <jvanek@redhat.com>
     1109
     1110        * netx/net/sourceforge/jnlp/resources/Messages.properties: fixed error
     1111        in PBadNonrelativeUrl
     1112
     11132012-05-23 Jiri Vanek  <jvanek@redhat.com>
     1114
     1115        Added more debugging outputs
     1116        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
     1117        (getCodeSourceSecurity): added output message when no SecurityDesc is found
     1118        for some url/resource
     1119        * netx/net/sourceforge/jnlp/resources/Messages.properties: added LNoSecInstance
     1120        and LCertFoundIn values
     1121        * netx/net/sourceforge/jnlp/security/KeyStores.java: (getPathToKeystore):
     1122        new method, able to search for file used for creating of KeyStore if possible
     1123        * netx/net/sourceforge/jnlp/security/CertificateUtils.java: (inKeyStores)
     1124        using getPathToKeystore for debug output
     1125
     11262012-05-23  Jiri Vanek  <jvanek@redhat.com>
     1127
     1128        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (getPermissions):
     1129        Any exception from this method is consumed somewhere. I have cough exception,
     1130        reprint it in debug mode and re-throw (to be lost). Main condition in this
     1131        method had several possible NullPointer exceptions. Separated and thrown before
     1132        this condition.
     1133
     11342012-05-23  Jiri Vanek  <jvanek@redhat.com>
     1135
     1136        Enhanced about dialog
     1137        * extra/net/sourceforge/javaws/about/Main.java: Main frame and Main tab
     1138        renamed from "About NetX" to "About IcedTea-Web and NetX".
     1139        * extra/net/sourceforge/javaws/about/resources/about.html: mentioned
     1140        IcedTea-Web.
     1141        * extra/net/sourceforge/javaws/about/resources/notes.html: List of authors
     1142        synchronized with AUTHORS, mentioned classpath's IcedTea-Web as homepage
     1143        of IcedTea-web.
     1144
     11452012-05-23  Jiri Vanek  <jvanek@redhat.com>
     1146
     1147        Fixed error in reproducers source preparation
     1148        * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) removed
     1149        inappropriately used quotes when copying notSrcFiles. Source files now
     1150        copied only if src dir exists in reproducer
     1151
     11522012-05-22  Adam Domurad  <adomurad@redhat.com>
     1153
     1154        Changed allocation of small, fixed-size buffers to stack-based
     1155        allocations. Changed occurences of sprintf to the safer function
     1156        snprintf, added buffer information. While unlikely to change
     1157        functionality, snprintf adds an extra check to prevent buffer
     1158        overflows.
     1159        * plugin/icedteanp/IcedTeaNPPlugin.cc: Allocation of small buffers
     1160        using malloc changed to stack allocation & changed sprintf calls to
     1161        buffer-size aware snprintf calls.
     1162        * plugin/icedteanp/IcedTeaPluginUtils.cc: Same as above.
     1163
     11642012-05-22  Jiri Vanek  <jvanek@redhat.com>
     1165
     1166        * tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java:
     1167        * tests/jnlp_tests/simple/AddShutdownHook/testcases/AddShutdownHookTest.java:
     1168        * tests/jnlp_tests/simple/AllStackTraces/testcases/AllStackTracesTest.java:
     1169        * tests/jnlp_tests/simple/CreateClassLoader/testcases/CreateClassLoaderTest.java:
     1170        * tests/jnlp_tests/simple/ReadEnvironment/testcases/ReadEnvironmentTest.java:
     1171        * tests/jnlp_tests/simple/ReadProperties/testcases/ReadPropertiesTest.java:
     1172        * tests/jnlp_tests/simple/RedirectStreams/testcases/RedirectStreamsTest.java:
     1173        * tests/jnlp_tests/simple/ReplaceSecurityManager/testcases/ReplaceSecurityManagerTest.java:
     1174        * tests/jnlp_tests/simple/SetContextClassLoader/testcases/SetContextClassLoaderTest.java:
     1175        All exact matches upon AccessControlException replaced by regular expression matching both jdk7 and jdk6 syntax
     1176
     11772012-05-21  Jiri Vanek  <jvanek@redhat.com>
     1178
     1179        * Makefile.am: mzilla-filesystem linking targets now counts also with
     1180        midori and epiphany. Extracted duplicated entries to variables
     1181        * configure.ac: added  check for midori and epiphany
     1182
     11832012-05-21  Jiri Vanek  <jvanek@redhat.com>
     1184
     1185        Added detection of installed browsers and added targets to create
     1186        symbolic links from install dir to browsers' plugin directories.
     1187        Primarily for testing purposes
     1188        * Makefile.am: (stamps/user-links.stamp) with alias (links) - new target for
     1189        creating symlinks for all users. One must be root to execute this target.
     1190        (stamps/global-links.stamp) with alias (user-links) - new target
     1191        for creating symlinks for logged user only. Because opera is missing this feature,
     1192        quite useless for testing or dependence targets, but good for live user.
     1193        (restore-global-links): target for restoring original global links.
     1194        One must be root again
     1195        (restore-user-links): target for restoring user's links
     1196        * configure.ac: added basic check whether and which browsers are
     1197        installed
     1198
     11992012-05-18  Jiri Vanek  <jvanek@redhat.com>
     1200
     1201        Fixed behavior when encoded/characters needed encoding included in url
     1202        * NEWS: mentioned PR811
     1203        * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (urlEquals) Enhanced
     1204        to be able compare encoded/decoded urls correctly.
     1205        (notNullUrlEquals) new method to separate comparing of individual parts of
     1206        url from null checks
     1207        * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (addResource)
     1208        is now encoding url if needed. (normalizeUrl) new method to encode path in
     1209        url of all except file protocol. (normalizeChunk) New method for encoding
     1210        of atomic piece.
     1211
     12122012-05-18  Jiri Vanek  <jvanek@redhat.com>
     1213
     1214        More tests for Spaces and characters in urls
     1215        * netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java: and
     1216        * netx/net/sourceforge/jnlp/cache/CacheUtil.java: for unit-tests
     1217        purposes (cacheDir) make to point to tmp dir when no
     1218        DeploymentConfiguration exists.
     1219        * tests/jnlp_tests/signed/Spaces can be everywhere signed/:
     1220        couple of new test doing the same as simple "Spaces can be everywhere"
     1221        but are signed
     1222        * tests/jnlp_tests/simple/Spaces can be everywhere/: added new test-cases
     1223        and html/jnlp test files to try more combinations of encodable characters
     1224        x launches
     1225        * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java:
     1226        unittest for url encoder behavior
     1227        * tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java:
     1228        unittest for urlEquals function
     1229
     12302012-05-17  Adam Domurad  <adomurad@redhat.com>
     1231
     1232        Fixed uses of == to compare String objects to .equals where
     1233        appropriate.
     1234        Noted a non-obvious use of == to compare a 'magic' String reference.
     1235        * netx/net/sourceforge/jnlp/JNLPFile.java:
     1236        Changed calls that compare String contents from == to .equals
     1237        * plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java:
     1238        Same
     1239        * plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java:
     1240        Same
     1241        * netx/net/sourceforge/jnlp/Version.java: Added comment explaining why
     1242        == was used vs .equals
     1243
     12442012-05-14  Jiri Vanek  <jvanek@redhat.com>
     1245
     1246        * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
     1247        * tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java:
     1248        System.out replaced with System.err
     1249
     12502012-05-14  Jiri Vanek  <jvanek@redhat.com>
     1251
     1252        * tests/junit-runner/JunitLikeXmlOutputListener.java: fixed indentation
     1253        and spacing
     1254
     12552012-05-11  Thomas Meyer  <thomas@m3y3r.de>
     1256
     1257        * tests/netx/unit/net/sourceforge/jnlp/util/PropertiesFileTest.java: Add
     1258        some unit tests for the PropertiesFile class
     1259        * tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java: Add
     1260        some unit tests for the CacheLRUWrapper class
     1261        * netx/net/sourceforge/jnlp/util/PropertiesFile.java: Use last
     1262        modification timestamp of the underlying file to lazy load properties.
     1263        (load): Only reload file, if the file modification timestamp has changed.
     1264        (store): Actually fsync() the file to disk.
     1265        * netx/net/sourceforge/jnlp/services/XPersistenceService.java (create):
     1266        Fix coding style
     1267        * netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java (load): Only check
     1268        data when the recently_used file was reloaded.
     1269
     12702012-05-02  Jiri Vanek  <jvanek@redhat.com>
     1271
     1272        Introduced new annotations Bug (to connect test/reproducer with documentation)
     1273        and NeedsDisplay which tells the launching engine that this particular
     1274        test needs Display. Based on ptisnovs's ideas and jtreg experiences
     1275        *Makefile.am: (JUNIT_RUNNER_JAR), (stamps/run-netx-unit-tests.stamp) and
     1276        (stamps/run-unit-test-code-coverage.stamp) are now dependent on (stamps/netx-dist-tests-compile)
     1277         and classpaths inside them have been enriched for JNLP_TESTS_ENGINE_DIR
     1278        which contains definitions of those annotations
     1279        *tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java: and
     1280        *tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java: and
     1281        *tests/jnlp_tests/simple/Spaces can be everywhere/testcase/SpacesCanBeEverywhereTests.java:
     1282         filled Bug annotations
     1283        *tests/junit-runner/JunitLikeXmlOutputListener.java: made to understand
     1284        Bug annotation
     1285        *tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/NeedsDisplay.java:
     1286        and
     1287        *tests/netx/jnlp_testsengine/net/sourceforge/jnlp/annotations/Bug.java:
     1288        annotations definitions
     1289        *tests/report-styles/jreport.xsl: made nice links from bug annotation
     1290        prepared by JunitLikeXmlOutputListener
     1291
     12922012-04-24  Omair Majid  <omajid@redhat.com>
     1293
     1294        * Makefile.am
     1295        (RUNTIME): Add resources.jar.
     1296        (stamps/run-unit-test-code-coverage.stamp) [WITH_EMMA]: Add resouces.jar
     1297        to classpath.
     1298        (stamps/run-reproducers-test-code-coverage.stamp) [WITH_EMMA]: Include
     1299        resources.jar in classpath.
     1300        (stamps/bootstrap-directory.stamp): Create a link to resources.jar in
     1301        BOOT_DIR.
     1302
     13032012-04-19  Omair Majid  <omajid@redhat.com>
     1304
     1305        PR918: java applet windows uses a low resulution black/white icon
     1306        * NEWS: Update with fix.
     1307        * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Remove windowIcon.
     1308        (initialize): Do not call loadWindowIcon.
     1309        (getWindowIcon): Remove.
     1310        (setWindowIcon): Remove.
     1311        (loadWindowIcon): Remove.
     1312        * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
     1313        (checkTopLevelWindow): Do not set the icon for all top level windows. Use
     1314        the default java icon instead.
     1315        * netx/net/sourceforge/jnlp/util/ImageResources.java: New file. Provides
     1316        access to icons.
     1317        * netx/net/sourceforge/jnlp/JNLPSplashScreen.java (JNLPSplashScreen),
     1318        * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java
     1319        (getListener),
     1320        * netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java
     1321        (AdvancedProxySettingsDialog),
     1322        * netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java (CacheViewer),
     1323        * netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java (ControlPanel),
     1324        * netx/net/sourceforge/jnlp/security/SecurityDialog.java (SecurityDialog),
     1325        * netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
     1326        (CertificateViewer),
     1327        * netx/net/sourceforge/jnlp/util/BasicExceptionDialog.java (show),
     1328        * plugin/icedteanp/java/sun/applet/JavaConsole.java (initialize):
     1329        Explicitly load icons.
     1330        * tests/netx/unit/net/sourceforge/jnlp/util/ImageResourcesTest.java: Test
     1331        for ImageResources class.
     1332
     13332012-04-18  Jiri Vanek  <jvanek@redhat.com>
     1334
     1335        Allowed signed applets in automatic reproducers tests
     1336        * tests/jnlp_tests/signed/AppletTestSigned/resources/AppletTestSigned.html:
     1337        html file for launching signed applet. Its style is different from the one for
     1338        calling unsigned applets - red.
     1339        * tests/jnlp_tests/signed/AppletTestSigned/resources/AppletTestSigned.jnlp:
     1340        jnlp file for launched signed applet
     1341        * tests/jnlp_tests/signed/AppletTestSigned/srcs/AppletTestSigned.java
     1342        body of signed applet
     1343        * tests/jnlp_tests/signed/AppletTestSigned/testcases/AppletTestSignedTests.java:
     1344        (AppletTestSignedTest): testing method to launch signed applet in javaws
     1345        (AppletTestSignedFirefoxTest): testing method to launch signed applet in
     1346        browser
     1347        * Makefile.am: PUBLIC_KEYSTORE_PASS, EXPORTED_TEST_CERT, TEST_CERT_ALIAS,
     1348        PUBLIC_KEYSTORE PUBLIC_KEYSTORE_PASS: new global variables holding
     1349        keystores' credentials
     1350        (clean-local): clean-bootstrap-directory moved to be last one, as keytool
     1351        is necessary for removing certificate
     1352        (EXPORTED_TEST_CERT): new target exporting certificate from testing keystore
     1353        (stamps/netx-dist-tests-import-cert-to-public): new target to import
     1354        certificate to PUBLIC_KEYSTORE
     1355        (netx-dist-tests-remove-cert-from-public): new target removing testing
     1356        certificate from PUBLIC_KEYSTORE
     1357        (clean-netx-dist-tests): now depends on netx-dist-tests-remove-cert-from-public
     1358        and is removing EXPORTED_TEST_CERT file
     1359
     13602012-04-17  Jiri Vanek <jvanek@redhat.com>
     1361
     1362        Rewritten DeadLockTestTest to stop failing in more then 1/2 of cases
     1363        All assassinated processes were hanging as zombies, killed forcibly by
     1364        kill -9 now.
     1365        * /tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
     1366        (countJavaInstances) now return pids of found javas.
     1367        (killDiff) new method killing zombie javas forcibly.
     1368
     13692012-04-11  Jiri Vanek  <jvanek@redhat.com>
     1370
     1371        * Makefile.am: EMMA_JAVA_ARGS, new variable for adjusting emma runs.
     1372        Currently set to -Xmx2G.
     1373        (stamps/run-unit-test-code-coverage.stamp),
     1374        (stamps/run-reproducers-test-code-coverage.stamp),
     1375        (run-test-code-coverage): Use EMMA_JAVA_ARGS in theirs emma runs.
     1376
     13772012-06-04  Jiri Vanek <jvanek@redhat.com>
     1378            Thomas Meyer <thomas@m3y3r.de>
     1379
     1380        * makefile.am: (stamps/run-netx-dist-tests.stamp) and
     1381                       (run-reproducers-test-code-coverage.stamp)
     1382        now using $(javaws) variable instead of plaintext javaws
     1383        * netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java: (checkData) new
     1384        method checking for sanity of cache entries
     1385        (load) now checks for data sanity after loading, and stores without
     1386        corrupted items if necessary
     1387        (Comparator.compare) for sorting lru items. Now redundant checking for
     1388        sanity removed
     1389        * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (getCacheFile) don't
     1390        call lruHandler.store twice for new cache entries
     1391        (getCacheFileIfExist) removed iteration and cleaning mechanism
     1392        * netx/net/sourceforge/jnlp/resources/Messages.properties: modified
     1393        cache messages
     1394        * tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java
     1395        Added test for checking corrupted path in entry and all tests adapted for
     1396        exception thrown only in debug mode
     1397
     13982012-04-04  Danesh Dadachanji <ddadacha@redhat.com>
     1399
     1400        Change the name of JarSigner to JarCertVerifier to make it more
     1401        relevant to the purpose of the file.
     1402        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     1403        * netx/net/sourceforge/jnlp/tools/KeyStoreUtil.java:
     1404        Replace all instances, paramaters and references of JarSigner
     1405        by JarCertVerifier.
     1406        * netx/net/sourceforge/jnlp/security/CertWarningPane.java
     1407        * netx/net/sourceforge/jnlp/security/CertsInfoPane.java
     1408        * netx/net/sourceforge/jnlp/security/MoreInfoPane.java
     1409        * netx/net/sourceforge/jnlp/security/SecurityDialogs.java:
     1410        Replaced all paramaters, references and variable names of JarSigner
     1411        to CertVerifier to match the variable object type.
     1412        * netx/net/sourceforge/jnlp/security/SecurityDialog.java (getJarSigner):
     1413        Renamed to getCertVerifier as it returns the certVerfier instance.
     1414        * netx/net/sourceforge/jnlp/tools/JarSigner.java:
     1415        Renamed to JarCertVerifier.
     1416        * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java:
     1417        The rename of JarSigner.
     1418
     14192012-04-05  Jiri Vanek <jvanek@redhat.com>
     1420
     1421        Fixing issue when process was not launched at all and when was killed but
     1422        left behind living/hanging, fixing mime-types
     1423        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     1424        (getContentOfStream) this method overloaded with possibility to specify
     1425        encoding (I needed to set it to ASCII in one test)
     1426        (deadlyException) field introduced in ThreadedProcess to record exception
     1427        caused by impassibility of launching the process. And so process have
     1428        been null without any sign why.
     1429        (TinyHttpdImpl) now correctly returns known mime types
     1430        (ProcessAssasin) can now skip or smoothly (and finally correctly)
     1431        destroy its process, and all his logging messages were done null-proof
     1432        (as deadlyException now allows)
     1433        Asynchronous (ContentReader) have been silenced when complaining about
     1434        closed streams by Assassin.
     1435
     14362012-04-03  Danesh Dadachanji  <ddadacha@redhat.com>
     1437
     1438        Change all vendors in JNLP test suite to IcedTea and homepage href's to
     1439        a link to IcedTea-Web's wiki page.
     1440        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedJAVAXJNLP.jnlp
     1441        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedNETSF.jnlp
     1442        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSELF.jnlp
     1443        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSUNSEC.jnlp
     1444        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1.jnlp
     1445        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1_1.jnlp
     1446        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2.jnlp
     1447        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2_1.jnlp
     1448        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar.jnlp
     1449        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar2.jnlp
     1450        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar3.jnlp
     1451        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar4.jnlp
     1452        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp
     1453        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp
     1454        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp
     1455        * tests/jnlp_tests/signed/SimpletestSigned1/resources/SimpletestSigned1.jnlp
     1456        * tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageJAVAXJNLP.jnlp
     1457        * tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageNETSF.jnlp
     1458        * tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSELF.jnlp
     1459        * tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSUNSEC.jnlp
     1460        * tests/jnlp_tests/simple/AddShutdownHook/resources/AddShutdownHook.jnlp
     1461        * tests/jnlp_tests/simple/AllStackTraces/resources/AllStackTraces.jnlp
     1462        * tests/jnlp_tests/simple/AppletTest/resources/AppletTest.jnlp
     1463        * tests/jnlp_tests/simple/CheckServices/resources/CheckServices.jnlp
     1464        * tests/jnlp_tests/simple/CreateClassLoader/resources/CreateClassLoader.jnlp
     1465        * tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleParser.jnlp
     1466        * tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleVendorParser.jnlp
     1467        * tests/jnlp_tests/simple/InformationTitleVendorParser/resources/VendorParser.jnlp
     1468        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1main2mainAppDesc.jnlp
     1469        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1main2mainNoAppDesc.jnlp
     1470        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1main2nothingNoAppDesc.jnlp
     1471        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1mainHaveAppDesc.jnlp
     1472        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1mainNoAppDesc.jnlp
     1473        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1noAppDesc.jnlp
     1474        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1noAppDescAtAll.jnlp
     1475        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingAppDesc.jnlp
     1476        * tests/jnlp_tests/simple/ManifestedJar1/resources/ManifestedJar-1nothing2nothingNoAppDesc.jnlp
     1477        * tests/jnlp_tests/simple/ReadEnvironment/resources/ReadEnvironment.jnlp
     1478        * tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties1.jnlp
     1479        * tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties2.jnlp
     1480        * tests/jnlp_tests/simple/RedirectStreams/resources/RedirectStreams.jnlp
     1481        * tests/jnlp_tests/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp
     1482        * tests/jnlp_tests/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp
     1483        * tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere1.jnlp
     1484        * tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere2.jnlp
     1485        * tests/jnlp_tests/simple/Spaces can be everywhere/resources/SpacesCanBeEverywhere1.jnlp
     1486        * tests/jnlp_tests/simple/deadlocktest/resources/deadlocktest.jnlp
     1487        * tests/jnlp_tests/simple/deadlocktest/resources/deadlocktest_1.jnlp
     1488        * tests/jnlp_tests/simple/simpletest1/resources/simpletest1.jnlp
     1489        * tests/jnlp_tests/simple/simpletest1/resources/simpletestCustomSplash.jnlp
     1490        * tests/jnlp_tests/simple/simpletest1/resources/simpletestMegaSlow.jnlp
     1491        * tests/jnlp_tests/simple/simpletest1/resources/simpletestSlow.jnlp
     1492        * tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowBrokenCustomSplash.jnlp
     1493        * tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowSlowCustomSplash.jnlp
     1494        * tests/jnlp_tests/simple/simpletest2/resources/simpletest2.jnlp:
     1495        Replaced the specified vendor with IcedTea and homepage with a link to
     1496        IcedTea-Web's wiki.
     1497
     14982012-04-03  Omair Majid  <omajid@redhat.com>
     1499
     1500        * netx/net/sourceforge/jnlp/runtime/pac-funcs.js: Replace incorrect use of
     1501        getYear() with getFullYear().
     1502        (inYearMonthDateRange): Add missing conditional case.
     1503        * tests/netx/pac/pac-funcs-test.js
     1504        (runTest): New function.
     1505        (runTests): Call runTest.
     1506        (incDate): Deal with month/year wrapping around.
     1507        (decDate): Removed.
     1508        (testDateRange, testDateRange2, testDateRange3): Handle wrapping of month
     1509        and days.
     1510
     15112012-04-03  Jiri Vanek <jvanek@redhat.com>
     1512
     1513        Tests virtual server thread marked as daemon by default
     1514        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     1515        All (ServerLauncher) instances returned by methods were marked as daemon
     1516        by default. Possibility to change and api were kept.
     1517
     15182012-03-30  Danesh Dadachanji  <ddadacha@redhat.com>
     1519
     1520        Certificate start dates are not being checked, they are still verified
     1521        even if the date has yet not been reached.
     1522        * netx/net/sourceforge/jnlp/tools/JarSigner.java (verifyJar): If the start
     1523        date is in the future, set notYetValidCert to true.
     1524
     15252012-03-21  Omair Majid  <omajid@redhat.com>
     1526
     1527        * tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java
     1528        (testIsMatchDoesNotHangOnLargeData): New method.
     1529
     15302012-03-21  Lars Herschke  <lhersch@dssgmbh.de>
     1531
     1532        PR898: signed applications with big jnlp-file doesn't start
     1533        * netx/net/sourceforge/jnlp/JNLPMatcher.java (JNLPMatcher): Handle large
     1534        files correctly.
     1535
     15362012-03-19  Danesh Dadachanji  <ddadacha@redhat.com>
     1537
     1538        Fix failing unit test missing title/vendor tags in the JNLP stream.
     1539        * tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java
     1540        (testNestedComments): Added title and vendor tags to malformedJnlp.
     1541
     15422012-03-19  Jiri Vanek <jvanek@redhat.com>
     1543        * tests/jnlp_tests/signed/CacheReproducer/testcases/CacheReproducerTest.java:
     1544         as javaws have now integrated splash, I have changed this test to lunch
     1545         javaws -Xclearcache with -headless to skip this logo (although it is
     1546        not fatal fr testrun itself)
     1547        * tests/jnlp_tests/simple/AppletTest/resources/appletAutoTests.html:
     1548         this html file is lunched during tests run in browser and stdout of
     1549         lunched applet is examined. Is lunched with slow resources to test
     1550         spalshscreen
     1551        * tests/jnlp_tests/simple/AppletTest/resources/appletViewTest.html: this
     1552        test html file is dedicated to manual lunch and let user to look how the
     1553         applet (with slow loading) is  loaded and how looks splashscreen in
     1554         small mode and in large mode
     1555        * tests/jnlp_tests/simple/AppletTest/testcases/AppletTestTests.java:
     1556         test is enriched for lunching the html file with applet in browser and
     1557         is examining output of this file. Browser must be always terminated as
     1558         there is no way how to close from inside
     1559        * tests/jnlp_tests/simple/simpletest1/resources/netxPlugin.png:
     1560         image to let user observe that user-defined splashscreen is still
     1561         working even when internal splashscreen is enabled
     1562        * tests/jnlp_tests/simple/simpletest1/resources/simpletestCustomSplash.jnlp:
     1563         this and all jnlp files below are just for manual lunching and for
     1564         watching various lunches of splash screen - slow loading of resources
     1565         and with custom splash
     1566        * tests/jnlp_tests/simple/simpletest1/resources/simpletestMegaSlow.jnlp:
     1567        slow loading of resource and (XslowX)jnlp also
     1568        * tests/jnlp_tests/simple/simpletest1/resources/simpletestSlow.jnlp:
     1569         slow loading of resource
     1570        * tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowBrokenCustomSplash.jnlp:
     1571         slow loading of resource with broken user's splash (our internal will be used)
     1572        * tests/jnlp_tests/simple/simpletest1/resources/simpletestSlowSlowCustomSplash.jnlp:
     1573         slow loading of custom splash screen and resource
     1574        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     1575         Main server launcher was modified to support lunching of browser,
     1576         stdout listteners and for slowing download of resources to provide time
     1577         for watching splash screen (main) was rewritten to provide free port OR
     1578         run server in-D specified directory on custom or default port - very
     1579         useful for debuging reproducers
     1580         (getIndependentInstance) can now run also on specified port and (or) directory
     1581         (USED_BROWSER_COMMAND) new constant handling value of -D property to
     1582        set browser = "used.browser.command";
     1583         (getBrowserLocation) new method  to provide specified
     1584        (by used.browser.command -D property) or default browser location (firefox)
     1585         (ensureServer) test is testing weather XslowXmodifier is working
     1586         (executeBrowser) set of overloaded functions to lunch browser
     1587         (TinyHttpdImpl) was enriched for XslowX modifier. When resource starts
     1588         with this, is returned slowly - splited to 10 parts with 1s delay
     1589         betwen sending each of them.
     1590         Although it is throwing BrokenPipe exception, is working fine.
     1591         (splitArray) new function to split array of byte to n arrays of bytes,
     1592         which when concated do the same array
     1593         (splitArrayTestN) set of tests for splitArray
     1594         (ContentReader) now can also have lsteners for catching outputs n runtime.
     1595        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ContentReaderListener.java:
     1596        Listener for catching chars and lines form processes outputs
     1597        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
     1598        added (testListeners) to test listeners behaviour
     1599
     16002012-03-16  Danesh Dadachanji  <ddadacha@redhat.com>
     1601
     1602        Applications using JNLP files without a title or vendor section
     1603        still run, despite them being required elements.
     1604        * netx/net/sourceforge/jnlp/Parser.java:
     1605        (getInformationDesc): If title or vendor are not found in info,
     1606        a new ParseException is thrown.
     1607        * netx/net/sourceforge/jnlp/resources/Messages.properties:
     1608        Added PNoTitleElement and PNoVendorElement
     1609        * tests/jnlp_tests/simple/InformationTitleVendorParser/resources/InformationParser.jnlp,
     1610        * tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleParser.jnlp,
     1611        * tests/jnlp_tests/simple/InformationTitleVendorParser/resources/TitleVendorParser.jnlp,
     1612        * tests/jnlp_tests/simple/InformationTitleVendorParser/resources/VendorParser.jnlp,
     1613        * tests/jnlp_tests/simple/InformationTitleVendorParser/testcases/TitleVendorParserTest.java:
     1614        New test that runs JNLPs in a combination of missing information, title
     1615        and vendor tags, checking for the appropriate exceptions.
     1616
     16172012-03-14  Deepak Bhole <dbhole@redhat.com>
     1618                        Omair Majid <omajid@redhat.com>
     1619
     1620        PR895: IcedTea-Web searches for missing classes on each loadClass or
     1621        findClass
     1622        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     1623        (CodeBaseClassLoader): Added new map to track resources that are not
     1624        found.
     1625        (findClass): If resource was not found before, return immediately. If
     1626        resource was not found for the first time, record it in the new map.
     1627        (findResouces): Same.
     1628        (findResource): Same.
     1629        * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java:
     1630        Test case for PR895 from Omair Majid.
     1631
     16322012-03-14  Omair Majid  <omajid@redhat.com>
     1633
     1634        Print exceptions to terminal when running in gui mode too.
     1635        * netx/net/sourceforge/jnlp/AbstractLaunchHandler.java: New file.
     1636        * netx/net/sourceforge/jnlp/DefaultLaunchHandler.java: Extend
     1637        AbstractLaunchHandler.
     1638        (DefaultLaunchHandler): New method.
     1639        (printMessage): Moved to parent class.
     1640        * netx/net/sourceforge/jnlp/GuiLaunchHandler.java: Extend
     1641        AbstractLaunchHandler.
     1642        (GuiLauchHandler): New method.
     1643        (launchError): Print the error too.
     1644        (launchWarning,validationError): Call parent's printMessage.
     1645        * netx/net/sourceforge/jnlp/LaunchException.java: Use standard java
     1646        exception chaining. This removes compatibility with pre-java 1.3 class
     1647        libraries.
     1648        (LaunchException(JNLPFile,Exception,String,String,String,String)): Pass
     1649        cause to parent so exceptions are chanined properly.
     1650        (LaunchException(String,Throwable),LaunchException(Throwable)): Call
     1651        parent's constructor.
     1652        (printStackTrace(PrintStream),printStackTrace(PrintWriter),getCause):
     1653        Removed. Use parent's implementation instead.
     1654        (getCauses): Removed.
     1655        * netx/net/sourceforge/jnlp/LaunchHandler.java
     1656        (validationError): Rename argument to clarify meaing.
     1657        * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
     1658        (initialize): Redirect output of all handlers to System.err.
     1659        * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
     1660        (PluginAppletSecurityContext): Likewise.
     1661        * tests/netx/unit/net/sourceforge/jnlp/DefaultLaunchHandlerTest.java,
     1662        * tests/netx/unit/net/sourceforge/jnlp/LaunchExceptionTest.java: New
     1663        file. Contains tests.
     1664
     16652012-03-12  Danesh Dadachanji  <ddadacha@redhat.com>
     1666
     1667        Adding test for regression of JNLP API accessibility in constructor
     1668        methods of applets.
     1669        * Makefile.am: Added classes.jar to classpath when compiling jnlp_tests.
     1670        * tests/jnlp_tests/simple/CheckServices/resources/CheckServices.jnlp:
     1671        * tests/jnlp_tests/simple/CheckServices/srcs/CheckServices.java:
     1672        * tests/jnlp_tests/simple/CheckServices/testcases/CheckServicesTests.java:
     1673        New test file added. Tests ServiceManager is setup correctly when called
     1674        from applet constructors.
     1675
     16762012-03-12  Danesh Dadachanji  <ddadacha@redhat.com>
     1677
     1678        Update tests that are missing title/vendor tag in their JNLPs.
     1679        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1.jnlp,
     1680        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer1_1.jnlp,
     1681        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2.jnlp,
     1682        * tests/jnlp_tests/signed/CacheReproducer/resources/CacheReproducer2_1.jnlp,
     1683        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar.jnlp,
     1684        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar2.jnlp,
     1685        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar3.jnlp,
     1686        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar4.jnlp,
     1687        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp,
     1688        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp,
     1689        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp,
     1690        * tests/jnlp_tests/simple/AddShutdownHook/resources/AddShutdownHook.jnlp,
     1691        * tests/jnlp_tests/simple/AllStackTraces/resources/AllStackTraces.jnlp
     1692        * tests/jnlp_tests/simple/CreateClassLoader/resources/CreateClassLoader.jnlp,
     1693        * tests/jnlp_tests/simple/ReadEnvironment/resources/ReadEnvironment.jnlp,
     1694        * tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties1.jnlp,
     1695        * tests/jnlp_tests/simple/ReadProperties/resources/ReadProperties2.jnlp,
     1696        * tests/jnlp_tests/simple/RedirectStreams/resources/RedirectStreams.jnlp,
     1697        * tests/jnlp_tests/simple/ReplaceSecurityManager/resources/ReplaceSecurityManager.jnlp,
     1698        * tests/jnlp_tests/simple/SetContextClassLoader/resources/SetContextClassLoader.jnlp,
     1699        * tests/netx/unit/net/sourceforge/jnlp/templates/template8.jnlp:
     1700        Added missing title/vendor tags that make them fail with this changeset.
     1701
     17022012-03-05  Jiri Vanek <jvanek@redhat.com>
     1703
     1704        Added test for main-class in manifest for jnlp
     1705        * Makefile.am: (prepare-reproducers.stamp) fixed manifest handling. Till
     1706        now was manifest copied as any other non java file, and so was rewritten
     1707        by jar tool
     1708        * tests/jnlp_tests/simple/ManifestedJar2/srcs: secondary jar file which
     1709        should have manifest and so should help ManifestedJar1 with testing
     1710        * tests/jnlp_tests/simple/ManifestedJar2/resources/META-INF/MANIFEST.MF:
     1711         manifest for  ManifestedJar2.jar
     1712        * tests/jnlp_tests/simple/ManifestedJar1/srcs: main testing jar
     1713        * tests/jnlp_tests/simple/ManifestedJar2/resources/META-INF/MANIFEST.MF:
     1714         manifest for  ManifestedJar1.jar
     1715        * tests/jnlp_tests/simple/ManifestedJar1/testcases/ManifestedJar1Test.java:
     1716         testing class for this reproducers
     1717        * tests/jnlp_tests/simple/ManifestedJar1/resources/: nine reproducers jnlps
     1718
     17192012-03-06  Jiri Vanek <jvanek@redhat.com>
     1720
     1721        Improved reflection test:
     1722        * tests/jnlp_tests/simple/AccessClassInPackage/testcases/AccessClassInPackageTest.java:
     1723        This testcase was extended for three more unsigned reflection tries and four signed
     1724        *tests/jnlp_tests/simple/AccessClassInPackage/srcs/AccessClassInPackage.java:
     1725        now accepting class to be findByName as argument. Four new jnlp files in
     1726        signed a four in simple are then passing  those argument
     1727        *tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSUNSEC.jnlp:
     1728        *tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageNETSF.jnlp:
     1729        *tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageJAVAXJNLP.jnlp:
     1730        *tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackageSELF.jnlp:
     1731        *tests/jnlp_tests/simple/AccessClassInPackage/resources/AccessClassInPackage.jnlp:
     1732        removed
     1733        * tests/jnlp_tests/signed/AccessClassInPackageSigned/srcs/AccessClassInPackageSigned.java
     1734        signed variation of AccessClassInPackage, tescase is also in AccessClassInPackage
     1735        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSELF.jnlp
     1736        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedNETSF.jnlp
     1737        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedSUNSEC.jnlp
     1738        * tests/jnlp_tests/signed/AccessClassInPackageSigned/resources/AccessClassInPackageSignedJAVAXJNLP.jnlp
     1739
     17402012-02-29  Deepak Bhole <dbhole@redhat.com>
     1741
     1742        * configure.ac: Bumped version to 1.3pre
     1743
     17442012-02-29  Deepak Bhole <dbhole@redhat.com>
     1745
     1746        * netx/net/sourceforge/jnlp/security/CertificateUtils.java
     1747        (inKeyStores): Only check for certificate equality.
     1748
     17492012-02-28  Deepak Bhole <dbhole@redhat.com>
     1750
     1751        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     1752        (checkForMain): Also check manifest file of main jar.
     1753        (getMainClassName): New method. Looks in a jar manifest to see if there is
     1754        a Main-Class specified.
     1755
     17562012-02-28  Deepak Bhole <dbhole@redhat.com>
     1757
     1758        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
     1759        (_eval): Return 0 id to Java side if eval fails.
     1760        (_call): Return 0 id to Java side if call fails.
     1761
     17622012-02-27  Matthias Klose  <doko@ubuntu.com>
     1763
     1764        * acinclude.m4 (IT_CHECK_PLUGIN_DEPENDENCIES): Use the mozilla-plugin
     1765         pkgconfig module if the libxul module is not available.
     1766
     17672012-02-27  Matthias Klose  <doko@ubuntu.com>
     1768
     1769        * acinclude.m4 (IT_FIND_JAVA): Set VERSION_DEFS.
     1770        * Makefile.am ($(PLUGIN_DIR)/%.o): Pass $(VERSION_DEFS)
     1771        * IcedTeaNPPlugin.cc (PLUGIN_MIME_DESC): Define in terms
     1772        of HAVE_JAVA7.
     1773
     17742012-02-27  Thomas Meyer <thomas@m3y3r.de>
     1775                        Deepak Bhole <dbhole@redhat.com>
     1776
     1777        PR820: IcedTea-Web 1.1.3 crashing Firefox when loading Citrix XenApp
     1778        * plugin/icedteanp/IcedTeaJavaRequestProcessor.cc
     1779        (createJavaObjectFromVariant): If variant is a generic object array,
     1780        create a JSObject on Java side instead of JSObject array.
     1781        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
     1782        (newMessageOnBus): Run finalize on main thread.
     1783        (eval): Create Java object in _eval
     1784        (call): Create Java object in _call.
     1785        (setMember): Create Java object in _setMember.
     1786        (sendMember): Create Java object in _getMember.
     1787        (sendString): Create Java object in _getString.
     1788        (_setMember): Process result and create Java object if needed.
     1789        (_getMember): Same.
     1790        (_eval): Same.
     1791        (_call): Same.
     1792        (_getString): Same.
     1793
     17942012-02-22  Danesh Dadachanji  <ddadacha@redhat.com>
     1795
     1796        Add ability to check for jnlp_href use outside of PluginBridge.
     1797        * netx/net/sourceforge/jnlp/PluginBridge.java
     1798        (PluginBridge): New boolean useJNLPHref is set if jnlp_href is used.
     1799        (useJNLPHref): New getter method, returns boolean useJNLPHref.
     1800
     18012012-02-10  Danesh Dadachanji  <ddadacha@redhat.com>
     1802
     1803        Fix path to NEW_LINE_IFS for when one builds outside of src directory.
     1804        * Makefile.am: Use top src directory instead of top build directory
     1805        for NEW_LINE_IFS
     1806
     18072012-02-06  Danesh Dadachanji  <ddadacha@redhat.com>
     1808
     1809        Fixed regression in running webstart applets from JNLP files.
     1810        * netx/net/sourceforge/jnlp/Launcher.java (createApplet): Added call to
     1811        set applet variable in the AppletInstance's AppletEnvironment.
     1812        * netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java
     1813        (setApplet): New method, set AppletEnvironment's applet variable only once.
     1814
     18152012-02-02  Danesh Dadachanji  <ddadacha@redhat.com>
     1816
     1817        * netx/net/sourceforge/jnlp/LaunchException.java: Fix message
     1818        to handle null description
     1819
     18202012-02-01  Danesh Dadachanji  <ddadacha@redhat.com>
     1821
     1822        * netx/net/sourceforge/jnlp/LaunchException.java: Add description
     1823        parameter to the message the exception stores.
     1824
     18252012-02-01 Jiri Vanek<jvanek@redhat.com>
     1826
     1827        Fix for PR844
     1828        * netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java: (getLRUSortedEntries)
     1829        instead of error throwing own LRU exception. Also catches more then
     1830        NumberFormatException
     1831        (clearLRUSortedEntries) new method - making soft clearing of cache public
     1832        (clearCache) now return true if cache was cleared, false otherwise
     1833        (or exception)
     1834        * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (getCacheFileIfExist)
     1835        does three tires to load cache. If ifrst fails, then recently_used file
     1836        is emptied both in memory and on disc. When second attemmpt fails, then
     1837        LRU cache is forcibly cleared. if clearing fails, then error is thrown.
     1838        If it pass, then one more try to load entries is allowed. When third
     1839        attempt fails, then error is  thrown.
     1840        * /netx/net/sourceforge/jnlp/cache/LruCacheException.java:
     1841        new file, for purpose of catching this particular exception
     1842        * netx/net/sourceforge/jnlp/util/PropertiesFile.java: (store) tries to
     1843        mkdirs to its path. It is better then to fail when no cache directory exists.
     1844        * tests/jnlp_tests/signed/CacheReproducer: new  reproducr trying severals
     1845        way of corupted cache on several types of jnlp files. Is signed because
     1846        of reflection used.
     1847        * tests/jnlp_tests/signed/SimpletestSigned1: signed hello world to be
     1848        used in  CacheReproducer tests.
     1849        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     1850        timeout for processes doubled, as clear cache methods sometimes took
     1851        more then original allowed.
     1852
     18532012-01-27  Deepak Bhole <dbhole@redhat.com>
     1854
     1855        PR852: Classloader not being flushed after last applet from a site is closed
     1856        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Added variable
     1857        to count usage for a given ClassLoader instance.
     1858        (getInstance): Decrement use count for a loader after it is merged with
     1859        another. Increment loader use count before returning.
     1860        (incrementLoaderUseCount): New method. Increments loader use count.
     1861        (decrementLoaderUseCount): New method. Decrements loader use count.
     1862        * java/sun/applet/PluginAppletViewer.java (appletClose): Decrement loader
     1863        use count when applet is closed.
     1864
     18652012-01-25  Jiri Vanek  <jvanek@redhat.com>
     1866
     1867        Added test for -Xnofork option and for applet launching by jnlp
     1868        * tests/jnlp_tests/simple/deadlocktest/resources/deadlocktest_1.jnlp: new file
     1869        By specifying new max heap size, should invoke jvm to fork when launched
     1870        * tests/jnlp_tests/simple/deadlocktest/srcs/DeadlockTest.java:
     1871        improved indentation, added debug output that main method was lunched
     1872        * tests/jnlp_tests/simple/deadlocktest/testcases/DeadLockTestTest.java:
     1873        small refactoring, add lunching  of deadlocktest_1.jnlp with and
     1874        without -Xnofork, and counting java instances during runtime
     1875        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java
     1876        (ThreadedProcess.run) fixed situation, when process ended, but not all
     1877        the output was read by its stdout/stderr readers
     1878        (ContentReader.run) enabled exception printing to stderr.
     1879        * tests/jnlp_tests/simple/AppletTest/ : test for loading applets by jnlp file
     1880
     18812012-01-06  Danesh Dadachanji  <ddadacha@redhat.com>
     1882
     1883        Use the JNLP file's information section for the Name and
     1884        Publisher labels of access dialogs, if available.
     1885        * netx/net/sourceforge/jnlp/PluginBridge.java:
     1886        (PluginBridge): Assigned info variable to JNLP file's information
     1887        section (if one is used), otherwise to a new, empty ArrayList.
     1888        (getInformation): Removed method, superclass method
     1889        should be used instead.
     1890        * netx/net/sourceforge/jnlp/resources/Messages.properties:
     1891        Adding SUnverified.
     1892        * a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java:
     1893        (addComponents): Append unverified note to the publisher label.
     1894
     18952012-01-09  Deepak Bhole <dbhole@redhat.com>
     1896
     1897        PR838: IcedTea plugin crashes with chrome browser when javascript is executed
     1898        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc (eval): Added a check
     1899        to ensure that the result pointer is valid before attempting to create an
     1900        NPVariant from it.
     1901
     19022012-01-05  Omair Majid <omajid@redhat.com>
     1903
     1904        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     1905        (initializeResources): Only throw exceptions about the main class not
     1906        being found when the jnlp file can have a main class.
     1907        (addToCodeBaseLoader): Dont try to process null URLs.
     1908
     19092011-12-15  Jiri Vanek  <jvanek@redhat.com>
     1910
     1911        * configure.ac: added search for xsltproc program and setting
     1912        WITH_XSLTPROC variable
     1913        * Makefile.am: xsltproc result is no longer ignored, command
     1914        itself is in conditional block
     1915
     19162011-12-22  Thomas Meyer <thomas@m3y3r.de>
     1917
     1918        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc(sendMember): Use
     1919        correct response parameter when returning array member vs member itself.
     1920
     19212011-12-21  Thomas Meyer <thomas@m3y3r.de>
     1922
     1923        RH586194: Unable to connect to connect with Juniper VPN client
     1924        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc(sendMember): Use
     1925        createJavaObjectFromVariant to create the resulting object on Java side,
     1926        rather than always creating a JSObject.
     1927
     19282011-12-21  Jiri Vanek  <jvanek@redhat.com>
     1929
     1930        * acinclude.m4: added definition of IT_CHECK_XULRUNNER_API_VERSION,
     1931        which tries to compile small program against new xulrunner api
     1932        * configure.ac: added call of IT_CHECK_XULRUNNER_API_VERSION
     1933        * plugin/icedteanp/IcedTeaNPPlugin.cc: (NP_GetMIMEDescription)
     1934        return type set-up by dependency on defined LEGACY_XULRUNNERAPI.
     1935         This one is set by IT_CHECK_XULRUNNER_API_VERSION during configure.
     1936        if defined, then old char* is used. New const char* is used otherwise.
     1937
     19382011-12-19  Danesh Dadachanji <ddadacha@redhat.com>
     1939
     1940        Fix for BasicService being used in applet constructors but not
     1941        having access to ApplicationInstance variable.
     1942        * netx/net/sourceforge/jnlp/Launcher.java:
     1943        (createApplet): Moved applet initialization below loader.setApplication,
     1944        appletInstance is now initialized with applet param as null.
     1945        * netx/net/sourceforge/jnlp/runtime/AppletInstance.java:
     1946        (setApplet): New method, allows setting of AppletInstance's applet
     1947        only once.
     1948
     19492011-12-16  Deepak Bhole <dbhole@redhat.com>
     1950
     1951        Patch from Thomas Meyer <thomas@m3y3r.de>
     1952        * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: Fixed function name
     1953        in comment for sendMember.
     1954
     19552011-12-08  Omair Majid  <omajid@redhat.com>
     1956
     1957        * netx/net/sourceforge/jnlp/Launcher.java
     1958        (launchApplication): Print arguments being passed to the application's
     1959        main method in debug mode.
     1960
     19612011-12-05  Danesh Dadachanji <ddadacha@redhat.com>
     1962
     1963        Update UI for AccessWarningPane
     1964        * netx/net/sourceforge/jnlp/security/AccessWarningPane.java:
     1965        Use question.png instead of warning.png for access dialogs.
     1966
     19672011-11-28 Jiri Vanek <jvanek@redhat.com>
     1968
     1969        Added code-coverage generation targets
     1970        * configure.ac: added search for optional emma.jar
     1971        * makefile.am: added UNIT_CLASS_NAMES and REPRODUCERS_CLASS_NAMES variables
     1972        to store tests clases for reuse in emmarun. Both also moved to separate target
     1973        (run-netx-unit-tests): made dependent on reused stamped version
     1974        (run-netx-dist-tests): made dependent on reused stamped version
     1975        (stamps/run-netx-dist-tests): stamped rusable version of run-netx-dist-tests
     1976        (run-unit-test-code-coverage) targets to generate report from unit-tests.
     1977         Result binary and xml file and html report in tests.build/netx/unit
     1978        (run-reproducers-test-code-coverage) targets to generate report from
     1979         reproducers-test. Result binary file, xml and html report in
     1980         tests.build/netx/jnlp_testsengine
     1981        (run-test-code-coverage): merges binary results from unit and reproducers
     1982        (clean-unit-test-code-coverage) conditionaly removes html,xml report
     1983         and es and ec files from tests.build/netx/unit
     1984        (clean-reproducers-test-code-coverage) condtionlay removes html and xml
     1985         report and es file from tests.build/netx/jnlp_testsengine
     1986        (clean-test-code-coverage) conditionlay removes merged html, xml es and em
     1987        files from tests.build
     1988        (clean-netx-tests) now depends also on clean-test-code-coverage
     1989
     19902011-11-11  Jiri Vanek  <jvanek@redhat.com>
     1991
     1992        Added reproducer for PR804 and PR8011
     1993        * tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere1.jnlp:
     1994        new jnlp file with space in name and with jar in resources which name does not contain
     1995        spaces
     1996        * tests/jnlp_tests/simple/Spaces can be everywhere/resources/Spaces can be everywhere2.jnlp:
     1997        new jnlp file with space in name and with jar in resources which name contains spaces
     1998        * tests/jnlp_tests/simple/Spaces can be everywhere/resources/SpacesCanBeEverywhere1.jnlp:
     1999        jnlp file without space in name but with jar in resources which name contains spaces
     2000        * tests/jnlp_tests/simple/Spaces can be everywhere/srcs/SpacesCanBeEverywhere.java:
     2001        new file containig simple main method of "Spaces can be everywhere.jar" jar
     2002        * tests/jnlp_tests/simple/Spaces can be everywhere/testcases/SpacesCanBeEverywhereTests.java
     2003        testcase for this reproducer. It is lunching  each of this jnlp once locally from filesystem and
     2004        once remotely from server. Please note that except it's own jar, this reproducer is also
     2005        using simpletest1.jar
     2006
     20072011-11-11  Jiri Vanek  <jvanek@redhat.com>
     2008
     2009        Fixed reproducers engine to handle spaces in files and in urls
     2010        * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp)
     2011        (stamps/netx-dist-tests-sign-some-reproducers.stamp)
     2012        (stamps/netx-dist-tests-compile-testcases.stamp):
     2013        added call to NEW_LINE_IFS to use line breake temporarily as parameter
     2014        separator while loading files from list and correct quoting
     2015        * NEW_LINE_IFS: new file, small separate script used in makefile as inline script
     2016        which backup original IFS variable and then set it to pure new line. It is in
     2017        separate file because it is reused and I do not know another way how to save a new
     2018        line variable in makefile. Restore to original vlaue is handled in Makefile
     2019        *tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
     2020        (testResourcesExists) filename is encoded to correct URL before requested from server
     2021        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     2022        "-headless" string extracted to variable HEADLES_OPTION
     2023        (executeProcess) and (ThreadedProcess) enhanced for variable dir to specify working
     2024        directory. Backward compatibility kept
     2025        (TinyHttpdImpl) now expects url on requests, so all requests are now decoded by
     2026        java.net.URLDecoder
     2027
     20282011-11-10  Jiri Vanek <jvanek at redhat.com>
     2029       
     2030        Added tests which covers corner cases or rhino support function dateRange
     2031        Enabled testWeekdayRange test
     2032        * tests/netx/pac/pac-funcs-test.js: (testWeekdayRange) - added mising
     2033        runTests call
     2034        (incDate) (decDate) (monthToStr) moved level up from function scope
     2035        to be shareable
     2036        (testDateRange2) new method, tests last days of months.
     2037        (testDateRange3) new method, tests first days of months
     2038        * netx/net/sourceforge/jnlp/runtime/pac-funcs.js:
     2039        (dateRange) logic of this method moved to isDateInRange. This one now serve
     2040        just as api using current date
     2041        (isDateInRange) logic of dateRange, can calculate ranges against any date
     2042
     20432011-10-31  Omair Majid  <omajid@redhat.com>
     2044
     2045        PR808: javaws is unable to start when missing jars are enumerated before
     2046        main jar
     2047        * NEWS: Update.
     2048        * netx/net/sourceforge/jnlp/tools/JarSigner.java (verifyJars): Continue
     2049        with other jars if the first jar can't be used.
     2050
     20512011-10-28  Deepak Bhole <dbhole@redhat.com>
     2052
     2053        RH742515, CVE-2011-3377: IcedTea-Web: second-level domain subdomains and
     2054        suffix domain SOP bypass
     2055        * NEWS: Updated
     2056        * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
     2057        (checkPermission): Remove special case for SocketPermission.
     2058
     20592011-10-27  Deepak Bhole <dbhole@redhat.com>
     2060
     2061        PR778: Jar download and server certificate verification deadlock
     2062        * ChangeLog: Removed extra whitespace from previous entries
     2063        * NEWS: Updated
     2064        * netx/net/sourceforge/jnlp/GuiLaunchHandler.java (launchInitialized):
     2065        Moved as much code as possible out of the invokeLater block.
     2066
     20672011-10-25  Omair Majid  <omajid@redhat.com>
     2068
     2069        PR804: javaws launcher incorrectly handles file names with spaces
     2070        * NEWS: Update.
     2071        * launcher/javaws.in: Use bash arrays to store arguments to handle
     2072        filenames with spaces correctly.
     2073
     20742011-10-24  Jiri Vanek <jvanek@redhat.com> 
     2075
     2076        Added reproducer for - PR788: Elluminate Live! is not working
     2077        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar.jnlp
     2078        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar2.jnlp
     2079        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar3.jnlp
     2080        * tests/jnlp_tests/signed/MissingJar/resources/MissingJar4.jnlp
     2081        four testcases's jnlp files. Differs by order and by used resoure tags
     2082        * tests/jnlp_tests/signed/MissingJar/srcs/MissingJar.java
     2083        very simple main jar, just printing message when initialized
     2084        * tests/jnlp_tests/signed/MissingJar/testcases/MissingJarTest.java
     2085        testing file of reproducer, launchiing above four jnlp files, each in individual test
     2086
     20872011-10-17  Jiri Vanek <jvanek@redhat.com>
     2088
     2089        PR564: NetX depends on sun.misc.BASE64Encoder
     2090        * configure.ac: removed IT564 comment, removed check for sun.misc.BASE64Encoder
     2091        * netx/net/sourceforge/jnlp/security/CertificateUtils.java : sun.misc.BASE64Encoder;
     2092        replaced (just changed import) by internal implementation from
     2093        net.sourceforge.jnlp.util.replacements.BASE64Encoder;
     2094        * netx/net/sourceforge/jnlp/util/replacements/BASE64Encoder.java:
     2095        * netx/net/sourceforge/jnlp/util/replacements/CharacterEncoder.java:
     2096        New files, internal implementation of BASE64Encoder,  copied from OpenJDK
     2097        * tests/netx/unit/net/sourceforge/jnlp/util/replacements/BASE64EncoderTest.java
     2098        New file, to test internal base64encoder implementation
     2099
     2100
     21012011-10-03  Jiri Vanek <jvanek@redhat.com>
     2102
     2103        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp
     2104        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/srcs/ReadPropertiesBySignedHack.java
     2105        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java
     2106        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp
     2107        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp
     2108        * tests/jnlp_tests/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java
     2109        * tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java
     2110        Direcory signed was somehow missing from my commit from 2011-09-22.
     2111        Now it  have been added with all its original files
     2112
     21132011-09-29  Omair Majid  <omajid@redhat.com>
     2114
     2115        PR618: Can't install OpenDJ, JavaWebStart fails with Input stream is null
     2116        error.
     2117        * NEWS: Update.
     2118        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     2119        (getResource): Rename to ...
     2120        (findResource): New method.
     2121        (findResources): If resource can not be found, search in lazy resources.
     2122        (findResourcesBySearching): New method.
     2123
     21242011-09-28  Omair Majid  <omajid@redhat.com>
     2125
     2126        * netx/net/sourceforge/jnlp/AppletDesc.java (getMainClass): Clarify the
     2127        return value in javadoc.
     2128        * netx/net/sourceforge/jnlp/Launcher.java
     2129        (createApplet, createAppletObject): Do not replace '/' with '.'.
     2130        * netx/net/sourceforge/jnlp/PluginBridge.java (PluginBridge): Ensure that
     2131        the class name is in the dot-separated from.
     2132        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     2133        (checkForMain): Ensure that the name is an exact match.
     2134
     21352011-09-28  Deepak Bhole <dbhole@redhat.com>
     2136
     2137        PR794: IcedTea-Web does not work if a Web Start app jar has a Class-Path
     2138        element in the manifest.
     2139        * netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java
     2140        (retrieve): Blank out the Class-Path elements in manifest.
     2141        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     2142        (activateJars): Only load Class-Path elements if this is an applet.
     2143        (addNewJar): Add the right permissions for the cached jar file and verify
     2144        signatures.
     2145
     21462011-09-26  Lars Herschke  <lhersch@dssgmbh.de>
     2147
     2148        * netx/net/sourceforge/jnlp/resources/Messages.properties: Add
     2149        CVExportPasswordMessage, CVImportPasswordMessage and
     2150        CVPasswordTitle.
     2151        * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize):
     2152        Initialize SSLContext with the user's client certificates.
     2153        * netx/net/sourceforge/jnlp/security/CertificateUtils.java
     2154        (addPKCS12ToKeyStore, addPKCS12ToKeyStore, dumpPKCS12): New methods.
     2155        * netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java
     2156        (getPasswords): New method.
     2157        (ImportButtonListener.actionPerformed): Import client certificates
     2158        in PKCS12 format.
     2159        (ExportButtonListener.actionPerformed): Export client certificates
     2160        in PKCS12 format.
     2161
     21622011-09-23  Omair Majid  <omajid@redhat.com>
     2163
     2164        RH738814: Access denied at ssl handshake
     2165        * netx/net/sourceforge/jnlp/security/SecurityDialogs.java
     2166        (showCertWarningDialog): Add a javadoc comment.
     2167        * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
     2168        (askUser): Wrap the call to showCertWarningDialog in a doPrivileged
     2169        block.
     2170
     21712011-09-22  Omair Majid  <omajid@redhat.com>
     2172
     2173        PR788: Elluminate Live! is not working
     2174        * NEWS: Update.
     2175        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
     2176        (checkForMain): If localFile is null (JAR couldn't be downloaded), try to
     2177        continue, rather than allowing the exception to cause an abort.
     2178
     21792011-09-21  Omair Majid  <omajid@redhat.com>
     2180
     2181        PR766: javaws fails to parse an <argument> node that contains CDATA
     2182        * netx/net/sourceforge/nanoxml/XMLElement.java
     2183        (sanitizeInput): Do not remove CDATA sections along with comments.
     2184
     21852011-09-20  Omair Majid  <omajid@redhat.com>
     2186
     2187        * tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java
     2188        (testCdata, testCdataNested, testCDataFirstChild, testCDataSecondChild)
     2189        (testCommentInElements2, testDoubleDashesInComments): New methods
     2190        * tests/netx/unit/net/sourceforge/jnlp/application/application0.jnlp,
     2191        * tests/netx/unit/net/sourceforge/jnlp/templates/template0.jnlp:
     2192        Change <!CDATA[ to <![CDATA[.
     2193
     21942011-09-22  Lars Herschke  <lhersch@dssgmbh.de>
     2195
     2196        PR789: typo in jrunscript.sh
     2197        * jrunscript.in: Use = instead of ==.
     2198
     21992011-09-22  Jiri Vanek <jvanek@redhat.com>
     2200
     2201        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/resources/ReadPropertiesBySignedHack.jnlp:
     2202        jnlp file to lunch ReadPropertiesBySignedHack, notice please dependenci
     2203        on ReadProperties.jar from simple reproducers
     2204        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/srcs/ReadPropertiesBySignedHack.java:
     2205        this reproducers verify, that even reflection-by enabled
     2206        XtrustAll will not allow to lunch unsigned code
     2207        * tests/jnlp_tests/signed/ReadPropertiesBySignedHack/testcases/ReadPropertiesBySignedHackTest.java:
     2208        testcase for this reproducer
     2209
     22102011-09-22  Jiri Vanek <jvanek@redhat.com>
     2211
     2212        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned1.jnlp:
     2213        * tests/jnlp_tests/signed/ReadPropertiesSigned/resources/ReadPropertiesSigned2.jnlp:
     2214        * tests/jnlp_tests/signed/ReadPropertiesSigned/testcases/ReadPropertiesSignedTest.java:
     2215        * tests/jnlp_tests/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java:
     2216        those four files are  example of signed reproducer
     2217        * tests/jnlp_tests/simple/ReadProperties/srcs/ReadProperties.java: now prints out got
     2218        variable for comparsion with above created signed example
     2219
     22202011-09-22  Jiri Vanek <jvanek@redhat.com>
     2221
     2222        Added signed reproducers engine
     2223        * Makefile.am: added variable KEYSTORE_NAME
     2224        (stamps/junit-jnlp-dist-dirs): creates stamp and depend on next two targets
     2225        (junit-jnlp-dist-simple.txt): creates list of simple reproducers, extracted
     2226         from stamps/junit-jnlp-dist-dirs
     2227        (junit-jnlp-dist-signed.txt): creates list of signed reproducers
     2228        (stamps/netx-dist-tests-prepare-reproducers.stamp): now traverse over
     2229        signed and simple
     2230        (stamps/netx-dist-tests-sign-some-reproducers.stamp): depends
     2231        on netx-dist-tests-prepare-reproducers, traverse through signed
     2232        reproducers and sign them
     2233        (stamps/netx-dist-tests-compile-testcases.stamp): now traverse over
     2234        signed and simple
     2235        (stamps/bootstrap-directory.stamp): creates symlinks/stubs to
     2236        jarsigner and keytool
     2237        (clean-netx-dist-tests):remove new stamps, signed and simple list and keysstore
     2238        * acinclude.m4: declared to proceed IT_FIND_KEYTOOL and IT_FIND_JARSIGNER macro
     2239        * configure.ac: declared macros to check for keytool and jarsigner
     2240        * tests/jnlp_tests/README: mentioned signed directory
     2241
     22422011-09-22  Jiri Vanek <jvanek@redhat.com>
     2243
     2244        * netx/net/sourceforge/jnlp/runtime/Boot.java: (main): added logic to
     2245        handle -Xtrustall option
     2246        * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: declared private static boolean
     2247        trustAll=false; with public getter and pkg.private  setter
     2248        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (checkTrustWithUser): modified,
     2249        when XtrustAll declared, then user is not asked and certificate is trusted
     2250        * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java:  (askUser): modified,
     2251        when XtrustAll declared, then user is not asked and certificate is trusted
     2252
     22532011-09-15  Jiri Vanek <jvanek@redhat.com>
     2254
     2255        * tests/jnlp_tests/: all current reproducers (AccessClassInPackage
     2256        AddShutdownHook AllStackTraces CreateClassLoader deadlocktest
     2257        ReadEnvironment ReadProperties RedirectStreams ReplaceSecurityManager
     2258        SetContextClassLoader simpletest1 simpletest2) junit's asserts are enchanted
     2259        for reason, so junit assertion exception message is much clearer.
     2260
     22612011-09-13  Deepak Bhole <dbhole@redhat.com>
     2262
     2263        PR782: Support building against npapi-sdk as well
     2264        Patch from Michał Górny < mgorny at gentoo dot org >
     2265        * acinclude.m4: Build against npapi-sdk.
     2266
     22672011-09-13  Deepak Bhole <dbhole@redhat.com>
     2268
     2269        * ChangeLog: Fixed formatting issues in previous entry.
     2270
     22712011-09-01 Jiri Vanek<jvanek@redhat.com>
     2272
     2273        Added functionality to allow icedtea web to be buildable with
     2274        rhel5 libraries.
     2275        * configure.ac: added IT_CHECK_GLIB_VERSION check.
     2276        * acinclude.m4: added IT_CHECK_GLIB_VERSION definition block to test.
     2277        version of glib installed and add LEGACY_GLIB define macro into
     2278         variable DEFS if version is <2.16.
     2279        * plugin/icedteanp/IcedTeaNPPlugin.cc: added replacements for incompatible
     2280        functions (g_strcmp0 and find_first_item_in_hash_table)if LEGACY_GLIB
     2281        is defined. Added define sections for use this function instead of glib ones.
     2282        Duplicated code moved into function getFirstInTableInstance(GHashTble* table).
     2283        * Makefile.am: ($(PLUGIN_DIR)/%.o): using DEFS setted by configure for compilation
    52284
    622852011-08-29  Deepak Bhole <dbhole@redhat.com>
     
    242303        (checkServerTrusted): Account for a null hostname that the
    252304        overloaded implementation may pass.
     2305
     23062011-08-23  Omair Majid  <omajid@redhat.com>
     2307
     2308        * configure.ac: Add check for new non-standard classes
     2309        sun.net.www.protocol.jar.URLJarFile and
     2310        sun.net.www.protocol.jar.URLJarFileCallBack.
    262311
    2723122011-08-23  Omair Majid  <omajid@redhat.com>
     
    342319        JRE.
    352320
     23212011-08-22  Saad Mohammad  <smohammad@redhat.com>
     2322        * netx/net/sourceforge/jnlp/JNLPFile.java:
     2323        (parse): After the file has been parsed, it calls
     2324        checkForSpecialProperties() to check if the resources contain any special
     2325        properties.
     2326        (checkForSpecialProperties): Scans through resources and checks if it
     2327        contains any special properties.
     2328        (requiresSignedJNLPWarning): Returns a boolean after determining if a signed
     2329        JNLP warning should be displayed.
     2330        (setSignedJNLPAsMissing): Informs JNLPFile that a signed JNLP file is
     2331        missing in the main jar.
     2332        * netx/net/sourceforge/jnlp/SecurityDesc.java:
     2333        (getJnlpRIAPermissions): Returns all the names of the basic JNLP system
     2334        properties accessible by RIAs.
     2335        * netx/net/sourceforge/jnlp/resources/Messages.properties:
     2336        Added LSignedJNLPFileDidNotMatch and SJNLPFileIsNotSigned.
     2337        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
     2338        (initializeResources): Locates the jar file that contains the main class
     2339        and verifies if a signed JNLP file is also located in that jar. This also
     2340        checks 'lazy' jars if the the main class was not found in 'eager' jars.
     2341        If the main jar was not found, a LaunchException is thrown which terminates
     2342        the launch of the application.
     2343        (checkForMain): A method that goes through each jar and checks to see
     2344        if it has the main class. If the main class is found, it calls
     2345        verifySignedJNLP() to verify if a valid signed JNLP file is also found in
     2346        the jar.
     2347        (verifySignedJNLP): A method that checks if the jar file contains a valid
     2348        signed JNLP file.
     2349        (closeStream): Closes a stream.
     2350        (loadClassExt): Added a try/catch block when addNextResource() is called.
     2351        (addNextResource): If the main jar has not been found, checkForMain() is
     2352        called to check if the jar contains the main class, and verifies if a signed
     2353        JNLP file is also located.
     2354        * netx/net/sourceforge/jnlp/security/MoreInfoPane.java:
     2355        (addComponents): Displays the signed JNLP warning message if necessary.
     2356        * netx/net/sourceforge/jnlp/security/SecurityDialog.java:
     2357        (SecurityDialog): Stores the value of whether a signed JNLP warning should
     2358        be displayed.
     2359        (showMoreInfoDialog): Passes in the associated JNLP file when creating a
     2360        SecurityDialog object.
     2361        (requiresSignedJNLPWarning): Returns a boolean after determining if a signed
     2362        JNLP warning should be displayed.
     2363
     23642011-08-17  Danesh Dadachanji <ddadacha@redhat.com>
     2365
     2366        Update UI for SecurityDialog
     2367        * netx/net/sourceforge/jnlp/resources/question.png: New icon added.
     2368        * netx/net/sourceforge/jnlp/security/CertWarningPane.java:
     2369        (addComponents): When certs are verified, question.png is used as the icon
     2370        and SAlwaysTrustPublisher is automatically selected.
     2371        * netx/net/sourceforge/jnlp/security/SecurityDialog.java:
     2372        (initDialog): Changed the title of a CERT_WARNING dialog.
     2373
     23742011-08-17  Danesh Dadachanji <ddadacha@redhat.com>
     2375
     2376        AUTHORS: Adding myself and Denis Lila. Removing the extra email from
     2377        Andrew Hughes.
     2378
     23792011-08-11  Danesh Dadachanji <ddadacha@redhat.com>
     2380
     2381        PR742: IcedTea-Web checks certs only upto 1 level deep before declaring
     2382        them untrusted.
     2383        * NEWS: Updated.
     2384        * netx/net/sourceforge/jnlp/tools/JarSigner.java:
     2385        (checkTrustedCerts): All certs along certPath are now checked for trust.
     2386
     23872011-08-09  Deepak Bhole <dbhole@redhat.com>
     2388
     2389        PR771: IcedTea-Web certificate verification code does not use the right
     2390        API
     2391        * netx/net/sourceforge/jnlp/security/CertificateUtils.java
     2392        (inKeyStores): Use Certificate.verify to correctly verify a certificate
     2393        against a public key in the store.
     2394
     23952011-08-09  Saad Mohammad  <smohammad@redhat.com>
     2396
     2397        PR765: JNLP file with all resource jars marked as 'lazy' fails to validate
     2398        signature and stops the launch of application
     2399        * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
     2400        (initializeResources): Initializes the first jar file if all resources
     2401        are marked as lazy jars
     2402
     24032011-08-03  Saad Mohammad  <smohammad@redhat.com>
     2404
     2405        * netx/net/sourceforge/jnlp/JNLPMatcher.java:
     2406          (JNLPMatcher): Removed NullPointerException from being thrown, caught and
     2407          then thrown again via JNLPMatcherException. This was replaced by throwing
     2408          a checked exception [JNLPMatcherException] directly.
     2409          (JNLPMatcher): Removed unused code [getters]
     2410          (JNLPMatcher): Closed Input/Output streams that were opened.
     2411          (isMatch): Removed caching of return value
     2412          (closeInputStream): Added this method to close input streams
     2413          (closeOutputStream): Added this method to close output streams
     2414        * netx/net/sourceforge/jnlp/Node.java:
     2415          Removed getAttributeNames() method from the commented section
     2416
    3624172011-08-03  Deepak Bhole <dbhole@redhat.com>
    372418
     
    402421        cert hashtable only if the entry is expected to be signed.
    412422
     24232011-08-02 Jiri Vanek <jvanek@redhat.com>
     2424
     2425        *Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp):
     2426        now are compiled files correctly compiled from directory structure.
     2427        Also not java files are copied with expected directory structure and
     2428        jarred together with classes.
     2429
     24302011-07-26  Jiri Vanek <jvanek@redhat.com>
     2431
     2432        *tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java: String
     2433         containing "localhost"  have been declared as final constant.
     2434        (SERVER_NAME) have been  moved instant Server instance so each server can
     2435         have it name without affecting others
     2436        (getUrl()) added -  can return URL of server singleton. Implementation of
     2437         this method is inside server, so each server can return its own useful URL.
     2438        (saveFile()) is now public.
     2439        Added identification for ThreadedProcess based on commandlineArgs and its
     2440         run is now slowed by Thread.sleep
     2441        (ServerLuncher) inner class is now public (it was bug to not be as we have
     2442         getIndependentInstance of it method ) and renamed to ServerLauncher
     2443        Enchanted wrapping of executeProcess
     2444
     2445
    4224462011-07-21  Deepak Bhole <dbhole@redhat.com>
    432447
    442448        PR749: sun.applet.PluginStreamHandler#handleMessage(String) really slow
    45         Patch from: Ricardo Martín Camarero (Ricky) <rickyepoderi at yahoo dot es>
     2449        Original patch from: Ricardo Martín Camarero <rickyepoderi at yahoo dot es>
    462450        * plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
    472451        (readPair): New function.
     
    492453        than using String.split().
    502454
    51 2011-07-20  Deepak Bhole <dbhole@redhat.com>
    52 
    53         * configure.ac: Prepare for 1.1.2
    54         * NEWS: Same
    55 
    56 2011-07-15  Deepak Bhole <dbhole@redhat.com>
    57 
    58         * configure.ac: Prepare to release 1.1.1
    59         * NEWS: Same
     24552011-07-19  Saad Mohammad  <smohammad@redhat.com>
     2456
     2457        * netx/net/sourceforge/jnlp/JNLPMatcher.java:
     2458          Created this class to compare signed JNLP file with the launching 
     2459          JNLP file. When comparing, it has support for both method of signing
     2460          of a JNLP file: APPLICATION_TEMPLATE.JNLP and APPLICATION.JNLP.
     2461        * netx/net/sourceforge/jnlp/JNLPMatcherException.java:
     2462          Added a custom exception: JNLPMatcherException. Thrown if verifying
     2463          signed JNLP files fails.
     2464        * netx/net/sourceforge/jnlp/Node.java:
     2465          Created a method that retrieves the attribute names of the Node and
     2466          stores it in private string [] member. The method returns the
     2467          attribute names.
     2468        * tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java:
     2469          This is a test case that tests the functionality of JNLPMatcher.
     2470          It tests the algorithm with a variety of template and application
     2471          JNLP files.
     2472        * tests/netx/unit/net/sourceforge/jnlp/launchApp.jnlp:
     2473          Launching JNLP file: This is the launching JNLP file used to compare
     2474          with templates and application JNLP files in JNLPMatcherTest.java
     2475        * tests/netx/unit/net/sourceforge/jnlp/templates/template0.jnlp:
     2476          Test Template JNLP file: Contains CDATA.
     2477        * tests/netx/unit/net/sourceforge/jnlp/templates/template1.jnlp:
     2478          Test Template JNLP file: An exact duplicate of the launching
     2479          JNLP file.
     2480        * tests/netx/unit/net/sourceforge/jnlp/templates/template2.jnlp:
     2481          Test Template JNLP file: Contains wildchars as attribute/element
     2482          values.
     2483        * tests/netx/unit/net/sourceforge/jnlp/templates/template3.jnlp:
     2484          Test Template JNLP file: Different order of elements/attributes
     2485          (same value)
     2486        * tests/netx/unit/net/sourceforge/jnlp/templates/template4.jnlp:
     2487          Test Template JNLP file: Contains wildchars as values of ALL elements
     2488          and attribute.
     2489        * tests/netx/unit/net/sourceforge/jnlp/templates/template5.jnlp:
     2490          Test Template JNLP file: Contains comments.
     2491        * tests/netx/unit/net/sourceforge/jnlp/templates/template6.jnlp:
     2492          Test Template JNLP file: Contains different attribute and element
     2493          values.
     2494        * tests/netx/unit/net/sourceforge/jnlp/templates/template7.jnlp:
     2495          Test Template JNLP file: Contains additional children in element.
     2496        * tests/netx/unit/net/sourceforge/jnlp/templates/template8.jnlp:
     2497          Test Template JNLP file: Contains fewer children in element.
     2498        * tests/netx/unit/net/sourceforge/jnlp/templates/template9.jnlp:
     2499          Test Template JNLP file: All values are different from the launching
     2500          JNLP file.
     2501        * tests/netx/unit/net/sourceforge/jnlp/application/application0.jnlp:
     2502          Test Application JNLP file: Contains CDATA.
     2503        * tests/netx/unit/net/sourceforge/jnlp/application/application1.jnlp:
     2504          Test Application JNLP file: An exact duplicate of the launching
     2505          JNLP file.
     2506        * tests/netx/unit/net/sourceforge/jnlp/application/application2.jnlp:
     2507          Test Application JNLP file: Different order of element/attributes
     2508          (same value).
     2509        * tests/netx/unit/net/sourceforge/jnlp/application/application3.jnlp:
     2510          Test Application JNLP file: Contains comments.
     2511        * tests/netx/unit/net/sourceforge/jnlp/application/application4.jnlp:
     2512          Test Application JNLP file: Contains wildchars as attribute/element
     2513          values.
     2514        * tests/netx/unit/net/sourceforge/jnlp/application/application5.jnlp:
     2515          Test Application JNLP file: Contains a different attribute (codebase)
     2516          value.
     2517        * tests/netx/unit/net/sourceforge/jnlp/application/application6.jnlp:
     2518          Test Application JNLP file: Contains additional children in element.
     2519        * tests/netx/unit/net/sourceforge/jnlp/application/application7.jnlp:
     2520          Test Application JNLP file: Contains fewer children in element.
     2521        * tests/netx/unit/net/sourceforge/jnlp/application/application8.jnlp:
     2522          Test Application JNLP file: All values are different from the
     2523          launching JNLP file.
     2524        * Makefile.am:
     2525          (run-netx-unit-tests): Copies resources(non java files) to test.build
     2526          before running the unit tests.
     2527
     25282011-06-22 Jiri Vanek <jvanek@redhat.com>
     2529
     2530        * tests/report-styles/jreport.xsl: part with classes statistics is now collapsable
     2531
     25322011-06-21 Jiri Vanek <jvanek@redhat.com>
     2533
     2534        *tests/jnlp_tests/simple: AccessClassInPackage, ReplaceSecurityManager,
     2535        AddShutdownHook, ReadEnvironment,  SetContextClassLoader,
     2536        AllStackTraces,  ReadProperties, CreateClassLoader, RedirectStreams tests
     2537
     25382011-06-21 Jiri Vanek <jvanek@redhat.com>
     2539
     2540        *Makefile.am: (run-netx-dist-tests): no depends on copying of styles
     2541        (clean-netx-dist-tests): depends also on removing of styles
     2542
     25432011-06-17 Jiri Vanek <jvanek@redhat.com>
     2544
     2545        * tests/jnlp_tests: directory for reproducers
     2546        * tests/jnlp_tests/advanced: reproducers which must care about
     2547         deploying and compiling thmselves
     2548        * tests/jnlp_tests/simple: reproducers compiled, jared and deployed
     2549        automatically
     2550        * tests/jnlp_tests/simple/name/srcs|testcases|resources/: sourcefiles,
     2551        resources and testaces for simple reproducers
     2552        * tests/jnlp_tests/simple/deadlocktest: test for tracing not-killable
     2553        javaws
     2554        * tests/jnlp_tests/simple/simpletest1: tutorial test
     2555        * tests/jnlp_tests/simple/simpletest2: tutorial test with exception
     2556        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java:
     2557        tests for server basic functionality
     2558        * tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java:
     2559        implementation of server to produce jnlps and resources. Implementation
     2560        of helpers to run javaws process.
     2561        *Makefile.am: new variables pointing to structure above;
     2562        (junit-jnlp-dist-dirs.txt): prepare destination directory structure
     2563        (stamps/netx-dist-tests-prepare-reproducers.stamp):compile tescascases of simple reproducers
     2564        (netx-dist-tests-source-files.txt): lookup for server and helping classes
     2565        (stamps/netx-dist-tests-compile.stamp): compile server and helping classes
     2566        (stamps/netx-dist-tests-compile-testcases.stamp): compile, jar and deploy all simple testcases and their resources
     2567        (run-netx-dist-tests): after make install run junit testsuite upon reproducers on virtual server
     2568        (clean-netx-tests): added dependence on  clean-netx-dist-tests
     2569        (clean-netx-dist-tests): deleting  of reproducers
     2570
     25712011-06-16 Jiri Vanek <jvanek@redhat.com>
     2572
     2573        * tests/report-styles/index.js: fast navigation functions
     2574        * tests/report-styles/report.css: styles for transformed result
     2575        * tests/report-styles/jreport.xsl: template for human-readable
     2576        xml->html transformation.
     2577        * Makefile.am: New variable for report-styles directory;
     2578        ($(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)): goal for copying styles and   
     2579        javascripts; (run-netx-unit-tests): added nonfaling xsltproc
     2580        transformation of sheet and unit-tests' xml report to index_unit.html;
     2581        (clean-netx-unit-tests): now depends also on clean_tests_reports;
     2582        (clean_tests_reports): new goal to remove report styles directory and
     2583        indexs html files.
    602584
    6125852011-07-14  Omair Majid  <omajid@redhat.com>
     
    972621        addComponents): Changed to a layout that will resize itself.
    982622
    99 2011-06-08  Deepak Bhole <dbhole@redhat.com>
    100 
    101         * configure.ac: Prepare for 1.1.1
    102         * NEWS: Same
    103 
    104 2011-06-08  Deepak Bhole <dbhole@redhat.com>
    105 
    106         * configure.ac: Update for release.
    107         * NEWS: Update for release.
    108 
    109 2011-06-08  Deepak Bhole <dbhole@redhat.com>
    110 
    111         * NEWS: Remove security update notes from NEWS as they are not "New"
     26232011-06-10  Denis Lila  <dlila@redhat.com>
     2624
     2625        * netx/net/sourceforge/jnlp/GuiLaunchHandler.java:
     2626        (mutex): New mutex for synchronizing splashScreen.
     2627        (closeSplashScreen): New method to hide and dispose
     2628        splashScreen.
     2629        (launchStarting): Call closeSplashScreen instead of doing it
     2630        inline.
     2631        (launchInitialized): Sync splashScreen creation.
     2632        (validationError, launchError): Call closeSplashScreen.
     2633
     26342011-06-10  Denis Lila  <dlila@redhat.com>
     2635
     2636        * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java:
     2637        (frameMutex): New mutex to synchronize accesses to "frame".
     2638        (getListener): Make almost all of it synchronized on frameMutex.
     2639        (disposeListener): Sync hider's body around frameMutex and call
     2640        dispose on the frame so that the awt threads die when they should.
     2641        (addProgressPanel): Sync "frame" usage.
     2642
     26432011-06-08  Saad Mohammad  <smohammad@redhat.com>
     2644
     2645        * AUTHORS: Updated
     2646        * netx/net/sourceforge/jnlp/services/ServiceUtil.java
     2647        (checkAccess): Moved the process of checking if the application is a trusted
     2648        application to a new method called isSigned().
     2649        * netx/net/sourceforge/jnlp/services/XPersistenceService.java
     2650        (checkLocation): Allows trusted application to have access to
     2651        PersistenceService data from different hosts. It uses ServiceUtil.isSigned()
     2652        to determine if the current application is a trusted application.
     2653
     26542011-06-08  Andrew Su  <asu@redhat.com>
     2655
     2656        * NEWS: Updated.
     2657        * netx/net/sourceforge/jnlp/JNLPFile.java:
     2658        (JNLPFile): Calls new constructor.
     2659        (JNLPFile): New constructor to take an option for forcing a codebase.
     2660        (JNLPFile): Call parse with extra parameter.
     2661        (parse): Use the given codebase passed in if we did not find one.
     2662        * netx/net/sourceforge/jnlp/Parser.java:
     2663        (Parser): Calls new constructor.
     2664        (Parser): New constructor which takes in a codebase as a last option.
     2665        * netx/net/sourceforge/jnlp/PluginBridge.java:
     2666        (PluginBridge): Calls new JNLPFile's constructor with current codebase
     2667
     26682011-06-08  Andrew Su  <asu@redhat.com>
     2669
     2670        * netx/net/sourceforge/jnlp/PluginBridge.java:
     2671        (jars): Changed to use HashSet instead of String[].
     2672        (PluginBridge): Updated to work with HashSet instead of String[]
     2673        (getResources): Likewise.
    1122674
    11326752011-06-08  Deepak Bhole <dbhole@redhat.com>
     
    1592721        _createAndRetainJavaObject.
    1602722
     27232011-05-31  Omair Majid  <omajid@redhat.com>
     2724
     2725        * netx/net/sourceforge/jnlp/JNLPSplashScreen.java: Subclass JDialog, not
     2726        JFrame.
     2727
     27282011-05-30  Andrew Su  <asu@redhat.com>
     2729
     2730        * netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java:
     2731        (addComponent): Add check to see if specified cache directory is
     2732        writable.
     2733
    16127342011-05-30  Andrew Su  <asu@redhat.com>
    1622735
     
    2302803        (lock): Removed creation of file here.
    2312804
     28052011-05-17 Jiri Vanek <jvanek@redhat.com>
     2806
     2807        * tests/junit-runner/JunitLikeXmlOutputListener: This listener exports
     2808        results of junit in xml which "follows junit-output schema". Extended
     2809        for date, duration and some statististics for future purpose
     2810        * Makefile.am (run-netx-unit-tests): backuping stdout/stderr of tests
     2811        * tests/junit-runner/CommandLine.java: registered
     2812        JunitLikeXmlOutputListener
     2813
    23228142011-05-10  Andrew Su  <asu@redhat.com>
    2332815
     
    2352817        (addComponents):Created a new comparator for sorting by file size and
    2362818        date.
     2819
     28202011-05-09  Jiri Vanek  <jvanek@redhat.com>
     2821        * tests/junit-runner/CommandLine.java:r added skipping of inner
     2822        classes and one jnlp file from sources package.
     2823
     28242011-05-03  Denis Lila  <dlila@redhat.com>
     2825
     2826        * netx/net/sourceforge/jnlp/NetxPanel.java:
     2827        Add imports.
     2828        (uKeyToTG): Change to HashMap.
     2829        (TGMapMutex): New mutex to synchronize uKeyToTG.
     2830        (getThreadGroup): Synchronize on TGMapMutex.
     2831        (NetxPanel): Only create a new thread group if one doesn't already
     2832        exist for the computed uKey.
    2372833
    23828342011-05-02  Deepak Bhole <dbhole@redhat.com>
     
    2432839        invokeAndWait.
    2442840        (appletSystemExit): Exit the VM when called.
     2841
     28422011-04-28  Denis Lila  <dlila@redhat.com>
     2843
     2844        * netx/net/sourceforge/jnlp/NetxPanel.java:
     2845        Remove unused import; add imports.
     2846        (uKey, uKeyToTG, appContextCreated): New members.
     2847        (getThreadGroup, createNewAppContext): New methods.
     2848        (runLoader): Pass uKey to PluginBridge's constructor.
     2849        (run): Remove. No longer needed.
     2850        (NetxPanel): Initialize uKey. If it is a new key, make a new thread
     2851        group for it and save it in the hash map.
     2852        (createAppletThread): Use getFutureTG instead of creating a thread
     2853        group on the spot.
     2854        * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:
     2855        (createPanel): Initialize and frame the panel in a separate thread.
     2856        * netx/net/sourceforge/jnlp/Launcher.java:
     2857        Remove unused import.
     2858        (createApplet, createApplication, createThreadGroup): Replace
     2859        AppThreadGroup with ThreadGroup. Remove all calls to setApplication.
     2860        * netx/net/sourceforge/jnlp/PluginBridge.java:
     2861        (PluginBridge): Remove the uniqueKey initialization logic. Set
     2862        uniqueKey to the uKey parameter.
     2863        * netx/net/sourceforge/jnlp/runtime/AppThreadGroup.java:
     2864        Remove file.
    2452865
    24628662011-04-28  Omair Majid  <omajid@redhat.com>
     
    2552875        (launcher.build/itweb-settings): Replace with...
    2562876        (launcher.build/$(itweb-settings)): New target.
     2877
     28782011-04-21  Deepak Bhole <dbhole@redhat.com>
     2879
     2880        * configure.ac: Bumped version to 1.2pre
    2572881
    25828822011-04-21  Deepak Bhole <dbhole@redhat.com>
  • branches/vendor/sourceforge/icedtea-web/current/Makefile.am

    r348 r416  
    11# Source directories
    22
    3 NETX_DIR = $(abs_top_builddir)/netx.build
    4 NETX_SRCDIR = $(abs_top_srcdir)/netx
    5 NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
    6 NETX_EXTRA_DIR=$(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
    7 NETX_EXTRA_DIST_DIR=$(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
    8 
    9 TESTS_SRCDIR=$(abs_top_srcdir)/tests
    10 TESTS_DIR=$(abs_top_builddir)/tests.build
    11 
    12 NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit
    13 NETX_UNIT_TEST_DIR=$(TESTS_DIR)/netx/unit
    14 
    15 JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner
    16 JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner
    17 
    18 JUNIT_RUNNER_JAR=$(abs_top_builddir)/junit-runner.jar
     3export NETX_DIR = $(abs_top_builddir)/netx.build
     4export NETX_SRCDIR = $(abs_top_srcdir)/netx
     5export NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
     6export NETX_EXTRA_DIR=$(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
     7export NETX_EXTRA_DIST_DIR=$(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
     8
     9export REPORT_STYLES_DIRNAME=report-styles
     10
     11export TESTS_SRCDIR=$(abs_top_srcdir)/tests
     12export TESTS_DIR=$(abs_top_builddir)/tests.build
     13
     14export NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit
     15export NETX_UNIT_TEST_DIR=$(TESTS_DIR)/netx/unit
     16
     17export JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner
     18export JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner
     19
     20
     21export JNLP_TESTS_ENGINE_SRCDIR=$(TESTS_SRCDIR)/test-extensions
     22export JNLP_TESTS_ENGINE_TESTS_SRCDIR=$(TESTS_SRCDIR)/test-extensions-tests
     23export JNLP_TESTS_SRCDIR=$(TESTS_SRCDIR)/reproducers
     24export JNLP_TESTS_ENGINE_DIR=$(TESTS_DIR)/jnlp_testsengine
     25export JNLP_TESTS_ENGINE_TESTS_DIR=$(TESTS_DIR)/netx/jnlp_testsengine_tests
     26export JNLP_TESTS_SERVER_DEPLOYDIR=$(TESTS_DIR)/jnlp_test_server
     27export JNLP_TESTS_DIR=$(TESTS_DIR)/jnlp_tests
     28export PRIVATE_KEYSTORE_NAME=teststore.ks
     29export PRIVATE_KEYSTORE_PASS=123456789
     30export EXPORTED_TEST_CERT_PREFIX=icedteatests
     31export EXPORTED_TEST_CERT_SUFFIX=crt
     32export TEST_CERT_ALIAS=icedteaweb
     33export PUBLIC_KEYSTORE=${HOME}/.icedtea/security/trusted.certs
     34export PUBLIC_KEYSTORE_PASS=changeit
     35
     36export JUNIT_RUNNER_JAR=$(abs_top_builddir)/junit-runner.jar
     37export UNIT_CLASS_NAMES = $(abs_top_builddir)/unit_class_names
     38export REPRODUCERS_CLASS_NAMES = $(abs_top_builddir)/reproducers_class_names
     39export REPRODUCERS_CLASS_WHITELIST = $(abs_top_srcdir)/netx-dist-tests-whitelist
     40export EMMA_JAVA_ARGS=-Xmx2G
     41export EMMA_MODIFIED_FILES=tests-output.xml ServerAccess-logs.xml stdout.log stderr.log all.log
     42export EMMA_BACKUP_SUFFIX=_noEmma
     43export EMMA_SUFFIX=_withEmma
     44export META_MANIFEST = META-INF/MANIFEST.MF
     45export SIGNED_REPRODUCERS=signed
     46export SIMPLE_REPRODUCERS=simple
     47export CUSTOM_REPRODUCERS=custom
     48export ALL_NONCUSTOM_REPRODUCERS=$(SIMPLE_REPRODUCERS) $(SIGNED_REPRODUCERS)
     49export ALL_REPRODUCERS=$(ALL_NONCUSTOM_REPRODUCERS) $(CUSTOM_REPRODUCERS)
     50
     51
     52# linking variables
     53export PLUGIN_LINK_NAME=libjavaplugin.so
     54export MOZILLA_LOCAL_PLUGINDIR=${HOME}/.mozilla/plugins
     55export MOZILLA_GLOBAL64_PLUGINDIR=/usr/lib64/mozilla/plugins
     56export MOZILLA_GLOBAL32_PLUGINDIR=/usr/lib/mozilla/plugins
     57export OPERA_GLOBAL64_PLUGINDIR=/usr/lib64/opera/plugins
     58export OPERA_GLOBAL32_PLUGINDIR=/usr/lib/opera/plugins
     59export BUILT_PLUGIN_LIBRARY=IcedTeaPlugin.so
     60export MOZILLA_LOCAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origU
     61export MOZILLA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origMG
     62export OPERA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origOG
     63export MOZILLA_FAMILY_TEST= "$(FIREFOX)" != "" -o "$(CHROMIUM)" != "" -o "$(CHROME)" != "" -o "$(MIDORI)" != "" -o "$(EPIPHANY)" != ""
     64# end of linking variables
    1965
    2066# Build directories
    2167
    22 BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
     68export BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
    2369
    2470if WITH_RHINO
     
    2874endif
    2975
    30 RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME)
     76export RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME):$(BOOT_DIR)/jre/lib/resources.jar
    3177
    3278# Flags
    33 IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
    34 IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
    35 IT_LANGUAGE_SOURCE_VERSION=6
    36 IT_CLASS_TARGET_VERSION=6
    37 IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
     79export IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
     80export IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
     81export IT_LANGUAGE_SOURCE_VERSION=6
     82export IT_CLASS_TARGET_VERSION=6
     83export IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
    3884
    3985#
     
    4490#  - we want full privileges
    4591#
    46 LAUNCHER_BOOTCLASSPATH="-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
    47 PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
     92export LAUNCHER_BOOTCLASSPATH="-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
     93export PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
    4894
    4995# Fake update version to work with the Deployment Toolkit script used by Oracle
    5096# http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
    51 JDK_UPDATE_VERSION=50
     97export JDK_UPDATE_VERSION=50
    5298
    5399# Sources list
    54100
    55 PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
    56 
    57 NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
     101export PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
     102
     103export NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
    58104        net.sourceforge.jnlp.cache net.sourceforge.jnlp.config \
    59105        net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \
     
    64110# Conditional defintions
    65111if ENABLE_PLUGIN
    66 ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
    67 LIVECONNECT_DIR = netscape sun/applet
    68 PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp
    69 PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp
    70 LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
    71 ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp
    72 PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
     112export ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
     113export LIVECONNECT_DIR = netscape sun/applet
     114export PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp
     115export PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp
     116export LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
     117export ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) stamps/liveconnect-dist.stamp
     118export PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
    73119endif
    74120
     
    92138
    93139if WITH_RHINO
    94   RHINO_TESTS=check-pac-functions
     140  RHINO_TESTS=stamps/check-pac-functions.stamp
    95141else
    96142  RHINO_TESTS=
     
    98144
    99145if WITH_JUNIT
    100   JUNIT_TESTS=run-netx-unit-tests
     146  JUNIT_TESTS=stamps/run-netx-unit-tests.stamp
    101147else
    102148  JUNIT_TESTS=
     
    104150
    105151
    106 PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
    107 
    108 EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
     152export PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
     153
     154export EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
    109155 itweb-settings.desktop.in $(top_srcdir)/tests
     156
     157# reproducers `D`shortcuts
     158export DTEST_SERVER=-Dtest.server.dir=$(JNLP_TESTS_SERVER_DEPLOYDIR)
     159export DJAVAWS_BUILD=-Djavaws.build.bin=$(DESTDIR)$(bindir)/$(javaws)
     160export DBROWSERS=-Dused.browsers=$(FIREFOX):$(CHROMIUM):$(CHROME):$(OPERA):$(MIDORI):$(EPIPHANY)
     161export REPRODUCERS_DPARAMETERS= $(DTEST_SERVER) $(DJAVAWS_BUILD) $(DBROWSERS) $(BROWSER_TESTS_MODIFICATION)
     162# end of `D`shortcuts
     163
     164#exported autoconf copies
     165export EXPORTED_JAVAC=$(BOOT_DIR)/bin/javac
     166#end of exported autoconf copies
    110167
    111168# binary names
     
    130187check-local: $(RHINO_TESTS) $(JUNIT_TESTS)
    131188
    132 clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \
    133  clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests
     189clean-local: clean-netx clean-plugin clean-liveconnect clean-extra \
     190 clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests clean-bootstrap-directory
    134191        if [ -e stamps ] ; then \
    135192          rmdir stamps ; \
     
    138195.PHONY: clean-IcedTeaPlugin clean-add-netx clean-add-netx-debug clean-add-plugin clean-add-plugin-debug \
    139196 clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs \
    140  clean-tests check-local clean-launchers check-pac-functions run-netx-unit-tests clean-netx-tests \
     197 clean-tests check-local clean-launchers stamps/check-pac-functions.stamp stamps/run-netx-unit-tests.stamp clean-netx-tests \
    141198 clean-junit-runner clean-netx-unit-tests
    142199
     
    144201        ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir)
    145202if ENABLE_PLUGIN
    146         ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir)
     203        ${INSTALL_PROGRAM} $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) $(DESTDIR)$(libdir)
    147204        ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
    148205endif
     
    173230
    174231uninstall-local:
    175         rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so
     232        rm -f $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
    176233        rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
    177234        rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
     
    203260        cd $(PLUGIN_DIR) && \
    204261        $(CXX) $(CXXFLAGS) \
     262           $(DEFS) $(VERSION_DEFS) \
    205263          -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
    206264          -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
     
    215273          -fPIC -o $@ -c $<
    216274
    217 $(PLUGIN_DIR)/IcedTeaPlugin.so: $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
     275$(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
    218276        cd $(PLUGIN_DIR) && \
    219277        $(CXX) $(CXXFLAGS) \
     
    226284clean-IcedTeaPlugin:
    227285        rm -f $(PLUGIN_DIR)/*.o
    228         rm -f $(PLUGIN_DIR)/IcedTeaPlugin.so
     286        rm -f $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY)
    229287        if [ $(abs_top_srcdir) != $(abs_top_builddir) ]; then \
    230288          if [ -e $(abs_top_builddir)/plugin/icedteanp ] ; then \
     
    432490        fi
    433491
    434 check-pac-functions: stamps/bootstrap-directory.stamp
     492stamps/check-pac-functions.stamp: stamps/bootstrap-directory.stamp
    435493        ./jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \
    436           $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js)
     494          $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) ; \
     495        mkdir -p stamps && \
     496        touch $@
    437497
    438498junit-runner-source-files.txt:
    439499        find $(JUNIT_RUNNER_SRCDIR) -name '*.java' | sort > $@
    440500
    441 $(JUNIT_RUNNER_JAR): junit-runner-source-files.txt
     501$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt stamps/netx-dist-tests-compile.stamp
    442502        mkdir -p $(JUNIT_RUNNER_DIR) && \
    443503        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
    444504          -d $(JUNIT_RUNNER_DIR) \
    445           -classpath $(JUNIT_JAR) \
     505          -classpath $(JUNIT_JAR):$(JNLP_TESTS_ENGINE_DIR) \
    446506          @junit-runner-source-files.txt && \
    447507        $(BOOT_DIR)/bin/jar cf $@  -C $(JUNIT_RUNNER_DIR) .
    448508
     509stamps/junit-jnlp-dist-dirs: junit-jnlp-dist-simple.txt stamps/junit-jnlp-dist-signed.stamp junit-jnlp-dist-custom.txt
     510        mkdir -p $(JNLP_TESTS_SERVER_DEPLOYDIR)
     511        mkdir -p $(JNLP_TESTS_DIR)
     512        touch $@
     513
     514junit-jnlp-dist-custom.txt:
     515        cd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \
     516        find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
     517
     518junit-jnlp-dist-simple.txt:
     519        cd $(JNLP_TESTS_SRCDIR)/simple/ ; \
     520        find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
     521
     522stamps/junit-jnlp-dist-signed.stamp:
     523        types=($(SIGNED_REPRODUCERS)) ; \
     524        for which in "$${types[@]}" ; do \
     525          pushd $(JNLP_TESTS_SRCDIR)/$$which/ ; \
     526          find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \
     527          popd ; \
     528        done ; \
     529        mkdir -p stamps && \
     530        touch $@
     531
     532stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs
     533        types=($(ALL_NONCUSTOM_REPRODUCERS)); \
     534        for which in "$${types[@]}" ; do \
     535          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     536          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     537          IFS="$$IFS_BACKUP" ; \
     538          for dir in "$${simpleReproducers[@]}" ; do \
     539            echo "processing: $$dir" ; \
     540            mkdir -p "$(JNLP_TESTS_DIR)/$$dir" ; \
     541            if [ -e "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ]; then \
     542              d=`pwd` ; \
     543              cd "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \
     544              srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \
     545              notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \
     546              $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar -d "$(JNLP_TESTS_DIR)/$$dir/" $$srcFiles ; \
     547              if [ -n "$$notSrcFiles" ] ; then \
     548                cp -R --parents $$notSrcFiles "$(JNLP_TESTS_DIR)/$$dir/" ; \
     549              fi ; \
     550              cd "$(JNLP_TESTS_DIR)/$$dir/" ; \
     551              if [ -f $(META_MANIFEST) ]; \
     552              then \
     553                $(BOOT_DIR)/bin/jar cfm "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $(META_MANIFEST) * ; \
     554              else \
     555                $(BOOT_DIR)/bin/jar cf "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \
     556              fi; \
     557              cd "$$d" ; \
     558            fi; \
     559          done ; \
     560        done ; \
     561        mkdir -p stamps && \
     562        touch $@
     563
     564stamps/netx-dist-tests-sign-some-reproducers.stamp: stamps/netx-dist-tests-prepare-reproducers.stamp
     565        keystore=$(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME); \
     566        types=($(SIGNED_REPRODUCERS)) ; \
     567        for which in "$${types[@]}" ; do \
     568          tcaw=$(TEST_CERT_ALIAS)_$$which ; \
     569          $(BOOT_DIR)/bin/keytool -genkey -alias $$tcaw -keystore $$keystore -keypass $(PRIVATE_KEYSTORE_PASS) -storepass $(PRIVATE_KEYSTORE_PASS) -dname "cn=$$tcaw, ou=$$tcaw, o=$$tcaw, c=$$tcaw" ; \
     570            . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     571          signedReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     572            IFS="$$IFS_BACKUP" ; \
     573          for dir in "$${signedReproducers[@]}" ; do \
     574           $(BOOT_DIR)/bin/jarsigner -keystore $$keystore -storepass $(PRIVATE_KEYSTORE_PASS) -keypass $(PRIVATE_KEYSTORE_PASS)  "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar"  $$tcaw ; \
     575          done ; \
     576        done ; \
     577        mkdir -p stamps && \
     578        touch $@
     579
     580stamps/change-dots-to-paths.stamp: stamps/netx-dist-tests-sign-some-reproducers.stamp
     581        pushd  $(JNLP_TESTS_SERVER_DEPLOYDIR); \
     582        types=($(ALL_NONCUSTOM_REPRODUCERS)); \
     583        for which in "$${types[@]}" ; do \
     584          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     585          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     586          IFS="$$IFS_BACKUP" ; \
     587          for dir in "$${simpleReproducers[@]}" ; do \
     588            if test "$${dir:0:1}" = "." ; then \
     589              echo "reproducer $$dir starts with dot. It is forbidden" ; \
     590              exit 5; \
     591            fi; \
     592            if test "$${dir:(-1)}" = "." ; then \
     593              echo "reproducer $$dir ends with dot. It is forbidden" ; \
     594              exit 5; \
     595            fi; \
     596            q=`expr index "$$dir" .`; \
     597            r=$$? ; \
     598            if [ $$r = 0  ]; then \
     599              slashed_dir="./$${dir//.//}" ; \
     600              path="`dirname $$slashed_dir`" ; \
     601              file="`basename $$slashed_dir`.jar" ; \
     602              echo "copying $$dir.jar to $$path as $$file" ; \
     603              mkdir --parents $$path ; \
     604              cp $$dir".jar" "$$path"/"$$file" ; \
     605            fi ; \
     606          done ; \
     607        done ; \
     608        popd ; \
     609        mkdir -p stamps && \
     610        touch $@
     611
     612#this always tries to remove  previous testcert
     613#the code is copypasted from netx-dist-tests-remove-cert-from-public, because
     614#with depending to not stamped target we always have to rerun reproducers targets
     615stamps/exported-test-certs.stamp: stamps/change-dots-to-paths.stamp
     616        -types=($(SIGNED_REPRODUCERS)) ; \
     617        for which in "$${types[@]}" ; do \
     618          $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
     619        done ;
     620        types=($(SIGNED_REPRODUCERS)) ; \
     621        for which in "$${types[@]}" ; do \
     622          keytool -export -alias $(TEST_CERT_ALIAS)_$$which -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) -storepass $(PRIVATE_KEYSTORE_PASS) -keystore $(PRIVATE_KEYSTORE_NAME) ; \
     623        done ;
     624        mkdir -p stamps && \
     625        touch $@
     626
     627stamps/netx-dist-tests-import-cert-to-public: stamps/exported-test-certs.stamp
     628        types=($(SIGNED_REPRODUCERS)) ; \
     629        for which in "$${types[@]}" ; do \
     630          yes | $(BOOT_DIR)/bin/keytool -import -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ;\
     631        done ;
     632        mkdir -p stamps && \
     633        touch $@
     634
     635netx-dist-tests-remove-cert-from-public:
     636        -types=($(SIGNED_REPRODUCERS)) ; \
     637        for which in "$${types[@]}" ; do \
     638          $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
     639        done ;
     640        -rm -rf stamps/netx-dist-tests-import-cert-to-public
     641
     642netx-dist-tests-source-files.txt:
     643        find $(JNLP_TESTS_ENGINE_SRCDIR) -name '*.java' | sort > $@
     644
     645stamps/netx-dist-tests-compile.stamp: stamps/netx.stamp \
     646 stamps/junit-jnlp-dist-dirs netx-dist-tests-source-files.txt
     647        mkdir -p $(JNLP_TESTS_ENGINE_DIR);
     648        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
     649         -d $(JNLP_TESTS_ENGINE_DIR) \
     650         -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
     651         @netx-dist-tests-source-files.txt && \
     652        mkdir -p stamps && \
     653        touch $@
     654
     655netx-dist-tests-tests-source-files.txt:
     656        find $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) -name '*.java' | sort > $@
     657
     658stamps/netx-dist-tests-tests-compile.stamp: stamps/junit-jnlp-dist-dirs netx-dist-tests-tests-source-files.txt  stamps/netx-dist-tests-compile.stamp
     659        mkdir -p $(JNLP_TESTS_ENGINE_TESTS_DIR);
     660        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
     661         -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
     662         -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
     663         @netx-dist-tests-tests-source-files.txt && \
     664        mkdir -p stamps && \
     665        touch $@
     666
     667stamps/netx-dist-tests-compile-testcases.stamp: stamps/netx.stamp stamps/junit-jnlp-dist-dirs \
     668 netx-dist-tests-source-files.txt stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-tests-compile.stamp
     669        types=($(ALL_REPRODUCERS)); \
     670        for which in "$${types[@]}" ; do \
     671          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     672          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     673          IFS="$$IFS_BACKUP" ; \
     674          for dir in "$${simpleReproducers[@]}" ; do \
     675            $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
     676              -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
     677              -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
     678            "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/"* ; \
     679          done ; \
     680        done ; \
     681        mkdir -p stamps && \
     682        touch $@
     683
     684stamps/netx-dist-tests-copy-resources.stamp: stamps/junit-jnlp-dist-dirs
     685        types=($(ALL_REPRODUCERS)); \
     686        for which in "$${types[@]}" ; do \
     687          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     688          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     689          IFS="$$IFS_BACKUP" ; \
     690          for dir in "$${simpleReproducers[@]}" ; do \
     691            cp -R "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/resources/"*  $(JNLP_TESTS_SERVER_DEPLOYDIR)/ ; \
     692          done ; \
     693        done ; \
     694        mkdir -p stamps && \
     695        touch $@
     696
     697$(REPRODUCERS_CLASS_NAMES): $(REPRODUCERS_CLASS_WHITELIST)
     698        whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
     699        cd $(JNLP_TESTS_ENGINE_TESTS_DIR) ; \
     700        class_names= ; \
     701        for test in `find -type f` ; do \
     702          class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \
     703          class_name=`echo $$class_name | sed -e 's|/|.|g' ` ; \
     704          INLCUDE="NO" ; \
     705          for x in $$whiteListed ; do \
     706            q=`expr match "$$class_name" "$$x"`; \
     707            r=$$? ; \
     708            if [ $$r = 0  ]; then \
     709              echo "$$class_name will be included in reproducers testcases because of $$x pattern in $(REPRODUCERS_CLASS_WHITELIST). Matching was  $$q"; \
     710              INLCUDE="YES" ; \
     711            fi; \
     712          done; \
     713          if [ "$$INLCUDE" = "YES"  ]; then \
     714            class_names="$$class_names $$class_name" ; \
     715          else \
     716            echo "$$class_name had no match in $(REPRODUCERS_CLASS_WHITELIST). Excluding"; \
     717          fi; \
     718        done ; \
     719        echo $$class_names > $(REPRODUCERS_CLASS_NAMES)
     720
     721stamps/run-netx-dist-tests.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
     722 javaws.desktop stamps/docs.stamp launcher.build/$(itweb_settings) itweb-settings.desktop \
     723 stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
     724 stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
     725 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) stamps/process-custom-reproducers.stamp
     726        cd $(JNLP_TESTS_ENGINE_DIR) ; \
     727        class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
     728        CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(JNLP_TESTS_ENGINE_TESTS_DIR) \
     729          $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \
     730         -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
     731if WITH_XSLTPROC
     732        $(XSLTPROC)  $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(JNLP_TESTS_ENGINE_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html
     733        $(XSLTPROC)  --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(JNLP_TESTS_ENGINE_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html
     734endif
     735        touch $@
     736
     737stamps/process-custom-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
     738 stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
     739 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES)
     740        . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     741        customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
     742        IFS="$$IFS_BACKUP" ; \
     743        for dir in "$${customReproducers[@]}" ; do \
     744          pushd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/$$dir/srcs; \
     745          $(MAKE) prepare-reproducer ; \
     746          popd ; \
     747        done ; \
     748        mkdir -p stamps && \
     749        touch $@
     750
     751clean-custom-reproducers: junit-jnlp-dist-custom.txt
     752        . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     753        customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
     754        IFS="$$IFS_BACKUP" ; \
     755        for dir in "$${customReproducers[@]}" ; do \
     756          pushd $(JNLP_TESTS_SRCDIR)/custom/$$dir/srcs; \
     757          $(MAKE) clean-reproducer ; \
     758          popd ; \
     759        done ; \
     760        rm -f stamps/process-custom-reproducers.stamp
     761
     762#for global-links you must be root, for opera there do not exists user-links
     763#although this targets will indeed create symbolic links to enable
     764#icedtea-web plugin inside browser it is intended for testing purposes
     765if ENABLE_PLUGIN
     766stamps/user-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp \
     767 launcher.build/$(javaws) stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
     768        if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     769          if [ -e $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ] ; then \
     770            mv -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)  $(MOZILLA_LOCAL_BACKUP_FILE) ; \
     771            echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) backed up as $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
     772          else \
     773            echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) doesn't exists, nothing to be backed up to $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
     774          fi ; \
     775          pushd $(MOZILLA_LOCAL_PLUGINDIR) ; \
     776          ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME) ; \
     777          echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
     778          popd ; \
     779        fi ; \
     780        touch $@
     781
     782restore-user-links:
     783        if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     784          if [ -e $(MOZILLA_LOCAL_BACKUP_FILE) ] ; then \
     785            mv -f  $(MOZILLA_LOCAL_BACKUP_FILE)  $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
     786            echo "$(MOZILLA_LOCAL_BACKUP_FILE) restored as $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)" ; \
     787          else \
     788            rm -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
     789            echo "$(MOZILLA_LOCAL_BACKUP_FILE) do not exists, nothing to be restored. $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) removed" ; \
     790          fi ; \
     791        fi ;
     792        if [ -e stamps/user-links.stamp ] ; then \
     793          rm -f stamps/user-links.stamp ; \
     794        fi
     795
     796stamps/global-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
     797 stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
     798        if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     799            dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
     800            arch=`arch`  ; \
     801            if [ "$$arch" = "x86_64" ]  ; then \
     802              dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
     803            fi ; \
     804            if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
     805              mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(MOZILLA_GLOBAL_BACKUP_FILE) ; \
     806              echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
     807            else \
     808              echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
     809            fi ; \
     810            pushd "$$dir"  ; \
     811            ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
     812            echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
     813            popd  ; \
     814        fi ;
     815        if [ "$(OPERA)" != "" ]  ; then \
     816            dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
     817            arch=`arch`  ; \
     818            if [ "$$arch" = "x86_64" ] ; then \
     819              dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
     820            fi ; \
     821            if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
     822              mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(OPERA_GLOBAL_BACKUP_FILE) ; \
     823              echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(OPERA_GLOBAL_BACKUP_FILE) "; \
     824            else \
     825              echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(OPERA_GLOBAL_BACKUP_FILE) "; \
     826            fi ; \
     827            pushd "$$dir"  ; \
     828            ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
     829            echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
     830            popd  ; \
     831        fi   ; \
     832        touch $@
     833
     834restore-global-links:
     835        if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     836            dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
     837            arch=`arch`  ; \
     838            if [ "$$arch" = "x86_64" ]  ; then \
     839              dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
     840            fi ; \
     841            if [ -e $(MOZILLA_GLOBAL_BACKUP_FILE) ] ; then \
     842              mv -f $(MOZILLA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
     843              echo "$(MOZILLA_GLOBAL_BACKUP_FILE) restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
     844            else \
     845              rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
     846              echo "$(MOZILLA_GLOBAL_BACKUP_FILE) do not exists, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
     847            fi ; \
     848        fi ;
     849        if [ "$(OPERA)" != "" ]  ; then \
     850            dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
     851            arch=`arch`  ; \
     852            if [ "$$arch" = "x86_64" ] ; then \
     853              dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
     854            fi ; \
     855            if [ -e $(OPERA_GLOBAL_BACKUP_FILE) ] ; then \
     856              mv -f $(OPERA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
     857              echo "$(OPERA_GLOBAL_BACKUP_FILE)  restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
     858            else \
     859              rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
     860              echo "$(OPERA_GLOBAL_BACKUP_FILE) do not exist, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
     861            fi ; \
     862        fi   ;
     863        if [ -e stamps/global-links.stamp ] ; then \
     864          rm -f stamps/global-links.stamp ; \
     865        fi
     866endif
     867
    449868netx-unit-tests-source-files.txt:
    450869        find $(NETX_UNIT_TEST_SRCDIR) -name '*.java' | sort > $@
    451870
    452871stamps/netx-unit-tests-compile.stamp: stamps/netx.stamp \
    453  netx-unit-tests-source-files.txt
     872 netx-unit-tests-source-files.txt stamps/netx-dist-tests-compile.stamp
    454873        mkdir -p $(NETX_UNIT_TEST_DIR) && \
    455874        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
    456875         -d $(NETX_UNIT_TEST_DIR) \
    457          -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
     876         -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
    458877         @netx-unit-tests-source-files.txt && \
    459878        mkdir -p stamps && \
    460879        touch $@
    461880
    462 run-netx-unit-tests: stamps/netx-unit-tests-compile.stamp \
    463  $(JUNIT_RUNNER_JAR)
    464         cp {$(NETX_UNIT_TEST_SRCDIR),$(NETX_UNIT_TEST_DIR)}/net/sourceforge/jnlp/basic.jnlp
     881$(TESTS_DIR)/$(REPORT_STYLES_DIRNAME):
     882        mkdir $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)
     883        cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.css $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
     884        cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.js $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
     885
     886$(UNIT_CLASS_NAMES):
    465887        cd $(NETX_UNIT_TEST_DIR) ; \
    466888        class_names= ; \
     
    470892          class_names="$$class_names $$class_name" ; \
    471893        done ; \
    472         echo $$class_names ; \
    473         CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):. \
    474           $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
    475 
    476 clean-netx-tests: clean-netx-unit-tests clean-junit-runner
     894        echo $$class_names > $(UNIT_CLASS_NAMES);
     895
     896stamps/run-netx-unit-tests.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
     897 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
     898        filename=" " ; \
     899        cd $(NETX_UNIT_TEST_SRCDIR) ; \
     900        for file in `find . -type f \! -iname "*.java"`; do\
     901                filename=`echo $$file `; \
     902                cp --parents $$filename $(NETX_UNIT_TEST_DIR) ; \
     903        done ; \
     904        cd $(NETX_UNIT_TEST_DIR) ; \
     905        class_names=`cat $(UNIT_CLASS_NAMES)` ; \
     906        CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(JNLP_TESTS_ENGINE_DIR):. \
     907          $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
     908if WITH_XSLTPROC
     909        $(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html
     910        $(XSLTPROC) --stringparam logs logs_unit.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(NETX_UNIT_TEST_DIR)/tests-output.xml > $(TESTS_DIR)/index_unit.html
     911endif
     912        mkdir -p stamps && \
     913        touch $@
     914
     915#warning,  during this target tests.build/netx/unit/tests-output.xml is backup and rewriten (but not coresponding html file)
     916#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
     917#you can add -ix "-*Test*" -ix "-*test*"  to ignore all test cases from statistics
     918stamps/run-unit-test-code-coverage.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
     919 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
     920if WITH_EMMA
     921        cd $(NETX_UNIT_TEST_DIR) ; \
     922        for file in $(EMMA_MODIFIED_FILES) ; do \
     923          mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
     924        done ;\
     925        class_names=`cat $(UNIT_CLASS_NAMES)` ; \
     926        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \
     927         -Dreport.html.out.encoding=UTF-8 \
     928         -raw \
     929         -sp $(NETX_SRCDIR) \
     930         -sp $(NETX_UNIT_TEST_SRCDIR) \
     931         -sp $(JUNIT_RUNNER_SRCDIR) \
     932         -r html \
     933         -r xml \
     934         -cp $(NETX_DIR)/lib/classes.jar \
     935         -cp $(JUNIT_JAR) \
     936         -cp $(JUNIT_RUNNER_JAR) \
     937         -cp $(BOOT_DIR)/jre/lib/rt.jar \
     938         -cp $(BOOT_DIR)/jre/lib/jsse.jar \
     939         -cp $(BOOT_DIR)/jre/lib/resources.jar \
     940         -cp $(RHINO_RUNTIME) \
     941         -cp $(JNLP_TESTS_ENGINE_DIR) \
     942         -cp . \
     943         -ix "-org.junit.*" \
     944         -ix "-junit.*" \
     945         CommandLine $$class_names ;  \
     946        for file in $(EMMA_MODIFIED_FILES) ; do \
     947          mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
     948          mv $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(NETX_UNIT_TEST_DIR)/$$file ; \
     949        done ;
     950else
     951        echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
     952        exit 5
     953endif
     954        touch $@
     955
     956#warning,  during this target tests.build/netx/jnlp_testsengine/tests-output.xml is backup and rewriten (but not coresponding html file)
     957#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
     958stamps/run-reproducers-test-code-coverage.stamp: stamps/run-netx-dist-tests.stamp $(REPRODUCERS_CLASS_NAMES)
     959if WITH_EMMA
     960        cd $(TESTS_DIR) ; \
     961        for file in $(EMMA_MODIFIED_FILES) ; do \
     962          mv $(JNLP_TESTS_ENGINE_DIR)/$$file $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
     963        done ;\
     964        echo "backuping javaws and netx.jar in $(DESTDIR)" ; \
     965        netx_backup=$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx_backup.jar ; \
     966        javaws_backup=$(DESTDIR)$(bindir)/javaws_backup ; \
     967        mv $(DESTDIR)$(bindir)/javaws $$javaws_backup ;  \
     968        mv $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar $$netx_backup ; \
     969        nw_bootclasspath="$(LAUNCHER_BOOTCLASSPATH):$(EMMA_JAR):$$netx_backup" ; \
     970        instructed_dir=$(TESTS_DIR)/instr ; \
     971        echo "instrumenting netx.jar from $$netx_backup through $$instructed_dir" ; \
     972        $(BOOT_DIR)/bin/java -cp  $(EMMA_JAR) emma instr -d $$instructed_dir -ip $$netx_backup ; \
     973        pushd $$instructed_dir ; \
     974        $(BOOT_DIR)/bin/jar -cf $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar * ; \
     975        popd ; \
     976        rm -rf $$instructed_dir ; \
     977        echo "patching $(javaws)" ; \
     978        cat $$javaws_backup | sed "s,$(LAUNCHER_BOOTCLASSPATH),$$nw_bootclasspath," > $(DESTDIR)$(bindir)/$(javaws) ; \
     979        chmod 777 $(DESTDIR)$(bindir)/$(javaws) ; \
     980        testcases_srcs=( ) ; \
     981        k=0 ; \
     982        types=($(ALL_REPRODUCERS)); \
     983        for which in "$${types[@]}" ; do \
     984          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     985          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     986          IFS="$$IFS_BACKUP" ; \
     987          for dir in "$${simpleReproducers[@]}" ; do \
     988            testcases_srcs[k]="-sp" ; \
     989            k=$$((k+1)) ; \
     990            testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
     991            k=$$((k+1)) ; \
     992            done ; \
     993          done ; \
     994        cd $(JNLP_TESTS_ENGINE_DIR) ; \
     995        class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
     996        $(BOOT_DIR)/bin/java  \
     997         $(EMMA_JAVA_ARGS) \
     998          $(REPRODUCERS_DPARAMETERS) \
     999         -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) emmarun  \
     1000           -raw \
     1001           -cp $(NETX_DIR)/lib/classes.jar \
     1002           -cp $(JUNIT_JAR) \
     1003           -cp $(JUNIT_RUNNER_JAR) \
     1004           -cp $(BOOT_DIR)/jre/lib/rt.jar \
     1005           -cp $(BOOT_DIR)/jre/lib/jsse.jar \
     1006           -cp $(BOOT_DIR)/jre/lib/resources.jar \
     1007           -cp $(RHINO_RUNTIME) \
     1008           -cp . \
     1009           -cp $(JNLP_TESTS_ENGINE_TESTS_DIR) \
     1010           -ix "-org.junit.*" \
     1011           -ix "-junit.*" \
     1012           CommandLine $$class_names ; \
     1013        mv $(JNLP_TESTS_ENGINE_DIR)/coverage.ec $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec ; \
     1014        mv $(JNLP_TESTS_ENGINE_DIR)/coverage.es $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
     1015        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
     1016          -in $(TESTS_DIR)/coverage.em \
     1017          -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec \
     1018          -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
     1019        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
     1020          -Dreport.html.out.encoding=UTF-8 \
     1021          -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es  \
     1022          -sp $(NETX_SRCDIR) \
     1023          -sp $(NETX_UNIT_TEST_SRCDIR) \
     1024          -sp $(JUNIT_RUNNER_SRCDIR) \
     1025          -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
     1026          -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
     1027          -r html \
     1028          -r xml \
     1029          "$${testcases_srcs[@]}" ; \
     1030        echo "restoring javaws and netx.jar in $(DESTDIR)" ; \
     1031        rm -f $(DESTDIR)$(bindir)/$(javaws) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
     1032        rm -f $(DESTDIR)$(bindir)/$(javaws);  \
     1033        mv $$javaws_backup $(DESTDIR)$(bindir)/$(javaws);  \
     1034        mv $$netx_backup $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
     1035        for file in $(EMMA_MODIFIED_FILES) ; do \
     1036          mv $(JNLP_TESTS_ENGINE_DIR)/$$file  $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
     1037          mv $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(JNLP_TESTS_ENGINE_DIR)/$$file ; \
     1038        done ;\
     1039        rm $(JNLP_TESTS_ENGINE_DIR)/coverage.txt ;
     1040else
     1041        echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
     1042        exit 5
     1043endif
     1044        touch $@
     1045
     1046run-test-code-coverage: run-unit-test-code-coverage run-reproducers-test-code-coverage
     1047if WITH_EMMA
     1048        cd $(TESTS_DIR) ; \
     1049        k=0 ; \
     1050        types=($(ALL_REPRODUCERS)); \
     1051        for which in "$${types[@]}" ; do \
     1052          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1053          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1054          IFS="$$IFS_BACKUP" ; \
     1055          for dir in "$${simpleReproducers[@]}" ; do \
     1056            testcases_srcs[k]="-sp" ; \
     1057            k=$$((k+1)) ; \
     1058            testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
     1059            k=$$((k+1)) ; \
     1060          done ; \
     1061        done ; \
     1062        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
     1063         -in $(NETX_UNIT_TEST_DIR)/coverage.es \
     1064         -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
     1065        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
     1066         -Dreport.html.out.encoding=UTF-8 \
     1067         -in $(TESTS_DIR)/coverage.es \
     1068         -in $(TESTS_DIR)/coverage.em \
     1069         -sp $(NETX_SRCDIR) \
     1070         -sp $(NETX_UNIT_TEST_SRCDIR) \
     1071         -sp $(JUNIT_RUNNER_SRCDIR) \
     1072         -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
     1073         -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
     1074         "$${testcases_srcs[@]}" \
     1075         -r html \
     1076         -r xml ;
     1077else
     1078        echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
     1079        exit 5
     1080endif
     1081
     1082clean-netx-tests: clean-netx-unit-tests clean-junit-runner clean-netx-dist-tests clean-test-code-coverage
    4771083        if [ -e $(TESTS_DIR)/netx ]; then \
    4781084          rmdir $(TESTS_DIR)/netx ; \
     
    4841090        rm -f $(JUNIT_RUNNER_JAR)
    4851091
    486 clean-netx-unit-tests:
     1092clean-netx-unit-tests: clean_tests_reports
    4871093        rm -f netx-unit-tests-source-files.txt
    4881094        rm -rf $(NETX_UNIT_TEST_DIR)
     1095        rm -f $(UNIT_CLASS_NAMES)
     1096        rm -f stamps/check-pac-functions.stamp
     1097        rm -f stamps/run-netx-unit-tests.stamp
    4891098        rm -f stamps/netx-unit-tests-compile.stamp
     1099
     1100clean_tests_reports:
     1101        rm -rf  $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
     1102        rm -f  $(TESTS_DIR)/*.html
     1103
     1104clean-netx-dist-tests: clean_tests_reports netx-dist-tests-remove-cert-from-public clean-custom-reproducers
     1105        rm -f netx-dist-tests-source-files.txt
     1106        rm -rf $(JNLP_TESTS_ENGINE_TESTS_DIR)
     1107        rm -rf $(JNLP_TESTS_DIR)
     1108        rm -rf $(JNLP_TESTS_SERVER_DEPLOYDIR)
     1109        rm -rf $(JNLP_TESTS_ENGINE_DIR)
     1110        rm -f stamps/junit-jnlp-dist-dirs
     1111        rm -f stamps/netx-dist-tests-compile.stamp
     1112        rm -f stamps/netx-dist-tests-tests-compile.stamp
     1113        rm -f stamps/netx-dist-tests-prepare-reproducers.stamp
     1114        rm -f stamps/netx-dist-tests-compile-testcases.stamp
     1115        rm -f stamps/netx-dist-tests-copy-resources.stamp
     1116        rm -f stamps/netx-dist-tests-sign-some-reproducers.stamp
     1117        rm -f stamps/change-dots-to-paths.stamp
     1118        rm -f junit-jnlp-dist-simple.txt
     1119        rm -f junit-jnlp-dist-custom.txt
     1120        rm -f netx-dist-tests-tests-source-files.txt
     1121        types=($(SIGNED_REPRODUCERS)) ; \
     1122        for which in "$${types[@]}" ; do \
     1123          rm -f junit-jnlp-dist-$$which.txt ; \
     1124          rm -f $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ; \
     1125        done ;
     1126        rm -f stamps/exported-test-certs.stamp
     1127        rm -f stamps/junit-jnlp-dist-signed.stamp
     1128        rm -f $(REPRODUCERS_CLASS_NAMES)
     1129        rm -f $(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME)
     1130        rm -f stamps/run-netx-dist-tests.stamp
     1131
     1132clean-unit-test-code-coverage:
     1133        if [ -e stamps/run-unit-test-code-coverage.stamp ]; then \
     1134          rm -rf $(NETX_UNIT_TEST_DIR)/coverage ; \
     1135          rm -f $(NETX_UNIT_TEST_DIR)/coverage.xml ; \
     1136          rm -f $(NETX_UNIT_TEST_DIR)/coverageX.es ; \
     1137          rm -f $(NETX_UNIT_TEST_DIR)/coverageX.ec ; \
     1138          rm -f $(NETX_UNIT_TEST_DIR)/coverage.es ; \
     1139          rm -f $(NETX_UNIT_TEST_DIR)/tests-output_withEmma.xml ; \
     1140          rm -f stamps/run-unit-test-code-coverage.stamp ; \
     1141        fi
     1142
     1143clean-reproducers-test-code-coverage:
     1144        if [ -e stamps/run-reproducers-test-code-coverage.stamp ]; then \
     1145         rm -rf $(JNLP_TESTS_ENGINE_DIR)/coverage ; \
     1146         rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.xml ; \
     1147         rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
     1148         rm -f $(JNLP_TESTS_ENGINE_DIR)/tests-output_withEmma.xml ; \
     1149         rm -f stamps/run-reproducers-test-code-coverage.stamp ; \
     1150        fi
     1151
     1152clean-test-code-coverage: clean-unit-test-code-coverage clean-reproducers-test-code-coverage
     1153        if [ -e $(TESTS_DIR)/coverage.xml ]; then \
     1154          rm -rf $(TESTS_DIR)/coverage  ; \
     1155          rm -f $(TESTS_DIR)/coverage.xml  ; \
     1156          rm -f $(TESTS_DIR)/coverage.es  ; \
     1157          rm -f $(TESTS_DIR)/coverage.em ; \
     1158        fi
     1159
    4901160
    4911161# plugin tests
     
    5291199        ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac
    5301200        ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc
     1201        if [ -e "$(KEYTOOL)" ] ; then \
     1202          ln -sf $(KEYTOOL) $(BOOT_DIR)/bin/keytool ;\
     1203        else \
     1204          echo "#! /bin/sh" > $(BOOT_DIR)/bin/keytool ;\
     1205          echo "echo \"keytool not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/keytool ;\
     1206          chmod 777 $(BOOT_DIR)/bin/keytool ;\
     1207        fi
     1208        if [ -e "$(JARSIGNER)" ] ; then \
     1209          ln -sf $(JARSIGNER) $(BOOT_DIR)/bin/jarsigner ;\
     1210        else \
     1211          echo "#! /bin/sh" > $(BOOT_DIR)/bin/jarsigner ;\
     1212          echo "echo \"jarsigner not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/jarsigner ;\
     1213          chmod 777 $(BOOT_DIR)/bin/jarsigner ;\
     1214        fi
    5311215        mkdir -p $(BOOT_DIR)/jre/lib && \
    5321216        ln -s $(SYSTEM_JRE_DIR)/lib/rt.jar $(BOOT_DIR)/jre/lib && \
     
    5351219        else \
    5361220          ln -s rt.jar $(BOOT_DIR)/jre/lib/jsse.jar ; \
     1221        fi
     1222        if [ -e $(SYSTEM_JRE_DIR)/lib/resources.jar ] ; then \
     1223          ln -s $(SYSTEM_JRE_DIR)/lib/resources.jar $(BOOT_DIR)/jre/lib ; \
     1224        else \
     1225          ln -s rt.jar $(BOOT_DIR)/jre/lib/resources.jar ; \
    5371226        fi
    5381227        ln -sf $(SYSTEM_JRE_DIR)/lib/$(JRE_ARCH_DIR) \
     
    5741263
    5751264plugin-tests: stamps/plugin-tests.stamp
     1265
     1266check-pac-functions: stamps/check-pac-functions.stamp
     1267
     1268run-netx-unit-tests: stamps/run-netx-unit-tests.stamp
     1269
     1270links: stamps/global-links.stamp
     1271
     1272user-links: stamps/user-links.stamp
     1273
     1274run-netx-dist-tests: stamps/run-netx-dist-tests.stamp
     1275
     1276run-unit-test-code-coverage: stamps/run-unit-test-code-coverage.stamp
     1277
     1278run-reproducers-test-code-coverage: stamps/run-reproducers-test-code-coverage.stamp
  • branches/vendor/sourceforge/icedtea-web/current/Makefile.in

    r348 r416  
    1 # Makefile.in generated by automake 1.11.1 from Makefile.am.
     1# Makefile.in generated by automake 1.11.3 from Makefile.am.
    22# @configure_input@
    33
    44# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
    5 # 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
    6 # Inc.
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
     6# Foundation, Inc.
    77# This Makefile.in is free software; the Free Software Foundation
    88# gives unlimited permission to copy and/or distribute it,
     
    5959top_distdir = $(distdir)
    6060am__remove_distdir = \
    61   { test ! -d "$(distdir)" \
    62     || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
    63          && rm -fr "$(distdir)"; }; }
     61  if test -d "$(distdir)"; then \
     62    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
     63      && rm -rf "$(distdir)" \
     64      || { sleep 5 && rm -rf "$(distdir)"; }; \
     65  else :; fi
    6466DIST_ARCHIVES = $(distdir).tar.gz
    6567GZIP_ENV = --best
    6668distuninstallcheck_listfiles = find . -type f -print
     69am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
     70  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
    6771distcleancheck_listfiles = find . -type f -print
    6872ACLOCAL = @ACLOCAL@
     
    7478AUTOMAKE = @AUTOMAKE@
    7579AWK = @AWK@
     80BROWSER_TESTS_MODIFICATION = @BROWSER_TESTS_MODIFICATION@
    7681BUILD_ARCH_DIR = @BUILD_ARCH_DIR@
    7782CC = @CC@
    7883CCDEPMODE = @CCDEPMODE@
    7984CFLAGS = @CFLAGS@
     85CHROME = @CHROME@
     86CHROMIUM = @CHROMIUM@
    8087CPPFLAGS = @CPPFLAGS@
    8188CXX = @CXX@
     
    9097ECJ = @ECJ@
    9198ECJ_JAR = @ECJ_JAR@
     99EMMA_AVAILABLE = @EMMA_AVAILABLE@
     100EMMA_JAR = @EMMA_JAR@
     101EPIPHANY = @EPIPHANY@
    92102EXEEXT = @EXEEXT@
     103FIREFOX = @FIREFOX@
    93104FULL_VERSION = @FULL_VERSION@
    94105GCJ = @GCJ@
     106GLIB2_V_216_CFLAGS = @GLIB2_V_216_CFLAGS@
     107GLIB2_V_216_LIBS = @GLIB2_V_216_LIBS@
    95108GLIB_CFLAGS = @GLIB_CFLAGS@
    96109GLIB_LIBS = @GLIB_LIBS@
     
    106119INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    107120JAR = @JAR@
     121JARSIGNER = @JARSIGNER@
    108122JAR_ACCEPTS_STDIN_LIST = @JAR_ACCEPTS_STDIN_LIST@
    109123JAR_KNOWS_ATFILE = @JAR_KNOWS_ATFILE@
     
    116130JUNIT_AVAILABLE = @JUNIT_AVAILABLE@
    117131JUNIT_JAR = @JUNIT_JAR@
     132KEYTOOL = @KEYTOOL@
    118133LDFLAGS = @LDFLAGS@
    119134LIBOBJS = @LIBOBJS@
     
    121136LTLIBOBJS = @LTLIBOBJS@
    122137MAKEINFO = @MAKEINFO@
     138MIDORI = @MIDORI@
    123139MKDIR_P = @MKDIR_P@
    124140MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
     
    126142MOZILLA_VERSION_COLLAPSED = @MOZILLA_VERSION_COLLAPSED@
    127143OBJEXT = @OBJEXT@
     144OPERA = @OPERA@
    128145PACKAGE = @PACKAGE@
    129146PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
     
    147164USING_ECJ = @USING_ECJ@
    148165VERSION = @VERSION@
     166VERSION_DEFS = @VERSION_DEFS@
    149167X11_CFLAGS = @X11_CFLAGS@
    150168X11_LIBS = @X11_LIBS@
     169XSLTPROC = @XSLTPROC@
    151170ZIP = @ZIP@
    152171abs_builddir = @abs_builddir@
     
    201220top_builddir = @top_builddir@
    202221top_srcdir = @top_srcdir@
    203 NETX_DIR = $(abs_top_builddir)/netx.build
    204 NETX_SRCDIR = $(abs_top_srcdir)/netx
    205 NETX_RESOURCE_DIR = $(NETX_SRCDIR)/net/sourceforge/jnlp/resources
    206 NETX_EXTRA_DIR = $(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
    207 NETX_EXTRA_DIST_DIR = $(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
    208 TESTS_SRCDIR = $(abs_top_srcdir)/tests
    209 TESTS_DIR = $(abs_top_builddir)/tests.build
    210 NETX_UNIT_TEST_SRCDIR = $(TESTS_SRCDIR)/netx/unit
    211 NETX_UNIT_TEST_DIR = $(TESTS_DIR)/netx/unit
    212 JUNIT_RUNNER_DIR = $(TESTS_DIR)/junit-runner
    213 JUNIT_RUNNER_SRCDIR = $(TESTS_SRCDIR)/junit-runner
    214 JUNIT_RUNNER_JAR = $(abs_top_builddir)/junit-runner.jar
    215 
    216 # Build directories
    217 BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
    218222@WITH_RHINO_FALSE@RHINO_RUNTIME =
    219223@WITH_RHINO_TRUE@RHINO_RUNTIME = :$(RHINO_JAR)
    220 RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME)
    221 
    222 # Flags
    223 IT_CFLAGS = $(CFLAGS) $(ARCHFLAG)
    224 IT_JAVAC_SETTINGS = -g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
    225 IT_LANGUAGE_SOURCE_VERSION = 6
    226 IT_CLASS_TARGET_VERSION = 6
    227 IT_JAVACFLAGS = $(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
    228 
    229 #
    230 # We need the jars in bootclasspath for a couple of reasons
    231 #  - we use classes (in the sun.applet package) loaded by the bootclassloader
    232 #    using another classloader to load classes from the same package causes an
    233 #    IllegalAccessException
    234 #  - we want full privileges
    235 #
    236 LAUNCHER_BOOTCLASSPATH = "-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
    237 PLUGIN_BOOTCLASSPATH = '"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
    238 
    239 # Fake update version to work with the Deployment Toolkit script used by Oracle
    240 # http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
    241 JDK_UPDATE_VERSION = 50
    242 
    243 # Sources list
    244 PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
    245 NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
    246         net.sourceforge.jnlp.cache net.sourceforge.jnlp.config \
    247         net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \
    248         net.sourceforge.jnlp.runtime net.sourceforge.jnlp.security \
    249         net.sourceforge.jnlp.security.viewer net.sourceforge.jnlp.services \
    250         net.sourceforge.jnlp.tools net.sourceforge.jnlp.util
    251 
    252 
    253 # Conditional defintions
    254 @ENABLE_PLUGIN_TRUE@ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
    255 @ENABLE_PLUGIN_TRUE@LIVECONNECT_DIR = netscape sun/applet
    256 @ENABLE_PLUGIN_TRUE@PLUGIN_DIR = $(abs_top_builddir)/plugin/icedteanp
    257 @ENABLE_PLUGIN_TRUE@PLUGIN_SRCDIR = $(abs_top_srcdir)/plugin/icedteanp
    258 @ENABLE_PLUGIN_TRUE@LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
    259 @ENABLE_PLUGIN_TRUE@ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp
    260 @ENABLE_PLUGIN_TRUE@PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
    261224@CP_SUPPORTS_REFLINK_TRUE@REFLINK = --reflink=auto
    262225@SRC_DIR_HARDLINKABLE_FALSE@SRC_DIR_LINK = $(REFLINK)
     
    267230@ENABLE_DOCS_TRUE@@JAVADOC_SUPPORTS_J_OPTIONS_TRUE@JAVADOC_MEM_OPTS = -J-Xmx1024m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m
    268231@WITH_RHINO_FALSE@RHINO_TESTS =
    269 @WITH_RHINO_TRUE@RHINO_TESTS = check-pac-functions
     232@WITH_RHINO_TRUE@RHINO_TESTS = stamps/check-pac-functions.stamp
    270233@WITH_JUNIT_FALSE@JUNIT_TESTS =
    271 @WITH_JUNIT_TRUE@JUNIT_TESTS = run-netx-unit-tests
    272 PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
    273 EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
    274  itweb-settings.desktop.in $(top_srcdir)/tests
    275 
     234@WITH_JUNIT_TRUE@JUNIT_TESTS = stamps/run-netx-unit-tests.stamp
     235#end of exported autoconf copies
    276236
    277237# binary names
     
    306266
    307267.SUFFIXES:
    308 am--refresh:
     268am--refresh: Makefile
    309269        @:
    310270$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     
    399359
    400360dist-bzip2: distdir
    401         tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
     361        tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
     362        $(am__remove_distdir)
     363
     364dist-lzip: distdir
     365        tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
    402366        $(am__remove_distdir)
    403367
     
    407371
    408372dist-xz: distdir
    409         tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
     373        tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
    410374        $(am__remove_distdir)
    411375
     
    438402        *.tar.lzma*) \
    439403          lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
     404        *.tar.lz*) \
     405          lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
    440406        *.tar.xz*) \
    441407          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
     
    457423          && $(am__cd) $(distdir)/_build \
    458424          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
     425            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
    459426            $(DISTCHECK_CONFIGURE_FLAGS) \
    460427          && $(MAKE) $(AM_MAKEFLAGS) \
     
    485452          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
    486453distuninstallcheck:
    487         @$(am__cd) '$(distuninstallcheck_dir)' \
    488         && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
     454        @test -n '$(distuninstallcheck_dir)' || { \
     455          echo 'ERROR: trying to run $@ with an empty' \
     456               '$$(distuninstallcheck_dir)' >&2; \
     457          exit 1; \
     458        }; \
     459        $(am__cd) '$(distuninstallcheck_dir)' || { \
     460          echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
     461          exit 1; \
     462        }; \
     463        test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
    489464           || { echo "ERROR: files left after uninstall:" ; \
    490465                if test -n "$(DESTDIR)"; then \
     
    517492installcheck: installcheck-am
    518493install-strip:
    519         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
    520           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
    521           `test -z '$(STRIP)' || \
    522             echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     494        if test -z '$(STRIP)'; then \
     495          $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     496            install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     497              install; \
     498        else \
     499          $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     500            install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     501            "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
     502        fi
    523503mostlyclean-generic:
    524504
     
    605585.PHONY: all all-am all-local am--refresh check check-am check-local \
    606586        clean clean-generic clean-local dist dist-all dist-bzip2 \
    607         dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
    608         distcheck distclean distclean-generic distcleancheck distdir \
    609         distuninstallcheck dvi dvi-am html html-am info info-am \
    610         install install-am install-data install-data-am \
     587        dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
     588        dist-zip distcheck distclean distclean-generic distcleancheck \
     589        distdir distuninstallcheck dvi dvi-am html html-am info \
     590        info-am install install-am install-data install-data-am \
    611591        install-data-local install-dvi install-dvi-am install-exec \
    612592        install-exec-am install-exec-local install-html \
     
    619599
    620600
     601export NETX_DIR = $(abs_top_builddir)/netx.build
     602export NETX_SRCDIR = $(abs_top_srcdir)/netx
     603export NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
     604export NETX_EXTRA_DIR=$(abs_top_srcdir)/extra/net/sourceforge/javaws/about/resources
     605export NETX_EXTRA_DIST_DIR=$(abs_top_builddir)/extra-lib/net/sourceforge/javaws/about/resources
     606
     607export REPORT_STYLES_DIRNAME=report-styles
     608
     609export TESTS_SRCDIR=$(abs_top_srcdir)/tests
     610export TESTS_DIR=$(abs_top_builddir)/tests.build
     611
     612export NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit
     613export NETX_UNIT_TEST_DIR=$(TESTS_DIR)/netx/unit
     614
     615export JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner
     616export JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner
     617
     618export JNLP_TESTS_ENGINE_SRCDIR=$(TESTS_SRCDIR)/test-extensions
     619export JNLP_TESTS_ENGINE_TESTS_SRCDIR=$(TESTS_SRCDIR)/test-extensions-tests
     620export JNLP_TESTS_SRCDIR=$(TESTS_SRCDIR)/reproducers
     621export JNLP_TESTS_ENGINE_DIR=$(TESTS_DIR)/jnlp_testsengine
     622export JNLP_TESTS_ENGINE_TESTS_DIR=$(TESTS_DIR)/netx/jnlp_testsengine_tests
     623export JNLP_TESTS_SERVER_DEPLOYDIR=$(TESTS_DIR)/jnlp_test_server
     624export JNLP_TESTS_DIR=$(TESTS_DIR)/jnlp_tests
     625export PRIVATE_KEYSTORE_NAME=teststore.ks
     626export PRIVATE_KEYSTORE_PASS=123456789
     627export EXPORTED_TEST_CERT_PREFIX=icedteatests
     628export EXPORTED_TEST_CERT_SUFFIX=crt
     629export TEST_CERT_ALIAS=icedteaweb
     630export PUBLIC_KEYSTORE=${HOME}/.icedtea/security/trusted.certs
     631export PUBLIC_KEYSTORE_PASS=changeit
     632
     633export JUNIT_RUNNER_JAR=$(abs_top_builddir)/junit-runner.jar
     634export UNIT_CLASS_NAMES = $(abs_top_builddir)/unit_class_names
     635export REPRODUCERS_CLASS_NAMES = $(abs_top_builddir)/reproducers_class_names
     636export REPRODUCERS_CLASS_WHITELIST = $(abs_top_srcdir)/netx-dist-tests-whitelist
     637export EMMA_JAVA_ARGS=-Xmx2G
     638export EMMA_MODIFIED_FILES=tests-output.xml ServerAccess-logs.xml stdout.log stderr.log all.log
     639export EMMA_BACKUP_SUFFIX=_noEmma
     640export EMMA_SUFFIX=_withEmma
     641export META_MANIFEST = META-INF/MANIFEST.MF
     642export SIGNED_REPRODUCERS=signed
     643export SIMPLE_REPRODUCERS=simple
     644export CUSTOM_REPRODUCERS=custom
     645export ALL_NONCUSTOM_REPRODUCERS=$(SIMPLE_REPRODUCERS) $(SIGNED_REPRODUCERS)
     646export ALL_REPRODUCERS=$(ALL_NONCUSTOM_REPRODUCERS) $(CUSTOM_REPRODUCERS)
     647
     648# linking variables
     649export PLUGIN_LINK_NAME=libjavaplugin.so
     650export MOZILLA_LOCAL_PLUGINDIR=${HOME}/.mozilla/plugins
     651export MOZILLA_GLOBAL64_PLUGINDIR=/usr/lib64/mozilla/plugins
     652export MOZILLA_GLOBAL32_PLUGINDIR=/usr/lib/mozilla/plugins
     653export OPERA_GLOBAL64_PLUGINDIR=/usr/lib64/opera/plugins
     654export OPERA_GLOBAL32_PLUGINDIR=/usr/lib/opera/plugins
     655export BUILT_PLUGIN_LIBRARY=IcedTeaPlugin.so
     656export MOZILLA_LOCAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origU
     657export MOZILLA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origMG
     658export OPERA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origOG
     659export MOZILLA_FAMILY_TEST= "$(FIREFOX)" != "" -o "$(CHROMIUM)" != "" -o "$(CHROME)" != "" -o "$(MIDORI)" != "" -o "$(EPIPHANY)" != ""
     660# end of linking variables
     661
     662# Build directories
     663
     664export BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
     665
     666export RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME):$(BOOT_DIR)/jre/lib/resources.jar
     667
     668# Flags
     669export IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
     670export IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
     671export IT_LANGUAGE_SOURCE_VERSION=6
     672export IT_CLASS_TARGET_VERSION=6
     673export IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
     674
     675#
     676# We need the jars in bootclasspath for a couple of reasons
     677#  - we use classes (in the sun.applet package) loaded by the bootclassloader
     678#    using another classloader to load classes from the same package causes an
     679#    IllegalAccessException
     680#  - we want full privileges
     681#
     682export LAUNCHER_BOOTCLASSPATH="-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)"
     683export PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"'
     684
     685# Fake update version to work with the Deployment Toolkit script used by Oracle
     686# http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
     687export JDK_UPDATE_VERSION=50
     688
     689# Sources list
     690
     691export PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
     692
     693export NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
     694        net.sourceforge.jnlp.cache net.sourceforge.jnlp.config \
     695        net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \
     696        net.sourceforge.jnlp.runtime net.sourceforge.jnlp.security \
     697        net.sourceforge.jnlp.security.viewer net.sourceforge.jnlp.services \
     698        net.sourceforge.jnlp.tools net.sourceforge.jnlp.util
     699
     700# Conditional defintions
     701@ENABLE_PLUGIN_TRUE@export ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
     702@ENABLE_PLUGIN_TRUE@export LIVECONNECT_DIR = netscape sun/applet
     703@ENABLE_PLUGIN_TRUE@export PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp
     704@ENABLE_PLUGIN_TRUE@export PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp
     705@ENABLE_PLUGIN_TRUE@export LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
     706@ENABLE_PLUGIN_TRUE@export ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) stamps/liveconnect-dist.stamp
     707@ENABLE_PLUGIN_TRUE@export PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
     708
     709export PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
     710
     711export EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \
     712 itweb-settings.desktop.in $(top_srcdir)/tests
     713
     714# reproducers `D`shortcuts
     715export DTEST_SERVER=-Dtest.server.dir=$(JNLP_TESTS_SERVER_DEPLOYDIR)
     716export DJAVAWS_BUILD=-Djavaws.build.bin=$(DESTDIR)$(bindir)/$(javaws)
     717export DBROWSERS=-Dused.browsers=$(FIREFOX):$(CHROMIUM):$(CHROME):$(OPERA):$(MIDORI):$(EPIPHANY)
     718export REPRODUCERS_DPARAMETERS= $(DTEST_SERVER) $(DJAVAWS_BUILD) $(DBROWSERS) $(BROWSER_TESTS_MODIFICATION)
     719# end of `D`shortcuts
     720
     721#exported autoconf copies
     722export EXPORTED_JAVAC=$(BOOT_DIR)/bin/javac
     723
    621724# Top-Level Targets
    622725# =================
     
    627730check-local: $(RHINO_TESTS) $(JUNIT_TESTS)
    628731
    629 clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \
    630  clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests
     732clean-local: clean-netx clean-plugin clean-liveconnect clean-extra \
     733 clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-tests clean-bootstrap-directory
    631734        if [ -e stamps ] ; then \
    632735          rmdir stamps ; \
     
    635738.PHONY: clean-IcedTeaPlugin clean-add-netx clean-add-netx-debug clean-add-plugin clean-add-plugin-debug \
    636739 clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs \
    637  clean-tests check-local clean-launchers check-pac-functions run-netx-unit-tests clean-netx-tests \
     740 clean-tests check-local clean-launchers stamps/check-pac-functions.stamp stamps/run-netx-unit-tests.stamp clean-netx-tests \
    638741 clean-junit-runner clean-netx-unit-tests
    639742
    640743install-exec-local:
    641744        ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir)
    642 @ENABLE_PLUGIN_TRUE@    ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir)
     745@ENABLE_PLUGIN_TRUE@    ${INSTALL_PROGRAM} $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) $(DESTDIR)$(libdir)
    643746@ENABLE_PLUGIN_TRUE@    ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
    644747        ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
     
    664767
    665768uninstall-local:
    666         rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so
     769        rm -f $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
    667770        rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
    668771        rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
     
    678781@ENABLE_PLUGIN_TRUE@    cd $(PLUGIN_DIR) && \
    679782@ENABLE_PLUGIN_TRUE@    $(CXX) $(CXXFLAGS) \
     783@ENABLE_PLUGIN_TRUE@       $(DEFS) $(VERSION_DEFS) \
    680784@ENABLE_PLUGIN_TRUE@      -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
    681785@ENABLE_PLUGIN_TRUE@      -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
     
    690794@ENABLE_PLUGIN_TRUE@      -fPIC -o $@ -c $<
    691795
    692 @ENABLE_PLUGIN_TRUE@$(PLUGIN_DIR)/IcedTeaPlugin.so: $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
     796@ENABLE_PLUGIN_TRUE@$(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
    693797@ENABLE_PLUGIN_TRUE@    cd $(PLUGIN_DIR) && \
    694798@ENABLE_PLUGIN_TRUE@    $(CXX) $(CXXFLAGS) \
     
    701805@ENABLE_PLUGIN_TRUE@clean-IcedTeaPlugin:
    702806@ENABLE_PLUGIN_TRUE@    rm -f $(PLUGIN_DIR)/*.o
    703 @ENABLE_PLUGIN_TRUE@    rm -f $(PLUGIN_DIR)/IcedTeaPlugin.so
     807@ENABLE_PLUGIN_TRUE@    rm -f $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY)
    704808@ENABLE_PLUGIN_TRUE@    if [ $(abs_top_srcdir) != $(abs_top_builddir) ]; then \
    705809@ENABLE_PLUGIN_TRUE@      if [ -e $(abs_top_builddir)/plugin/icedteanp ] ; then \
     
    8971001        fi
    8981002
    899 check-pac-functions: stamps/bootstrap-directory.stamp
     1003stamps/check-pac-functions.stamp: stamps/bootstrap-directory.stamp
    9001004        ./jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \
    901           $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js)
     1005          $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) ; \
     1006        mkdir -p stamps && \
     1007        touch $@
    9021008
    9031009junit-runner-source-files.txt:
    9041010        find $(JUNIT_RUNNER_SRCDIR) -name '*.java' | sort > $@
    9051011
    906 $(JUNIT_RUNNER_JAR): junit-runner-source-files.txt
     1012$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt stamps/netx-dist-tests-compile.stamp
    9071013        mkdir -p $(JUNIT_RUNNER_DIR) && \
    9081014        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
    9091015          -d $(JUNIT_RUNNER_DIR) \
    910           -classpath $(JUNIT_JAR) \
     1016          -classpath $(JUNIT_JAR):$(JNLP_TESTS_ENGINE_DIR) \
    9111017          @junit-runner-source-files.txt && \
    9121018        $(BOOT_DIR)/bin/jar cf $@  -C $(JUNIT_RUNNER_DIR) .
    9131019
     1020stamps/junit-jnlp-dist-dirs: junit-jnlp-dist-simple.txt stamps/junit-jnlp-dist-signed.stamp junit-jnlp-dist-custom.txt
     1021        mkdir -p $(JNLP_TESTS_SERVER_DEPLOYDIR)
     1022        mkdir -p $(JNLP_TESTS_DIR)
     1023        touch $@
     1024
     1025junit-jnlp-dist-custom.txt:
     1026        cd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \
     1027        find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
     1028
     1029junit-jnlp-dist-simple.txt:
     1030        cd $(JNLP_TESTS_SRCDIR)/simple/ ; \
     1031        find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@
     1032
     1033stamps/junit-jnlp-dist-signed.stamp:
     1034        types=($(SIGNED_REPRODUCERS)) ; \
     1035        for which in "$${types[@]}" ; do \
     1036          pushd $(JNLP_TESTS_SRCDIR)/$$which/ ; \
     1037          find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \
     1038          popd ; \
     1039        done ; \
     1040        mkdir -p stamps && \
     1041        touch $@
     1042
     1043stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs
     1044        types=($(ALL_NONCUSTOM_REPRODUCERS)); \
     1045        for which in "$${types[@]}" ; do \
     1046          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1047          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1048          IFS="$$IFS_BACKUP" ; \
     1049          for dir in "$${simpleReproducers[@]}" ; do \
     1050            echo "processing: $$dir" ; \
     1051            mkdir -p "$(JNLP_TESTS_DIR)/$$dir" ; \
     1052            if [ -e "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ]; then \
     1053              d=`pwd` ; \
     1054              cd "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \
     1055              srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \
     1056              notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \
     1057              $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar -d "$(JNLP_TESTS_DIR)/$$dir/" $$srcFiles ; \
     1058              if [ -n "$$notSrcFiles" ] ; then \
     1059                cp -R --parents $$notSrcFiles "$(JNLP_TESTS_DIR)/$$dir/" ; \
     1060              fi ; \
     1061              cd "$(JNLP_TESTS_DIR)/$$dir/" ; \
     1062              if [ -f $(META_MANIFEST) ]; \
     1063              then \
     1064                $(BOOT_DIR)/bin/jar cfm "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $(META_MANIFEST) * ; \
     1065              else \
     1066                $(BOOT_DIR)/bin/jar cf "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \
     1067              fi; \
     1068              cd "$$d" ; \
     1069            fi; \
     1070          done ; \
     1071        done ; \
     1072        mkdir -p stamps && \
     1073        touch $@
     1074
     1075stamps/netx-dist-tests-sign-some-reproducers.stamp: stamps/netx-dist-tests-prepare-reproducers.stamp
     1076        keystore=$(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME); \
     1077        types=($(SIGNED_REPRODUCERS)) ; \
     1078        for which in "$${types[@]}" ; do \
     1079          tcaw=$(TEST_CERT_ALIAS)_$$which ; \
     1080          $(BOOT_DIR)/bin/keytool -genkey -alias $$tcaw -keystore $$keystore -keypass $(PRIVATE_KEYSTORE_PASS) -storepass $(PRIVATE_KEYSTORE_PASS) -dname "cn=$$tcaw, ou=$$tcaw, o=$$tcaw, c=$$tcaw" ; \
     1081            . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1082          signedReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1083            IFS="$$IFS_BACKUP" ; \
     1084          for dir in "$${signedReproducers[@]}" ; do \
     1085           $(BOOT_DIR)/bin/jarsigner -keystore $$keystore -storepass $(PRIVATE_KEYSTORE_PASS) -keypass $(PRIVATE_KEYSTORE_PASS)  "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar"  $$tcaw ; \
     1086          done ; \
     1087        done ; \
     1088        mkdir -p stamps && \
     1089        touch $@
     1090
     1091stamps/change-dots-to-paths.stamp: stamps/netx-dist-tests-sign-some-reproducers.stamp
     1092        pushd  $(JNLP_TESTS_SERVER_DEPLOYDIR); \
     1093        types=($(ALL_NONCUSTOM_REPRODUCERS)); \
     1094        for which in "$${types[@]}" ; do \
     1095          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1096          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1097          IFS="$$IFS_BACKUP" ; \
     1098          for dir in "$${simpleReproducers[@]}" ; do \
     1099            if test "$${dir:0:1}" = "." ; then \
     1100              echo "reproducer $$dir starts with dot. It is forbidden" ; \
     1101              exit 5; \
     1102            fi; \
     1103            if test "$${dir:(-1)}" = "." ; then \
     1104              echo "reproducer $$dir ends with dot. It is forbidden" ; \
     1105              exit 5; \
     1106            fi; \
     1107            q=`expr index "$$dir" .`; \
     1108            r=$$? ; \
     1109            if [ $$r = 0  ]; then \
     1110              slashed_dir="./$${dir//.//}" ; \
     1111              path="`dirname $$slashed_dir`" ; \
     1112              file="`basename $$slashed_dir`.jar" ; \
     1113              echo "copying $$dir.jar to $$path as $$file" ; \
     1114              mkdir --parents $$path ; \
     1115              cp $$dir".jar" "$$path"/"$$file" ; \
     1116            fi ; \
     1117          done ; \
     1118        done ; \
     1119        popd ; \
     1120        mkdir -p stamps && \
     1121        touch $@
     1122
     1123#this always tries to remove  previous testcert
     1124#the code is copypasted from netx-dist-tests-remove-cert-from-public, because
     1125#with depending to not stamped target we always have to rerun reproducers targets
     1126stamps/exported-test-certs.stamp: stamps/change-dots-to-paths.stamp
     1127        -types=($(SIGNED_REPRODUCERS)) ; \
     1128        for which in "$${types[@]}" ; do \
     1129          $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
     1130        done ;
     1131        types=($(SIGNED_REPRODUCERS)) ; \
     1132        for which in "$${types[@]}" ; do \
     1133          keytool -export -alias $(TEST_CERT_ALIAS)_$$which -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) -storepass $(PRIVATE_KEYSTORE_PASS) -keystore $(PRIVATE_KEYSTORE_NAME) ; \
     1134        done ;
     1135        mkdir -p stamps && \
     1136        touch $@
     1137
     1138stamps/netx-dist-tests-import-cert-to-public: stamps/exported-test-certs.stamp
     1139        types=($(SIGNED_REPRODUCERS)) ; \
     1140        for which in "$${types[@]}" ; do \
     1141          yes | $(BOOT_DIR)/bin/keytool -import -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ;\
     1142        done ;
     1143        mkdir -p stamps && \
     1144        touch $@
     1145
     1146netx-dist-tests-remove-cert-from-public:
     1147        -types=($(SIGNED_REPRODUCERS)) ; \
     1148        for which in "$${types[@]}" ; do \
     1149          $(BOOT_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $(PUBLIC_KEYSTORE) -storepass $(PUBLIC_KEYSTORE_PASS) ; \
     1150        done ;
     1151        -rm -rf stamps/netx-dist-tests-import-cert-to-public
     1152
     1153netx-dist-tests-source-files.txt:
     1154        find $(JNLP_TESTS_ENGINE_SRCDIR) -name '*.java' | sort > $@
     1155
     1156stamps/netx-dist-tests-compile.stamp: stamps/netx.stamp \
     1157 stamps/junit-jnlp-dist-dirs netx-dist-tests-source-files.txt
     1158        mkdir -p $(JNLP_TESTS_ENGINE_DIR);
     1159        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
     1160         -d $(JNLP_TESTS_ENGINE_DIR) \
     1161         -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
     1162         @netx-dist-tests-source-files.txt && \
     1163        mkdir -p stamps && \
     1164        touch $@
     1165
     1166netx-dist-tests-tests-source-files.txt:
     1167        find $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) -name '*.java' | sort > $@
     1168
     1169stamps/netx-dist-tests-tests-compile.stamp: stamps/junit-jnlp-dist-dirs netx-dist-tests-tests-source-files.txt  stamps/netx-dist-tests-compile.stamp
     1170        mkdir -p $(JNLP_TESTS_ENGINE_TESTS_DIR);
     1171        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
     1172         -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
     1173         -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
     1174         @netx-dist-tests-tests-source-files.txt && \
     1175        mkdir -p stamps && \
     1176        touch $@
     1177
     1178stamps/netx-dist-tests-compile-testcases.stamp: stamps/netx.stamp stamps/junit-jnlp-dist-dirs \
     1179 netx-dist-tests-source-files.txt stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-tests-compile.stamp
     1180        types=($(ALL_REPRODUCERS)); \
     1181        for which in "$${types[@]}" ; do \
     1182          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1183          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1184          IFS="$$IFS_BACKUP" ; \
     1185          for dir in "$${simpleReproducers[@]}" ; do \
     1186            $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
     1187              -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \
     1188              -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
     1189            "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/"* ; \
     1190          done ; \
     1191        done ; \
     1192        mkdir -p stamps && \
     1193        touch $@
     1194
     1195stamps/netx-dist-tests-copy-resources.stamp: stamps/junit-jnlp-dist-dirs
     1196        types=($(ALL_REPRODUCERS)); \
     1197        for which in "$${types[@]}" ; do \
     1198          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1199          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1200          IFS="$$IFS_BACKUP" ; \
     1201          for dir in "$${simpleReproducers[@]}" ; do \
     1202            cp -R "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/resources/"*  $(JNLP_TESTS_SERVER_DEPLOYDIR)/ ; \
     1203          done ; \
     1204        done ; \
     1205        mkdir -p stamps && \
     1206        touch $@
     1207
     1208$(REPRODUCERS_CLASS_NAMES): $(REPRODUCERS_CLASS_WHITELIST)
     1209        whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
     1210        cd $(JNLP_TESTS_ENGINE_TESTS_DIR) ; \
     1211        class_names= ; \
     1212        for test in `find -type f` ; do \
     1213          class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \
     1214          class_name=`echo $$class_name | sed -e 's|/|.|g' ` ; \
     1215          INLCUDE="NO" ; \
     1216          for x in $$whiteListed ; do \
     1217            q=`expr match "$$class_name" "$$x"`; \
     1218            r=$$? ; \
     1219            if [ $$r = 0  ]; then \
     1220              echo "$$class_name will be included in reproducers testcases because of $$x pattern in $(REPRODUCERS_CLASS_WHITELIST). Matching was  $$q"; \
     1221              INLCUDE="YES" ; \
     1222            fi; \
     1223          done; \
     1224          if [ "$$INLCUDE" = "YES"  ]; then \
     1225            class_names="$$class_names $$class_name" ; \
     1226          else \
     1227            echo "$$class_name had no match in $(REPRODUCERS_CLASS_WHITELIST). Excluding"; \
     1228          fi; \
     1229        done ; \
     1230        echo $$class_names > $(REPRODUCERS_CLASS_NAMES)
     1231
     1232stamps/run-netx-dist-tests.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
     1233 javaws.desktop stamps/docs.stamp launcher.build/$(itweb_settings) itweb-settings.desktop \
     1234 stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
     1235 stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
     1236 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) stamps/process-custom-reproducers.stamp
     1237        cd $(JNLP_TESTS_ENGINE_DIR) ; \
     1238        class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
     1239        CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(JNLP_TESTS_ENGINE_TESTS_DIR) \
     1240          $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \
     1241         -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
     1242@WITH_XSLTPROC_TRUE@    $(XSLTPROC)  $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(JNLP_TESTS_ENGINE_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html
     1243@WITH_XSLTPROC_TRUE@    $(XSLTPROC)  --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(JNLP_TESTS_ENGINE_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html
     1244        touch $@
     1245
     1246stamps/process-custom-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
     1247 stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\
     1248 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES)
     1249        . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1250        customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
     1251        IFS="$$IFS_BACKUP" ; \
     1252        for dir in "$${customReproducers[@]}" ; do \
     1253          pushd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/$$dir/srcs; \
     1254          $(MAKE) prepare-reproducer ; \
     1255          popd ; \
     1256        done ; \
     1257        mkdir -p stamps && \
     1258        touch $@
     1259
     1260clean-custom-reproducers: junit-jnlp-dist-custom.txt
     1261        . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1262        customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \
     1263        IFS="$$IFS_BACKUP" ; \
     1264        for dir in "$${customReproducers[@]}" ; do \
     1265          pushd $(JNLP_TESTS_SRCDIR)/custom/$$dir/srcs; \
     1266          $(MAKE) clean-reproducer ; \
     1267          popd ; \
     1268        done ; \
     1269        rm -f stamps/process-custom-reproducers.stamp
     1270
     1271#for global-links you must be root, for opera there do not exists user-links
     1272#although this targets will indeed create symbolic links to enable
     1273#icedtea-web plugin inside browser it is intended for testing purposes
     1274@ENABLE_PLUGIN_TRUE@stamps/user-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp \
     1275@ENABLE_PLUGIN_TRUE@ launcher.build/$(javaws) stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
     1276@ENABLE_PLUGIN_TRUE@    if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     1277@ENABLE_PLUGIN_TRUE@      if [ -e $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ] ; then \
     1278@ENABLE_PLUGIN_TRUE@        mv -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)  $(MOZILLA_LOCAL_BACKUP_FILE) ; \
     1279@ENABLE_PLUGIN_TRUE@        echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) backed up as $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
     1280@ENABLE_PLUGIN_TRUE@      else \
     1281@ENABLE_PLUGIN_TRUE@        echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) doesn't exists, nothing to be backed up to $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
     1282@ENABLE_PLUGIN_TRUE@      fi ; \
     1283@ENABLE_PLUGIN_TRUE@      pushd $(MOZILLA_LOCAL_PLUGINDIR) ; \
     1284@ENABLE_PLUGIN_TRUE@      ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME) ; \
     1285@ENABLE_PLUGIN_TRUE@      echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
     1286@ENABLE_PLUGIN_TRUE@      popd ; \
     1287@ENABLE_PLUGIN_TRUE@    fi ; \
     1288@ENABLE_PLUGIN_TRUE@    touch $@
     1289
     1290@ENABLE_PLUGIN_TRUE@restore-user-links:
     1291@ENABLE_PLUGIN_TRUE@    if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     1292@ENABLE_PLUGIN_TRUE@      if [ -e $(MOZILLA_LOCAL_BACKUP_FILE) ] ; then \
     1293@ENABLE_PLUGIN_TRUE@        mv -f  $(MOZILLA_LOCAL_BACKUP_FILE)  $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
     1294@ENABLE_PLUGIN_TRUE@        echo "$(MOZILLA_LOCAL_BACKUP_FILE) restored as $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)" ; \
     1295@ENABLE_PLUGIN_TRUE@      else \
     1296@ENABLE_PLUGIN_TRUE@        rm -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
     1297@ENABLE_PLUGIN_TRUE@        echo "$(MOZILLA_LOCAL_BACKUP_FILE) do not exists, nothing to be restored. $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) removed" ; \
     1298@ENABLE_PLUGIN_TRUE@      fi ; \
     1299@ENABLE_PLUGIN_TRUE@    fi ;
     1300@ENABLE_PLUGIN_TRUE@    if [ -e stamps/user-links.stamp ] ; then \
     1301@ENABLE_PLUGIN_TRUE@      rm -f stamps/user-links.stamp ; \
     1302@ENABLE_PLUGIN_TRUE@    fi
     1303
     1304@ENABLE_PLUGIN_TRUE@stamps/global-links.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \
     1305@ENABLE_PLUGIN_TRUE@ stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
     1306@ENABLE_PLUGIN_TRUE@    if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     1307@ENABLE_PLUGIN_TRUE@        dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
     1308@ENABLE_PLUGIN_TRUE@        arch=`arch`  ; \
     1309@ENABLE_PLUGIN_TRUE@        if [ "$$arch" = "x86_64" ]  ; then \
     1310@ENABLE_PLUGIN_TRUE@          dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
     1311@ENABLE_PLUGIN_TRUE@        fi ; \
     1312@ENABLE_PLUGIN_TRUE@        if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
     1313@ENABLE_PLUGIN_TRUE@          mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(MOZILLA_GLOBAL_BACKUP_FILE) ; \
     1314@ENABLE_PLUGIN_TRUE@          echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
     1315@ENABLE_PLUGIN_TRUE@        else \
     1316@ENABLE_PLUGIN_TRUE@          echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(MOZILLA_GLOBAL_BACKUP_FILE)" ; \
     1317@ENABLE_PLUGIN_TRUE@        fi ; \
     1318@ENABLE_PLUGIN_TRUE@        pushd "$$dir"  ; \
     1319@ENABLE_PLUGIN_TRUE@        ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
     1320@ENABLE_PLUGIN_TRUE@        echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
     1321@ENABLE_PLUGIN_TRUE@        popd  ; \
     1322@ENABLE_PLUGIN_TRUE@    fi ;
     1323@ENABLE_PLUGIN_TRUE@    if [ "$(OPERA)" != "" ]  ; then \
     1324@ENABLE_PLUGIN_TRUE@        dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
     1325@ENABLE_PLUGIN_TRUE@        arch=`arch`  ; \
     1326@ENABLE_PLUGIN_TRUE@        if [ "$$arch" = "x86_64" ] ; then \
     1327@ENABLE_PLUGIN_TRUE@          dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
     1328@ENABLE_PLUGIN_TRUE@        fi ; \
     1329@ENABLE_PLUGIN_TRUE@        if [ -e "$$dir"/$(PLUGIN_LINK_NAME) ] ; then \
     1330@ENABLE_PLUGIN_TRUE@          mv -f "$$dir"/$(PLUGIN_LINK_NAME)  $(OPERA_GLOBAL_BACKUP_FILE) ; \
     1331@ENABLE_PLUGIN_TRUE@          echo "$$dir/$(PLUGIN_LINK_NAME) backed up as  $(OPERA_GLOBAL_BACKUP_FILE) "; \
     1332@ENABLE_PLUGIN_TRUE@        else \
     1333@ENABLE_PLUGIN_TRUE@          echo "$$dir/$(PLUGIN_LINK_NAME) do not exists, nothing to be backed up to $(OPERA_GLOBAL_BACKUP_FILE) "; \
     1334@ENABLE_PLUGIN_TRUE@        fi ; \
     1335@ENABLE_PLUGIN_TRUE@        pushd "$$dir"  ; \
     1336@ENABLE_PLUGIN_TRUE@        ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME)  ; \
     1337@ENABLE_PLUGIN_TRUE@        echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
     1338@ENABLE_PLUGIN_TRUE@        popd  ; \
     1339@ENABLE_PLUGIN_TRUE@    fi   ; \
     1340@ENABLE_PLUGIN_TRUE@    touch $@
     1341
     1342@ENABLE_PLUGIN_TRUE@restore-global-links:
     1343@ENABLE_PLUGIN_TRUE@    if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
     1344@ENABLE_PLUGIN_TRUE@        dir="$(MOZILLA_GLOBAL32_PLUGINDIR)"  ; \
     1345@ENABLE_PLUGIN_TRUE@        arch=`arch`  ; \
     1346@ENABLE_PLUGIN_TRUE@        if [ "$$arch" = "x86_64" ]  ; then \
     1347@ENABLE_PLUGIN_TRUE@          dir="$(MOZILLA_GLOBAL64_PLUGINDIR)"  ; \
     1348@ENABLE_PLUGIN_TRUE@        fi ; \
     1349@ENABLE_PLUGIN_TRUE@        if [ -e $(MOZILLA_GLOBAL_BACKUP_FILE) ] ; then \
     1350@ENABLE_PLUGIN_TRUE@          mv -f $(MOZILLA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
     1351@ENABLE_PLUGIN_TRUE@          echo "$(MOZILLA_GLOBAL_BACKUP_FILE) restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
     1352@ENABLE_PLUGIN_TRUE@        else \
     1353@ENABLE_PLUGIN_TRUE@          rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
     1354@ENABLE_PLUGIN_TRUE@          echo "$(MOZILLA_GLOBAL_BACKUP_FILE) do not exists, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
     1355@ENABLE_PLUGIN_TRUE@        fi ; \
     1356@ENABLE_PLUGIN_TRUE@    fi ;
     1357@ENABLE_PLUGIN_TRUE@    if [ "$(OPERA)" != "" ]  ; then \
     1358@ENABLE_PLUGIN_TRUE@        dir="$(OPERA_GLOBAL32_PLUGINDIR)"  ; \
     1359@ENABLE_PLUGIN_TRUE@        arch=`arch`  ; \
     1360@ENABLE_PLUGIN_TRUE@        if [ "$$arch" = "x86_64" ] ; then \
     1361@ENABLE_PLUGIN_TRUE@          dir="$(OPERA_GLOBAL64_PLUGINDIR)" ; \
     1362@ENABLE_PLUGIN_TRUE@        fi ; \
     1363@ENABLE_PLUGIN_TRUE@        if [ -e $(OPERA_GLOBAL_BACKUP_FILE) ] ; then \
     1364@ENABLE_PLUGIN_TRUE@          mv -f $(OPERA_GLOBAL_BACKUP_FILE) "$$dir"/$(PLUGIN_LINK_NAME) ; \
     1365@ENABLE_PLUGIN_TRUE@          echo "$(OPERA_GLOBAL_BACKUP_FILE)  restored as $$dir/$(PLUGIN_LINK_NAME)" ; \
     1366@ENABLE_PLUGIN_TRUE@        else \
     1367@ENABLE_PLUGIN_TRUE@          rm -f "$$dir"/$(PLUGIN_LINK_NAME) ; \
     1368@ENABLE_PLUGIN_TRUE@          echo "$(OPERA_GLOBAL_BACKUP_FILE) do not exist, nothing to be restored. $$dir/$(PLUGIN_LINK_NAME) removed" ; \
     1369@ENABLE_PLUGIN_TRUE@        fi ; \
     1370@ENABLE_PLUGIN_TRUE@    fi   ;
     1371@ENABLE_PLUGIN_TRUE@    if [ -e stamps/global-links.stamp ] ; then \
     1372@ENABLE_PLUGIN_TRUE@      rm -f stamps/global-links.stamp ; \
     1373@ENABLE_PLUGIN_TRUE@    fi
     1374
    9141375netx-unit-tests-source-files.txt:
    9151376        find $(NETX_UNIT_TEST_SRCDIR) -name '*.java' | sort > $@
    9161377
    9171378stamps/netx-unit-tests-compile.stamp: stamps/netx.stamp \
    918  netx-unit-tests-source-files.txt
     1379 netx-unit-tests-source-files.txt stamps/netx-dist-tests-compile.stamp
    9191380        mkdir -p $(NETX_UNIT_TEST_DIR) && \
    9201381        $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
    9211382         -d $(NETX_UNIT_TEST_DIR) \
    922          -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \
     1383         -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \
    9231384         @netx-unit-tests-source-files.txt && \
    9241385        mkdir -p stamps && \
    9251386        touch $@
    9261387
    927 run-netx-unit-tests: stamps/netx-unit-tests-compile.stamp \
    928  $(JUNIT_RUNNER_JAR)
    929         cp {$(NETX_UNIT_TEST_SRCDIR),$(NETX_UNIT_TEST_DIR)}/net/sourceforge/jnlp/basic.jnlp
     1388$(TESTS_DIR)/$(REPORT_STYLES_DIRNAME):
     1389        mkdir $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)
     1390        cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.css $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
     1391        cp $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/*.js $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
     1392
     1393$(UNIT_CLASS_NAMES):
    9301394        cd $(NETX_UNIT_TEST_DIR) ; \
    9311395        class_names= ; \
     
    9351399          class_names="$$class_names $$class_name" ; \
    9361400        done ; \
    937         echo $$class_names ; \
    938         CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):. \
    939           $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
    940 
    941 clean-netx-tests: clean-netx-unit-tests clean-junit-runner
     1401        echo $$class_names > $(UNIT_CLASS_NAMES);
     1402
     1403stamps/run-netx-unit-tests.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
     1404 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
     1405        filename=" " ; \
     1406        cd $(NETX_UNIT_TEST_SRCDIR) ; \
     1407        for file in `find . -type f \! -iname "*.java"`; do\
     1408                filename=`echo $$file `; \
     1409                cp --parents $$filename $(NETX_UNIT_TEST_DIR) ; \
     1410        done ; \
     1411        cd $(NETX_UNIT_TEST_DIR) ; \
     1412        class_names=`cat $(UNIT_CLASS_NAMES)` ; \
     1413        CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(JNLP_TESTS_ENGINE_DIR):. \
     1414          $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names
     1415@WITH_XSLTPROC_TRUE@    $(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html
     1416@WITH_XSLTPROC_TRUE@    $(XSLTPROC) --stringparam logs logs_unit.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(NETX_UNIT_TEST_DIR)/tests-output.xml > $(TESTS_DIR)/index_unit.html
     1417        mkdir -p stamps && \
     1418        touch $@
     1419
     1420#warning,  during this target tests.build/netx/unit/tests-output.xml is backup and rewriten (but not coresponding html file)
     1421#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
     1422#you can add -ix "-*Test*" -ix "-*test*"  to ignore all test cases from statistics
     1423stamps/run-unit-test-code-coverage.stamp: stamps/netx-unit-tests-compile.stamp $(JUNIT_RUNNER_JAR)  \
     1424 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)  $(UNIT_CLASS_NAMES)
     1425@WITH_EMMA_TRUE@        cd $(NETX_UNIT_TEST_DIR) ; \
     1426@WITH_EMMA_TRUE@        for file in $(EMMA_MODIFIED_FILES) ; do \
     1427@WITH_EMMA_TRUE@          mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
     1428@WITH_EMMA_TRUE@        done ;\
     1429@WITH_EMMA_TRUE@        class_names=`cat $(UNIT_CLASS_NAMES)` ; \
     1430@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \
     1431@WITH_EMMA_TRUE@         -Dreport.html.out.encoding=UTF-8 \
     1432@WITH_EMMA_TRUE@         -raw \
     1433@WITH_EMMA_TRUE@         -sp $(NETX_SRCDIR) \
     1434@WITH_EMMA_TRUE@         -sp $(NETX_UNIT_TEST_SRCDIR) \
     1435@WITH_EMMA_TRUE@         -sp $(JUNIT_RUNNER_SRCDIR) \
     1436@WITH_EMMA_TRUE@         -r html \
     1437@WITH_EMMA_TRUE@         -r xml \
     1438@WITH_EMMA_TRUE@         -cp $(NETX_DIR)/lib/classes.jar \
     1439@WITH_EMMA_TRUE@         -cp $(JUNIT_JAR) \
     1440@WITH_EMMA_TRUE@         -cp $(JUNIT_RUNNER_JAR) \
     1441@WITH_EMMA_TRUE@         -cp $(BOOT_DIR)/jre/lib/rt.jar \
     1442@WITH_EMMA_TRUE@         -cp $(BOOT_DIR)/jre/lib/jsse.jar \
     1443@WITH_EMMA_TRUE@         -cp $(BOOT_DIR)/jre/lib/resources.jar \
     1444@WITH_EMMA_TRUE@         -cp $(RHINO_RUNTIME) \
     1445@WITH_EMMA_TRUE@         -cp $(JNLP_TESTS_ENGINE_DIR) \
     1446@WITH_EMMA_TRUE@         -cp . \
     1447@WITH_EMMA_TRUE@         -ix "-org.junit.*" \
     1448@WITH_EMMA_TRUE@         -ix "-junit.*" \
     1449@WITH_EMMA_TRUE@         CommandLine $$class_names ;  \
     1450@WITH_EMMA_TRUE@        for file in $(EMMA_MODIFIED_FILES) ; do \
     1451@WITH_EMMA_TRUE@          mv $(NETX_UNIT_TEST_DIR)/$$file  $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
     1452@WITH_EMMA_TRUE@          mv $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(NETX_UNIT_TEST_DIR)/$$file ; \
     1453@WITH_EMMA_TRUE@        done ;
     1454@WITH_EMMA_FALSE@       echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
     1455@WITH_EMMA_FALSE@       exit 5
     1456        touch $@
     1457
     1458#warning,  during this target tests.build/netx/jnlp_testsengine/tests-output.xml is backup and rewriten (but not coresponding html file)
     1459#xml results run from emma sandbox, however, can be wrong, co the new tests-output.xml is then renamed and orginal one restored
     1460stamps/run-reproducers-test-code-coverage.stamp: stamps/run-netx-dist-tests.stamp $(REPRODUCERS_CLASS_NAMES)
     1461@WITH_EMMA_TRUE@        cd $(TESTS_DIR) ; \
     1462@WITH_EMMA_TRUE@        for file in $(EMMA_MODIFIED_FILES) ; do \
     1463@WITH_EMMA_TRUE@          mv $(JNLP_TESTS_ENGINE_DIR)/$$file $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \
     1464@WITH_EMMA_TRUE@        done ;\
     1465@WITH_EMMA_TRUE@        echo "backuping javaws and netx.jar in $(DESTDIR)" ; \
     1466@WITH_EMMA_TRUE@        netx_backup=$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx_backup.jar ; \
     1467@WITH_EMMA_TRUE@        javaws_backup=$(DESTDIR)$(bindir)/javaws_backup ; \
     1468@WITH_EMMA_TRUE@        mv $(DESTDIR)$(bindir)/javaws $$javaws_backup ;  \
     1469@WITH_EMMA_TRUE@        mv $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar $$netx_backup ; \
     1470@WITH_EMMA_TRUE@        nw_bootclasspath="$(LAUNCHER_BOOTCLASSPATH):$(EMMA_JAR):$$netx_backup" ; \
     1471@WITH_EMMA_TRUE@        instructed_dir=$(TESTS_DIR)/instr ; \
     1472@WITH_EMMA_TRUE@        echo "instrumenting netx.jar from $$netx_backup through $$instructed_dir" ; \
     1473@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/java -cp  $(EMMA_JAR) emma instr -d $$instructed_dir -ip $$netx_backup ; \
     1474@WITH_EMMA_TRUE@        pushd $$instructed_dir ; \
     1475@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/jar -cf $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar * ; \
     1476@WITH_EMMA_TRUE@        popd ; \
     1477@WITH_EMMA_TRUE@        rm -rf $$instructed_dir ; \
     1478@WITH_EMMA_TRUE@        echo "patching $(javaws)" ; \
     1479@WITH_EMMA_TRUE@        cat $$javaws_backup | sed "s,$(LAUNCHER_BOOTCLASSPATH),$$nw_bootclasspath," > $(DESTDIR)$(bindir)/$(javaws) ; \
     1480@WITH_EMMA_TRUE@        chmod 777 $(DESTDIR)$(bindir)/$(javaws) ; \
     1481@WITH_EMMA_TRUE@        testcases_srcs=( ) ; \
     1482@WITH_EMMA_TRUE@        k=0 ; \
     1483@WITH_EMMA_TRUE@        types=($(ALL_REPRODUCERS)); \
     1484@WITH_EMMA_TRUE@        for which in "$${types[@]}" ; do \
     1485@WITH_EMMA_TRUE@          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1486@WITH_EMMA_TRUE@          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1487@WITH_EMMA_TRUE@          IFS="$$IFS_BACKUP" ; \
     1488@WITH_EMMA_TRUE@          for dir in "$${simpleReproducers[@]}" ; do \
     1489@WITH_EMMA_TRUE@            testcases_srcs[k]="-sp" ; \
     1490@WITH_EMMA_TRUE@            k=$$((k+1)) ; \
     1491@WITH_EMMA_TRUE@            testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
     1492@WITH_EMMA_TRUE@            k=$$((k+1)) ; \
     1493@WITH_EMMA_TRUE@            done ; \
     1494@WITH_EMMA_TRUE@          done ; \
     1495@WITH_EMMA_TRUE@        cd $(JNLP_TESTS_ENGINE_DIR) ; \
     1496@WITH_EMMA_TRUE@        class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
     1497@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/java  \
     1498@WITH_EMMA_TRUE@         $(EMMA_JAVA_ARGS) \
     1499@WITH_EMMA_TRUE@          $(REPRODUCERS_DPARAMETERS) \
     1500@WITH_EMMA_TRUE@         -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) emmarun  \
     1501@WITH_EMMA_TRUE@           -raw \
     1502@WITH_EMMA_TRUE@           -cp $(NETX_DIR)/lib/classes.jar \
     1503@WITH_EMMA_TRUE@           -cp $(JUNIT_JAR) \
     1504@WITH_EMMA_TRUE@           -cp $(JUNIT_RUNNER_JAR) \
     1505@WITH_EMMA_TRUE@           -cp $(BOOT_DIR)/jre/lib/rt.jar \
     1506@WITH_EMMA_TRUE@           -cp $(BOOT_DIR)/jre/lib/jsse.jar \
     1507@WITH_EMMA_TRUE@           -cp $(BOOT_DIR)/jre/lib/resources.jar \
     1508@WITH_EMMA_TRUE@           -cp $(RHINO_RUNTIME) \
     1509@WITH_EMMA_TRUE@           -cp . \
     1510@WITH_EMMA_TRUE@           -cp $(JNLP_TESTS_ENGINE_TESTS_DIR) \
     1511@WITH_EMMA_TRUE@           -ix "-org.junit.*" \
     1512@WITH_EMMA_TRUE@           -ix "-junit.*" \
     1513@WITH_EMMA_TRUE@           CommandLine $$class_names ; \
     1514@WITH_EMMA_TRUE@        mv $(JNLP_TESTS_ENGINE_DIR)/coverage.ec $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec ; \
     1515@WITH_EMMA_TRUE@        mv $(JNLP_TESTS_ENGINE_DIR)/coverage.es $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
     1516@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
     1517@WITH_EMMA_TRUE@          -in $(TESTS_DIR)/coverage.em \
     1518@WITH_EMMA_TRUE@          -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec \
     1519@WITH_EMMA_TRUE@          -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \
     1520@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
     1521@WITH_EMMA_TRUE@          -Dreport.html.out.encoding=UTF-8 \
     1522@WITH_EMMA_TRUE@          -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es  \
     1523@WITH_EMMA_TRUE@          -sp $(NETX_SRCDIR) \
     1524@WITH_EMMA_TRUE@          -sp $(NETX_UNIT_TEST_SRCDIR) \
     1525@WITH_EMMA_TRUE@          -sp $(JUNIT_RUNNER_SRCDIR) \
     1526@WITH_EMMA_TRUE@          -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
     1527@WITH_EMMA_TRUE@          -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
     1528@WITH_EMMA_TRUE@          -r html \
     1529@WITH_EMMA_TRUE@          -r xml \
     1530@WITH_EMMA_TRUE@          "$${testcases_srcs[@]}" ; \
     1531@WITH_EMMA_TRUE@        echo "restoring javaws and netx.jar in $(DESTDIR)" ; \
     1532@WITH_EMMA_TRUE@        rm -f $(DESTDIR)$(bindir)/$(javaws) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
     1533@WITH_EMMA_TRUE@        rm -f $(DESTDIR)$(bindir)/$(javaws);  \
     1534@WITH_EMMA_TRUE@        mv $$javaws_backup $(DESTDIR)$(bindir)/$(javaws);  \
     1535@WITH_EMMA_TRUE@        mv $$netx_backup $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \
     1536@WITH_EMMA_TRUE@        for file in $(EMMA_MODIFIED_FILES) ; do \
     1537@WITH_EMMA_TRUE@          mv $(JNLP_TESTS_ENGINE_DIR)/$$file  $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_SUFFIX)" ; \
     1538@WITH_EMMA_TRUE@          mv $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)"  $(JNLP_TESTS_ENGINE_DIR)/$$file ; \
     1539@WITH_EMMA_TRUE@        done ;\
     1540@WITH_EMMA_TRUE@        rm $(JNLP_TESTS_ENGINE_DIR)/coverage.txt ;
     1541@WITH_EMMA_FALSE@       echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
     1542@WITH_EMMA_FALSE@       exit 5
     1543        touch $@
     1544
     1545run-test-code-coverage: run-unit-test-code-coverage run-reproducers-test-code-coverage
     1546@WITH_EMMA_TRUE@        cd $(TESTS_DIR) ; \
     1547@WITH_EMMA_TRUE@        k=0 ; \
     1548@WITH_EMMA_TRUE@        types=($(ALL_REPRODUCERS)); \
     1549@WITH_EMMA_TRUE@        for which in "$${types[@]}" ; do \
     1550@WITH_EMMA_TRUE@          . $(abs_top_srcdir)/NEW_LINE_IFS ; \
     1551@WITH_EMMA_TRUE@          simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
     1552@WITH_EMMA_TRUE@          IFS="$$IFS_BACKUP" ; \
     1553@WITH_EMMA_TRUE@          for dir in "$${simpleReproducers[@]}" ; do \
     1554@WITH_EMMA_TRUE@            testcases_srcs[k]="-sp" ; \
     1555@WITH_EMMA_TRUE@            k=$$((k+1)) ; \
     1556@WITH_EMMA_TRUE@            testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \
     1557@WITH_EMMA_TRUE@            k=$$((k+1)) ; \
     1558@WITH_EMMA_TRUE@          done ; \
     1559@WITH_EMMA_TRUE@        done ; \
     1560@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \
     1561@WITH_EMMA_TRUE@         -in $(NETX_UNIT_TEST_DIR)/coverage.es \
     1562@WITH_EMMA_TRUE@         -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
     1563@WITH_EMMA_TRUE@        $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR)  -Demma.report.html.out.encoding=UTF-8 emma report \
     1564@WITH_EMMA_TRUE@         -Dreport.html.out.encoding=UTF-8 \
     1565@WITH_EMMA_TRUE@         -in $(TESTS_DIR)/coverage.es \
     1566@WITH_EMMA_TRUE@         -in $(TESTS_DIR)/coverage.em \
     1567@WITH_EMMA_TRUE@         -sp $(NETX_SRCDIR) \
     1568@WITH_EMMA_TRUE@         -sp $(NETX_UNIT_TEST_SRCDIR) \
     1569@WITH_EMMA_TRUE@         -sp $(JUNIT_RUNNER_SRCDIR) \
     1570@WITH_EMMA_TRUE@         -sp $(JNLP_TESTS_ENGINE_SRCDIR) \
     1571@WITH_EMMA_TRUE@         -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \
     1572@WITH_EMMA_TRUE@         "$${testcases_srcs[@]}" \
     1573@WITH_EMMA_TRUE@         -r html \
     1574@WITH_EMMA_TRUE@         -r xml ;
     1575@WITH_EMMA_FALSE@       echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ;
     1576@WITH_EMMA_FALSE@       exit 5
     1577
     1578clean-netx-tests: clean-netx-unit-tests clean-junit-runner clean-netx-dist-tests clean-test-code-coverage
    9421579        if [ -e $(TESTS_DIR)/netx ]; then \
    9431580          rmdir $(TESTS_DIR)/netx ; \
     
    9491586        rm -f $(JUNIT_RUNNER_JAR)
    9501587
    951 clean-netx-unit-tests:
     1588clean-netx-unit-tests: clean_tests_reports
    9521589        rm -f netx-unit-tests-source-files.txt
    9531590        rm -rf $(NETX_UNIT_TEST_DIR)
     1591        rm -f $(UNIT_CLASS_NAMES)
     1592        rm -f stamps/check-pac-functions.stamp
     1593        rm -f stamps/run-netx-unit-tests.stamp
    9541594        rm -f stamps/netx-unit-tests-compile.stamp
     1595
     1596clean_tests_reports:
     1597        rm -rf  $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME)/
     1598        rm -f  $(TESTS_DIR)/*.html
     1599
     1600clean-netx-dist-tests: clean_tests_reports netx-dist-tests-remove-cert-from-public clean-custom-reproducers
     1601        rm -f netx-dist-tests-source-files.txt
     1602        rm -rf $(JNLP_TESTS_ENGINE_TESTS_DIR)
     1603        rm -rf $(JNLP_TESTS_DIR)
     1604        rm -rf $(JNLP_TESTS_SERVER_DEPLOYDIR)
     1605        rm -rf $(JNLP_TESTS_ENGINE_DIR)
     1606        rm -f stamps/junit-jnlp-dist-dirs
     1607        rm -f stamps/netx-dist-tests-compile.stamp
     1608        rm -f stamps/netx-dist-tests-tests-compile.stamp
     1609        rm -f stamps/netx-dist-tests-prepare-reproducers.stamp
     1610        rm -f stamps/netx-dist-tests-compile-testcases.stamp
     1611        rm -f stamps/netx-dist-tests-copy-resources.stamp
     1612        rm -f stamps/netx-dist-tests-sign-some-reproducers.stamp
     1613        rm -f stamps/change-dots-to-paths.stamp
     1614        rm -f junit-jnlp-dist-simple.txt
     1615        rm -f junit-jnlp-dist-custom.txt
     1616        rm -f netx-dist-tests-tests-source-files.txt
     1617        types=($(SIGNED_REPRODUCERS)) ; \
     1618        for which in "$${types[@]}" ; do \
     1619          rm -f junit-jnlp-dist-$$which.txt ; \
     1620          rm -f $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ; \
     1621        done ;
     1622        rm -f stamps/exported-test-certs.stamp
     1623        rm -f stamps/junit-jnlp-dist-signed.stamp
     1624        rm -f $(REPRODUCERS_CLASS_NAMES)
     1625        rm -f $(abs_top_builddir)/$(PRIVATE_KEYSTORE_NAME)
     1626        rm -f stamps/run-netx-dist-tests.stamp
     1627
     1628clean-unit-test-code-coverage:
     1629        if [ -e stamps/run-unit-test-code-coverage.stamp ]; then \
     1630          rm -rf $(NETX_UNIT_TEST_DIR)/coverage ; \
     1631          rm -f $(NETX_UNIT_TEST_DIR)/coverage.xml ; \
     1632          rm -f $(NETX_UNIT_TEST_DIR)/coverageX.es ; \
     1633          rm -f $(NETX_UNIT_TEST_DIR)/coverageX.ec ; \
     1634          rm -f $(NETX_UNIT_TEST_DIR)/coverage.es ; \
     1635          rm -f $(NETX_UNIT_TEST_DIR)/tests-output_withEmma.xml ; \
     1636          rm -f stamps/run-unit-test-code-coverage.stamp ; \
     1637        fi
     1638
     1639clean-reproducers-test-code-coverage:
     1640        if [ -e stamps/run-reproducers-test-code-coverage.stamp ]; then \
     1641         rm -rf $(JNLP_TESTS_ENGINE_DIR)/coverage ; \
     1642         rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.xml ; \
     1643         rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \
     1644         rm -f $(JNLP_TESTS_ENGINE_DIR)/tests-output_withEmma.xml ; \
     1645         rm -f stamps/run-reproducers-test-code-coverage.stamp ; \
     1646        fi
     1647
     1648clean-test-code-coverage: clean-unit-test-code-coverage clean-reproducers-test-code-coverage
     1649        if [ -e $(TESTS_DIR)/coverage.xml ]; then \
     1650          rm -rf $(TESTS_DIR)/coverage  ; \
     1651          rm -f $(TESTS_DIR)/coverage.xml  ; \
     1652          rm -f $(TESTS_DIR)/coverage.es  ; \
     1653          rm -f $(TESTS_DIR)/coverage.em ; \
     1654        fi
    9551655
    9561656# plugin tests
     
    9921692        ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac
    9931693        ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc
     1694        if [ -e "$(KEYTOOL)" ] ; then \
     1695          ln -sf $(KEYTOOL) $(BOOT_DIR)/bin/keytool ;\
     1696        else \
     1697          echo "#! /bin/sh" > $(BOOT_DIR)/bin/keytool ;\
     1698          echo "echo \"keytool not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/keytool ;\
     1699          chmod 777 $(BOOT_DIR)/bin/keytool ;\
     1700        fi
     1701        if [ -e "$(JARSIGNER)" ] ; then \
     1702          ln -sf $(JARSIGNER) $(BOOT_DIR)/bin/jarsigner ;\
     1703        else \
     1704          echo "#! /bin/sh" > $(BOOT_DIR)/bin/jarsigner ;\
     1705          echo "echo \"jarsigner not exist on your system, signed part of reproducers test will fail\"" >> $(BOOT_DIR)/bin/jarsigner ;\
     1706          chmod 777 $(BOOT_DIR)/bin/jarsigner ;\
     1707        fi
    9941708        mkdir -p $(BOOT_DIR)/jre/lib && \
    9951709        ln -s $(SYSTEM_JRE_DIR)/lib/rt.jar $(BOOT_DIR)/jre/lib && \
     
    9981712        else \
    9991713          ln -s rt.jar $(BOOT_DIR)/jre/lib/jsse.jar ; \
     1714        fi
     1715        if [ -e $(SYSTEM_JRE_DIR)/lib/resources.jar ] ; then \
     1716          ln -s $(SYSTEM_JRE_DIR)/lib/resources.jar $(BOOT_DIR)/jre/lib ; \
     1717        else \
     1718          ln -s rt.jar $(BOOT_DIR)/jre/lib/resources.jar ; \
    10001719        fi
    10011720        ln -sf $(SYSTEM_JRE_DIR)/lib/$(JRE_ARCH_DIR) \
     
    10381757plugin-tests: stamps/plugin-tests.stamp
    10391758
     1759check-pac-functions: stamps/check-pac-functions.stamp
     1760
     1761run-netx-unit-tests: stamps/run-netx-unit-tests.stamp
     1762
     1763links: stamps/global-links.stamp
     1764
     1765user-links: stamps/user-links.stamp
     1766
     1767run-netx-dist-tests: stamps/run-netx-dist-tests.stamp
     1768
     1769run-unit-test-code-coverage: stamps/run-unit-test-code-coverage.stamp
     1770
     1771run-reproducers-test-code-coverage: stamps/run-reproducers-test-code-coverage.stamp
     1772
    10401773# Tell versions [3.59,3.63) of GNU make to not export all variables.
    10411774# Otherwise a system limit (for SysV at least) may be exceeded.
  • branches/vendor/sourceforge/icedtea-web/current/NEWS

    r348 r416  
    99CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
    1010
    11 New in release 1.1.2 (2011-08-31):
     11New in release 1.3 (2012-09-04):
     12* Security updates
     13  - CVE-2012-3422, RH840592: Potential read from an uninitialized memory location
     14  - CVE-2012-3423, RH841345: Incorrect handling of not 0-terminated strings
     15* NetX
     16  - PR898: signed applications with big jnlp-file doesn't start (webstart affect like "frozen")
     17  - PR811: javaws is not handling urls with spaces (and other characters needing encoding) correctly
     18* Plugin
     19  - PR820: IcedTea-Web 1.1.3 crashing Firefox when loading Citrix XenApp
     20  - PR863: Error passing strings to applet methods in Chromium
     21  - PR895: IcedTea-Web searches for missing classes on each loadClass or findClass
     22  - PR861: Allow loading from non codebase hosts. Allow code to connect to hosting server
     23  - PR518: NPString.utf8characters not guaranteed to be nul-terminated
     24  - PR722: META-INF/ unsigned entries should be ignored in signing
     25  - PR855: AppletStub getDocumentBase() doesn't return full URL
     26  - PR1011: Folders treated as jar files in archive tag
     27  - PR1106: Buffer overflow in plugin table
     28  - PR975: Plugin should not include classpaths specified in jar manifests when using jnlp_href
     29  - PR588: Cookies not written from cookie jar to browser cookies
     30* Common
     31  - PR918: java applet windows uses a low resulution black/white icon
     32  - RH838417: Disambiguate signed applet security prompt from certificate warning
     33  - RH838559: Disambiguate signed applet security prompt from certificate warning
     34  - RH720836: project can be compiled against GTK+ 2 or 3 librarie
     35  - PR955: regression: SweetHome3D fails to run
     36
     37New in release 1.2 (2011-XX-XX):
     38* Security updates:
     39        - RH718164, CVE-2011-2513: Home directory path disclosure to untrusted applications
     40        - RH718170, CVE-2011-2514: Java Web Start security warning dialog manipulation
     41        - RH742515, CVE-2011-3377: IcedTea-Web: second-level domain subdomains and suffix domain SOP bypass
     42* NetX
     43  - PR618: Can't install OpenDJ, JavaWebStart fails with Input stream is null error
     44  - PR765: JNLP file with all resource jars marked as 'lazy' fails to validate signature and stops the launch of application
     45  - PR788: Elluminate Live! is not working
     46  - PR804: javaws launcher incorrectly handles file names with spaces
    1247* Plugin
    1348  - PR749: sun.applet.PluginStreamHandler#handleMessage(String) really slow
     49  - PR782: Support building against npapi-sdk as well
     50  - PR838: IcedTea plugin crashes with chrome browser when javascript is executed
     51  - PR852: Classloader not being flushed after last applet from a site is closed
     52  - RH586194: Unable to connect to connect with Juniper VPN client
    1453  - RH718693: MindTerm SSH Applet doesn't work
    1554Common
    1655  - PR768: Signed applets/Web Start apps don't work with OpenJDK7 and up
     56  - PR771: IcedTea-Web certificate verification code does not use the right API
     57  - PR742: IcedTea-Web checks certs only upto 1 level deep before declaring them untrusted.
    1758  - PR769: IcedTea-Web does not work with some ssl sites with OpenJDK7
     59  - PR778: Jar download and server certificate verification deadlock
     60  - PR789: typo in jrunscript.sh
     61  - PR794: IcedTea-Web does not work if a Web Start app jar has a Class-Path element in the manifest
     62  - PR808: javaws is unable to start, when missing jars are enumerated before main jar
    1863  - RH734081: Javaws cannot use proxy settings from Firefox
     64  - RH738814: Access denied at ssl handshake
     65  - Support for authenticating using client certificates
    1966
    20 New in release 1.1.1 (2011-07-20):
    21 * Security updates:
    22         - RH718164, CVE-2011-2513: Home directory path disclosure to untrusted applications
    23         - RH718170, CVE-2011-2514: Java Web Start security warning dialog manipulation
    24 
    25 New in release 1.1 (2011-06-08):
     67New in release 1.1 (2011-XX-XX):
     68* Security updates
     69  - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries
     70  - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation
    2671* New Features
    2772  - IcedTea-Web now installs to a FHS-compliant location
     
    3883  - The user's default browser (determined from xdg-open or $BROWSER) is used
    3984  - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled)
     85  - PR464: plugin can now load parameters from jnlp files.
    4086  - PR658: now jnlp.packEnabled works with applets.
    4187  - PR726: closing javaws -about no longer throws exceptions.
  • branches/vendor/sourceforge/icedtea-web/current/acinclude.m4

    r348 r416  
    360360])
    361361
     362dnl ITW_GTK_CHECK_VERSION([gtk version])
     363AC_DEFUN([ITW_GTK_CHECK_VERSION],
     364[
     365  AC_MSG_CHECKING([for GTK$1 version])
     366  GTK_VER=`$PKG_CONFIG --modversion gtk+-$1.0`
     367  AC_MSG_RESULT([$GTK_VER])
     368])
     369
     370dnl ITW_GTK_CHECK([gtk version])
     371AC_DEFUN([ITW_GTK_CHECK],
     372[
     373  case "$1" in
     374    default)
     375      PKG_CHECK_MODULES(GTK, gtk+-3.0,
     376        [ITW_GTK_CHECK_VERSION([3])],
     377        [PKG_CHECK_MODULES(GTK, gtk+-2.0,
     378           [ITW_GTK_CHECK_VERSION([2])],
     379           [AC_MSG_ERROR([GTK $1 not found])]
     380        )]
     381      )
     382      ;;
     383    *)
     384      PKG_CHECK_MODULES(GTK, gtk+-$1.0,
     385        [ITW_GTK_CHECK_VERSION([$1])],
     386        [AC_MSG_ERROR([GTK $1 not found])]
     387      )
     388      ;;
     389  esac
     390])
     391
    362392AC_DEFUN_ONCE([IT_CHECK_PLUGIN_DEPENDENCIES],
    363393[
     
    366396AC_REQUIRE([IT_CHECK_PLUGIN])
    367397if test "x${enable_plugin}" = "xyes" ; then
    368   PKG_CHECK_MODULES(GTK, gtk+-2.0)
     398  AC_ARG_WITH([gtk],
     399    [AS_HELP_STRING([--with-gtk=[2|3|default]],
     400    [the GTK+ version to use (default: 3)])],
     401    [case "$with_gtk" in
     402       2|3|default) ;;
     403       *) AC_MSG_ERROR([invalid GTK version specified]) ;;
     404     esac],
     405    [with_gtk=default])
     406  ITW_GTK_CHECK([$with_gtk])
    369407  PKG_CHECK_MODULES(GLIB, glib-2.0)
    370408  AC_SUBST(GLIB_CFLAGS)
     
    373411  AC_SUBST(GTK_LIBS)
    374412
    375   PKG_CHECK_MODULES(MOZILLA, mozilla-plugin)
    376    
     413  PKG_CHECK_MODULES(MOZILLA, npapi-sdk, [
     414    AC_CACHE_CHECK([for xulrunner version], [xulrunner_cv_collapsed_version],[
     415      # XXX: use NPAPI versions instead
     416      xulrunner_cv_collapsed_version=20000000
     417    ])
     418  ], [
     419    PKG_CHECK_MODULES(MOZILLA, mozilla-plugin)
     420  ])
     421
    377422  AC_SUBST(MOZILLA_CFLAGS)
    378423  AC_SUBST(MOZILLA_LIBS)
     
    390435    then
    391436      xulrunner_cv_collapsed_version=`pkg-config --modversion libxul | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
     437    elif pkg-config --modversion mozilla-plugin >/dev/null 2>&1
     438    then
     439      xulrunner_cv_collapsed_version=`pkg-config --modversion mozilla-plugin | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
    392440    else
    393441      AC_MSG_FAILURE([cannot determine xulrunner version])
     
    483531AM_CONDITIONAL(HAS_PKGVERSION, test "x${PKGVERSION}" != "xnone")
    484532AC_SUBST(PKGVERSION)
     533])
     534
     535AC_DEFUN_ONCE([IT_CHECK_GLIB_VERSION],[
     536   PKG_CHECK_MODULES([GLIB2_V_216],[glib-2.0 >= 2.16],[],[AC_DEFINE([LEGACY_GLIB])])
     537 ])
     538
     539AC_DEFUN_ONCE([IT_CHECK_XULRUNNER_API_VERSION],
     540[
     541  AC_MSG_CHECKING([for legacy xulrunner api])
     542  AC_LANG_PUSH(C++)
     543  CXXFLAGS_BACKUP=$CXXFLAGS
     544  CXXFLAGS=$CXXFLAGS" "$MOZILLA_CFLAGS
     545  AC_TRY_COMPILE([
     546    #include <npfunctions.h>
     547    const  char* NP_GetMIMEDescription ()
     548    {return (char*) "yap!";}
     549  ],[],[
     550    AC_MSG_RESULT(no)
     551  ],[
     552    AC_MSG_RESULT(yes)
     553    AC_DEFINE([LEGACY_XULRUNNERAPI])
     554  ])
     555  CXXFLAGS=$CXXFLAGS_BACKUP
     556  AC_LANG_POP(C++)
    485557])
    486558
     
    643715  AC_MSG_RESULT(${JAVA})
    644716  AC_SUBST(JAVA)
     717  JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'`
     718  case "${JAVA_VERSION}" in
     719    1.7*) VERSION_DEFS='-DHAVE_JAVA7';;
     720  esac
     721  AC_SUBST(VERSION_DEFS)
     722])
     723
     724AC_DEFUN_ONCE([IT_FIND_KEYTOOL],
     725[
     726  AC_REQUIRE([IT_CHECK_FOR_JDK])
     727  AC_MSG_CHECKING([for keytool])
     728  AC_ARG_WITH([keytool],
     729              [AS_HELP_STRING(--with-keytool,specify location of keytool for signed part of run-netx-dist)],
     730  [
     731    if test "${withval}" = "yes" ; then
     732      KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool 
     733    else
     734      KEYTOOL="${withval}"
     735    fi
     736  ],
     737  [
     738    KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool
     739  ])
     740  if ! test -f "${KEYTOOL}"; then
     741    AC_PATH_PROG(KEYTOOL, keytool)
     742  fi
     743  if ! test -f "${KEYTOOL}"; then
     744    KEYTOOL=""
     745  fi
     746  if test -z "${KEYTOOL}" ; then
     747     AC_MSG_WARN("keytool not found so signed part of run-netx-dist will fail")
     748  fi
     749  AC_MSG_RESULT(${KEYTOOL})
     750  AC_SUBST(KEYTOOL)
     751])
     752
     753AC_DEFUN_ONCE([IT_FIND_JARSIGNER],
     754[
     755  AC_REQUIRE([IT_CHECK_FOR_JDK])
     756  AC_MSG_CHECKING([for jarsigner])
     757  AC_ARG_WITH([jarsigner],
     758              [AS_HELP_STRING(--with-jarsigner,specify location of jarsigner for signed part od run-netx-dist)],
     759  [
     760    if test "${withval}" = "yes" ; then
     761      JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner 
     762    else
     763      JARSIGNER="${withval}"
     764    fi
     765  ],
     766  [
     767    JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner
     768  ])
     769  if ! test -f "${JARSIGNER}"; then
     770    AC_PATH_PROG(JARSIGNER, jarsigner,"")
     771  fi
     772  if ! test -f "${JARSIGNER}"; then
     773    JARSIGNER=""
     774  fi
     775  if test -z "${JARSIGNER}"; then
     776     AC_MSG_WARN("jarsigner not found so signed part of run-netx-dist will fail")
     777  fi
     778  AC_MSG_RESULT(${JARSIGNER})
     779  AC_SUBST(JARSIGNER)
    645780])
    646781
     
    784919  AC_SUBST([FULL_VERSION])
    785920])
     921
     922dnl Allows you to configure (enable/disable/set path to) the browser
     923dnl REQUIRED Parameters:
     924dnl [browser name, variable to store path, default command to run browser (if not provided, assume it's the same as the browser name]
     925AC_DEFUN([IT_FIND_BROWSER],
     926[
     927  AC_ARG_WITH([$1],
     928              [AS_HELP_STRING(--with-$1,specify the location of $1)],
     929  [
     930   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
     931    $2=""
     932   elif test -f "${withval}" ; then
     933    $2="${withval}"
     934   else
     935    AC_MSG_CHECKING([for $1])
     936    AC_MSG_RESULT([not found])
     937    AC_MSG_FAILURE([invalid location specified to $1: ${withval}])
     938   fi
     939  ],
     940  [
     941   withval="yes"
     942  ])
     943
     944  if test -f "${$2}"; then
     945   AC_MSG_CHECKING([for $1])
     946   AC_MSG_RESULT([${$2}])
     947  elif test "${withval}" != "no"; then
     948   if test $# -gt 2; then
     949    AC_PATH_TOOL([$2], [$3], [], []) 
     950   else
     951    AC_PATH_TOOL([$2], [$1], [], [])
     952   fi
     953  else
     954   AC_MSG_CHECKING([for $1])       
     955   AC_MSG_RESULT([no])
     956  fi
     957])
     958
     959AC_DEFUN_ONCE([IT_SET_GLOBAL_BROWSERTESTS_BEHAVIOUR],
     960[
     961  AC_MSG_CHECKING([how browser test will be run])
     962  AC_ARG_WITH([browser-tests],
     963             [AS_HELP_STRING([--with-browser-tests],
     964                              [yes - as defined (default), no - all browser tests will be skipped, one - all "mutiple browsers" test will behave as "one" test, all - all browser tests will be run for all set browsers])],
     965             [
     966               BROWSER_SWITCH=${withval}
     967             ],
     968             [
     969               BROWSER_SWITCH="yes"
     970             ])
     971  D_PARAM_PART="-Dmodified.browsers.run"
     972  case "$BROWSER_SWITCH" in
     973    "yes" )
     974        BROWSER_TESTS_MODIFICATION="" ;;
     975    "no" )
     976        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=ignore" ;;
     977    "one" )
     978        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=one" ;;
     979    "all" )
     980        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=all" ;;
     981    *)
     982        AC_MSG_ERROR([unknown valkue of with-browser-tests ($BROWSER_SWITCH), so not use (yes) or set yes|no|one|all])
     983  esac
     984  AC_MSG_RESULT(${BROWSER_SWITCH})
     985  AC_SUBST(BROWSER_TESTS_MODIFICATION)
     986])
  • branches/vendor/sourceforge/icedtea-web/current/aclocal.m4

    r348 r416  
    1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
     1# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
    22
    33# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
    4 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
     4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
     5# Inc.
    56# This file is free software; the Free Software Foundation
    67# gives unlimited permission to copy and/or distribute it,
     
    178179])# PKG_CHECK_MODULES
    179180
    180 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
    181 #
    182 # This file is free software; the Free Software Foundation
    183 # gives unlimited permission to copy and/or distribute it,
    184 # with or without modifications, as long as this notice is preserved.
     181# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
     182# Foundation, Inc.
     183#
     184# This file is free software; the Free Software Foundation
     185# gives unlimited permission to copy and/or distribute it,
     186# with or without modifications, as long as this notice is preserved.
     187
     188# serial 1
    185189
    186190# AM_AUTOMAKE_VERSION(VERSION)
     
    193197dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
    194198dnl require some minimum version.  Point them to the right macro.
    195 m4_if([$1], [1.11.1], [],
     199m4_if([$1], [1.11.3], [],
    196200      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
    197201])
     
    209213# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
    210214AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
    211 [AM_AUTOMAKE_VERSION([1.11.1])dnl
     215[AM_AUTOMAKE_VERSION([1.11.3])dnl
    212216m4_ifndef([AC_AUTOCONF_VERSION],
    213217  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
     
    216220# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
    217221
    218 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
    219 #
    220 # This file is free software; the Free Software Foundation
    221 # gives unlimited permission to copy and/or distribute it,
    222 # with or without modifications, as long as this notice is preserved.
     222# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
     223#
     224# This file is free software; the Free Software Foundation
     225# gives unlimited permission to copy and/or distribute it,
     226# with or without modifications, as long as this notice is preserved.
     227
     228# serial 1
    223229
    224230# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
     
    303309fi])])
    304310
    305 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
    306 # Free Software Foundation, Inc.
    307 #
    308 # This file is free software; the Free Software Foundation
    309 # gives unlimited permission to copy and/or distribute it,
    310 # with or without modifications, as long as this notice is preserved.
    311 
    312 # serial 10
     311# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
     312# 2010, 2011 Free Software Foundation, Inc.
     313#
     314# This file is free software; the Free Software Foundation
     315# gives unlimited permission to copy and/or distribute it,
     316# with or without modifications, as long as this notice is preserved.
     317
     318# serial 12
    313319
    314320# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
     
    350356  # making a dummy file named `D' -- because `-MD' means `put the output
    351357  # in D'.
     358  rm -rf conftest.dir
    352359  mkdir conftest.dir
    353360  # Copy depcomp to subdir because otherwise we won't find it if we're
     
    414421      fi
    415422      ;;
    416     msvisualcpp | msvcmsys)
     423    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
    417424      # This compiler won't grok `-c -o', but also, the minuso test has
    418425      # not run yet.  These depmodes are late enough in the game, and
     
    479486  am_depcomp="$ac_aux_dir/depcomp"
    480487  AMDEPBACKSLASH='\'
     488  am__nodep='_no'
    481489fi
    482490AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
    483491AC_SUBST([AMDEPBACKSLASH])dnl
    484492_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
     493AC_SUBST([am__nodep])dnl
     494_AM_SUBST_NOTMAKE([am__nodep])dnl
    485495])
    486496
     
    704714echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
    705715
    706 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
    707 #
    708 # This file is free software; the Free Software Foundation
    709 # gives unlimited permission to copy and/or distribute it,
    710 # with or without modifications, as long as this notice is preserved.
     716# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
     717# Inc.
     718#
     719# This file is free software; the Free Software Foundation
     720# gives unlimited permission to copy and/or distribute it,
     721# with or without modifications, as long as this notice is preserved.
     722
     723# serial 1
    711724
    712725# AM_PROG_INSTALL_SH
     
    841854])
    842855
    843 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
    844 #
    845 # This file is free software; the Free Software Foundation
    846 # gives unlimited permission to copy and/or distribute it,
    847 # with or without modifications, as long as this notice is preserved.
     856# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
     857# Inc.
     858#
     859# This file is free software; the Free Software Foundation
     860# gives unlimited permission to copy and/or distribute it,
     861# with or without modifications, as long as this notice is preserved.
     862
     863# serial 1
    848864
    849865# AM_PROG_MKDIR_P
     
    869885# Helper functions for option handling.                     -*- Autoconf -*-
    870886
    871 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
    872 #
    873 # This file is free software; the Free Software Foundation
    874 # gives unlimited permission to copy and/or distribute it,
    875 # with or without modifications, as long as this notice is preserved.
    876 
    877 # serial 4
     887# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
     888# Foundation, Inc.
     889#
     890# This file is free software; the Free Software Foundation
     891# gives unlimited permission to copy and/or distribute it,
     892# with or without modifications, as long as this notice is preserved.
     893
     894# serial 5
    878895
    879896# _AM_MANGLE_OPTION(NAME)
     
    883900
    884901# _AM_SET_OPTION(NAME)
    885 # ------------------------------
     902# --------------------
    886903# Set option NAME.  Presently that only means defining a flag for this option.
    887904AC_DEFUN([_AM_SET_OPTION],
     
    889906
    890907# _AM_SET_OPTIONS(OPTIONS)
    891 # ----------------------------------
     908# ------------------------
    892909# OPTIONS is a space-separated list of Automake options.
    893910AC_DEFUN([_AM_SET_OPTIONS],
     
    900917[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
    901918
    902 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
    903 #
    904 # This file is free software; the Free Software Foundation
    905 # gives unlimited permission to copy and/or distribute it,
    906 # with or without modifications, as long as this notice is preserved.
     919# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
     920#
     921# This file is free software; the Free Software Foundation
     922# gives unlimited permission to copy and/or distribute it,
     923# with or without modifications, as long as this notice is preserved.
     924
     925# serial 1
    907926
    908927# AM_RUN_LOG(COMMAND)
     
    9821001AC_MSG_RESULT(yes)])
    9831002
    984 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
    985 #
    986 # This file is free software; the Free Software Foundation
    987 # gives unlimited permission to copy and/or distribute it,
    988 # with or without modifications, as long as this notice is preserved.
     1003# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
     1004#
     1005# This file is free software; the Free Software Foundation
     1006# gives unlimited permission to copy and/or distribute it,
     1007# with or without modifications, as long as this notice is preserved.
     1008
     1009# serial 1
    9891010
    9901011# AM_PROG_INSTALL_STRIP
     
    10101031AC_SUBST([INSTALL_STRIP_PROGRAM])])
    10111032
    1012 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
    1013 #
    1014 # This file is free software; the Free Software Foundation
    1015 # gives unlimited permission to copy and/or distribute it,
    1016 # with or without modifications, as long as this notice is preserved.
    1017 
    1018 # serial 2
     1033# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
     1034#
     1035# This file is free software; the Free Software Foundation
     1036# gives unlimited permission to copy and/or distribute it,
     1037# with or without modifications, as long as this notice is preserved.
     1038
     1039# serial 3
    10191040
    10201041# _AM_SUBST_NOTMAKE(VARIABLE)
     
    10251046
    10261047# AM_SUBST_NOTMAKE(VARIABLE)
    1027 # ---------------------------
     1048# --------------------------
    10281049# Public sister of _AM_SUBST_NOTMAKE.
    10291050AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
     
    10311052# Check how to create a tarball.                            -*- Autoconf -*-
    10321053
    1033 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
     1054# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
    10341055#
    10351056# This file is free software; the Free Software Foundation
     
    10531074#     $(am__untar) < result.tar
    10541075AC_DEFUN([_AM_PROG_TAR],
    1055 [# Always define AMTAR for backward compatibility.
    1056 AM_MISSING_PROG([AMTAR], [tar])
     1076[# Always define AMTAR for backward compatibility.  Yes, it's still used
     1077# in the wild :-(  We should find a proper way to deprecate it ...
     1078AC_SUBST([AMTAR], ['$${TAR-tar}'])
    10571079m4_if([$1], [v7],
    1058      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
     1080     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
    10591081     [m4_case([$1], [ustar],, [pax],,
    10601082              [m4_fatal([Unknown tar format])])
  • branches/vendor/sourceforge/icedtea-web/current/config.guess

    r348 r416  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    5 #   Free Software Foundation, Inc.
    6 
    7 timestamp='2009-11-20'
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     5#   2011, 2012 Free Software Foundation, Inc.
     6
     7timestamp='2012-01-01'
    88
    99# This file is free software; you can redistribute it and/or modify it
     
    5757
    5858Originally written by Per Bothner.
    59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    60 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
     602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
     61Free Software Foundation, Inc.
    6162
    6263This is free software; see the source for copying conditions.  There is NO
     
    145146    *:NetBSD:*:*)
    146147        # NetBSD (nbsd) targets should (where applicable) match one or
    147         # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
     148        # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
    148149        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
    149150        # switched to ELF, *-*-netbsd* would select the old
     
    181182                ;;
    182183            *)
    183                 os=netbsd
     184                os=netbsd
    184185                ;;
    185186        esac
     
    224225                ;;
    225226        *5.*)
    226                 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
     227                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
    227228                ;;
    228229        esac
     
    270271        # 1.2 uses "1.2" for uname -r.
    271272        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    272         exit ;;
     273        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
     274        exitcode=$?
     275        trap '' 0
     276        exit $exitcode ;;
    273277    Alpha\ *:Windows_NT*:*)
    274278        # How do we know it's Interix rather than the generic POSIX subsystem?
     
    296300        exit ;;
    297301    *:OS400:*:*)
    298         echo powerpc-ibm-os400
     302        echo powerpc-ibm-os400
    299303        exit ;;
    300304    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
     
    395399    # be no problem.
    396400    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    397         echo m68k-atari-mint${UNAME_RELEASE}
     401        echo m68k-atari-mint${UNAME_RELEASE}
    398402        exit ;;
    399403    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    400404        echo m68k-atari-mint${UNAME_RELEASE}
    401         exit ;;
     405        exit ;;
    402406    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    403         echo m68k-atari-mint${UNAME_RELEASE}
     407        echo m68k-atari-mint${UNAME_RELEASE}
    404408        exit ;;
    405409    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    406         echo m68k-milan-mint${UNAME_RELEASE}
    407         exit ;;
     410        echo m68k-milan-mint${UNAME_RELEASE}
     411        exit ;;
    408412    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    409         echo m68k-hades-mint${UNAME_RELEASE}
    410         exit ;;
     413        echo m68k-hades-mint${UNAME_RELEASE}
     414        exit ;;
    411415    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    412         echo m68k-unknown-mint${UNAME_RELEASE}
    413         exit ;;
     416        echo m68k-unknown-mint${UNAME_RELEASE}
     417        exit ;;
    414418    m68k:machten:*:*)
    415419        echo m68k-apple-machten${UNAME_RELEASE}
     
    481485        exit ;;
    482486    AViiON:dgux:*:*)
    483         # DG/UX returns AViiON for all architectures
    484         UNAME_PROCESSOR=`/usr/bin/uname -p`
     487        # DG/UX returns AViiON for all architectures
     488        UNAME_PROCESSOR=`/usr/bin/uname -p`
    485489        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
    486490        then
     
    495499            echo i586-dg-dgux${UNAME_RELEASE}
    496500        fi
    497         exit ;;
     501        exit ;;
    498502    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    499503        echo m88k-dolphin-sysv3
     
    552556        fi
    553557        exit ;;
    554     *:AIX:*:[456])
     558    *:AIX:*:[4567])
    555559        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    556560        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
     
    595599                if [ -x /usr/bin/getconf ]; then
    596600                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
    597                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
    598                     case "${sc_cpu_version}" in
    599                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
    600                       528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
    601                       532)                      # CPU_PA_RISC2_0
    602                         case "${sc_kernel_bits}" in
    603                           32) HP_ARCH="hppa2.0n" ;;
    604                           64) HP_ARCH="hppa2.0w" ;;
     601                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
     602                    case "${sc_cpu_version}" in
     603                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
     604                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
     605                      532)                      # CPU_PA_RISC2_0
     606                        case "${sc_kernel_bits}" in
     607                          32) HP_ARCH="hppa2.0n" ;;
     608                          64) HP_ARCH="hppa2.0w" ;;
    605609                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
    606                         esac ;;
    607                     esac
     610                        esac ;;
     611                    esac
    608612                fi
    609613                if [ "${HP_ARCH}" = "" ]; then
    610614                    eval $set_cc_for_build
    611                     sed 's/^              //' << EOF >$dummy.c
    612 
    613               #define _HPUX_SOURCE
    614               #include <stdlib.h>
    615               #include <unistd.h>
    616 
    617               int main ()
    618               {
    619               #if defined(_SC_KERNEL_BITS)
    620                   long bits = sysconf(_SC_KERNEL_BITS);
    621               #endif
    622                   long cpu  = sysconf (_SC_CPU_VERSION);
    623 
    624                   switch (cpu)
    625                 {
    626                 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
    627                 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
    628                 case CPU_PA_RISC2_0:
    629               #if defined(_SC_KERNEL_BITS)
    630                     switch (bits)
    631                         {
    632                         case 64: puts ("hppa2.0w"); break;
    633                         case 32: puts ("hppa2.0n"); break;
    634                         default: puts ("hppa2.0"); break;
    635                         } break;
    636               #else  /* !defined(_SC_KERNEL_BITS) */
    637                     puts ("hppa2.0"); break;
    638               #endif
    639                 default: puts ("hppa1.0"); break;
    640                 }
    641                   exit (0);
    642               }
     615                    sed 's/^            //' << EOF >$dummy.c
     616
     617                #define _HPUX_SOURCE
     618                #include <stdlib.h>
     619                #include <unistd.h>
     620
     621                int main ()
     622                {
     623                #if defined(_SC_KERNEL_BITS)
     624                    long bits = sysconf(_SC_KERNEL_BITS);
     625                #endif
     626                    long cpu  = sysconf (_SC_CPU_VERSION);
     627
     628                    switch (cpu)
     629                        {
     630                        case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
     631                        case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
     632                        case CPU_PA_RISC2_0:
     633                #if defined(_SC_KERNEL_BITS)
     634                            switch (bits)
     635                                {
     636                                case 64: puts ("hppa2.0w"); break;
     637                                case 32: puts ("hppa2.0n"); break;
     638                                default: puts ("hppa2.0"); break;
     639                                } break;
     640                #else  /* !defined(_SC_KERNEL_BITS) */
     641                            puts ("hppa2.0"); break;
     642                #endif
     643                        default: puts ("hppa1.0"); break;
     644                        }
     645                    exit (0);
     646                }
    643647EOF
    644648                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
     
    731735    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    732736        echo c1-convex-bsd
    733         exit ;;
     737        exit ;;
    734738    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    735739        if getsysinfo -f scalar_acc
     
    737741        else echo c2-convex-bsd
    738742        fi
    739         exit ;;
     743        exit ;;
    740744    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    741745        echo c34-convex-bsd
    742         exit ;;
     746        exit ;;
    743747    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    744748        echo c38-convex-bsd
    745         exit ;;
     749        exit ;;
    746750    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    747751        echo c4-convex-bsd
    748         exit ;;
     752        exit ;;
    749753    CRAY*Y-MP:*:*:*)
    750754        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     
    770774    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    771775        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    772         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    773         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    774         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    775         exit ;;
     776        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     777        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
     778        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     779        exit ;;
    776780    5000:UNIX_System_V:4.*:*)
    777         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    778         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
    779         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     781        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     782        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
     783        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    780784        exit ;;
    781785    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
     
    789793        exit ;;
    790794    *:FreeBSD:*:*)
    791         case ${UNAME_MACHINE} in
    792             pc98)
    793                 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     795        UNAME_PROCESSOR=`/usr/bin/uname -p`
     796        case ${UNAME_PROCESSOR} in
    794797            amd64)
    795798                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    796799            *)
    797                 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     800                echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    798801        esac
    799802        exit ;;
     
    804807        echo ${UNAME_MACHINE}-pc-mingw32
    805808        exit ;;
     809    i*:MSYS*:*)
     810        echo ${UNAME_MACHINE}-pc-msys
     811        exit ;;
    806812    i*:windows32*:*)
    807         # uname -m includes "-pc" on this system.
    808         echo ${UNAME_MACHINE}-mingw32
     813        # uname -m includes "-pc" on this system.
     814        echo ${UNAME_MACHINE}-mingw32
    809815        exit ;;
    810816    i*:PW*:*)
     
    812818        exit ;;
    813819    *:Interix*:*)
    814         case ${UNAME_MACHINE} in
     820        case ${UNAME_MACHINE} in
    815821            x86)
    816822                echo i586-pc-interix${UNAME_RELEASE}
     
    867873          EV67)  UNAME_MACHINE=alphaev67 ;;
    868874          EV68*) UNAME_MACHINE=alphaev68 ;;
    869         esac
     875        esac
    870876        objdump --private-headers /bin/sh | grep -q ld.so.1
    871877        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
     
    879885            echo ${UNAME_MACHINE}-unknown-linux-gnu
    880886        else
    881             echo ${UNAME_MACHINE}-unknown-linux-gnueabi
     887            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
     888                | grep -q __ARM_PCS_VFP
     889            then
     890                echo ${UNAME_MACHINE}-unknown-linux-gnueabi
     891            else
     892                echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
     893            fi
    882894        fi
    883895        exit ;;
     
    886898        exit ;;
    887899    cris:Linux:*:*)
    888         echo cris-axis-linux-gnu
     900        echo ${UNAME_MACHINE}-axis-linux-gnu
    889901        exit ;;
    890902    crisv32:Linux:*:*)
    891         echo crisv32-axis-linux-gnu
     903        echo ${UNAME_MACHINE}-axis-linux-gnu
    892904        exit ;;
    893905    frv:Linux:*:*)
    894         echo frv-unknown-linux-gnu
     906        echo ${UNAME_MACHINE}-unknown-linux-gnu
     907        exit ;;
     908    hexagon:Linux:*:*)
     909        echo ${UNAME_MACHINE}-unknown-linux-gnu
    895910        exit ;;
    896911    i*86:Linux:*:*)
     
    934949        ;;
    935950    or32:Linux:*:*)
    936         echo or32-unknown-linux-gnu
     951        echo ${UNAME_MACHINE}-unknown-linux-gnu
    937952        exit ;;
    938953    padre:Linux:*:*)
     
    960975        exit ;;
    961976    sh64*:Linux:*:*)
    962         echo ${UNAME_MACHINE}-unknown-linux-gnu
     977        echo ${UNAME_MACHINE}-unknown-linux-gnu
    963978        exit ;;
    964979    sh*:Linux:*:*)
     
    968983        echo ${UNAME_MACHINE}-unknown-linux-gnu
    969984        exit ;;
     985    tile*:Linux:*:*)
     986        echo ${UNAME_MACHINE}-unknown-linux-gnu
     987        exit ;;
    970988    vax:Linux:*:*)
    971989        echo ${UNAME_MACHINE}-dec-linux-gnu
    972990        exit ;;
    973991    x86_64:Linux:*:*)
    974         echo x86_64-unknown-linux-gnu
     992        echo ${UNAME_MACHINE}-unknown-linux-gnu
    975993        exit ;;
    976994    xtensa*:Linux:*:*)
    977         echo ${UNAME_MACHINE}-unknown-linux-gnu
     995        echo ${UNAME_MACHINE}-unknown-linux-gnu
    978996        exit ;;
    979997    i*86:DYNIX/ptx:4*:*)
     
    9841002        exit ;;
    9851003    i*86:UNIX_SV:4.2MP:2.*)
    986         # Unixware is an offshoot of SVR4, but it has its own version
    987         # number series starting with 2...
    988         # I am not positive that other SVR4 systems won't match this,
     1004        # Unixware is an offshoot of SVR4, but it has its own version
     1005        # number series starting with 2...
     1006        # I am not positive that other SVR4 systems won't match this,
    9891007        # I just have to hope.  -- rms.
    990         # Use sysv4.2uw... so that sysv4* matches it.
     1008        # Use sysv4.2uw... so that sysv4* matches it.
    9911009        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    9921010        exit ;;
     
    10201038        exit ;;
    10211039    i*86:*:5:[678]*)
    1022         # UnixWare 7.x, OpenUNIX and OpenServer 6.
     1040        # UnixWare 7.x, OpenUNIX and OpenServer 6.
    10231041        case `/bin/uname -X | grep "^Machine"` in
    10241042            *486*)           UNAME_MACHINE=i486 ;;
     
    10481066    pc:*:*:*)
    10491067        # Left here for compatibility:
    1050         # uname -m prints for DJGPP always 'pc', but it prints nothing about
    1051         # the processor, so we play safe by assuming i586.
     1068        # uname -m prints for DJGPP always 'pc', but it prints nothing about
     1069        # the processor, so we play safe by assuming i586.
    10521070        # Note: whatever this is, it MUST be the same as what config.sub
    10531071        # prints for the "djgpp" host, or else GDB configury will decide that
    10541072        # this is a cross-build.
    10551073        echo i586-pc-msdosdjgpp
    1056         exit ;;
     1074        exit ;;
    10571075    Intel:Mach:3*:*)
    10581076        echo i386-pc-mach3
     
    10891107          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    10901108    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    1091         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1092           && { echo i486-ncr-sysv4; exit; } ;;
     1109        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
     1110          && { echo i486-ncr-sysv4; exit; } ;;
    10931111    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
    10941112        OS_REL='.3'
     
    11331151        fi
    11341152        exit ;;
    1135     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    1136                       # says <Richard.M.Bartel@ccMail.Census.GOV>
    1137         echo i586-unisys-sysv4
    1138         exit ;;
     1153    PENTIUM:*:4.0*:*)   # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1154                        # says <Richard.M.Bartel@ccMail.Census.GOV>
     1155        echo i586-unisys-sysv4
     1156        exit ;;
    11391157    *:UNIX_System_V:4*:FTX*)
    11401158        # From Gerald Hewes <hewes@openmarket.com>.
     
    11621180    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    11631181        if [ -d /usr/nec ]; then
    1164                 echo mips-nec-sysv${UNAME_RELEASE}
     1182                echo mips-nec-sysv${UNAME_RELEASE}
    11651183        else
    1166                 echo mips-unknown-sysv${UNAME_RELEASE}
    1167         fi
    1168         exit ;;
     1184                echo mips-unknown-sysv${UNAME_RELEASE}
     1185        fi
     1186        exit ;;
    11691187    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
    11701188        echo powerpc-be-beos
     
    12311249        echo i386-pc-qnx
    12321250        exit ;;
     1251    NEO-?:NONSTOP_KERNEL:*:*)
     1252        echo neo-tandem-nsk${UNAME_RELEASE}
     1253        exit ;;
    12331254    NSE-?:NONSTOP_KERNEL:*:*)
    12341255        echo nse-tandem-nsk${UNAME_RELEASE}
     
    12761297        exit ;;
    12771298    SEI:*:*:SEIUX)
    1278         echo mips-sei-seiux${UNAME_RELEASE}
     1299        echo mips-sei-seiux${UNAME_RELEASE}
    12791300        exit ;;
    12801301    *:DragonFly:*:*)
     
    12821303        exit ;;
    12831304    *:*VMS:*:*)
    1284         UNAME_MACHINE=`(uname -p) 2>/dev/null`
     1305        UNAME_MACHINE=`(uname -p) 2>/dev/null`
    12851306        case "${UNAME_MACHINE}" in
    12861307            A*) echo alpha-dec-vms ; exit ;;
     
    13221343  printf ("m68k-sony-newsos%s\n",
    13231344#ifdef NEWSOS4
    1324           "4"
     1345        "4"
    13251346#else
    1326           ""
    1327 #endif
    1328          ); exit (0);
     1347        ""
     1348#endif
     1349        ); exit (0);
    13291350#endif
    13301351#endif
  • branches/vendor/sourceforge/icedtea-web/current/config.sub

    r348 r416  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    5 #   Free Software Foundation, Inc.
    6 
    7 timestamp='2009-11-20'
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     5#   2011, 2012 Free Software Foundation, Inc.
     6
     7timestamp='2012-01-01'
    88
    99# This file is (in principle) common to ALL GNU software.
     
    7676GNU config.sub ($timestamp)
    7777
    78 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    79 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     78Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
     792001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
     80Free Software Foundation, Inc.
    8081
    8182This is free software; see the source for copying conditions.  There is NO
     
    124125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    125126case $maybe_os in
    126   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
    127   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
     127  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
     128  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
     129  knetbsd*-gnu* | netbsd*-gnu* | \
    128130  kopensolaris*-gnu* | \
    129131  storm-chaos* | os2-emx* | rtmk-nova*)
     
    157159                basic_machine=$1
    158160                ;;
    159         -bluegene*)
    160                 os=-cnk
     161        -bluegene*)
     162                os=-cnk
    161163                ;;
    162164        -sim | -cisco | -oki | -wec | -winbond)
     
    174176                basic_machine=$1
    175177                ;;
    176         -chorusrdb)
    177                 os=-chorusrdb
     178        -chorusrdb)
     179                os=-chorusrdb
    178180                basic_machine=$1
    179                 ;;
     181                ;;
    180182        -hiux*)
    181183                os=-hiuxwe2
     
    250252        | am33_2.0 \
    251253        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
     254        | be32 | be64 \
    252255        | bfin \
    253256        | c4x | clipper \
    254257        | d10v | d30v | dlx | dsp16xx \
     258        | epiphany \
    255259        | fido | fr30 | frv \
    256260        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     261        | hexagon \
    257262        | i370 | i860 | i960 | ia64 \
    258263        | ip2k | iq2000 \
     264        | le32 | le64 \
    259265        | lm32 \
    260266        | m32c | m32r | m32rle | m68000 | m68k | m88k \
     
    282288        | mt \
    283289        | msp430 \
     290        | nds32 | nds32le | nds32be \
    284291        | nios | nios2 \
    285292        | ns16k | ns32k \
     293        | open8 \
    286294        | or32 \
    287295        | pdp10 | pdp11 | pj | pjl \
    288         | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
     296        | powerpc | powerpc64 | powerpc64le | powerpcle \
    289297        | pyramid \
    290         | rx \
     298        | rl78 | rx \
    291299        | score \
    292300        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
     
    294302        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
    295303        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
    296         | spu | strongarm \
    297         | tahoe | thumb | tic4x | tic80 | tron \
     304        | spu \
     305        | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
    298306        | ubicom32 \
    299         | v850 | v850e \
     307        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
    300308        | we32k \
    301         | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
     309        | x86 | xc16x | xstormy16 | xtensa \
    302310        | z8k | z80)
    303311                basic_machine=$basic_machine-unknown
    304312                ;;
     313        c54x)
     314                basic_machine=tic54x-unknown
     315                ;;
     316        c55x)
     317                basic_machine=tic55x-unknown
     318                ;;
     319        c6x)
     320                basic_machine=tic6x-unknown
     321                ;;
    305322        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
    306                 # Motorola 68HC11/12.
    307323                basic_machine=$basic_machine-unknown
    308324                os=-none
     
    312328        ms1)
    313329                basic_machine=mt-unknown
     330                ;;
     331
     332        strongarm | thumb | xscale)
     333                basic_machine=arm-unknown
     334                ;;
     335
     336        xscaleeb)
     337                basic_machine=armeb-unknown
     338                ;;
     339
     340        xscaleel)
     341                basic_machine=armel-unknown
    314342                ;;
    315343
     
    333361        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    334362        | avr-* | avr32-* \
     363        | be32-* | be64-* \
    335364        | bfin-* | bs2000-* \
    336         | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
     365        | c[123]* | c30-* | [cjt]90-* | c4x-* \
    337366        | clipper-* | craynv-* | cydra-* \
    338367        | d10v-* | d30v-* | dlx-* \
     
    341370        | h8300-* | h8500-* \
    342371        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
     372        | hexagon-* \
    343373        | i*86-* | i860-* | i960-* | ia64-* \
    344374        | ip2k-* | iq2000-* \
     375        | le32-* | le64-* \
    345376        | lm32-* \
    346377        | m32c-* | m32r-* | m32rle-* \
     
    368399        | mt-* \
    369400        | msp430-* \
     401        | nds32-* | nds32le-* | nds32be-* \
    370402        | nios-* | nios2-* \
    371403        | none-* | np1-* | ns16k-* | ns32k-* \
     404        | open8-* \
    372405        | orion-* \
    373406        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
    374         | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
     407        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
    375408        | pyramid-* \
    376         | romp-* | rs6000-* | rx-* \
     409        | rl78-* | romp-* | rs6000-* | rx-* \
    377410        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
    378411        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    379412        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
    380413        | sparclite-* \
    381         | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
    382         | tahoe-* | thumb-* \
    383         | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
     414        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
     415        | tahoe-* \
     416        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     417        | tile*-* \
    384418        | tron-* \
    385419        | ubicom32-* \
    386         | v850-* | v850e-* | vax-* \
     420        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
     421        | vax-* \
    387422        | we32k-* \
    388         | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
     423        | x86-* | x86_64-* | xc16x-* | xps100-* \
    389424        | xstormy16-* | xtensa*-* \
    390425        | ymp-* \
     
    411446                os=-udi
    412447                ;;
    413         abacus)
     448        abacus)
    414449                basic_machine=abacus-unknown
    415450                ;;
     
    481516                os=-cnk
    482517                ;;
     518        c54x-*)
     519                basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
     520                ;;
     521        c55x-*)
     522                basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
     523                ;;
     524        c6x-*)
     525                basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
     526                ;;
    483527        c90)
    484528                basic_machine=c90-cray
    485529                os=-unicos
    486530                ;;
    487         cegcc)
     531        cegcc)
    488532                basic_machine=arm-unknown
    489533                os=-cegcc
     
    517561                os=-unicosmp
    518562                ;;
    519         cr16)
     563        cr16 | cr16-*)
    520564                basic_machine=cr16-unknown
    521565                os=-elf
     
    675719                basic_machine=i370-ibm
    676720                ;;
    677 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
    678721        i*86v32)
    679722                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
     
    733776                os=-sysv
    734777                ;;
    735         microblaze)
     778        microblaze)
    736779                basic_machine=microblaze-xilinx
    737780                ;;
     
    772815                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
    773816                ;;
     817        msys)
     818                basic_machine=i386-pc
     819                os=-msys
     820                ;;
    774821        mvs)
    775822                basic_machine=i370-ibm
    776823                os=-mvs
     824                ;;
     825        nacl)
     826                basic_machine=le32-unknown
     827                os=-nacl
    777828                ;;
    778829        ncr3000)
     
    840891                basic_machine=np1-gould
    841892                ;;
     893        neo-tandem)
     894                basic_machine=neo-tandem
     895                ;;
     896        nse-tandem)
     897                basic_machine=nse-tandem
     898                ;;
    842899        nsr-tandem)
    843900                basic_machine=nsr-tandem
     
    922979        power)  basic_machine=power-ibm
    923980                ;;
    924         ppc)    basic_machine=powerpc-unknown
    925                 ;;
    926         ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
     981        ppc | ppcbe)    basic_machine=powerpc-unknown
     982                ;;
     983        ppc-* | ppcbe-*)
     984                basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
    927985                ;;
    928986        ppcle | powerpclittle | ppc-le | powerpc-little)
     
    10181076                os=-sysv4
    10191077                ;;
     1078        strongarm-* | thumb-*)
     1079                basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
     1080                ;;
    10201081        sun2)
    10211082                basic_machine=m68000-sun
     
    10741135                os=-unicos
    10751136                ;;
    1076         tic54x | c54x*)
    1077                 basic_machine=tic54x-unknown
    1078                 os=-coff
    1079                 ;;
    1080         tic55x | c55x*)
    1081                 basic_machine=tic55x-unknown
    1082                 os=-coff
    1083                 ;;
    1084         tic6x | c6x*)
    1085                 basic_machine=tic6x-unknown
    1086                 os=-coff
    1087                 ;;
    10881137        tile*)
    1089                 basic_machine=tile-unknown
     1138                basic_machine=$basic_machine-unknown
    10901139                os=-linux-gnu
    10911140                ;;
     
    11561205        xps | xps100)
    11571206                basic_machine=xps100-honeywell
     1207                ;;
     1208        xscale-* | xscalee[bl]-*)
     1209                basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
    11581210                ;;
    11591211        ymp)
     
    12541306then
    12551307case $os in
    1256         # First match some system type aliases
    1257         # that might get confused with valid system types.
     1308        # First match some system type aliases
     1309        # that might get confused with valid system types.
    12581310        # -solaris* is a basic system type, with this one exception.
    1259         -auroraux)
    1260                 os=-auroraux
     1311        -auroraux)
     1312                os=-auroraux
    12611313                ;;
    12621314        -solaris1 | -solaris1.*)
     
    12941346              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    12951347              | -chorusos* | -chorusrdb* | -cegcc* \
    1296               | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1297               | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
     1348              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
     1349              | -mingw32* | -linux-gnu* | -linux-android* \
     1350              | -linux-newlib* | -linux-uclibc* \
    12981351              | -uxpv* | -beos* | -mpeix* | -udk* \
    12991352              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
     
    13421395                os=-openedition
    13431396                ;;
    1344         -os400*)
     1397        -os400*)
    13451398                os=-os400
    13461399                ;;
     
    13911444                os=-sysv4
    13921445                ;;
    1393         -tpf*)
     1446        -tpf*)
    13941447                os=-tpf
    13951448                ;;
     
    14351488        -dicos*)
    14361489                os=-dicos
     1490                ;;
     1491        -nacl*)
    14371492                ;;
    14381493        -none)
     
    14581513
    14591514case $basic_machine in
    1460         score-*)
     1515        score-*)
    14611516                os=-elf
    14621517                ;;
    1463         spu-*)
     1518        spu-*)
    14641519                os=-elf
    14651520                ;;
     
    14731528                os=-aout
    14741529                ;;
    1475         c4x-* | tic4x-*)
    1476                 os=-coff
     1530        c4x-* | tic4x-*)
     1531                os=-coff
     1532                ;;
     1533        tic54x-*)
     1534                os=-coff
     1535                ;;
     1536        tic55x-*)
     1537                os=-coff
     1538                ;;
     1539        tic6x-*)
     1540                os=-coff
    14771541                ;;
    14781542        # This must come before the *-dec entry.
     
    14941558        m68000-sun)
    14951559                os=-sunos3
    1496                 # This also exists in the configure program, but was not the
    1497                 # default.
    1498                 # os=-sunos4
    14991560                ;;
    15001561        m68*-cisco)
    15011562                os=-aout
    15021563                ;;
    1503         mep-*)
     1564        mep-*)
    15041565                os=-elf
    15051566                ;;
     
    15281589                os=-aix
    15291590                ;;
    1530         *-knuth)
     1591        *-knuth)
    15311592                os=-mmixware
    15321593                ;;
  • branches/vendor/sourceforge/icedtea-web/current/configure

    r348 r416  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.68 for icedtea-web 1.1.2.
     3# Generated by GNU Autoconf 2.68 for icedtea-web 1.3.
    44#
    55# Report bugs to <distro-pkg-dev@openjdk.java.net>.
     
    560560PACKAGE_NAME='icedtea-web'
    561561PACKAGE_TARNAME='icedtea-web'
    562 PACKAGE_VERSION='1.1.2'
    563 PACKAGE_STRING='icedtea-web 1.1.2'
     562PACKAGE_VERSION='1.3'
     563PACKAGE_STRING='icedtea-web 1.3'
    564564PACKAGE_BUGREPORT='distro-pkg-dev@openjdk.java.net'
    565565PACKAGE_URL='http://icedtea.classpath.org/wiki/IcedTea-Web'
     
    569569LTLIBOBJS
    570570LIBOBJS
     571EMMA_AVAILABLE
     572EMMA_JAR
     573WITH_EMMA_FALSE
     574WITH_EMMA_TRUE
    571575JUNIT_AVAILABLE
    572576JUNIT_JAR
     
    577581WITH_RHINO_FALSE
    578582WITH_RHINO_TRUE
     583WITH_XSLTPROC_FALSE
     584WITH_XSLTPROC_TRUE
     585BROWSER_TESTS_MODIFICATION
     586EPIPHANY
     587MIDORI
     588OPERA
     589CHROMIUM
     590CHROME
     591FIREFOX
     592XSLTPROC
     593GLIB2_V_216_LIBS
     594GLIB2_V_216_CFLAGS
     595VERSION_DEFS
    579596JAVA
    580597SYSTEM_JRE_DIR
     
    601618ICEDTEA_REVISION
    602619HG
     620JARSIGNER
     621KEYTOOL
    603622JAVADOC_SUPPORTS_J_OPTIONS_FALSE
    604623JAVADOC_SUPPORTS_J_OPTIONS_TRUE
     
    636655am__fastdepCC_TRUE
    637656CCDEPMODE
     657am__nodep
    638658AMDEPBACKSLASH
    639659AMDEP_FALSE
     
    732752with_ecj_jar
    733753with_javadoc
     754with_keytool
     755with_jarsigner
    734756with_pkgversion
    735757enable_plugin
     758with_gtk
    736759with_jre_home
    737760with_java
     761with_firefox
     762with_chrome
     763with_chromium
     764with_opera
     765with_midori
     766with_epiphany
     767with_browser_tests
    738768with_rhino
    739769with_junit
     770with_emma
    740771'
    741772      ac_precious_vars='build_alias
     
    760791MOZILLA_LIBS
    761792X11_CFLAGS
    762 X11_LIBS'
     793X11_LIBS
     794GLIB2_V_216_CFLAGS
     795GLIB2_V_216_LIBS'
    763796
    764797
     
    13031336  # This message is too long to be a string in the A/UX 3.1 sh.
    13041337  cat <<_ACEOF
    1305 \`configure' configures icedtea-web 1.1.2 to adapt to many kinds of systems.
     1338\`configure' configures icedtea-web 1.3 to adapt to many kinds of systems.
    13061339
    13071340Usage: $0 [OPTION]... [VAR=VALUE]...
     
    13731406if test -n "$ac_init_help"; then
    13741407  case $ac_init_help in
    1375      short | recursive ) echo "Configuration of icedtea-web 1.1.2:";;
     1408     short | recursive ) echo "Configuration of icedtea-web 1.3:";;
    13761409   esac
    13771410  cat <<\_ACEOF
     
    13981431  --with-javadoc          specify location of Java documentation tool
    13991432                          (javadoc)
     1433  --with-keytool          specify location of keytool for signed part of
     1434                          run-netx-dist
     1435  --with-jarsigner        specify location of jarsigner for signed part od
     1436                          run-netx-dist
    14001437  --with-pkgversion=PKG   Use PKG in the version string in addition to
    14011438                          "IcedTea"
     1439  --with-gtk=2|3|default  the GTK+ version to use (default: 3)
    14021440  --with-jre-home         jre home directory (default is the JRE under the
    14031441                          JDK)
    14041442  --with-java             specify location of the 1.5 java vm
     1443  --with-firefox          specify the location of firefox
     1444  --with-chrome           specify the location of chrome
     1445  --with-chromium         specify the location of chromium
     1446  --with-opera            specify the location of opera
     1447  --with-midori           specify the location of midori
     1448  --with-epiphany         specify the location of epiphany
     1449  --with-browser-tests    yes - as defined (default), no - all browser tests
     1450                          will be skipped, one - all "mutiple browsers" test
     1451                          will behave as "one" test, all - all browser tests
     1452                          will be run for all set browsers
    14051453  --with-rhino            specify location of the rhino jar
    14061454  --with-junit            specify location of the junit jar
     1455  --with-emma             specify location of the emma jar
    14071456
    14081457Some influential environment variables:
     
    14311480  X11_CFLAGS  C compiler flags for X11, overriding pkg-config
    14321481  X11_LIBS    linker flags for X11, overriding pkg-config
     1482  GLIB2_V_216_CFLAGS
     1483              C compiler flags for GLIB2_V_216, overriding pkg-config
     1484  GLIB2_V_216_LIBS
     1485              linker flags for GLIB2_V_216, overriding pkg-config
    14331486
    14341487Use these variables to override the choices made by `configure' or to help
     
    14991552if $ac_init_version; then
    15001553  cat <<\_ACEOF
    1501 icedtea-web configure 1.1.2
     1554icedtea-web configure 1.3
    15021555generated by GNU Autoconf 2.68
    15031556
     
    16381691running configure, to aid debugging if configure makes a mistake.
    16391692
    1640 It was created by icedtea-web $as_me 1.1.2, which was
     1693It was created by icedtea-web $as_me 1.3, which was
    16411694generated by GNU Autoconf 2.68.  Invocation command line was
    16421695
     
    24532506# Define the identity of the package.
    24542507 PACKAGE='icedtea-web'
    2455  VERSION='1.1.2'
     2508 VERSION='1.3'
    24562509
    24572510
     
    24832536# We need awk for the "check" target.  The system "awk" is bad on
    24842537# some platforms.
    2485 # Always define AMTAR for backward compatibility.
    2486 
    2487 AMTAR=${AMTAR-"${am_missing_run}tar"}
     2538# Always define AMTAR for backward compatibility.  Yes, it's still used
     2539# in the wild :-(  We should find a proper way to deprecate it ...
     2540AMTAR='$${TAR-tar}'
    24882541
    24892542
     
    34983551  am_depcomp="$ac_aux_dir/depcomp"
    34993552  AMDEPBACKSLASH='\'
     3553  am__nodep='_no'
    35003554fi
    35013555 if test "x$enable_dependency_tracking" != xno; then
     
    35223576  # making a dummy file named `D' -- because `-MD' means `put the output
    35233577  # in D'.
     3578  rm -rf conftest.dir
    35243579  mkdir conftest.dir
    35253580  # Copy depcomp to subdir because otherwise we won't find it if we're
     
    35813636      fi
    35823637      ;;
    3583     msvisualcpp | msvcmsys)
     3638    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
    35843639      # This compiler won't grok `-c -o', but also, the minuso test has
    35853640      # not run yet.  These depmodes are late enough in the game, and
     
    39063961  # making a dummy file named `D' -- because `-MD' means `put the output
    39073962  # in D'.
     3963  rm -rf conftest.dir
    39083964  mkdir conftest.dir
    39093965  # Copy depcomp to subdir because otherwise we won't find it if we're
     
    39654021      fi
    39664022      ;;
    3967     msvisualcpp | msvcmsys)
     4023    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
    39684024      # This compiler won't grok `-c -o', but also, the minuso test has
    39694025      # not run yet.  These depmodes are late enough in the game, and
     
    58325888  mkdir pkg
    58335889  cat << \EOF > $CLASS
    5834 /* [#]line 5834 "configure" */
     5890/* [#]line 5890 "configure" */
    58355891package pkg;
    58365892
     
    58705926
    58715927
     5928
     5929
     5930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for keytool" >&5
     5931$as_echo_n "checking for keytool... " >&6; }
     5932
     5933# Check whether --with-keytool was given.
     5934if test "${with_keytool+set}" = set; then :
     5935  withval=$with_keytool;
     5936    if test "${withval}" = "yes" ; then
     5937      KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool
     5938    else
     5939      KEYTOOL="${withval}"
     5940    fi
     5941
     5942else
     5943
     5944    KEYTOOL=${SYSTEM_JDK_DIR}/bin/keytool
     5945
     5946fi
     5947
     5948  if ! test -f "${KEYTOOL}"; then
     5949    # Extract the first word of "keytool", so it can be a program name with args.
     5950set dummy keytool; ac_word=$2
     5951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     5952$as_echo_n "checking for $ac_word... " >&6; }
     5953if ${ac_cv_path_KEYTOOL+:} false; then :
     5954  $as_echo_n "(cached) " >&6
     5955else
     5956  case $KEYTOOL in
     5957  [\\/]* | ?:[\\/]*)
     5958  ac_cv_path_KEYTOOL="$KEYTOOL" # Let the user override the test with a path.
     5959  ;;
     5960  *)
     5961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     5962for as_dir in $PATH
     5963do
     5964  IFS=$as_save_IFS
     5965  test -z "$as_dir" && as_dir=.
     5966    for ac_exec_ext in '' $ac_executable_extensions; do
     5967  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     5968    ac_cv_path_KEYTOOL="$as_dir/$ac_word$ac_exec_ext"
     5969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     5970    break 2
     5971  fi
     5972done
     5973  done
     5974IFS=$as_save_IFS
     5975
     5976  ;;
     5977esac
     5978fi
     5979KEYTOOL=$ac_cv_path_KEYTOOL
     5980if test -n "$KEYTOOL"; then
     5981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KEYTOOL" >&5
     5982$as_echo "$KEYTOOL" >&6; }
     5983else
     5984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5985$as_echo "no" >&6; }
     5986fi
     5987
     5988
     5989  fi
     5990  if ! test -f "${KEYTOOL}"; then
     5991    KEYTOOL=""
     5992  fi
     5993  if test -z "${KEYTOOL}" ; then
     5994     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"keytool not found so signed part of run-netx-dist will fail\"" >&5
     5995$as_echo "$as_me: WARNING: \"keytool not found so signed part of run-netx-dist will fail\"" >&2;}
     5996  fi
     5997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${KEYTOOL}" >&5
     5998$as_echo "${KEYTOOL}" >&6; }
     5999
     6000
     6001
     6002
     6003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner" >&5
     6004$as_echo_n "checking for jarsigner... " >&6; }
     6005
     6006# Check whether --with-jarsigner was given.
     6007if test "${with_jarsigner+set}" = set; then :
     6008  withval=$with_jarsigner;
     6009    if test "${withval}" = "yes" ; then
     6010      JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner
     6011    else
     6012      JARSIGNER="${withval}"
     6013    fi
     6014
     6015else
     6016
     6017    JARSIGNER=${SYSTEM_JDK_DIR}/bin/jarsigner
     6018
     6019fi
     6020
     6021  if ! test -f "${JARSIGNER}"; then
     6022    # Extract the first word of "jarsigner", so it can be a program name with args.
     6023set dummy jarsigner; ac_word=$2
     6024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6025$as_echo_n "checking for $ac_word... " >&6; }
     6026if ${ac_cv_path_JARSIGNER+:} false; then :
     6027  $as_echo_n "(cached) " >&6
     6028else
     6029  case $JARSIGNER in
     6030  [\\/]* | ?:[\\/]*)
     6031  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
     6032  ;;
     6033  *)
     6034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     6035for as_dir in $PATH
     6036do
     6037  IFS=$as_save_IFS
     6038  test -z "$as_dir" && as_dir=.
     6039    for ac_exec_ext in '' $ac_executable_extensions; do
     6040  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     6041    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
     6042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     6043    break 2
     6044  fi
     6045done
     6046  done
     6047IFS=$as_save_IFS
     6048
     6049  test -z "$ac_cv_path_JARSIGNER" && ac_cv_path_JARSIGNER=""""
     6050  ;;
     6051esac
     6052fi
     6053JARSIGNER=$ac_cv_path_JARSIGNER
     6054if test -n "$JARSIGNER"; then
     6055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
     6056$as_echo "$JARSIGNER" >&6; }
     6057else
     6058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6059$as_echo "no" >&6; }
     6060fi
     6061
     6062
     6063  fi
     6064  if ! test -f "${JARSIGNER}"; then
     6065    JARSIGNER=""
     6066  fi
     6067  if test -z "${JARSIGNER}"; then
     6068     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"jarsigner not found so signed part of run-netx-dist will fail\"" >&5
     6069$as_echo "$as_me: WARNING: \"jarsigner not found so signed part of run-netx-dist will fail\"" >&2;}
     6070  fi
     6071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JARSIGNER}" >&5
     6072$as_echo "${JARSIGNER}" >&6; }
     6073
     6074
    58726075ac_config_files="$ac_config_files javac"
    58736076
     
    61756378if test "x${enable_plugin}" = "xyes" ; then
    61766379
     6380# Check whether --with-gtk was given.
     6381if test "${with_gtk+set}" = set; then :
     6382  withval=$with_gtk; case "$with_gtk" in
     6383       2|3|default) ;;
     6384       *) as_fn_error $? "invalid GTK version specified" "$LINENO" 5 ;;
     6385     esac
     6386else
     6387  with_gtk=default
     6388fi
     6389
     6390
     6391  case "$with_gtk" in
     6392    default)
     6393
     6394pkg_failed=no
     6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
     6396$as_echo_n "checking for GTK... " >&6; }
     6397
     6398if test -n "$GTK_CFLAGS"; then
     6399    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
     6400 elif test -n "$PKG_CONFIG"; then
     6401    if test -n "$PKG_CONFIG" && \
     6402    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
     6403  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
     6404  ac_status=$?
     6405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6406  test $ac_status = 0; }; then
     6407  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null`
     6408else
     6409  pkg_failed=yes
     6410fi
     6411 else
     6412    pkg_failed=untried
     6413fi
     6414if test -n "$GTK_LIBS"; then
     6415    pkg_cv_GTK_LIBS="$GTK_LIBS"
     6416 elif test -n "$PKG_CONFIG"; then
     6417    if test -n "$PKG_CONFIG" && \
     6418    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5
     6419  ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5
     6420  ac_status=$?
     6421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6422  test $ac_status = 0; }; then
     6423  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null`
     6424else
     6425  pkg_failed=yes
     6426fi
     6427 else
     6428    pkg_failed=untried
     6429fi
     6430
     6431
     6432
     6433if test $pkg_failed = yes; then
     6434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6435$as_echo "no" >&6; }
     6436
     6437if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
     6438        _pkg_short_errors_supported=yes
     6439else
     6440        _pkg_short_errors_supported=no
     6441fi
     6442        if test $_pkg_short_errors_supported = yes; then
     6443                GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-3.0" 2>&1`
     6444        else
     6445                GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-3.0" 2>&1`
     6446        fi
     6447        # Put the nasty error message in config.log where it belongs
     6448        echo "$GTK_PKG_ERRORS" >&5
     6449
     6450
    61776451pkg_failed=no
    61786452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
     
    62316505        echo "$GTK_PKG_ERRORS" >&5
    62326506
    6233         as_fn_error $? "Package requirements (gtk+-2.0) were not met:
    6234 
    6235 $GTK_PKG_ERRORS
    6236 
    6237 Consider adjusting the PKG_CONFIG_PATH environment variable if you
    6238 installed software in a non-standard prefix.
    6239 
    6240 Alternatively, you may set the environment variables GTK_CFLAGS
    6241 and GTK_LIBS to avoid the need to call pkg-config.
    6242 See the pkg-config man page for more details." "$LINENO" 5
     6507        as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
    62436508
    62446509elif test $pkg_failed = untried; then
    62456510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    62466511$as_echo "no" >&6; }
    6247         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    6248 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    6249 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
    6250 is in your PATH or set the PKG_CONFIG environment variable to the full
    6251 path to pkg-config.
    6252 
    6253 Alternatively, you may set the environment variables GTK_CFLAGS
    6254 and GTK_LIBS to avoid the need to call pkg-config.
    6255 See the pkg-config man page for more details.
    6256 
    6257 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
    6258 See \`config.log' for more details" "$LINENO" 5; }
     6512        as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
    62596513
    62606514else
     
    62646518$as_echo "yes" >&6; }
    62656519
    6266 fi
     6520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2 version" >&5
     6521$as_echo_n "checking for GTK2 version... " >&6; }
     6522  GTK_VER=`$PKG_CONFIG --modversion gtk+-2.0`
     6523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
     6524$as_echo "$GTK_VER" >&6; }
     6525
     6526fi
     6527
     6528elif test $pkg_failed = untried; then
     6529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6530$as_echo "no" >&6; }
     6531
     6532pkg_failed=no
     6533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
     6534$as_echo_n "checking for GTK... " >&6; }
     6535
     6536if test -n "$GTK_CFLAGS"; then
     6537    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
     6538 elif test -n "$PKG_CONFIG"; then
     6539    if test -n "$PKG_CONFIG" && \
     6540    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
     6541  ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
     6542  ac_status=$?
     6543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6544  test $ac_status = 0; }; then
     6545  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null`
     6546else
     6547  pkg_failed=yes
     6548fi
     6549 else
     6550    pkg_failed=untried
     6551fi
     6552if test -n "$GTK_LIBS"; then
     6553    pkg_cv_GTK_LIBS="$GTK_LIBS"
     6554 elif test -n "$PKG_CONFIG"; then
     6555    if test -n "$PKG_CONFIG" && \
     6556    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
     6557  ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
     6558  ac_status=$?
     6559  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6560  test $ac_status = 0; }; then
     6561  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null`
     6562else
     6563  pkg_failed=yes
     6564fi
     6565 else
     6566    pkg_failed=untried
     6567fi
     6568
     6569
     6570
     6571if test $pkg_failed = yes; then
     6572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6573$as_echo "no" >&6; }
     6574
     6575if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
     6576        _pkg_short_errors_supported=yes
     6577else
     6578        _pkg_short_errors_supported=no
     6579fi
     6580        if test $_pkg_short_errors_supported = yes; then
     6581                GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0" 2>&1`
     6582        else
     6583                GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0" 2>&1`
     6584        fi
     6585        # Put the nasty error message in config.log where it belongs
     6586        echo "$GTK_PKG_ERRORS" >&5
     6587
     6588        as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
     6589
     6590elif test $pkg_failed = untried; then
     6591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6592$as_echo "no" >&6; }
     6593        as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
     6594
     6595else
     6596        GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
     6597        GTK_LIBS=$pkg_cv_GTK_LIBS
     6598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     6599$as_echo "yes" >&6; }
     6600
     6601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2 version" >&5
     6602$as_echo_n "checking for GTK2 version... " >&6; }
     6603  GTK_VER=`$PKG_CONFIG --modversion gtk+-2.0`
     6604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
     6605$as_echo "$GTK_VER" >&6; }
     6606
     6607fi
     6608
     6609else
     6610        GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
     6611        GTK_LIBS=$pkg_cv_GTK_LIBS
     6612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     6613$as_echo "yes" >&6; }
     6614
     6615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3 version" >&5
     6616$as_echo_n "checking for GTK3 version... " >&6; }
     6617  GTK_VER=`$PKG_CONFIG --modversion gtk+-3.0`
     6618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
     6619$as_echo "$GTK_VER" >&6; }
     6620
     6621fi
     6622      ;;
     6623    *)
     6624
     6625pkg_failed=no
     6626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
     6627$as_echo_n "checking for GTK... " >&6; }
     6628
     6629if test -n "$GTK_CFLAGS"; then
     6630    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
     6631 elif test -n "$PKG_CONFIG"; then
     6632    if test -n "$PKG_CONFIG" && \
     6633    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-\$with_gtk.0\""; } >&5
     6634  ($PKG_CONFIG --exists --print-errors "gtk+-$with_gtk.0") 2>&5
     6635  ac_status=$?
     6636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6637  test $ac_status = 0; }; then
     6638  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-$with_gtk.0" 2>/dev/null`
     6639else
     6640  pkg_failed=yes
     6641fi
     6642 else
     6643    pkg_failed=untried
     6644fi
     6645if test -n "$GTK_LIBS"; then
     6646    pkg_cv_GTK_LIBS="$GTK_LIBS"
     6647 elif test -n "$PKG_CONFIG"; then
     6648    if test -n "$PKG_CONFIG" && \
     6649    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-\$with_gtk.0\""; } >&5
     6650  ($PKG_CONFIG --exists --print-errors "gtk+-$with_gtk.0") 2>&5
     6651  ac_status=$?
     6652  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6653  test $ac_status = 0; }; then
     6654  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-$with_gtk.0" 2>/dev/null`
     6655else
     6656  pkg_failed=yes
     6657fi
     6658 else
     6659    pkg_failed=untried
     6660fi
     6661
     6662
     6663
     6664if test $pkg_failed = yes; then
     6665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6666$as_echo "no" >&6; }
     6667
     6668if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
     6669        _pkg_short_errors_supported=yes
     6670else
     6671        _pkg_short_errors_supported=no
     6672fi
     6673        if test $_pkg_short_errors_supported = yes; then
     6674                GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-$with_gtk.0" 2>&1`
     6675        else
     6676                GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-$with_gtk.0" 2>&1`
     6677        fi
     6678        # Put the nasty error message in config.log where it belongs
     6679        echo "$GTK_PKG_ERRORS" >&5
     6680
     6681        as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
     6682
     6683elif test $pkg_failed = untried; then
     6684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6685$as_echo "no" >&6; }
     6686        as_fn_error $? "GTK $with_gtk not found" "$LINENO" 5
     6687
     6688else
     6689        GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
     6690        GTK_LIBS=$pkg_cv_GTK_LIBS
     6691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     6692$as_echo "yes" >&6; }
     6693
     6694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK$with_gtk version" >&5
     6695$as_echo_n "checking for GTK$with_gtk version... " >&6; }
     6696  GTK_VER=`$PKG_CONFIG --modversion gtk+-$with_gtk.0`
     6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_VER" >&5
     6698$as_echo "$GTK_VER" >&6; }
     6699
     6700fi
     6701      ;;
     6702  esac
     6703
    62676704
    62686705pkg_failed=no
     
    63706807 elif test -n "$PKG_CONFIG"; then
    63716808    if test -n "$PKG_CONFIG" && \
     6809    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"npapi-sdk\""; } >&5
     6810  ($PKG_CONFIG --exists --print-errors "npapi-sdk") 2>&5
     6811  ac_status=$?
     6812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6813  test $ac_status = 0; }; then
     6814  pkg_cv_MOZILLA_CFLAGS=`$PKG_CONFIG --cflags "npapi-sdk" 2>/dev/null`
     6815else
     6816  pkg_failed=yes
     6817fi
     6818 else
     6819    pkg_failed=untried
     6820fi
     6821if test -n "$MOZILLA_LIBS"; then
     6822    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
     6823 elif test -n "$PKG_CONFIG"; then
     6824    if test -n "$PKG_CONFIG" && \
     6825    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"npapi-sdk\""; } >&5
     6826  ($PKG_CONFIG --exists --print-errors "npapi-sdk") 2>&5
     6827  ac_status=$?
     6828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6829  test $ac_status = 0; }; then
     6830  pkg_cv_MOZILLA_LIBS=`$PKG_CONFIG --libs "npapi-sdk" 2>/dev/null`
     6831else
     6832  pkg_failed=yes
     6833fi
     6834 else
     6835    pkg_failed=untried
     6836fi
     6837
     6838
     6839
     6840if test $pkg_failed = yes; then
     6841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6842$as_echo "no" >&6; }
     6843
     6844if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
     6845        _pkg_short_errors_supported=yes
     6846else
     6847        _pkg_short_errors_supported=no
     6848fi
     6849        if test $_pkg_short_errors_supported = yes; then
     6850                MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "npapi-sdk" 2>&1`
     6851        else
     6852                MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "npapi-sdk" 2>&1`
     6853        fi
     6854        # Put the nasty error message in config.log where it belongs
     6855        echo "$MOZILLA_PKG_ERRORS" >&5
     6856
     6857
     6858
     6859pkg_failed=no
     6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MOZILLA" >&5
     6861$as_echo_n "checking for MOZILLA... " >&6; }
     6862
     6863if test -n "$MOZILLA_CFLAGS"; then
     6864    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
     6865 elif test -n "$PKG_CONFIG"; then
     6866    if test -n "$PKG_CONFIG" && \
    63726867    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\""; } >&5
    63736868  ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
     
    64536948fi
    64546949
     6950elif test $pkg_failed = untried; then
     6951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6952$as_echo "no" >&6; }
     6953
     6954
     6955pkg_failed=no
     6956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MOZILLA" >&5
     6957$as_echo_n "checking for MOZILLA... " >&6; }
     6958
     6959if test -n "$MOZILLA_CFLAGS"; then
     6960    pkg_cv_MOZILLA_CFLAGS="$MOZILLA_CFLAGS"
     6961 elif test -n "$PKG_CONFIG"; then
     6962    if test -n "$PKG_CONFIG" && \
     6963    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\""; } >&5
     6964  ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
     6965  ac_status=$?
     6966  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6967  test $ac_status = 0; }; then
     6968  pkg_cv_MOZILLA_CFLAGS=`$PKG_CONFIG --cflags "mozilla-plugin" 2>/dev/null`
     6969else
     6970  pkg_failed=yes
     6971fi
     6972 else
     6973    pkg_failed=untried
     6974fi
     6975if test -n "$MOZILLA_LIBS"; then
     6976    pkg_cv_MOZILLA_LIBS="$MOZILLA_LIBS"
     6977 elif test -n "$PKG_CONFIG"; then
     6978    if test -n "$PKG_CONFIG" && \
     6979    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mozilla-plugin\""; } >&5
     6980  ($PKG_CONFIG --exists --print-errors "mozilla-plugin") 2>&5
     6981  ac_status=$?
     6982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6983  test $ac_status = 0; }; then
     6984  pkg_cv_MOZILLA_LIBS=`$PKG_CONFIG --libs "mozilla-plugin" 2>/dev/null`
     6985else
     6986  pkg_failed=yes
     6987fi
     6988 else
     6989    pkg_failed=untried
     6990fi
     6991
     6992
     6993
     6994if test $pkg_failed = yes; then
     6995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6996$as_echo "no" >&6; }
     6997
     6998if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
     6999        _pkg_short_errors_supported=yes
     7000else
     7001        _pkg_short_errors_supported=no
     7002fi
     7003        if test $_pkg_short_errors_supported = yes; then
     7004                MOZILLA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "mozilla-plugin" 2>&1`
     7005        else
     7006                MOZILLA_PKG_ERRORS=`$PKG_CONFIG --print-errors "mozilla-plugin" 2>&1`
     7007        fi
     7008        # Put the nasty error message in config.log where it belongs
     7009        echo "$MOZILLA_PKG_ERRORS" >&5
     7010
     7011        as_fn_error $? "Package requirements (mozilla-plugin) were not met:
     7012
     7013$MOZILLA_PKG_ERRORS
     7014
     7015Consider adjusting the PKG_CONFIG_PATH environment variable if you
     7016installed software in a non-standard prefix.
     7017
     7018Alternatively, you may set the environment variables MOZILLA_CFLAGS
     7019and MOZILLA_LIBS to avoid the need to call pkg-config.
     7020See the pkg-config man page for more details." "$LINENO" 5
     7021
     7022elif test $pkg_failed = untried; then
     7023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     7024$as_echo "no" >&6; }
     7025        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     7026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     7027as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
     7028is in your PATH or set the PKG_CONFIG environment variable to the full
     7029path to pkg-config.
     7030
     7031Alternatively, you may set the environment variables MOZILLA_CFLAGS
     7032and MOZILLA_LIBS to avoid the need to call pkg-config.
     7033See the pkg-config man page for more details.
     7034
     7035To get pkg-config, see <http://pkg-config.freedesktop.org/>.
     7036See \`config.log' for more details" "$LINENO" 5; }
     7037
     7038else
     7039        MOZILLA_CFLAGS=$pkg_cv_MOZILLA_CFLAGS
     7040        MOZILLA_LIBS=$pkg_cv_MOZILLA_LIBS
     7041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     7042$as_echo "yes" >&6; }
     7043
     7044fi
     7045
     7046else
     7047        MOZILLA_CFLAGS=$pkg_cv_MOZILLA_CFLAGS
     7048        MOZILLA_LIBS=$pkg_cv_MOZILLA_LIBS
     7049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     7050$as_echo "yes" >&6; }
     7051
     7052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xulrunner version" >&5
     7053$as_echo_n "checking for xulrunner version... " >&6; }
     7054if ${xulrunner_cv_collapsed_version+:} false; then :
     7055  $as_echo_n "(cached) " >&6
     7056else
     7057
     7058      # XXX: use NPAPI versions instead
     7059      xulrunner_cv_collapsed_version=20000000
     7060
     7061fi
     7062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xulrunner_cv_collapsed_version" >&5
     7063$as_echo "$xulrunner_cv_collapsed_version" >&6; }
     7064
     7065fi
     7066
    64557067
    64567068
     
    64787090    then
    64797091      xulrunner_cv_collapsed_version=`pkg-config --modversion libxul | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
     7092    elif pkg-config --modversion mozilla-plugin >/dev/null 2>&1
     7093    then
     7094      xulrunner_cv_collapsed_version=`pkg-config --modversion mozilla-plugin | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'`
    64807095    else
    64817096      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     
    67877402$as_echo "${JAVA}" >&6; }
    67887403
     7404  JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/[^"]*"\(.*\)"$/\1/p'`
     7405  case "${JAVA_VERSION}" in
     7406    1.7*) VERSION_DEFS='-DHAVE_JAVA7';;
     7407  esac
     7408
    67897409
    67907410
     
    68027422cd tmp.$$
    68037423cat << \EOF > $CLASS
    6804 /* [#]line 6804 "configure" */
     7424/* [#]line 7424 "configure" */
    68057425package sun.applet;
    68067426
     
    68527472cd tmp.$$
    68537473cat << \EOF > $CLASS
    6854 /* [#]line 6854 "configure" */
     7474/* [#]line 7474 "configure" */
    68557475package sun.applet;
    68567476
     
    69027522cd tmp.$$
    69037523cat << \EOF > $CLASS
    6904 /* [#]line 6904 "configure" */
     7524/* [#]line 7524 "configure" */
    69057525package sun.applet;
    69067526
     
    69527572cd tmp.$$
    69537573cat << \EOF > $CLASS
    6954 /* [#]line 6954 "configure" */
     7574/* [#]line 7574 "configure" */
    69557575package sun.applet;
    69567576
     
    70027622cd tmp.$$
    70037623cat << \EOF > $CLASS
    7004 /* [#]line 7004 "configure" */
     7624/* [#]line 7624 "configure" */
    70057625package sun.applet;
    70067626
     
    70527672cd tmp.$$
    70537673cat << \EOF > $CLASS
    7054 /* [#]line 7054 "configure" */
     7674/* [#]line 7674 "configure" */
    70557675package sun.applet;
    70567676
     
    71027722cd tmp.$$
    71037723cat << \EOF > $CLASS
    7104 /* [#]line 7104 "configure" */
     7724/* [#]line 7724 "configure" */
    71057725package sun.applet;
    71067726
     
    71527772cd tmp.$$
    71537773cat << \EOF > $CLASS
    7154 /* [#]line 7154 "configure" */
     7774/* [#]line 7774 "configure" */
    71557775package sun.applet;
    71567776
     
    71917811
    71927812
    7193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.misc.BASE64Encoder is available" >&5
    7194 $as_echo_n "checking if sun.misc.BASE64Encoder is available... " >&6; }
    7195 if ${it_cv_SUN_MISC_BASE64ENCODER+:} false; then :
     7813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.misc.HexDumpEncoder is available" >&5
     7814$as_echo_n "checking if sun.misc.HexDumpEncoder is available... " >&6; }
     7815if ${it_cv_SUN_MISC_HEXDUMPENCODER+:} false; then :
    71967816  $as_echo_n "(cached) " >&6
    71977817else
     
    72027822cd tmp.$$
    72037823cat << \EOF > $CLASS
    7204 /* [#]line 7204 "configure" */
    7205 package sun.applet;
    7206 
    7207 import sun.misc.BASE64Encoder;
    7208 
    7209 public class Test
    7210 {
    7211   public static void main(String[] args)
    7212     throws Exception
    7213   {
    7214     System.out.println(Class.forName("sun.misc.BASE64Encoder"));
    7215   }
    7216 }
    7217 
    7218 EOF
    7219 if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&5 2>&1; then
    7220   if $JAVA -classpath . $BYTECODE >&5 2>&1; then
    7221       it_cv_SUN_MISC_BASE64ENCODER=yes;
    7222   else
    7223       it_cv_SUN_MISC_BASE64ENCODER=no;
    7224   fi
    7225 else
    7226   it_cv_SUN_MISC_BASE64ENCODER=no;
    7227 fi
    7228 
    7229 fi
    7230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $it_cv_SUN_MISC_BASE64ENCODER" >&5
    7231 $as_echo "$it_cv_SUN_MISC_BASE64ENCODER" >&6; }
    7232 rm -f $CLASS *.class
    7233 cd ..
    7234 # should be rmdir but has to be rm -rf due to sun.applet usage
    7235 rm -rf tmp.$$
    7236 if test x"${it_cv_SUN_MISC_BASE64ENCODER}" = "xno"; then
    7237    as_fn_error $? "sun.misc.BASE64Encoder not found." "$LINENO" 5
    7238 fi
    7239 
    7240 
    7241 
    7242 
    7243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.misc.HexDumpEncoder is available" >&5
    7244 $as_echo_n "checking if sun.misc.HexDumpEncoder is available... " >&6; }
    7245 if ${it_cv_SUN_MISC_HEXDUMPENCODER+:} false; then :
    7246   $as_echo_n "(cached) " >&6
    7247 else
    7248 
    7249 CLASS=sun/applet/Test.java
    7250 BYTECODE=$(echo $CLASS|sed 's#\.java##')
    7251 mkdir -p tmp.$$/$(dirname $CLASS)
    7252 cd tmp.$$
    7253 cat << \EOF > $CLASS
    7254 /* [#]line 7254 "configure" */
     7824/* [#]line 7824 "configure" */
    72557825package sun.applet;
    72567826
     
    73027872cd tmp.$$
    73037873cat << \EOF > $CLASS
    7304 /* [#]line 7304 "configure" */
     7874/* [#]line 7874 "configure" */
    73057875package sun.applet;
    73067876
     
    73527922cd tmp.$$
    73537923cat << \EOF > $CLASS
    7354 /* [#]line 7354 "configure" */
     7924/* [#]line 7924 "configure" */
    73557925package sun.applet;
    73567926
     
    73917961
    73927962
    7393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.awt.X11.XEmbeddedFrame is available" >&5
    7394 $as_echo_n "checking if sun.awt.X11.XEmbeddedFrame is available... " >&6; }
    7395 if ${it_cv_SUN_AWT_X11_XEMBEDDEDFRAME+:} false; then :
     7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.net.www.protocol.jar.URLJarFile is available" >&5
     7964$as_echo_n "checking if sun.net.www.protocol.jar.URLJarFile is available... " >&6; }
     7965if ${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE+:} false; then :
    73967966  $as_echo_n "(cached) " >&6
    73977967else
     
    74027972cd tmp.$$
    74037973cat << \EOF > $CLASS
    7404 /* [#]line 7404 "configure" */
     7974/* [#]line 7974 "configure" */
     7975package sun.applet;
     7976
     7977import sun.net.www.protocol.jar.URLJarFile;
     7978
     7979public class Test
     7980{
     7981  public static void main(String[] args)
     7982    throws Exception
     7983  {
     7984    System.out.println(Class.forName("sun.net.www.protocol.jar.URLJarFile"));
     7985  }
     7986}
     7987
     7988EOF
     7989if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&5 2>&1; then
     7990  if $JAVA -classpath . $BYTECODE >&5 2>&1; then
     7991      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE=yes;
     7992  else
     7993      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE=no;
     7994  fi
     7995else
     7996  it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE=no;
     7997fi
     7998
     7999fi
     8000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE" >&5
     8001$as_echo "$it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE" >&6; }
     8002rm -f $CLASS *.class
     8003cd ..
     8004# should be rmdir but has to be rm -rf due to sun.applet usage
     8005rm -rf tmp.$$
     8006if test x"${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE}" = "xno"; then
     8007   as_fn_error $? "sun.net.www.protocol.jar.URLJarFile not found." "$LINENO" 5
     8008fi
     8009
     8010
     8011
     8012
     8013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.net.www.protocol.jar.URLJarFileCallBack is available" >&5
     8014$as_echo_n "checking if sun.net.www.protocol.jar.URLJarFileCallBack is available... " >&6; }
     8015if ${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK+:} false; then :
     8016  $as_echo_n "(cached) " >&6
     8017else
     8018
     8019CLASS=sun/applet/Test.java
     8020BYTECODE=$(echo $CLASS|sed 's#\.java##')
     8021mkdir -p tmp.$$/$(dirname $CLASS)
     8022cd tmp.$$
     8023cat << \EOF > $CLASS
     8024/* [#]line 8024 "configure" */
     8025package sun.applet;
     8026
     8027import sun.net.www.protocol.jar.URLJarFileCallBack;
     8028
     8029public class Test
     8030{
     8031  public static void main(String[] args)
     8032    throws Exception
     8033  {
     8034    System.out.println(Class.forName("sun.net.www.protocol.jar.URLJarFileCallBack"));
     8035  }
     8036}
     8037
     8038EOF
     8039if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&5 2>&1; then
     8040  if $JAVA -classpath . $BYTECODE >&5 2>&1; then
     8041      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK=yes;
     8042  else
     8043      it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK=no;
     8044  fi
     8045else
     8046  it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK=no;
     8047fi
     8048
     8049fi
     8050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK" >&5
     8051$as_echo "$it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK" >&6; }
     8052rm -f $CLASS *.class
     8053cd ..
     8054# should be rmdir but has to be rm -rf due to sun.applet usage
     8055rm -rf tmp.$$
     8056if test x"${it_cv_SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK}" = "xno"; then
     8057   as_fn_error $? "sun.net.www.protocol.jar.URLJarFileCallBack not found." "$LINENO" 5
     8058fi
     8059
     8060
     8061
     8062
     8063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sun.awt.X11.XEmbeddedFrame is available" >&5
     8064$as_echo_n "checking if sun.awt.X11.XEmbeddedFrame is available... " >&6; }
     8065if ${it_cv_SUN_AWT_X11_XEMBEDDEDFRAME+:} false; then :
     8066  $as_echo_n "(cached) " >&6
     8067else
     8068
     8069CLASS=sun/applet/Test.java
     8070BYTECODE=$(echo $CLASS|sed 's#\.java##')
     8071mkdir -p tmp.$$/$(dirname $CLASS)
     8072cd tmp.$$
     8073cat << \EOF > $CLASS
     8074/* [#]line 8074 "configure" */
    74058075package sun.applet;
    74068076
     
    74528122cd tmp.$$
    74538123cat << \EOF > $CLASS
    7454 /* [#]line 7454 "configure" */
     8124/* [#]line 8124 "configure" */
    74558125package sun.applet;
    74568126
     
    75028172cd tmp.$$
    75038173cat << \EOF > $CLASS
    7504 /* [#]line 7504 "configure" */
     8174/* [#]line 8174 "configure" */
    75058175package sun.applet;
    75068176
     
    75528222cd tmp.$$
    75538223cat << \EOF > $CLASS
    7554 /* [#]line 7554 "configure" */
     8224/* [#]line 8224 "configure" */
    75558225package sun.applet;
    75568226
     
    76028272cd tmp.$$
    76038273cat << \EOF > $CLASS
    7604 /* [#]line 7604 "configure" */
     8274/* [#]line 8274 "configure" */
    76058275import java.lang.reflect.Modifier;
    76068276
     
    76548324
    76558325
     8326
     8327pkg_failed=no
     8328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB2_V_216" >&5
     8329$as_echo_n "checking for GLIB2_V_216... " >&6; }
     8330
     8331if test -n "$GLIB2_V_216_CFLAGS"; then
     8332    pkg_cv_GLIB2_V_216_CFLAGS="$GLIB2_V_216_CFLAGS"
     8333 elif test -n "$PKG_CONFIG"; then
     8334    if test -n "$PKG_CONFIG" && \
     8335    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5
     8336  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5
     8337  ac_status=$?
     8338  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     8339  test $ac_status = 0; }; then
     8340  pkg_cv_GLIB2_V_216_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16" 2>/dev/null`
     8341else
     8342  pkg_failed=yes
     8343fi
     8344 else
     8345    pkg_failed=untried
     8346fi
     8347if test -n "$GLIB2_V_216_LIBS"; then
     8348    pkg_cv_GLIB2_V_216_LIBS="$GLIB2_V_216_LIBS"
     8349 elif test -n "$PKG_CONFIG"; then
     8350    if test -n "$PKG_CONFIG" && \
     8351    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\""; } >&5
     8352  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5
     8353  ac_status=$?
     8354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     8355  test $ac_status = 0; }; then
     8356  pkg_cv_GLIB2_V_216_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16" 2>/dev/null`
     8357else
     8358  pkg_failed=yes
     8359fi
     8360 else
     8361    pkg_failed=untried
     8362fi
     8363
     8364
     8365
     8366if test $pkg_failed = yes; then
     8367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8368$as_echo "no" >&6; }
     8369
     8370if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
     8371        _pkg_short_errors_supported=yes
     8372else
     8373        _pkg_short_errors_supported=no
     8374fi
     8375        if test $_pkg_short_errors_supported = yes; then
     8376                GLIB2_V_216_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16" 2>&1`
     8377        else
     8378                GLIB2_V_216_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16" 2>&1`
     8379        fi
     8380        # Put the nasty error message in config.log where it belongs
     8381        echo "$GLIB2_V_216_PKG_ERRORS" >&5
     8382
     8383        $as_echo "#define LEGACY_GLIB 1" >>confdefs.h
     8384
     8385elif test $pkg_failed = untried; then
     8386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8387$as_echo "no" >&6; }
     8388        $as_echo "#define LEGACY_GLIB 1" >>confdefs.h
     8389
     8390else
     8391        GLIB2_V_216_CFLAGS=$pkg_cv_GLIB2_V_216_CFLAGS
     8392        GLIB2_V_216_LIBS=$pkg_cv_GLIB2_V_216_LIBS
     8393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     8394$as_echo "yes" >&6; }
     8395
     8396fi
     8397
     8398
     8399
     8400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for legacy xulrunner api" >&5
     8401$as_echo_n "checking for legacy xulrunner api... " >&6; }
     8402  ac_ext=cpp
     8403ac_cpp='$CXXCPP $CPPFLAGS'
     8404ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     8405ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     8406ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     8407
     8408  CXXFLAGS_BACKUP=$CXXFLAGS
     8409  CXXFLAGS=$CXXFLAGS" "$MOZILLA_CFLAGS
     8410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8411/* end confdefs.h.  */
     8412
     8413    #include <npfunctions.h>
     8414    const  char* NP_GetMIMEDescription ()
     8415    {return (char*) "yap!";}
     8416
     8417int
     8418main ()
     8419{
     8420
     8421  ;
     8422  return 0;
     8423}
     8424_ACEOF
     8425if ac_fn_cxx_try_compile "$LINENO"; then :
     8426
     8427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8428$as_echo "no" >&6; }
     8429
     8430else
     8431
     8432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     8433$as_echo "yes" >&6; }
     8434    $as_echo "#define LEGACY_XULRUNNERAPI 1" >>confdefs.h
     8435
     8436
     8437fi
     8438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     8439  CXXFLAGS=$CXXFLAGS_BACKUP
     8440  ac_ext=c
     8441ac_cpp='$CPP $CPPFLAGS'
     8442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     8443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     8444ac_compiler_gnu=$ac_cv_c_compiler_gnu
     8445
     8446
     8447
    76568448#
    76578449# Find optional depedencies
    76588450#
     8451
     8452for ac_prog in xsltproc
     8453do
     8454  # Extract the first word of "$ac_prog", so it can be a program name with args.
     8455set dummy $ac_prog; ac_word=$2
     8456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8457$as_echo_n "checking for $ac_word... " >&6; }
     8458if ${ac_cv_prog_XSLTPROC+:} false; then :
     8459  $as_echo_n "(cached) " >&6
     8460else
     8461  if test -n "$XSLTPROC"; then
     8462  ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
     8463else
     8464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8465for as_dir in $PATH
     8466do
     8467  IFS=$as_save_IFS
     8468  test -z "$as_dir" && as_dir=.
     8469    for ac_exec_ext in '' $ac_executable_extensions; do
     8470  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8471    ac_cv_prog_XSLTPROC="$ac_prog"
     8472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8473    break 2
     8474  fi
     8475done
     8476  done
     8477IFS=$as_save_IFS
     8478
     8479fi
     8480fi
     8481XSLTPROC=$ac_cv_prog_XSLTPROC
     8482if test -n "$XSLTPROC"; then
     8483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
     8484$as_echo "$XSLTPROC" >&6; }
     8485else
     8486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8487$as_echo "no" >&6; }
     8488fi
     8489
     8490
     8491  test -n "$XSLTPROC" && break
     8492done
     8493
     8494# browser to be linked/tested
     8495# Example: IT_FIND_BROWSER([browser-name],[variable-to-store-path],[default-run-command-if-different-from-the-browser-name])
     8496
     8497
     8498# Check whether --with-firefox was given.
     8499if test "${with_firefox+set}" = set; then :
     8500  withval=$with_firefox;
     8501   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
     8502    FIREFOX=""
     8503   elif test -f "${withval}" ; then
     8504    FIREFOX="${withval}"
     8505   else
     8506    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for firefox" >&5
     8507$as_echo_n "checking for firefox... " >&6; }
     8508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     8509$as_echo "not found" >&6; }
     8510    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     8511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     8512as_fn_error $? "invalid location specified to firefox: ${withval}
     8513See \`config.log' for more details" "$LINENO" 5; }
     8514   fi
     8515
     8516else
     8517
     8518   withval="yes"
     8519
     8520fi
     8521
     8522
     8523  if test -f "${FIREFOX}"; then
     8524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for firefox" >&5
     8525$as_echo_n "checking for firefox... " >&6; }
     8526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FIREFOX}" >&5
     8527$as_echo "${FIREFOX}" >&6; }
     8528  elif test "${withval}" != "no"; then
     8529   if test 2 -gt 2; then
     8530    if test -n "$ac_tool_prefix"; then
     8531  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
     8532set dummy ${ac_tool_prefix}; ac_word=$2
     8533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8534$as_echo_n "checking for $ac_word... " >&6; }
     8535if ${ac_cv_path_FIREFOX+:} false; then :
     8536  $as_echo_n "(cached) " >&6
     8537else
     8538  case $FIREFOX in
     8539  [\\/]* | ?:[\\/]*)
     8540  ac_cv_path_FIREFOX="$FIREFOX" # Let the user override the test with a path.
     8541  ;;
     8542  *)
     8543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8544for as_dir in $PATH
     8545do
     8546  IFS=$as_save_IFS
     8547  test -z "$as_dir" && as_dir=.
     8548    for ac_exec_ext in '' $ac_executable_extensions; do
     8549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8550    ac_cv_path_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
     8551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8552    break 2
     8553  fi
     8554done
     8555  done
     8556IFS=$as_save_IFS
     8557
     8558  ;;
     8559esac
     8560fi
     8561FIREFOX=$ac_cv_path_FIREFOX
     8562if test -n "$FIREFOX"; then
     8563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIREFOX" >&5
     8564$as_echo "$FIREFOX" >&6; }
     8565else
     8566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8567$as_echo "no" >&6; }
     8568fi
     8569
     8570
     8571fi
     8572if test -z "$ac_cv_path_FIREFOX"; then
     8573  ac_pt_FIREFOX=$FIREFOX
     8574  # Extract the first word of "", so it can be a program name with args.
     8575set dummy ; ac_word=$2
     8576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8577$as_echo_n "checking for $ac_word... " >&6; }
     8578if ${ac_cv_path_ac_pt_FIREFOX+:} false; then :
     8579  $as_echo_n "(cached) " >&6
     8580else
     8581  case $ac_pt_FIREFOX in
     8582  [\\/]* | ?:[\\/]*)
     8583  ac_cv_path_ac_pt_FIREFOX="$ac_pt_FIREFOX" # Let the user override the test with a path.
     8584  ;;
     8585  *)
     8586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8587for as_dir in $PATH
     8588do
     8589  IFS=$as_save_IFS
     8590  test -z "$as_dir" && as_dir=.
     8591    for ac_exec_ext in '' $ac_executable_extensions; do
     8592  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8593    ac_cv_path_ac_pt_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
     8594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8595    break 2
     8596  fi
     8597done
     8598  done
     8599IFS=$as_save_IFS
     8600
     8601  ;;
     8602esac
     8603fi
     8604ac_pt_FIREFOX=$ac_cv_path_ac_pt_FIREFOX
     8605if test -n "$ac_pt_FIREFOX"; then
     8606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_FIREFOX" >&5
     8607$as_echo "$ac_pt_FIREFOX" >&6; }
     8608else
     8609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8610$as_echo "no" >&6; }
     8611fi
     8612
     8613  if test "x$ac_pt_FIREFOX" = x; then
     8614    FIREFOX=""
     8615  else
     8616    case $cross_compiling:$ac_tool_warned in
     8617yes:)
     8618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8620ac_tool_warned=yes ;;
     8621esac
     8622    FIREFOX=$ac_pt_FIREFOX
     8623  fi
     8624else
     8625  FIREFOX="$ac_cv_path_FIREFOX"
     8626fi
     8627
     8628   else
     8629    if test -n "$ac_tool_prefix"; then
     8630  # Extract the first word of "${ac_tool_prefix}firefox", so it can be a program name with args.
     8631set dummy ${ac_tool_prefix}firefox; ac_word=$2
     8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8633$as_echo_n "checking for $ac_word... " >&6; }
     8634if ${ac_cv_path_FIREFOX+:} false; then :
     8635  $as_echo_n "(cached) " >&6
     8636else
     8637  case $FIREFOX in
     8638  [\\/]* | ?:[\\/]*)
     8639  ac_cv_path_FIREFOX="$FIREFOX" # Let the user override the test with a path.
     8640  ;;
     8641  *)
     8642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8643for as_dir in $PATH
     8644do
     8645  IFS=$as_save_IFS
     8646  test -z "$as_dir" && as_dir=.
     8647    for ac_exec_ext in '' $ac_executable_extensions; do
     8648  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8649    ac_cv_path_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
     8650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8651    break 2
     8652  fi
     8653done
     8654  done
     8655IFS=$as_save_IFS
     8656
     8657  ;;
     8658esac
     8659fi
     8660FIREFOX=$ac_cv_path_FIREFOX
     8661if test -n "$FIREFOX"; then
     8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIREFOX" >&5
     8663$as_echo "$FIREFOX" >&6; }
     8664else
     8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8666$as_echo "no" >&6; }
     8667fi
     8668
     8669
     8670fi
     8671if test -z "$ac_cv_path_FIREFOX"; then
     8672  ac_pt_FIREFOX=$FIREFOX
     8673  # Extract the first word of "firefox", so it can be a program name with args.
     8674set dummy firefox; ac_word=$2
     8675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8676$as_echo_n "checking for $ac_word... " >&6; }
     8677if ${ac_cv_path_ac_pt_FIREFOX+:} false; then :
     8678  $as_echo_n "(cached) " >&6
     8679else
     8680  case $ac_pt_FIREFOX in
     8681  [\\/]* | ?:[\\/]*)
     8682  ac_cv_path_ac_pt_FIREFOX="$ac_pt_FIREFOX" # Let the user override the test with a path.
     8683  ;;
     8684  *)
     8685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8686for as_dir in $PATH
     8687do
     8688  IFS=$as_save_IFS
     8689  test -z "$as_dir" && as_dir=.
     8690    for ac_exec_ext in '' $ac_executable_extensions; do
     8691  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8692    ac_cv_path_ac_pt_FIREFOX="$as_dir/$ac_word$ac_exec_ext"
     8693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8694    break 2
     8695  fi
     8696done
     8697  done
     8698IFS=$as_save_IFS
     8699
     8700  ;;
     8701esac
     8702fi
     8703ac_pt_FIREFOX=$ac_cv_path_ac_pt_FIREFOX
     8704if test -n "$ac_pt_FIREFOX"; then
     8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_FIREFOX" >&5
     8706$as_echo "$ac_pt_FIREFOX" >&6; }
     8707else
     8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8709$as_echo "no" >&6; }
     8710fi
     8711
     8712  if test "x$ac_pt_FIREFOX" = x; then
     8713    FIREFOX=""
     8714  else
     8715    case $cross_compiling:$ac_tool_warned in
     8716yes:)
     8717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8719ac_tool_warned=yes ;;
     8720esac
     8721    FIREFOX=$ac_pt_FIREFOX
     8722  fi
     8723else
     8724  FIREFOX="$ac_cv_path_FIREFOX"
     8725fi
     8726
     8727   fi
     8728  else
     8729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for firefox" >&5
     8730$as_echo_n "checking for firefox... " >&6; }
     8731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8732$as_echo "no" >&6; }
     8733  fi
     8734
     8735
     8736
     8737# Check whether --with-chrome was given.
     8738if test "${with_chrome+set}" = set; then :
     8739  withval=$with_chrome;
     8740   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
     8741    CHROME=""
     8742   elif test -f "${withval}" ; then
     8743    CHROME="${withval}"
     8744   else
     8745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chrome" >&5
     8746$as_echo_n "checking for chrome... " >&6; }
     8747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     8748$as_echo "not found" >&6; }
     8749    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     8750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     8751as_fn_error $? "invalid location specified to chrome: ${withval}
     8752See \`config.log' for more details" "$LINENO" 5; }
     8753   fi
     8754
     8755else
     8756
     8757   withval="yes"
     8758
     8759fi
     8760
     8761
     8762  if test -f "${CHROME}"; then
     8763   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chrome" >&5
     8764$as_echo_n "checking for chrome... " >&6; }
     8765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CHROME}" >&5
     8766$as_echo "${CHROME}" >&6; }
     8767  elif test "${withval}" != "no"; then
     8768   if test 3 -gt 2; then
     8769    if test -n "$ac_tool_prefix"; then
     8770  # Extract the first word of "${ac_tool_prefix}google-chrome", so it can be a program name with args.
     8771set dummy ${ac_tool_prefix}google-chrome; ac_word=$2
     8772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8773$as_echo_n "checking for $ac_word... " >&6; }
     8774if ${ac_cv_path_CHROME+:} false; then :
     8775  $as_echo_n "(cached) " >&6
     8776else
     8777  case $CHROME in
     8778  [\\/]* | ?:[\\/]*)
     8779  ac_cv_path_CHROME="$CHROME" # Let the user override the test with a path.
     8780  ;;
     8781  *)
     8782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8783for as_dir in $PATH
     8784do
     8785  IFS=$as_save_IFS
     8786  test -z "$as_dir" && as_dir=.
     8787    for ac_exec_ext in '' $ac_executable_extensions; do
     8788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8789    ac_cv_path_CHROME="$as_dir/$ac_word$ac_exec_ext"
     8790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8791    break 2
     8792  fi
     8793done
     8794  done
     8795IFS=$as_save_IFS
     8796
     8797  ;;
     8798esac
     8799fi
     8800CHROME=$ac_cv_path_CHROME
     8801if test -n "$CHROME"; then
     8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROME" >&5
     8803$as_echo "$CHROME" >&6; }
     8804else
     8805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8806$as_echo "no" >&6; }
     8807fi
     8808
     8809
     8810fi
     8811if test -z "$ac_cv_path_CHROME"; then
     8812  ac_pt_CHROME=$CHROME
     8813  # Extract the first word of "google-chrome", so it can be a program name with args.
     8814set dummy google-chrome; ac_word=$2
     8815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8816$as_echo_n "checking for $ac_word... " >&6; }
     8817if ${ac_cv_path_ac_pt_CHROME+:} false; then :
     8818  $as_echo_n "(cached) " >&6
     8819else
     8820  case $ac_pt_CHROME in
     8821  [\\/]* | ?:[\\/]*)
     8822  ac_cv_path_ac_pt_CHROME="$ac_pt_CHROME" # Let the user override the test with a path.
     8823  ;;
     8824  *)
     8825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8826for as_dir in $PATH
     8827do
     8828  IFS=$as_save_IFS
     8829  test -z "$as_dir" && as_dir=.
     8830    for ac_exec_ext in '' $ac_executable_extensions; do
     8831  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8832    ac_cv_path_ac_pt_CHROME="$as_dir/$ac_word$ac_exec_ext"
     8833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8834    break 2
     8835  fi
     8836done
     8837  done
     8838IFS=$as_save_IFS
     8839
     8840  ;;
     8841esac
     8842fi
     8843ac_pt_CHROME=$ac_cv_path_ac_pt_CHROME
     8844if test -n "$ac_pt_CHROME"; then
     8845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROME" >&5
     8846$as_echo "$ac_pt_CHROME" >&6; }
     8847else
     8848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8849$as_echo "no" >&6; }
     8850fi
     8851
     8852  if test "x$ac_pt_CHROME" = x; then
     8853    CHROME=""
     8854  else
     8855    case $cross_compiling:$ac_tool_warned in
     8856yes:)
     8857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8859ac_tool_warned=yes ;;
     8860esac
     8861    CHROME=$ac_pt_CHROME
     8862  fi
     8863else
     8864  CHROME="$ac_cv_path_CHROME"
     8865fi
     8866
     8867   else
     8868    if test -n "$ac_tool_prefix"; then
     8869  # Extract the first word of "${ac_tool_prefix}chrome", so it can be a program name with args.
     8870set dummy ${ac_tool_prefix}chrome; ac_word=$2
     8871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8872$as_echo_n "checking for $ac_word... " >&6; }
     8873if ${ac_cv_path_CHROME+:} false; then :
     8874  $as_echo_n "(cached) " >&6
     8875else
     8876  case $CHROME in
     8877  [\\/]* | ?:[\\/]*)
     8878  ac_cv_path_CHROME="$CHROME" # Let the user override the test with a path.
     8879  ;;
     8880  *)
     8881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8882for as_dir in $PATH
     8883do
     8884  IFS=$as_save_IFS
     8885  test -z "$as_dir" && as_dir=.
     8886    for ac_exec_ext in '' $ac_executable_extensions; do
     8887  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8888    ac_cv_path_CHROME="$as_dir/$ac_word$ac_exec_ext"
     8889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8890    break 2
     8891  fi
     8892done
     8893  done
     8894IFS=$as_save_IFS
     8895
     8896  ;;
     8897esac
     8898fi
     8899CHROME=$ac_cv_path_CHROME
     8900if test -n "$CHROME"; then
     8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROME" >&5
     8902$as_echo "$CHROME" >&6; }
     8903else
     8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8905$as_echo "no" >&6; }
     8906fi
     8907
     8908
     8909fi
     8910if test -z "$ac_cv_path_CHROME"; then
     8911  ac_pt_CHROME=$CHROME
     8912  # Extract the first word of "chrome", so it can be a program name with args.
     8913set dummy chrome; ac_word=$2
     8914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8915$as_echo_n "checking for $ac_word... " >&6; }
     8916if ${ac_cv_path_ac_pt_CHROME+:} false; then :
     8917  $as_echo_n "(cached) " >&6
     8918else
     8919  case $ac_pt_CHROME in
     8920  [\\/]* | ?:[\\/]*)
     8921  ac_cv_path_ac_pt_CHROME="$ac_pt_CHROME" # Let the user override the test with a path.
     8922  ;;
     8923  *)
     8924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8925for as_dir in $PATH
     8926do
     8927  IFS=$as_save_IFS
     8928  test -z "$as_dir" && as_dir=.
     8929    for ac_exec_ext in '' $ac_executable_extensions; do
     8930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     8931    ac_cv_path_ac_pt_CHROME="$as_dir/$ac_word$ac_exec_ext"
     8932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8933    break 2
     8934  fi
     8935done
     8936  done
     8937IFS=$as_save_IFS
     8938
     8939  ;;
     8940esac
     8941fi
     8942ac_pt_CHROME=$ac_cv_path_ac_pt_CHROME
     8943if test -n "$ac_pt_CHROME"; then
     8944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROME" >&5
     8945$as_echo "$ac_pt_CHROME" >&6; }
     8946else
     8947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8948$as_echo "no" >&6; }
     8949fi
     8950
     8951  if test "x$ac_pt_CHROME" = x; then
     8952    CHROME=""
     8953  else
     8954    case $cross_compiling:$ac_tool_warned in
     8955yes:)
     8956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8958ac_tool_warned=yes ;;
     8959esac
     8960    CHROME=$ac_pt_CHROME
     8961  fi
     8962else
     8963  CHROME="$ac_cv_path_CHROME"
     8964fi
     8965
     8966   fi
     8967  else
     8968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chrome" >&5
     8969$as_echo_n "checking for chrome... " >&6; }
     8970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8971$as_echo "no" >&6; }
     8972  fi
     8973
     8974
     8975
     8976# Check whether --with-chromium was given.
     8977if test "${with_chromium+set}" = set; then :
     8978  withval=$with_chromium;
     8979   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
     8980    CHROMIUM=""
     8981   elif test -f "${withval}" ; then
     8982    CHROMIUM="${withval}"
     8983   else
     8984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chromium" >&5
     8985$as_echo_n "checking for chromium... " >&6; }
     8986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     8987$as_echo "not found" >&6; }
     8988    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     8989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     8990as_fn_error $? "invalid location specified to chromium: ${withval}
     8991See \`config.log' for more details" "$LINENO" 5; }
     8992   fi
     8993
     8994else
     8995
     8996   withval="yes"
     8997
     8998fi
     8999
     9000
     9001  if test -f "${CHROMIUM}"; then
     9002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chromium" >&5
     9003$as_echo_n "checking for chromium... " >&6; }
     9004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CHROMIUM}" >&5
     9005$as_echo "${CHROMIUM}" >&6; }
     9006  elif test "${withval}" != "no"; then
     9007   if test 3 -gt 2; then
     9008    if test -n "$ac_tool_prefix"; then
     9009  # Extract the first word of "${ac_tool_prefix}chromium-browser", so it can be a program name with args.
     9010set dummy ${ac_tool_prefix}chromium-browser; ac_word=$2
     9011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9012$as_echo_n "checking for $ac_word... " >&6; }
     9013if ${ac_cv_path_CHROMIUM+:} false; then :
     9014  $as_echo_n "(cached) " >&6
     9015else
     9016  case $CHROMIUM in
     9017  [\\/]* | ?:[\\/]*)
     9018  ac_cv_path_CHROMIUM="$CHROMIUM" # Let the user override the test with a path.
     9019  ;;
     9020  *)
     9021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9022for as_dir in $PATH
     9023do
     9024  IFS=$as_save_IFS
     9025  test -z "$as_dir" && as_dir=.
     9026    for ac_exec_ext in '' $ac_executable_extensions; do
     9027  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9028    ac_cv_path_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
     9029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9030    break 2
     9031  fi
     9032done
     9033  done
     9034IFS=$as_save_IFS
     9035
     9036  ;;
     9037esac
     9038fi
     9039CHROMIUM=$ac_cv_path_CHROMIUM
     9040if test -n "$CHROMIUM"; then
     9041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROMIUM" >&5
     9042$as_echo "$CHROMIUM" >&6; }
     9043else
     9044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9045$as_echo "no" >&6; }
     9046fi
     9047
     9048
     9049fi
     9050if test -z "$ac_cv_path_CHROMIUM"; then
     9051  ac_pt_CHROMIUM=$CHROMIUM
     9052  # Extract the first word of "chromium-browser", so it can be a program name with args.
     9053set dummy chromium-browser; ac_word=$2
     9054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9055$as_echo_n "checking for $ac_word... " >&6; }
     9056if ${ac_cv_path_ac_pt_CHROMIUM+:} false; then :
     9057  $as_echo_n "(cached) " >&6
     9058else
     9059  case $ac_pt_CHROMIUM in
     9060  [\\/]* | ?:[\\/]*)
     9061  ac_cv_path_ac_pt_CHROMIUM="$ac_pt_CHROMIUM" # Let the user override the test with a path.
     9062  ;;
     9063  *)
     9064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9065for as_dir in $PATH
     9066do
     9067  IFS=$as_save_IFS
     9068  test -z "$as_dir" && as_dir=.
     9069    for ac_exec_ext in '' $ac_executable_extensions; do
     9070  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9071    ac_cv_path_ac_pt_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
     9072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9073    break 2
     9074  fi
     9075done
     9076  done
     9077IFS=$as_save_IFS
     9078
     9079  ;;
     9080esac
     9081fi
     9082ac_pt_CHROMIUM=$ac_cv_path_ac_pt_CHROMIUM
     9083if test -n "$ac_pt_CHROMIUM"; then
     9084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROMIUM" >&5
     9085$as_echo "$ac_pt_CHROMIUM" >&6; }
     9086else
     9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9088$as_echo "no" >&6; }
     9089fi
     9090
     9091  if test "x$ac_pt_CHROMIUM" = x; then
     9092    CHROMIUM=""
     9093  else
     9094    case $cross_compiling:$ac_tool_warned in
     9095yes:)
     9096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9098ac_tool_warned=yes ;;
     9099esac
     9100    CHROMIUM=$ac_pt_CHROMIUM
     9101  fi
     9102else
     9103  CHROMIUM="$ac_cv_path_CHROMIUM"
     9104fi
     9105
     9106   else
     9107    if test -n "$ac_tool_prefix"; then
     9108  # Extract the first word of "${ac_tool_prefix}chromium", so it can be a program name with args.
     9109set dummy ${ac_tool_prefix}chromium; ac_word=$2
     9110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9111$as_echo_n "checking for $ac_word... " >&6; }
     9112if ${ac_cv_path_CHROMIUM+:} false; then :
     9113  $as_echo_n "(cached) " >&6
     9114else
     9115  case $CHROMIUM in
     9116  [\\/]* | ?:[\\/]*)
     9117  ac_cv_path_CHROMIUM="$CHROMIUM" # Let the user override the test with a path.
     9118  ;;
     9119  *)
     9120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9121for as_dir in $PATH
     9122do
     9123  IFS=$as_save_IFS
     9124  test -z "$as_dir" && as_dir=.
     9125    for ac_exec_ext in '' $ac_executable_extensions; do
     9126  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9127    ac_cv_path_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
     9128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9129    break 2
     9130  fi
     9131done
     9132  done
     9133IFS=$as_save_IFS
     9134
     9135  ;;
     9136esac
     9137fi
     9138CHROMIUM=$ac_cv_path_CHROMIUM
     9139if test -n "$CHROMIUM"; then
     9140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHROMIUM" >&5
     9141$as_echo "$CHROMIUM" >&6; }
     9142else
     9143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9144$as_echo "no" >&6; }
     9145fi
     9146
     9147
     9148fi
     9149if test -z "$ac_cv_path_CHROMIUM"; then
     9150  ac_pt_CHROMIUM=$CHROMIUM
     9151  # Extract the first word of "chromium", so it can be a program name with args.
     9152set dummy chromium; ac_word=$2
     9153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9154$as_echo_n "checking for $ac_word... " >&6; }
     9155if ${ac_cv_path_ac_pt_CHROMIUM+:} false; then :
     9156  $as_echo_n "(cached) " >&6
     9157else
     9158  case $ac_pt_CHROMIUM in
     9159  [\\/]* | ?:[\\/]*)
     9160  ac_cv_path_ac_pt_CHROMIUM="$ac_pt_CHROMIUM" # Let the user override the test with a path.
     9161  ;;
     9162  *)
     9163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9164for as_dir in $PATH
     9165do
     9166  IFS=$as_save_IFS
     9167  test -z "$as_dir" && as_dir=.
     9168    for ac_exec_ext in '' $ac_executable_extensions; do
     9169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9170    ac_cv_path_ac_pt_CHROMIUM="$as_dir/$ac_word$ac_exec_ext"
     9171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9172    break 2
     9173  fi
     9174done
     9175  done
     9176IFS=$as_save_IFS
     9177
     9178  ;;
     9179esac
     9180fi
     9181ac_pt_CHROMIUM=$ac_cv_path_ac_pt_CHROMIUM
     9182if test -n "$ac_pt_CHROMIUM"; then
     9183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CHROMIUM" >&5
     9184$as_echo "$ac_pt_CHROMIUM" >&6; }
     9185else
     9186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9187$as_echo "no" >&6; }
     9188fi
     9189
     9190  if test "x$ac_pt_CHROMIUM" = x; then
     9191    CHROMIUM=""
     9192  else
     9193    case $cross_compiling:$ac_tool_warned in
     9194yes:)
     9195{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9196$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9197ac_tool_warned=yes ;;
     9198esac
     9199    CHROMIUM=$ac_pt_CHROMIUM
     9200  fi
     9201else
     9202  CHROMIUM="$ac_cv_path_CHROMIUM"
     9203fi
     9204
     9205   fi
     9206  else
     9207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chromium" >&5
     9208$as_echo_n "checking for chromium... " >&6; }
     9209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9210$as_echo "no" >&6; }
     9211  fi
     9212
     9213
     9214
     9215# Check whether --with-opera was given.
     9216if test "${with_opera+set}" = set; then :
     9217  withval=$with_opera;
     9218   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
     9219    OPERA=""
     9220   elif test -f "${withval}" ; then
     9221    OPERA="${withval}"
     9222   else
     9223    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opera" >&5
     9224$as_echo_n "checking for opera... " >&6; }
     9225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     9226$as_echo "not found" >&6; }
     9227    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     9228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     9229as_fn_error $? "invalid location specified to opera: ${withval}
     9230See \`config.log' for more details" "$LINENO" 5; }
     9231   fi
     9232
     9233else
     9234
     9235   withval="yes"
     9236
     9237fi
     9238
     9239
     9240  if test -f "${OPERA}"; then
     9241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opera" >&5
     9242$as_echo_n "checking for opera... " >&6; }
     9243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPERA}" >&5
     9244$as_echo "${OPERA}" >&6; }
     9245  elif test "${withval}" != "no"; then
     9246   if test 2 -gt 2; then
     9247    if test -n "$ac_tool_prefix"; then
     9248  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
     9249set dummy ${ac_tool_prefix}; ac_word=$2
     9250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9251$as_echo_n "checking for $ac_word... " >&6; }
     9252if ${ac_cv_path_OPERA+:} false; then :
     9253  $as_echo_n "(cached) " >&6
     9254else
     9255  case $OPERA in
     9256  [\\/]* | ?:[\\/]*)
     9257  ac_cv_path_OPERA="$OPERA" # Let the user override the test with a path.
     9258  ;;
     9259  *)
     9260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9261for as_dir in $PATH
     9262do
     9263  IFS=$as_save_IFS
     9264  test -z "$as_dir" && as_dir=.
     9265    for ac_exec_ext in '' $ac_executable_extensions; do
     9266  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9267    ac_cv_path_OPERA="$as_dir/$ac_word$ac_exec_ext"
     9268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9269    break 2
     9270  fi
     9271done
     9272  done
     9273IFS=$as_save_IFS
     9274
     9275  ;;
     9276esac
     9277fi
     9278OPERA=$ac_cv_path_OPERA
     9279if test -n "$OPERA"; then
     9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPERA" >&5
     9281$as_echo "$OPERA" >&6; }
     9282else
     9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9284$as_echo "no" >&6; }
     9285fi
     9286
     9287
     9288fi
     9289if test -z "$ac_cv_path_OPERA"; then
     9290  ac_pt_OPERA=$OPERA
     9291  # Extract the first word of "", so it can be a program name with args.
     9292set dummy ; ac_word=$2
     9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9294$as_echo_n "checking for $ac_word... " >&6; }
     9295if ${ac_cv_path_ac_pt_OPERA+:} false; then :
     9296  $as_echo_n "(cached) " >&6
     9297else
     9298  case $ac_pt_OPERA in
     9299  [\\/]* | ?:[\\/]*)
     9300  ac_cv_path_ac_pt_OPERA="$ac_pt_OPERA" # Let the user override the test with a path.
     9301  ;;
     9302  *)
     9303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9304for as_dir in $PATH
     9305do
     9306  IFS=$as_save_IFS
     9307  test -z "$as_dir" && as_dir=.
     9308    for ac_exec_ext in '' $ac_executable_extensions; do
     9309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9310    ac_cv_path_ac_pt_OPERA="$as_dir/$ac_word$ac_exec_ext"
     9311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9312    break 2
     9313  fi
     9314done
     9315  done
     9316IFS=$as_save_IFS
     9317
     9318  ;;
     9319esac
     9320fi
     9321ac_pt_OPERA=$ac_cv_path_ac_pt_OPERA
     9322if test -n "$ac_pt_OPERA"; then
     9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OPERA" >&5
     9324$as_echo "$ac_pt_OPERA" >&6; }
     9325else
     9326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9327$as_echo "no" >&6; }
     9328fi
     9329
     9330  if test "x$ac_pt_OPERA" = x; then
     9331    OPERA=""
     9332  else
     9333    case $cross_compiling:$ac_tool_warned in
     9334yes:)
     9335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9337ac_tool_warned=yes ;;
     9338esac
     9339    OPERA=$ac_pt_OPERA
     9340  fi
     9341else
     9342  OPERA="$ac_cv_path_OPERA"
     9343fi
     9344
     9345   else
     9346    if test -n "$ac_tool_prefix"; then
     9347  # Extract the first word of "${ac_tool_prefix}opera", so it can be a program name with args.
     9348set dummy ${ac_tool_prefix}opera; ac_word=$2
     9349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9350$as_echo_n "checking for $ac_word... " >&6; }
     9351if ${ac_cv_path_OPERA+:} false; then :
     9352  $as_echo_n "(cached) " >&6
     9353else
     9354  case $OPERA in
     9355  [\\/]* | ?:[\\/]*)
     9356  ac_cv_path_OPERA="$OPERA" # Let the user override the test with a path.
     9357  ;;
     9358  *)
     9359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9360for as_dir in $PATH
     9361do
     9362  IFS=$as_save_IFS
     9363  test -z "$as_dir" && as_dir=.
     9364    for ac_exec_ext in '' $ac_executable_extensions; do
     9365  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9366    ac_cv_path_OPERA="$as_dir/$ac_word$ac_exec_ext"
     9367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9368    break 2
     9369  fi
     9370done
     9371  done
     9372IFS=$as_save_IFS
     9373
     9374  ;;
     9375esac
     9376fi
     9377OPERA=$ac_cv_path_OPERA
     9378if test -n "$OPERA"; then
     9379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPERA" >&5
     9380$as_echo "$OPERA" >&6; }
     9381else
     9382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9383$as_echo "no" >&6; }
     9384fi
     9385
     9386
     9387fi
     9388if test -z "$ac_cv_path_OPERA"; then
     9389  ac_pt_OPERA=$OPERA
     9390  # Extract the first word of "opera", so it can be a program name with args.
     9391set dummy opera; ac_word=$2
     9392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9393$as_echo_n "checking for $ac_word... " >&6; }
     9394if ${ac_cv_path_ac_pt_OPERA+:} false; then :
     9395  $as_echo_n "(cached) " >&6
     9396else
     9397  case $ac_pt_OPERA in
     9398  [\\/]* | ?:[\\/]*)
     9399  ac_cv_path_ac_pt_OPERA="$ac_pt_OPERA" # Let the user override the test with a path.
     9400  ;;
     9401  *)
     9402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9403for as_dir in $PATH
     9404do
     9405  IFS=$as_save_IFS
     9406  test -z "$as_dir" && as_dir=.
     9407    for ac_exec_ext in '' $ac_executable_extensions; do
     9408  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9409    ac_cv_path_ac_pt_OPERA="$as_dir/$ac_word$ac_exec_ext"
     9410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9411    break 2
     9412  fi
     9413done
     9414  done
     9415IFS=$as_save_IFS
     9416
     9417  ;;
     9418esac
     9419fi
     9420ac_pt_OPERA=$ac_cv_path_ac_pt_OPERA
     9421if test -n "$ac_pt_OPERA"; then
     9422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OPERA" >&5
     9423$as_echo "$ac_pt_OPERA" >&6; }
     9424else
     9425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9426$as_echo "no" >&6; }
     9427fi
     9428
     9429  if test "x$ac_pt_OPERA" = x; then
     9430    OPERA=""
     9431  else
     9432    case $cross_compiling:$ac_tool_warned in
     9433yes:)
     9434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9436ac_tool_warned=yes ;;
     9437esac
     9438    OPERA=$ac_pt_OPERA
     9439  fi
     9440else
     9441  OPERA="$ac_cv_path_OPERA"
     9442fi
     9443
     9444   fi
     9445  else
     9446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opera" >&5
     9447$as_echo_n "checking for opera... " >&6; }
     9448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9449$as_echo "no" >&6; }
     9450  fi
     9451
     9452
     9453
     9454# Check whether --with-midori was given.
     9455if test "${with_midori+set}" = set; then :
     9456  withval=$with_midori;
     9457   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
     9458    MIDORI=""
     9459   elif test -f "${withval}" ; then
     9460    MIDORI="${withval}"
     9461   else
     9462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for midori" >&5
     9463$as_echo_n "checking for midori... " >&6; }
     9464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     9465$as_echo "not found" >&6; }
     9466    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     9467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     9468as_fn_error $? "invalid location specified to midori: ${withval}
     9469See \`config.log' for more details" "$LINENO" 5; }
     9470   fi
     9471
     9472else
     9473
     9474   withval="yes"
     9475
     9476fi
     9477
     9478
     9479  if test -f "${MIDORI}"; then
     9480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for midori" >&5
     9481$as_echo_n "checking for midori... " >&6; }
     9482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${MIDORI}" >&5
     9483$as_echo "${MIDORI}" >&6; }
     9484  elif test "${withval}" != "no"; then
     9485   if test 2 -gt 2; then
     9486    if test -n "$ac_tool_prefix"; then
     9487  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
     9488set dummy ${ac_tool_prefix}; ac_word=$2
     9489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9490$as_echo_n "checking for $ac_word... " >&6; }
     9491if ${ac_cv_path_MIDORI+:} false; then :
     9492  $as_echo_n "(cached) " >&6
     9493else
     9494  case $MIDORI in
     9495  [\\/]* | ?:[\\/]*)
     9496  ac_cv_path_MIDORI="$MIDORI" # Let the user override the test with a path.
     9497  ;;
     9498  *)
     9499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9500for as_dir in $PATH
     9501do
     9502  IFS=$as_save_IFS
     9503  test -z "$as_dir" && as_dir=.
     9504    for ac_exec_ext in '' $ac_executable_extensions; do
     9505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9506    ac_cv_path_MIDORI="$as_dir/$ac_word$ac_exec_ext"
     9507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9508    break 2
     9509  fi
     9510done
     9511  done
     9512IFS=$as_save_IFS
     9513
     9514  ;;
     9515esac
     9516fi
     9517MIDORI=$ac_cv_path_MIDORI
     9518if test -n "$MIDORI"; then
     9519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIDORI" >&5
     9520$as_echo "$MIDORI" >&6; }
     9521else
     9522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9523$as_echo "no" >&6; }
     9524fi
     9525
     9526
     9527fi
     9528if test -z "$ac_cv_path_MIDORI"; then
     9529  ac_pt_MIDORI=$MIDORI
     9530  # Extract the first word of "", so it can be a program name with args.
     9531set dummy ; ac_word=$2
     9532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9533$as_echo_n "checking for $ac_word... " >&6; }
     9534if ${ac_cv_path_ac_pt_MIDORI+:} false; then :
     9535  $as_echo_n "(cached) " >&6
     9536else
     9537  case $ac_pt_MIDORI in
     9538  [\\/]* | ?:[\\/]*)
     9539  ac_cv_path_ac_pt_MIDORI="$ac_pt_MIDORI" # Let the user override the test with a path.
     9540  ;;
     9541  *)
     9542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9543for as_dir in $PATH
     9544do
     9545  IFS=$as_save_IFS
     9546  test -z "$as_dir" && as_dir=.
     9547    for ac_exec_ext in '' $ac_executable_extensions; do
     9548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9549    ac_cv_path_ac_pt_MIDORI="$as_dir/$ac_word$ac_exec_ext"
     9550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9551    break 2
     9552  fi
     9553done
     9554  done
     9555IFS=$as_save_IFS
     9556
     9557  ;;
     9558esac
     9559fi
     9560ac_pt_MIDORI=$ac_cv_path_ac_pt_MIDORI
     9561if test -n "$ac_pt_MIDORI"; then
     9562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_MIDORI" >&5
     9563$as_echo "$ac_pt_MIDORI" >&6; }
     9564else
     9565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9566$as_echo "no" >&6; }
     9567fi
     9568
     9569  if test "x$ac_pt_MIDORI" = x; then
     9570    MIDORI=""
     9571  else
     9572    case $cross_compiling:$ac_tool_warned in
     9573yes:)
     9574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9576ac_tool_warned=yes ;;
     9577esac
     9578    MIDORI=$ac_pt_MIDORI
     9579  fi
     9580else
     9581  MIDORI="$ac_cv_path_MIDORI"
     9582fi
     9583
     9584   else
     9585    if test -n "$ac_tool_prefix"; then
     9586  # Extract the first word of "${ac_tool_prefix}midori", so it can be a program name with args.
     9587set dummy ${ac_tool_prefix}midori; ac_word=$2
     9588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9589$as_echo_n "checking for $ac_word... " >&6; }
     9590if ${ac_cv_path_MIDORI+:} false; then :
     9591  $as_echo_n "(cached) " >&6
     9592else
     9593  case $MIDORI in
     9594  [\\/]* | ?:[\\/]*)
     9595  ac_cv_path_MIDORI="$MIDORI" # Let the user override the test with a path.
     9596  ;;
     9597  *)
     9598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9599for as_dir in $PATH
     9600do
     9601  IFS=$as_save_IFS
     9602  test -z "$as_dir" && as_dir=.
     9603    for ac_exec_ext in '' $ac_executable_extensions; do
     9604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9605    ac_cv_path_MIDORI="$as_dir/$ac_word$ac_exec_ext"
     9606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9607    break 2
     9608  fi
     9609done
     9610  done
     9611IFS=$as_save_IFS
     9612
     9613  ;;
     9614esac
     9615fi
     9616MIDORI=$ac_cv_path_MIDORI
     9617if test -n "$MIDORI"; then
     9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIDORI" >&5
     9619$as_echo "$MIDORI" >&6; }
     9620else
     9621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9622$as_echo "no" >&6; }
     9623fi
     9624
     9625
     9626fi
     9627if test -z "$ac_cv_path_MIDORI"; then
     9628  ac_pt_MIDORI=$MIDORI
     9629  # Extract the first word of "midori", so it can be a program name with args.
     9630set dummy midori; ac_word=$2
     9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9632$as_echo_n "checking for $ac_word... " >&6; }
     9633if ${ac_cv_path_ac_pt_MIDORI+:} false; then :
     9634  $as_echo_n "(cached) " >&6
     9635else
     9636  case $ac_pt_MIDORI in
     9637  [\\/]* | ?:[\\/]*)
     9638  ac_cv_path_ac_pt_MIDORI="$ac_pt_MIDORI" # Let the user override the test with a path.
     9639  ;;
     9640  *)
     9641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9642for as_dir in $PATH
     9643do
     9644  IFS=$as_save_IFS
     9645  test -z "$as_dir" && as_dir=.
     9646    for ac_exec_ext in '' $ac_executable_extensions; do
     9647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9648    ac_cv_path_ac_pt_MIDORI="$as_dir/$ac_word$ac_exec_ext"
     9649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9650    break 2
     9651  fi
     9652done
     9653  done
     9654IFS=$as_save_IFS
     9655
     9656  ;;
     9657esac
     9658fi
     9659ac_pt_MIDORI=$ac_cv_path_ac_pt_MIDORI
     9660if test -n "$ac_pt_MIDORI"; then
     9661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_MIDORI" >&5
     9662$as_echo "$ac_pt_MIDORI" >&6; }
     9663else
     9664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9665$as_echo "no" >&6; }
     9666fi
     9667
     9668  if test "x$ac_pt_MIDORI" = x; then
     9669    MIDORI=""
     9670  else
     9671    case $cross_compiling:$ac_tool_warned in
     9672yes:)
     9673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9675ac_tool_warned=yes ;;
     9676esac
     9677    MIDORI=$ac_pt_MIDORI
     9678  fi
     9679else
     9680  MIDORI="$ac_cv_path_MIDORI"
     9681fi
     9682
     9683   fi
     9684  else
     9685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for midori" >&5
     9686$as_echo_n "checking for midori... " >&6; }
     9687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9688$as_echo "no" >&6; }
     9689  fi
     9690
     9691
     9692
     9693# Check whether --with-epiphany was given.
     9694if test "${with_epiphany+set}" = set; then :
     9695  withval=$with_epiphany;
     9696   if test "${withval}" = "no" || test "${withval}" = "yes" || test "${withval}" = "" ; then
     9697    EPIPHANY=""
     9698   elif test -f "${withval}" ; then
     9699    EPIPHANY="${withval}"
     9700   else
     9701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epiphany" >&5
     9702$as_echo_n "checking for epiphany... " >&6; }
     9703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     9704$as_echo "not found" >&6; }
     9705    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     9706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     9707as_fn_error $? "invalid location specified to epiphany: ${withval}
     9708See \`config.log' for more details" "$LINENO" 5; }
     9709   fi
     9710
     9711else
     9712
     9713   withval="yes"
     9714
     9715fi
     9716
     9717
     9718  if test -f "${EPIPHANY}"; then
     9719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epiphany" >&5
     9720$as_echo_n "checking for epiphany... " >&6; }
     9721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${EPIPHANY}" >&5
     9722$as_echo "${EPIPHANY}" >&6; }
     9723  elif test "${withval}" != "no"; then
     9724   if test 2 -gt 2; then
     9725    if test -n "$ac_tool_prefix"; then
     9726  # Extract the first word of "${ac_tool_prefix}", so it can be a program name with args.
     9727set dummy ${ac_tool_prefix}; ac_word=$2
     9728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9729$as_echo_n "checking for $ac_word... " >&6; }
     9730if ${ac_cv_path_EPIPHANY+:} false; then :
     9731  $as_echo_n "(cached) " >&6
     9732else
     9733  case $EPIPHANY in
     9734  [\\/]* | ?:[\\/]*)
     9735  ac_cv_path_EPIPHANY="$EPIPHANY" # Let the user override the test with a path.
     9736  ;;
     9737  *)
     9738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9739for as_dir in $PATH
     9740do
     9741  IFS=$as_save_IFS
     9742  test -z "$as_dir" && as_dir=.
     9743    for ac_exec_ext in '' $ac_executable_extensions; do
     9744  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9745    ac_cv_path_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
     9746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9747    break 2
     9748  fi
     9749done
     9750  done
     9751IFS=$as_save_IFS
     9752
     9753  ;;
     9754esac
     9755fi
     9756EPIPHANY=$ac_cv_path_EPIPHANY
     9757if test -n "$EPIPHANY"; then
     9758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EPIPHANY" >&5
     9759$as_echo "$EPIPHANY" >&6; }
     9760else
     9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9762$as_echo "no" >&6; }
     9763fi
     9764
     9765
     9766fi
     9767if test -z "$ac_cv_path_EPIPHANY"; then
     9768  ac_pt_EPIPHANY=$EPIPHANY
     9769  # Extract the first word of "", so it can be a program name with args.
     9770set dummy ; ac_word=$2
     9771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9772$as_echo_n "checking for $ac_word... " >&6; }
     9773if ${ac_cv_path_ac_pt_EPIPHANY+:} false; then :
     9774  $as_echo_n "(cached) " >&6
     9775else
     9776  case $ac_pt_EPIPHANY in
     9777  [\\/]* | ?:[\\/]*)
     9778  ac_cv_path_ac_pt_EPIPHANY="$ac_pt_EPIPHANY" # Let the user override the test with a path.
     9779  ;;
     9780  *)
     9781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9782for as_dir in $PATH
     9783do
     9784  IFS=$as_save_IFS
     9785  test -z "$as_dir" && as_dir=.
     9786    for ac_exec_ext in '' $ac_executable_extensions; do
     9787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9788    ac_cv_path_ac_pt_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
     9789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9790    break 2
     9791  fi
     9792done
     9793  done
     9794IFS=$as_save_IFS
     9795
     9796  ;;
     9797esac
     9798fi
     9799ac_pt_EPIPHANY=$ac_cv_path_ac_pt_EPIPHANY
     9800if test -n "$ac_pt_EPIPHANY"; then
     9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_EPIPHANY" >&5
     9802$as_echo "$ac_pt_EPIPHANY" >&6; }
     9803else
     9804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9805$as_echo "no" >&6; }
     9806fi
     9807
     9808  if test "x$ac_pt_EPIPHANY" = x; then
     9809    EPIPHANY=""
     9810  else
     9811    case $cross_compiling:$ac_tool_warned in
     9812yes:)
     9813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9815ac_tool_warned=yes ;;
     9816esac
     9817    EPIPHANY=$ac_pt_EPIPHANY
     9818  fi
     9819else
     9820  EPIPHANY="$ac_cv_path_EPIPHANY"
     9821fi
     9822
     9823   else
     9824    if test -n "$ac_tool_prefix"; then
     9825  # Extract the first word of "${ac_tool_prefix}epiphany", so it can be a program name with args.
     9826set dummy ${ac_tool_prefix}epiphany; ac_word=$2
     9827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9828$as_echo_n "checking for $ac_word... " >&6; }
     9829if ${ac_cv_path_EPIPHANY+:} false; then :
     9830  $as_echo_n "(cached) " >&6
     9831else
     9832  case $EPIPHANY in
     9833  [\\/]* | ?:[\\/]*)
     9834  ac_cv_path_EPIPHANY="$EPIPHANY" # Let the user override the test with a path.
     9835  ;;
     9836  *)
     9837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9838for as_dir in $PATH
     9839do
     9840  IFS=$as_save_IFS
     9841  test -z "$as_dir" && as_dir=.
     9842    for ac_exec_ext in '' $ac_executable_extensions; do
     9843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9844    ac_cv_path_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
     9845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9846    break 2
     9847  fi
     9848done
     9849  done
     9850IFS=$as_save_IFS
     9851
     9852  ;;
     9853esac
     9854fi
     9855EPIPHANY=$ac_cv_path_EPIPHANY
     9856if test -n "$EPIPHANY"; then
     9857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EPIPHANY" >&5
     9858$as_echo "$EPIPHANY" >&6; }
     9859else
     9860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9861$as_echo "no" >&6; }
     9862fi
     9863
     9864
     9865fi
     9866if test -z "$ac_cv_path_EPIPHANY"; then
     9867  ac_pt_EPIPHANY=$EPIPHANY
     9868  # Extract the first word of "epiphany", so it can be a program name with args.
     9869set dummy epiphany; ac_word=$2
     9870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9871$as_echo_n "checking for $ac_word... " >&6; }
     9872if ${ac_cv_path_ac_pt_EPIPHANY+:} false; then :
     9873  $as_echo_n "(cached) " >&6
     9874else
     9875  case $ac_pt_EPIPHANY in
     9876  [\\/]* | ?:[\\/]*)
     9877  ac_cv_path_ac_pt_EPIPHANY="$ac_pt_EPIPHANY" # Let the user override the test with a path.
     9878  ;;
     9879  *)
     9880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     9881for as_dir in $PATH
     9882do
     9883  IFS=$as_save_IFS
     9884  test -z "$as_dir" && as_dir=.
     9885    for ac_exec_ext in '' $ac_executable_extensions; do
     9886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     9887    ac_cv_path_ac_pt_EPIPHANY="$as_dir/$ac_word$ac_exec_ext"
     9888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9889    break 2
     9890  fi
     9891done
     9892  done
     9893IFS=$as_save_IFS
     9894
     9895  ;;
     9896esac
     9897fi
     9898ac_pt_EPIPHANY=$ac_cv_path_ac_pt_EPIPHANY
     9899if test -n "$ac_pt_EPIPHANY"; then
     9900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_EPIPHANY" >&5
     9901$as_echo "$ac_pt_EPIPHANY" >&6; }
     9902else
     9903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9904$as_echo "no" >&6; }
     9905fi
     9906
     9907  if test "x$ac_pt_EPIPHANY" = x; then
     9908    EPIPHANY=""
     9909  else
     9910    case $cross_compiling:$ac_tool_warned in
     9911yes:)
     9912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9914ac_tool_warned=yes ;;
     9915esac
     9916    EPIPHANY=$ac_pt_EPIPHANY
     9917  fi
     9918else
     9919  EPIPHANY="$ac_cv_path_EPIPHANY"
     9920fi
     9921
     9922   fi
     9923  else
     9924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epiphany" >&5
     9925$as_echo_n "checking for epiphany... " >&6; }
     9926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9927$as_echo "no" >&6; }
     9928  fi
     9929
     9930
     9931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how browser test will be run" >&5
     9932$as_echo_n "checking how browser test will be run... " >&6; }
     9933
     9934# Check whether --with-browser-tests was given.
     9935if test "${with_browser_tests+set}" = set; then :
     9936  withval=$with_browser_tests;
     9937               BROWSER_SWITCH=${withval}
     9938
     9939else
     9940
     9941               BROWSER_SWITCH="yes"
     9942
     9943fi
     9944
     9945  D_PARAM_PART="-Dmodified.browsers.run"
     9946  case "$BROWSER_SWITCH" in
     9947    "yes" )
     9948        BROWSER_TESTS_MODIFICATION="" ;;
     9949    "no" )
     9950        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=ignore" ;;
     9951    "one" )
     9952        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=one" ;;
     9953    "all" )
     9954        BROWSER_TESTS_MODIFICATION="$D_PARAM_PART=all" ;;
     9955    *)
     9956        as_fn_error $? "unknown valkue of with-browser-tests ($BROWSER_SWITCH), so not use (yes) or set yes|no|one|all" "$LINENO" 5
     9957  esac
     9958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${BROWSER_SWITCH}" >&5
     9959$as_echo "${BROWSER_SWITCH}" >&6; }
     9960
     9961
     9962
     9963 if test x"$XSLTPROC" != x ; then
     9964  WITH_XSLTPROC_TRUE=
     9965  WITH_XSLTPROC_FALSE='#'
     9966else
     9967  WITH_XSLTPROC_TRUE='#'
     9968  WITH_XSLTPROC_FALSE=
     9969fi
    76599970
    76609971
     
    779810109  else
    779910110    JUNIT_AVAILABLE=false
     10111  fi
     10112
     10113
     10114
     10115
     10116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for emma jar" >&5
     10117$as_echo_n "checking for emma jar... " >&6; }
     10118
     10119# Check whether --with-emma was given.
     10120if test "${with_emma+set}" = set; then :
     10121  withval=$with_emma;
     10122    case "${withval}" in
     10123      yes)
     10124        EMMA_JAR=yes
     10125        ;;
     10126      no)
     10127        EMMA_JAR=no
     10128        ;;
     10129      *)
     10130        if test -f "${withval}"; then
     10131          EMMA_JAR="${withval}"
     10132        elif test -z "${withval}"; then
     10133          EMMA_JAR=yes
     10134        else
     10135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     10136$as_echo "not found" >&6; }
     10137          as_fn_error $? "\"The emma jar ${withval} was not found.\"" "$LINENO" 5
     10138        fi
     10139        ;;
     10140    esac
     10141
     10142else
     10143
     10144    EMMA_JAR=yes
     10145
     10146fi
     10147
     10148  it_extra_paths_emma="/usr/share/java/emma.jar"
     10149  if test "x${EMMA_JAR}" = "xyes"; then
     10150    for path in ${it_extra_paths_emma}; do
     10151      if test -f ${path}; then
     10152        EMMA_JAR=${path}
     10153        break
     10154      fi
     10155    done
     10156  fi
     10157  if test x"${EMMA_JAR}" = "xyes"; then
     10158    if test -f "/usr/share/java/emma.jar"; then
     10159      EMMA_JAR=/usr/share/java/emma.jar
     10160    fi
     10161  fi
     10162  if test x"${EMMA_JAR}" = "xyes"; then
     10163    EMMA_JAR=no
     10164  fi
     10165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${EMMA_JAR}" >&5
     10166$as_echo "${EMMA_JAR}" >&6; }
     10167   if test x"${EMMA_JAR}" != "xno"; then
     10168  WITH_EMMA_TRUE=
     10169  WITH_EMMA_FALSE='#'
     10170else
     10171  WITH_EMMA_TRUE='#'
     10172  WITH_EMMA_FALSE=
     10173fi
     10174
     10175  # Clear EMMA_JAR if it doesn't contain a valid filename
     10176  if test x"${EMMA_JAR}" = "xno"; then
     10177    EMMA_JAR=
     10178  fi
     10179  if test -n "${EMMA_JAR}" ; then
     10180    EMMA_AVAILABLE=true
     10181  else
     10182    EMMA_AVAILABLE=false
    780010183  fi
    780110184
     
    800110384Usually this means the macro was only invoked conditionally." "$LINENO" 5
    800210385fi
     10386if test -z "${WITH_XSLTPROC_TRUE}" && test -z "${WITH_XSLTPROC_FALSE}"; then
     10387  as_fn_error $? "conditional \"WITH_XSLTPROC\" was never defined.
     10388Usually this means the macro was only invoked conditionally." "$LINENO" 5
     10389fi
    800310390if test -z "${WITH_RHINO_TRUE}" && test -z "${WITH_RHINO_FALSE}"; then
    800410391  as_fn_error $? "conditional \"WITH_RHINO\" was never defined.
     
    800710394if test -z "${WITH_JUNIT_TRUE}" && test -z "${WITH_JUNIT_FALSE}"; then
    800810395  as_fn_error $? "conditional \"WITH_JUNIT\" was never defined.
     10396Usually this means the macro was only invoked conditionally." "$LINENO" 5
     10397fi
     10398if test -z "${WITH_EMMA_TRUE}" && test -z "${WITH_EMMA_FALSE}"; then
     10399  as_fn_error $? "conditional \"WITH_EMMA\" was never defined.
    800910400Usually this means the macro was only invoked conditionally." "$LINENO" 5
    801010401fi
     
    841810809# values after options handling.
    841910810ac_log="
    8420 This file was extended by icedtea-web $as_me 1.1.2, which was
     10811This file was extended by icedtea-web $as_me 1.3, which was
    842110812generated by GNU Autoconf 2.68.  Invocation command line was
    842210813
     
    847610867ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
    847710868ac_cs_version="\\
    8478 icedtea-web config.status 1.1.2
     10869icedtea-web config.status 1.3
    847910870configured by $0, generated by GNU Autoconf 2.68,
    848010871  with options \\"\$ac_cs_config\\"
  • branches/vendor/sourceforge/icedtea-web/current/configure.ac

    r348 r416  
    1 AC_INIT([icedtea-web],[1.1.2],[distro-pkg-dev@openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web])
     1AC_INIT([icedtea-web],[1.3],[distro-pkg-dev@openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web])
    22AM_INIT_AUTOMAKE([1.9 tar-pax foreign])
    33AC_CONFIG_FILES([Makefile netx.manifest])
     
    3434FIND_ECJ_JAR
    3535IT_FIND_JAVADOC
     36IT_FIND_KEYTOOL
     37IT_FIND_JARSIGNER
    3638AC_CONFIG_FILES([javac], [chmod +x javac])
    3739
     
    5254dnl PR46074 (gcc) - Missing java.net cookie code required by IcedTea plugin
    5355dnl IT563 - NetX uses sun.security code
    54 dnl IT564 - NetX depends on sun.misc.BASE64Encoder
    5556dnl IT605 - NetX depends on sun.misc.HexDumpEncoder
    5657dnl IT570 - NetX depends on sun.applet.AppletViewPanel
     
    6970IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker])
    7071IT_CHECK_FOR_CLASS(SUN_SECURITY_X509_X500NAME, [sun.security.x509.X500Name])
    71 IT_CHECK_FOR_CLASS(SUN_MISC_BASE64ENCODER, [sun.misc.BASE64Encoder])
    7272IT_CHECK_FOR_CLASS(SUN_MISC_HEXDUMPENCODER, [sun.misc.HexDumpEncoder])
    7373IT_CHECK_FOR_CLASS(SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION, [sun.security.validator.ValidatorException])
    7474IT_CHECK_FOR_CLASS(COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER,
    7575        [com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager])
     76IT_CHECK_FOR_CLASS(SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE, [sun.net.www.protocol.jar.URLJarFile])
     77IT_CHECK_FOR_CLASS(SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK, [sun.net.www.protocol.jar.URLJarFileCallBack])
    7678IT_CHECK_FOR_CLASS(SUN_AWT_X11_XEMBEDDEDFRAME, [sun.awt.X11.XEmbeddedFrame])
    7779IT_CHECK_FOR_CLASS(SUN_MISC_REF, [sun.misc.Ref])
     
    7981IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef])
    8082IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE
     83IT_CHECK_GLIB_VERSION
     84IT_CHECK_XULRUNNER_API_VERSION
    8185
    8286#
     
    8488#
    8589
     90AC_CHECK_PROGS([XSLTPROC],[xsltproc],[], [])
     91# browser to be linked/tested
     92# Example: IT_FIND_BROWSER([browser-name],[variable-to-store-path],[default-run-command-if-different-from-the-browser-name])
     93IT_FIND_BROWSER([firefox],[FIREFOX])
     94IT_FIND_BROWSER([chrome],[CHROME],[google-chrome])
     95IT_FIND_BROWSER([chromium],[CHROMIUM],[chromium-browser])
     96IT_FIND_BROWSER([opera],[OPERA])
     97IT_FIND_BROWSER([midori],[MIDORI])
     98IT_FIND_BROWSER([epiphany],[EPIPHANY])
     99IT_SET_GLOBAL_BROWSERTESTS_BEHAVIOUR
     100
     101AM_CONDITIONAL([WITH_XSLTPROC], [test x"$XSLTPROC" != x ])
    86102IT_FIND_OPTIONAL_JAR([rhino], RHINO,
    87103    [/usr/share/java/js.jar /usr/share/rhino-1.6/lib/js.jar])
    88104IT_FIND_OPTIONAL_JAR([junit], JUNIT,
    89105    [/usr/share/java/junit4.jar /usr/share/junit-4/lib/junit.jar])
     106IT_FIND_OPTIONAL_JAR([emma], EMMA,
     107    [/usr/share/java/emma.jar])
    90108
    91109AC_CONFIG_FILES([jrunscript], [chmod u+x jrunscript])
  • branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/Main.java

    r348 r416  
    6767                tabbedPane = new JTabbedPane();
    6868
    69                 tabbedPane.add("About NetX", aboutPanel);
     69                tabbedPane.add("About IcedTea-Web and NetX", aboutPanel);
    7070                tabbedPane.add("Applications", appsPanel);
    7171                tabbedPane.add("Notes", notesPanel);
     
    8282                }
    8383               
    84                 JFrame frame = new JFrame("About NetX");
     84                JFrame frame = new JFrame("About IcedTea-Web and NetX");
    8585                frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    8686                Main demo = null;
  • branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/about.html

    r348 r416  
    66    </head>
    77    <body>
    8         <b>NetX</b> is a high-quality JNLP client that executes
     8        <h3>IcedTea-Web</h3> is a high-quality JNLP client, built on <b>NetX</b>, that executes
    99        network-based applications. 
    1010        <br>NetX downloads code over the
  • branches/vendor/sourceforge/icedtea-web/current/extra/net/sourceforge/javaws/about/resources/notes.html

    r348 r416  
    2424                                                                <b>Lillian Angel</b> <br>
    2525                                                                <b>Deepak Bhole</b> <br>
     26                                                                <b>Danesh Dadachanji</b> <br>
     27                                                                <b>Adam Domurad</b> <br>
    2628                                                                <b>Thomas Fitzsimmons</b> <br>
    2729                                                                <b>Andrew John Hughes</b> <br>
     
    3032                                                                <b>Omair Majid</b> <br>
    3133                                                                <b>Jon A. Maxwell</b> <br>
     34                                                                <b>Thomas Meyer</b> <br>
     35                                                                <b>Saad Mohammad</b> <br>
    3236                                                                <b>Andrew Su</b> <br>
    3337                                                                <b>Joshua Sumali</b> <br>
     38                                                                <b>Jiri Vanek</b> <br>
    3439                                                                <b>Mark Wielaard</b> <br>
    3540                                                                <b>Man Lung Wong</b> <br>
     
    8085        </tbody>
    8186</table>
    82 <b>Please visit the SourceForge site
     87<b> Home page of IcedTea-Web:
     88    <a href="http://icedtea.classpath.org/wiki/IcedTea-Web">
     89                http://icedtea.classpath.org/wiki/IcedTea-Web
     90        </a><br>
     91    Please visit also the SourceForge site
    8392        <a href="http://jnlp.sourceforge.net/netx/index.html">
    8493                http://jnlp.sourceforge.net/netx/index.html
  • branches/vendor/sourceforge/icedtea-web/current/install-sh

    r348 r416  
    22# install - install a program, script, or datafile
    33
    4 scriptversion=2009-04-28.21; # UTC
     4scriptversion=2011-01-19.21; # UTC
    55
    66# This originates from X11R5 (mit/util/scripts/install.sh), which was
     
    157157
    158158    -t) dst_arg=$2
     159        # Protect names problematic for `test' and other utilities.
     160        case $dst_arg in
     161          -* | [=\(\)!]) dst_arg=./$dst_arg;;
     162        esac
    159163        shift;;
    160164
     
    187191    shift # arg
    188192    dst_arg=$arg
     193    # Protect names problematic for `test' and other utilities.
     194    case $dst_arg in
     195      -* | [=\(\)!]) dst_arg=./$dst_arg;;
     196    esac
    189197  done
    190198fi
     
    201209
    202210if test -z "$dir_arg"; then
    203   trap '(exit $?); exit' 1 2 13 15
     211  do_exit='(exit $ret); exit $ret'
     212  trap "ret=129; $do_exit" 1
     213  trap "ret=130; $do_exit" 2
     214  trap "ret=141; $do_exit" 13
     215  trap "ret=143; $do_exit" 15
    204216
    205217  # Set umask so as not to create temps with too-generous modes.
     
    229241for src
    230242do
    231   # Protect names starting with `-'.
     243  # Protect names problematic for `test' and other utilities.
    232244  case $src in
    233     -*) src=./$src;;
     245    -* | [=\(\)!]) src=./$src;;
    234246  esac
    235247
     
    253265      exit 1
    254266    fi
    255 
    256267    dst=$dst_arg
    257     # Protect names starting with `-'.
    258     case $dst in
    259       -*) dst=./$dst;;
    260     esac
    261268
    262269    # If destination is a directory, append the input filename; won't work
     
    386393      case $dstdir in
    387394        /*) prefix='/';;
    388         -*) prefix='./';;
     395        [-=\(\)!]*) prefix='./';;
    389396        *)  prefix='';;
    390397      esac
     
    404411      for d
    405412      do
    406         test -z "$d" && continue
     413        test X"$d" = X && continue
    407414
    408415        prefix=$prefix$d
  • branches/vendor/sourceforge/icedtea-web/current/jrunscript.in

    r348 r416  
    11#!/bin/bash
    22
    3 if [ x"@RHINO_JAR@" == x ] ; then
     3if [ x"@RHINO_JAR@" = x ] ; then
    44  echo "jrunscript requires rhino support"
    55  exit 1
  • branches/vendor/sourceforge/icedtea-web/current/launcher/javaws.in

    r348 r416  
    1 #!/bin/sh
     1#!/bin/bash
    22
    33JAVA=@JAVA@
     
    99CP=@JRE@/lib/rt.jar
    1010
    11 JAVA_ARGS=
    12 ARGS=
     11JAVA_ARGS=( )
     12ARGS=( )
     13COMMAND=()
     14
     15i=0
     16j=0
    1317
    1418while [ "$#" -gt "0" ]; do
    1519  case "$1" in
    1620    -J*)
    17       JAVA_ARGS="${JAVA_ARGS} ${1##-J}"
     21      JAVA_ARGS[$i]="${1##-J}"
     22      i=$((i+1))
    1823      ;;
    1924    *)
    20       ARGS="${ARGS} $1"
     25      ARGS[$j]="$1"
     26      j=$((j+1))
    2127      ;;
    2228  esac
     
    2430done
    2531
    26 ${JAVA} ${LAUNCHER_BOOTCLASSPATH} ${LAUNCHER_FLAGS} \
    27   ${JAVA_ARGS} \
    28   -classpath ${CP} \
    29   -Dicedtea-web.bin.name=${PROGRAM_NAME} \
    30   -Dicedtea-web.bin.location=${BINARY_LOCATION} \
    31   ${CLASSNAME} \
    32   ${ARGS}
     32k=0
     33COMMAND[k]="${JAVA}"
     34k=$((k+1))
     35COMMAND[k]="${LAUNCHER_BOOTCLASSPATH}"
     36k=$((k+1))
     37COMMAND[k]="${LAUNCHER_FLAGS}"
     38k=$((k+1))
     39i=0
     40while [ "$i" -lt "${#JAVA_ARGS[@]}" ]; do
     41  COMMAND[k]="${JAVA_ARGS[$i]}"
     42  i=$((i+1))
     43  k=$((k+1))
     44done
     45COMMAND[k]="-classpath"
     46k=$((k+1))
     47COMMAND[k]="${CP}"
     48k=$((k+1))
     49COMMAND[k]="-Dicedtea-web.bin.name=${PROGRAM_NAME}"
     50k=$((k+1))
     51COMMAND[k]="-Dicedtea-web.bin.location=${BINARY_LOCATION}"
     52k=$((k+1))
     53COMMAND[k]="${CLASSNAME}"
     54k=$((k+1))
     55j=0
     56while [ "$j" -lt "${#ARGS[@]}" ]; do
     57  COMMAND[k]="${ARGS[$j]}"
     58  j=$((j+1))
     59  k=$((k+1))
     60done
     61
     62exec -a "javaws" "${COMMAND[@]}"
    3363
    3464exit $?
  • branches/vendor/sourceforge/icedtea-web/current/missing

    r348 r416  
    22# Common stub for a few missing GNU programs while installing.
    33
    4 scriptversion=2009-04-28.21; # UTC
     4scriptversion=2012-01-06.13; # UTC
    55
    66# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
    7 # 2008, 2009 Free Software Foundation, Inc.
     7# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
    88# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
    99
     
    8585  lex          create \`lex.yy.c', if possible, from existing .c
    8686  makeinfo     touch the output file
    87   tar          try tar, gnutar, gtar, then tar without non-portable flags
    8887  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
    8988
     
    121120  lex*|yacc*)
    122121    # Not GNU programs, they don't have --version.
    123     ;;
    124 
    125   tar*)
    126     if test -n "$run"; then
    127        echo 1>&2 "ERROR: \`tar' requires --run"
    128        exit 1
    129     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
    130        exit 1
    131     fi
    132122    ;;
    133123
     
    227217    rm -f y.tab.c y.tab.h
    228218    if test $# -ne 1; then
    229         eval LASTARG="\${$#}"
     219        eval LASTARG=\${$#}
    230220        case $LASTARG in
    231221        *.y)
     
    257247    rm -f lex.yy.c
    258248    if test $# -ne 1; then
    259         eval LASTARG="\${$#}"
     249        eval LASTARG=\${$#}
    260250        case $LASTARG in
    261251        *.l)
     
    319309    ;;
    320310
    321   tar*)
    322     shift
    323 
    324     # We have already tried tar in the generic part.
    325     # Look for gnutar/gtar before invocation to avoid ugly error
    326     # messages.
    327     if (gnutar --version > /dev/null 2>&1); then
    328        gnutar "$@" && exit 0
    329     fi
    330     if (gtar --version > /dev/null 2>&1); then
    331        gtar "$@" && exit 0
    332     fi
    333     firstarg="$1"
    334     if shift; then
    335         case $firstarg in
    336         *o*)
    337             firstarg=`echo "$firstarg" | sed s/o//`
    338             tar "$firstarg" "$@" && exit 0
    339             ;;
    340         esac
    341         case $firstarg in
    342         *h*)
    343             firstarg=`echo "$firstarg" | sed s/h//`
    344             tar "$firstarg" "$@" && exit 0
    345             ;;
    346         esac
    347     fi
    348 
    349     echo 1>&2 "\
    350 WARNING: I can't seem to be able to run \`tar' with the given arguments.
    351          You may want to install GNU tar or Free paxutils, or check the
    352          command line arguments."
    353     exit 1
    354     ;;
    355 
    356311  *)
    357312    echo 1>&2 "\
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/AppletDesc.java

    r348 r416  
    2626 * @version $Revision: 1.8 $
    2727 */
    28 public class AppletDesc {
     28public class AppletDesc implements LaunchDesc {
    2929
    3030    /** the applet name */
     
    7474
    7575    /**
    76      * Returns the main class name
     76     * Returns the main class name in the dot-separated form (eg: foo.bar.Baz)
    7777     */
     78    @Override
    7879    public String getMainClass() {
    7980        return mainClass;
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ApplicationDesc.java

    r348 r416  
    2525 * @version $Revision: 1.7 $
    2626 */
    27 public class ApplicationDesc {
     27public class ApplicationDesc implements LaunchDesc {
    2828
    2929    /** the main class name and package */
     
    4747     * Returns the main class name
    4848     */
     49    @Override
    4950    public String getMainClass() {
    5051        return mainClass;
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java

    r348 r416  
    1717package net.sourceforge.jnlp;
    1818
     19import java.io.PrintStream;
     20
    1921import net.sourceforge.jnlp.runtime.*;
    2022
     
    2729 * @version $Revision: 1.1 $
    2830 */
    29 public class DefaultLaunchHandler implements LaunchHandler {
     31public class DefaultLaunchHandler extends AbstractLaunchHandler {
     32
     33    public DefaultLaunchHandler(PrintStream out) {
     34        super(out);
     35    }
    3036
    3137    /**
     
    5864     * @return true to allow the application to continue, false to stop it.
    5965     */
    60     public boolean validationError(LaunchException security) {
    61         printMessage(security);
     66    public boolean validationError(LaunchException error) {
     67        printMessage(error);
    6268        return true;
    6369    }
     
    7278    public void launchCompleted(ApplicationInstance application) {
    7379        //
    74     }
    75 
    76     /**
    77      * Print a message to stdout.
    78      */
    79     protected static void printMessage(LaunchException ex) {
    80         StringBuffer result = new StringBuffer();
    81         result.append("netx: ");
    82         result.append(ex.getCategory());
    83         if (ex.getSummary() != null) {
    84             result.append(": ");
    85             result.append(ex.getSummary());
    86         }
    87 
    88         if (JNLPRuntime.isDebug()) {
    89             if (ex.getCause() != null)
    90                 ex.getCause().printStackTrace();
    91             else
    92                 ex.printStackTrace();
    93         }
    94 
    95         Throwable causes[] = ex.getCauses();
    96 
    97         for (int i = 0; i < causes.length; i++) {
    98             result.append(" (");
    99             result.append(causes[i].getClass().getName());
    100             result.append(" ");
    101             result.append(causes[i].getMessage());
    102             result.append(")");
    103         }
    10480    }
    10581
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/GuiLaunchHandler.java

    r348 r416  
    3838package net.sourceforge.jnlp;
    3939
     40import java.io.PrintStream;
     41import java.lang.reflect.InvocationTargetException;
    4042import java.net.URL;
    4143
     
    5153 * including splash screens and exception dialogs.
    5254 */
    53 public class GuiLaunchHandler implements LaunchHandler {
     55public class GuiLaunchHandler extends AbstractLaunchHandler {
    5456
    5557    private JNLPSplashScreen splashScreen = null;
     58    private final Object mutex = new Object();
    5659    private UpdatePolicy policy = UpdatePolicy.ALWAYS;
     60
     61    public GuiLaunchHandler(PrintStream outputStream) {
     62        super(outputStream);
     63    }
    5764
    5865    @Override
     
    6673            @Override
    6774            public void run() {
     75                closeSplashScreen();
    6876                BasicExceptionDialog.show(exception);
    6977            }
    7078        });
     79        printMessage(exception);
     80    }
     81
     82    private void closeSplashScreen() {
     83        synchronized(mutex) {
     84            if (splashScreen != null) {
     85                if (splashScreen.isSplashScreenValid()) {
     86                    splashScreen.setVisible(false);
     87                }
     88                splashScreen.dispose();
     89            }
     90        }
    7191    }
    7292
     
    7696            @Override
    7797            public void run() {
    78                 if (splashScreen != null) {
    79                     if (splashScreen.isSplashScreenValid()) {
    80                         splashScreen.setVisible(false);
    81                     }
    82                     splashScreen.dispose();
    83                 }
     98                closeSplashScreen();
    8499            }
    85100        });
     
    88103    @Override
    89104    public void launchInitialized(final JNLPFile file) {
     105       
     106        int preferredWidth = 500;
     107        int preferredHeight = 400;
     108
     109        final URL splashImageURL = file.getInformation().getIconLocation(
     110                IconDesc.SPLASH, preferredWidth, preferredHeight);
     111
     112        if (splashImageURL != null) {
     113            final ResourceTracker resourceTracker = new ResourceTracker(true);
     114            resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, policy);
     115            synchronized(mutex) {
     116                try {
     117                    SwingUtilities.invokeAndWait(new Runnable() {
     118                        @Override
     119                        public void run() {
     120                            splashScreen = new JNLPSplashScreen(resourceTracker, null, null);
     121                        }
     122                    });
     123                } catch (InterruptedException ie) {
     124                    // Wait till splash screen is created
     125                    while (splashScreen == null);
     126                } catch (InvocationTargetException ite) {
     127                    ite.printStackTrace();
     128                }
     129
     130                splashScreen.setSplashImageURL(splashImageURL);
     131            }
     132        }
     133       
    90134        SwingUtilities.invokeLater(new Runnable() {
    91135            @Override
    92136            public void run() {
    93                 final int preferredWidth = 500;
    94                 final int preferredHeight = 400;
    95 
    96                 URL splashImageURL = file.getInformation().getIconLocation(
    97                         IconDesc.SPLASH, preferredWidth, preferredHeight);
    98137                if (splashImageURL != null) {
    99                     ResourceTracker resourceTracker = new ResourceTracker(true);
    100                     resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, policy);
    101                     splashScreen = new JNLPSplashScreen(resourceTracker, null, null);
    102                     splashScreen.setSplashImageURL(splashImageURL);
    103                     if (splashScreen.isSplashScreenValid()) {
    104                         splashScreen.setVisible(true);
     138                    synchronized(mutex) {
     139                        if (splashScreen.isSplashScreenValid()) {
     140                            splashScreen.setVisible(true);
     141                        }
    105142                    }
    106143                }
     
    111148    @Override
    112149    public boolean launchWarning(LaunchException warning) {
    113         DefaultLaunchHandler.printMessage(warning);
     150        printMessage(warning);
    114151        return true;
    115152    }
    116153
    117154    @Override
    118     public boolean validationError(LaunchException security) {
    119         DefaultLaunchHandler.printMessage(security);
     155    public boolean validationError(LaunchException error) {
     156        closeSplashScreen();
     157        printMessage(error);
    120158        return true;
    121159    }
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/InstallerDesc.java

    r348 r416  
    2323 * @version $Revision: 1.6 $
    2424 */
    25 public class InstallerDesc {
     25public class InstallerDesc implements LaunchDesc {
    2626
    2727    /** the main class name and package. */
     
    4040     * Returns the main class name and package.
    4141     */
     42    @Override
    4243    public String getMainClass() {
    4344        return mainClass;
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPFile.java

    r348 r416  
    9292
    9393    /** the application description */
    94     protected Object launchType;
     94    protected LaunchDesc launchType;
    9595
    9696    /** the component description */
     
    100100    protected SecurityDesc security;
    101101
     102    /** the default JVM locale */
     103    protected Locale defaultLocale = null;
     104
    102105    /** the default OS */
    103     protected Locale defaultLocale = null;
     106    protected String defaultOS = null;
    104107
    105108    /** the default arch */
    106     protected String defaultOS = null;
    107 
    108     /** the default jvm */
    109109    protected String defaultArch = null;
     110
     111    /** A signed JNLP file is missing from the main jar */
     112    private boolean missingSignedJNLP = false;
     113
     114    /** JNLP file contains special properties */
     115    private boolean containsSpecialProperties = false;
     116
     117    /**
     118     * List of acceptable properties (not-special)
     119     */
     120    private String[] generalProperties = SecurityDesc.getJnlpRIAPermissions();
    110121
    111122    { // initialize defaults if security allows
     
    119130    }
    120131
     132    static enum Match { LANG_COUNTRY_VARIANT, LANG_COUNTRY, LANG, GENERALIZED }
     133
    121134    /**
    122135     * Empty stub, allowing child classes to override the constructor
     
    175188     */
    176189    public JNLPFile(URL location, Version version, boolean strict, UpdatePolicy policy) throws IOException, ParseException {
     190        this(location, version, strict, policy, null);
     191    }
     192
     193    /**
     194     * Create a JNLPFile from a URL and a version, checking for updates
     195     * using the specified policy.
     196     *
     197     * @param location the location of the JNLP file
     198     * @param version the version of the JNLP file
     199     * @param strict whether to enforce the spec when
     200     * @param policy the update policy
     201     * @param forceCodebase codebase to use if not specified in JNLP file.
     202     * @throws IOException if an IO exception occurred
     203     * @throws ParseException if the JNLP file was invalid
     204     */
     205    protected JNLPFile(URL location, Version version, boolean strict, UpdatePolicy policy, URL forceCodebase) throws IOException, ParseException {
    177206        Node root = Parser.getRootNode(openURL(location, version, policy));
    178         parse(root, strict, location);
     207        parse(root, strict, location, forceCodebase);
    179208
    180209        //Downloads the original jnlp file into the cache if possible
     
    182211        //originated from a website, then download the one from the website
    183212        //into the cache).
    184         if (sourceLocation != null && location.getProtocol() == "file") {
     213        if (sourceLocation != null && "file".equals(location.getProtocol())) {
    185214            openURL(sourceLocation, version, policy);
    186215        }
     
    223252     */
    224253    public JNLPFile(InputStream input, boolean strict) throws ParseException {
    225         parse(Parser.getRootNode(input), strict, null);
     254        parse(Parser.getRootNode(input), strict, null, null);
    226255    }
    227256
     
    258287
    259288    /**
    260      * Returns the JNLP file's title. This method returns the same
     289     * Returns the JNLP file's best localized title. This method returns the same
    261290     * value as InformationDesc.getTitle().
    262291     */
     
    266295
    267296    /**
     297     * Returns the JNLP file's best localized vendor. This method returns the same
     298     * value as InformationDesc.getVendor().
     299     */
     300    public String getVendor() {
     301        return getInformation().getVendor();
     302    }
     303
     304    /**
    268305     * Returns the JNLP file's network location as specified in the
    269306     * JNLP file.
     
    323360    public InformationDesc getInformation(final Locale locale) {
    324361        return new InformationDesc(this, new Locale[] { locale }) {
     362            @Override
    325363            protected List<Object> getItems(Object key) {
    326364                List<Object> result = new ArrayList<Object>();
    327365
    328                 for (int i = 0; i < info.size(); i++) {
    329                     InformationDesc infoDesc = info.get(i);
    330 
    331                     if (localMatches(locale, infoDesc.getLocales()))
    332                         result.addAll(infoDesc.getItems(key));
     366                for (Match precision : Match.values()) {
     367                    for (InformationDesc infoDesc : JNLPFile.this.info) {
     368                        if (localeMatches(locale, infoDesc.getLocales(), precision)) {
     369                            result.addAll(infoDesc.getItems(key));
     370                        }
     371                    }
     372
     373                    if (result.size() > 0) {
     374                        return result;
     375                    }
    333376                }
    334 
    335377                return result;
     378            }
     379
     380            @Override
     381            public String getTitle() {
     382                for (Match precision : Match.values()) {
     383                    for (InformationDesc infoDesc : JNLPFile.this.info) {
     384                        String title = infoDesc.getTitle();
     385                        if (localeMatches(locale, infoDesc.getLocales(), precision)
     386                                && title != null && !"".equals(title)) {
     387                            return title;
     388                        }
     389                    }
     390                }
     391
     392                return null;
     393            }
     394
     395            @Override
     396            public String getVendor() {
     397                for (Match precision : Match.values()) {
     398                    for (InformationDesc infoDesc : JNLPFile.this.info) {
     399                        String vendor = infoDesc.getVendor();
     400                        if (localeMatches(locale, infoDesc.getLocales(), precision)
     401                                && vendor != null && !"".equals(vendor)) {
     402                            return vendor;
     403                        }
     404                    }
     405                }
     406
     407                return null;
    336408            }
    337409        };
     
    367439    public ResourcesDesc getResources(final Locale locale, final String os, final String arch) {
    368440        return new ResourcesDesc(this, new Locale[] { locale }, new String[] { os }, new String[] { arch }) {
     441
     442            @Override
    369443            public <T> List<T> getResources(Class<T> launchType) {
    370444                List<T> result = new ArrayList<T>();
    371445
    372                 for (int i = 0; i < resources.size(); i++) {
    373                     ResourcesDesc rescDesc = resources.get(i);
    374 
    375                     if (localMatches(locale, rescDesc.getLocales())
     446                for (ResourcesDesc rescDesc : resources) {
     447                    boolean hasUsableLocale = false;
     448                    for (Match match : Match.values()) {
     449                        hasUsableLocale |= localeMatches(locale, rescDesc.getLocales(), match);
     450                    }
     451                    if (hasUsableLocale
    376452                            && stringMatches(os, rescDesc.getOS())
    377453                            && stringMatches(arch, rescDesc.getArch()))
     
    384460            }
    385461
     462            @Override
    386463            public void addResource(Object resource) {
    387464                // todo: honor the current locale, os, arch values
     
    409486        List<ResourcesDesc> matchingResources = new ArrayList<ResourcesDesc>();
    410487        for (ResourcesDesc rescDesc: resources) {
    411             if (localMatches(locale, rescDesc.getLocales())
     488            boolean hasUsableLocale = false;
     489            for (Match match : Match.values()) {
     490                hasUsableLocale |= localeMatches(locale, rescDesc.getLocales(), match);
     491            }
     492            if (hasUsableLocale
    412493                    && stringMatches(os, rescDesc.getOS())
    413494                    && stringMatches(arch, rescDesc.getArch())) {
     
    422503     * ApplicationDesc and InstallerDesc
    423504     */
    424     public Object getLaunchInfo() {
     505    public LaunchDesc getLaunchInfo() {
    425506        return launchType;
    426507    }
     
    522603     * @param requested the local
    523604     * @param available the available locales
     605     * @param precision the depth with which to match locales. 1 checks only
     606     * language, 2 checks language and country, 3 checks language, country and
     607     * variant for matches. Passing 0 will always return true.
    524608     * @return true if requested matches any of available, or if
    525609     * available is empty or null.
    526610     */
    527     private boolean localMatches(Locale requested, Locale available[]) {
    528         if (available == null || available.length == 0)
    529             return true;
    530 
    531         for (int i = 0; i < available.length; i++) {
    532             String language = requested.getLanguage(); // "" but never null
    533             String country = requested.getCountry();
    534             String variant = requested.getVariant();
    535 
    536             if (!"".equals(language) && !language.equalsIgnoreCase(available[i].getLanguage()))
    537                 continue;
    538             if (!"".equals(country) && !country.equalsIgnoreCase(available[i].getCountry()))
    539                 continue;
    540             if (!"".equals(variant) && !variant.equalsIgnoreCase(available[i].getVariant()))
    541                 continue;
    542 
    543             return true;
    544         }
    545 
     611    public boolean localeMatches(Locale requested, Locale available[], Match matchLevel) {
     612
     613        if (matchLevel == Match.GENERALIZED)
     614            return available == null || available.length == 0;
     615
     616        String language = requested.getLanguage(); // "" but never null
     617        String country = requested.getCountry();
     618        String variant = requested.getVariant();
     619
     620        for (Locale locale : available) {
     621            switch (matchLevel) {
     622                case LANG:
     623                    if (!language.isEmpty()
     624                            && language.equals(locale.getLanguage())
     625                            && locale.getCountry().isEmpty()
     626                            && locale.getVariant().isEmpty())
     627                        return true;
     628                    break;
     629                case LANG_COUNTRY:
     630                    if (!language.isEmpty()
     631                            && language.equals(locale.getLanguage())
     632                            && !country.isEmpty()
     633                            && country.equals(locale.getCountry())
     634                            && locale.getVariant().isEmpty())
     635                        return true;
     636                    break;
     637                case LANG_COUNTRY_VARIANT:
     638                    if (language.equals(locale.getLanguage())
     639                            && country.equals(locale.getCountry())
     640                            && variant.equals(locale.getVariant()))
     641                        return true;
     642                    break;
     643                default:
     644                    break;
     645            }
     646        }
    546647        return false;
    547648    }
     
    575676     * @param location the file location or null
    576677     */
    577     private void parse(Node root, boolean strict, URL location) throws ParseException {
     678    private void parse(Node root, boolean strict, URL location, URL forceCodebase) throws ParseException {
    578679        try {
    579680            //if (location != null)
    580681            //  location = new URL(location, "."); // remove filename
    581682
    582             Parser parser = new Parser(this, location, root, strict, true); // true == allow extensions
     683            Parser parser = new Parser(this, location, root, strict, true, forceCodebase); // true == allow extensions
    583684
    584685            // JNLP tag information
     
    588689            sourceLocation = parser.getFileLocation() != null ? parser.getFileLocation() : location;
    589690            info = parser.getInfo(root);
     691            parser.checkForInformation();
    590692            update = parser.getUpdate(root);
    591693            resources = parser.getResources(root, false); // false == not a j2se/java resources section
     
    593695            component = parser.getComponent(root);
    594696            security = parser.getSecurity(root);
     697
     698            checkForSpecialProperties();
     699
    595700        } catch (ParseException ex) {
    596701            throw ex;
     
    600705
    601706            throw new RuntimeException(ex.toString());
     707        }
     708    }
     709
     710    /**
     711     * Inspects the JNLP file to check if it contains any special properties
     712     */
     713    private void checkForSpecialProperties() {
     714
     715        for (ResourcesDesc res : resources) {
     716            for (PropertyDesc propertyDesc : res.getProperties()) {
     717
     718                for (int i = 0; i < generalProperties.length; i++) {
     719                    String property = propertyDesc.getKey();
     720
     721                    if (property.equals(generalProperties[i])) {
     722                        break;
     723                    } else if (!property.equals(generalProperties[i])
     724                            && i == generalProperties.length - 1) {
     725                        containsSpecialProperties = true;
     726                        return;
     727                    }
     728                }
     729
     730            }
    602731        }
    603732    }
     
    675804    }
    676805
     806    /**
     807     * Returns a boolean after determining if a signed JNLP warning should be
     808     * displayed in the 'More Information' panel.
     809     *
     810     * @return true if a warning should be displayed; otherwise false
     811     */
     812    public boolean requiresSignedJNLPWarning() {
     813        return (missingSignedJNLP && containsSpecialProperties);
     814    }
     815
     816    /**
     817     * Informs that a signed JNLP file is missing in the main jar
     818     */
     819    public void setSignedJNLPAsMissing() {
     820        missingSignedJNLP = true;
     821    }
    677822}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/JNLPSplashScreen.java

    r348 r416  
    1111
    1212import javax.imageio.ImageIO;
    13 import javax.swing.JFrame;
     13import javax.swing.JDialog;
    1414
    1515import net.sourceforge.jnlp.cache.ResourceTracker;
    1616import net.sourceforge.jnlp.runtime.JNLPRuntime;
     17import net.sourceforge.jnlp.util.ImageResources;
    1718
    18 public class JNLPSplashScreen extends JFrame {
     19public class JNLPSplashScreen extends JDialog {
    1920
    2021    String applicationTitle;
     
    2829    public JNLPSplashScreen(ResourceTracker resourceTracker,
    2930            String applicationTitle, String applicationVendor) {
     31
     32        setIconImages(ImageResources.INSTANCE.getApplicationImages());
    3033
    3134        // If the JNLP file does not contain any icon images, the splash image
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchException.java

    r348 r416  
    1717package net.sourceforge.jnlp;
    1818
    19 import java.io.*;
    20 import java.util.*;
    21 
    22 import net.sourceforge.jnlp.util.*;
    23 
    2419/**
    2520 * Thrown when a JNLP application, applet, or installer could not
     
    3126public class LaunchException extends Exception {
    3227
    33     /** the original exception */
    34     private Throwable cause = null;
     28    private static final long serialVersionUID = 7283827853612357423L;
    3529
    3630    /** the file being launched */
     
    5347     */
    5448    public LaunchException(JNLPFile file, Exception cause, String severity, String category, String summary, String description) {
    55         super(severity + ": " + category + ": " + summary);
     49        super(severity + ": " + category + ": " + summary + " "
     50                    + (description == null ? "" : description), cause);
    5651
    5752        this.file = file;
     
    6055        this.description = description;
    6156        this.severity = severity;
    62 
    63         // replace with setCause when no longer 1.3 compatible
    64         this.cause = cause;
    6557    }
    6658
     
    6961     */
    7062    public LaunchException(Throwable cause) {
    71         this(cause.getMessage());
    72 
    73         // replace with setCause when no longer 1.3 compatible
    74         this.cause = cause;
     63        super(cause);
    7564    }
    7665
     
    7968     */
    8069    public LaunchException(String message, Throwable cause) {
    81         this(message + ": " + cause.getMessage());
    82 
    83         // replace with setCause when no longer 1.3 compatible
    84         this.cause = cause;
     70        super(message, cause);
    8571    }
    8672
     
    132118    }
    133119
    134     /**
    135      * Return the cause of the launch exception or null if there
    136      * is no cause exception.
    137      */
    138     public Throwable getCause() {
    139         return cause;
    140     }
    141 
    142     /**
    143      * Returns the causes for this exception.  This method is
    144      * useful on JRE 1.3 since getCause is not a standard method,
    145      * and will be removed once netx no longer supports 1.3.
    146      */
    147     public Throwable[] getCauses() {
    148         ArrayList<Throwable> result = new ArrayList<Throwable>();
    149 
    150         Reflect r = new Reflect();
    151         Throwable cause = this.cause;
    152 
    153         while (cause != null) {
    154             result.add(cause);
    155             cause = (Throwable) r.invoke(cause, "getCause");
    156         }
    157 
    158         return result.toArray(new Throwable[0]);
    159     }
    160 
    161     /**
    162      * Print the stack trace and the cause exception (1.3
    163      * compatible)
    164      */
    165     public void printStackTrace(PrintStream stream) {
    166         super.printStackTrace(stream);
    167 
    168         if (cause != null) {
    169             stream.println("Caused by: ");
    170             cause.printStackTrace(stream);
    171         }
    172     }
    173 
    174     /**
    175      * Print the stack trace and the cause exception (1.3
    176      * compatible)
    177      */
    178     public void printStackTrace(PrintWriter stream) {
    179         super.printStackTrace(stream);
    180 
    181         if (cause != null) {
    182             stream.println("Caused by: ");
    183             cause.printStackTrace(stream);
    184         }
    185     }
    186 
    187120}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/LaunchHandler.java

    r348 r416  
    5151     * @return true to allow the application to continue, false to stop it.
    5252     */
    53     public boolean validationError(LaunchException security);
     53    public boolean validationError(LaunchException error);
    5454
    5555    // this method will probably be replaced when real security
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Launcher.java

    r348 r416  
    2626import java.net.URL;
    2727import java.net.UnknownHostException;
     28import java.util.Arrays;
    2829import java.util.LinkedList;
    2930import java.util.List;
     
    3334import net.sourceforge.jnlp.cache.CacheUtil;
    3435import net.sourceforge.jnlp.cache.UpdatePolicy;
    35 import net.sourceforge.jnlp.runtime.AppThreadGroup;
    3636import net.sourceforge.jnlp.runtime.AppletInstance;
    3737import net.sourceforge.jnlp.runtime.ApplicationInstance;
     
    588588
    589589            main.setAccessible(true);
     590
     591            if (JNLPRuntime.isDebug()) {
     592                System.out.println("Invoking main() with args: " + Arrays.toString(args));
     593            }
    590594            main.invoke(null, new Object[] { args });
    591595
     
    703707            }
    704708
    705             AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup();
    706 
     709            ThreadGroup group = Thread.currentThread().getThreadGroup();
     710
     711            // appletInstance is needed by ServiceManager when looking up
     712            // services. This could potentially be done in applet constructor
     713            // so initialize appletInstance before creating applet.
     714            AppletInstance appletInstance;
     715            if (cont == null)
     716                appletInstance = new AppletInstance(file, group, loader, null);
     717            else
     718                appletInstance = new AppletInstance(file, group, loader, null, cont);
     719
     720            loader.setApplication(appletInstance);
     721
     722            // Initialize applet now that ServiceManager has access to its
     723            // appletInstance.
    707724            String appletName = file.getApplet().getMainClass();
    708 
    709             //Classloader chokes if there's '/' in the path to the main class.
    710             //Must replace with '.' instead.
    711             appletName = appletName.replace('/', '.');
    712725            Class appletClass = loader.loadClass(appletName);
    713726            Applet applet = (Applet) appletClass.newInstance();
    714 
    715             AppletInstance appletInstance;
    716             if (cont == null)
    717                 appletInstance = new AppletInstance(file, group, loader, applet);
    718             else
    719                 appletInstance = new AppletInstance(file, group, loader, applet, cont);
    720 
    721             group.setApplication(appletInstance);
    722             loader.setApplication(appletInstance);
    723 
     727            // Finish setting up appletInstance.
     728            appletInstance.setApplet(applet);
     729            appletInstance.getAppletEnvironment().setApplet(applet);
     730           
    724731            setContextClassLoaderForAllThreads(appletInstance.getThreadGroup(), appletInstance.getClassLoader());
    725732
     
    747754
    748755            String appletName = file.getApplet().getMainClass();
    749 
    750             //Classloader chokes if there's '/' in the path to the main class.
    751             //Must replace with '.' instead.
    752             appletName = appletName.replace('/', '.');
    753756            Class appletClass = loader.loadClass(appletName);
    754757            Applet applet = (Applet) appletClass.newInstance();
     
    766769        try {
    767770            JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy);
    768             AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup();
     771            ThreadGroup group = Thread.currentThread().getThreadGroup();
    769772
    770773            ApplicationInstance app = new ApplicationInstance(file, group, loader);
    771             group.setApplication(app);
    772774            loader.setApplication(app);
    773775
     
    785787     * ThreadGroup has to be created at an earlier point in the applet code.
    786788     */
    787     protected AppThreadGroup createThreadGroup(JNLPFile file) {
    788         AppThreadGroup appThreadGroup = null;
     789    protected ThreadGroup createThreadGroup(JNLPFile file) {
     790        ThreadGroup tg = null;
    789791
    790792        if (file instanceof PluginBridge) {
    791             appThreadGroup = (AppThreadGroup) Thread.currentThread().getThreadGroup();
     793            tg = Thread.currentThread().getThreadGroup();
    792794        } else {
    793             appThreadGroup = new AppThreadGroup(mainGroup, file.getTitle());
    794         }
    795 
    796         return appThreadGroup;
     795            tg = new ThreadGroup(mainGroup, file.getTitle());
     796        }
     797
     798        return tg;
    797799    }
    798800
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/NetxPanel.java

    r348 r416  
    2424
    2525import net.sourceforge.jnlp.AppletLog;
    26 import net.sourceforge.jnlp.runtime.AppThreadGroup;
    2726import net.sourceforge.jnlp.runtime.AppletInstance;
    2827import net.sourceforge.jnlp.runtime.JNLPRuntime;
    2928
    3029import java.net.URL;
     30import java.util.HashMap;
    3131import java.util.Hashtable;
     32import java.util.Map;
     33import java.util.concurrent.ConcurrentHashMap;
     34import java.util.concurrent.ConcurrentMap;
    3235
    3336import sun.applet.AppletViewerPanel;
     
    4548    private AppletInstance appInst = null;
    4649    private boolean appletAlive;
     50    private final String uKey;
     51
     52    // We use this so that we can create exactly one thread group
     53    // for all panels with the same uKey.
     54    private static final Map<String, ThreadGroup> uKeyToTG =
     55        new HashMap<String, ThreadGroup>();
     56    private static final Object TGMapMutex = new Object();
     57
     58    // This map is actually a set (unfortunately there is no ConcurrentSet
     59    // in java.util.concurrent). If KEY is in this map, then we know that
     60    // an app context has been created for the panel that has uKey.equals(KEY),
     61    // so we avoid creating it a second time for panels with the same uKey.
     62    // Because it's a set, only the keys matter. However, we can't insert
     63    // null values in because if we did, we couldn't use null checks to see
     64    // if a key was absent before a putIfAbsent.
     65    private static final ConcurrentMap<String, Boolean> appContextCreated =
     66        new ConcurrentHashMap<String, Boolean>();
    4767
    4868    public NetxPanel(URL documentURL, Hashtable<String, String> atts) {
    4969        super(documentURL, atts);
     70
     71        /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html,
     72         * classloaders are shared iff these properties match:
     73         * codebase, cache_archive, java_archive, archive
     74         *
     75         * To achieve this, we create the uniquekey based on those 4 values,
     76         * always in the same order. The initial "<NAME>=" parts ensure a
     77         * bad tag cannot trick the loader into getting shared with another.
     78         */
     79
     80        // Firefox sometimes skips the codebase if it is default  -- ".",
     81        // so set it that way if absent
     82        String codebaseAttr =      atts.get("codebase") != null ?
     83                                   atts.get("codebase") : ".";
     84
     85        String cache_archiveAttr = atts.get("cache_archive") != null ?
     86                                   atts.get("cache_archive") : "";
     87
     88        String java_archiveAttr =  atts.get("java_archive") != null ?
     89                                   atts.get("java_archive") : "";
     90
     91        String archiveAttr =       atts.get("archive") != null ?
     92                                   atts.get("archive") : "";
     93
     94        this.uKey = "codebase=" + codebaseAttr +
     95                    "cache_archive=" + cache_archiveAttr +
     96                    "java_archive=" + java_archiveAttr +
     97                    "archive=" +  archiveAttr;
     98
     99        // when this was being done (incorrectly) in Launcher, the call was
     100        // new AppThreadGroup(mainGroup, file.getTitle());
     101        synchronized(TGMapMutex) {
     102            if (!uKeyToTG.containsKey(this.uKey)) {
     103                ThreadGroup tg = new ThreadGroup(Launcher.mainGroup, this.documentURL.toString());
     104                uKeyToTG.put(this.uKey, tg);
     105            }
     106        }
    50107    }
    51108
     
    56113        this.exitOnFailure = exitOnFailure;
    57114        this.appletAlive = true;
    58     }
    59 
    60     @Override
    61     public void run() {
    62         /*
    63          * create an AppContext for this thread associated with this particular
    64          * plugin instance (which runs in a different thread group from the rest
    65          * of the plugin).
    66          */
    67         SunToolkit.createNewAppContext();
    68 
    69         super.run();
    70115    }
    71116
     
    79124        super.showAppletException(t);
    80125    }
    81    
     126
    82127    //Overriding to use Netx classloader. You might need to relax visibility
    83128    //in sun.applet.AppletPanel for runLoader().
     
    91136                                getWidth(),
    92137                                getHeight(),
    93                                 atts);
     138                                atts, uKey);
    94139
    95140            doInit = true;
     
    155200        }
    156201
    157         // when this was being done (incorrectly) in Launcher, the call was
    158         // new AppThreadGroup(mainGroup, file.getTitle());
    159         ThreadGroup tg = new AppThreadGroup(Launcher.mainGroup,
    160                 this.documentURL.toString());
    161         handler = new Thread(tg, this);
     202        handler = new Thread(getThreadGroup(), this);
    162203        handler.start();
    163204    }
     
    175216        return handler != null && handler.isAlive() && this.appletAlive;
    176217    }
     218
     219    public ThreadGroup getThreadGroup() {
     220        synchronized(TGMapMutex) {
     221            return uKeyToTG.get(uKey);
     222        }
     223    }
     224
     225    public void createNewAppContext() {
     226        if (Thread.currentThread().getThreadGroup() != getThreadGroup()) {
     227            throw new RuntimeException("createNewAppContext called from the wrong thread.");
     228        }
     229        // only create a new context if one hasn't already been created for the
     230        // applets with this unique key.
     231        if (null == appContextCreated.putIfAbsent(uKey, Boolean.TRUE)) {
     232            SunToolkit.createNewAppContext();
     233        }
     234    }
    177235}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Node.java

    r348 r416  
    2020    private Node next;
    2121    private Node children[];
     22    private List <String> attributeNames= null;
    2223
    2324    Node(XMLElement xml) {
     
    6162        return children;
    6263    }
     64   
     65    /**
     66     * To retrieve all attribute names
     67     * @return all attribute names of the Node in ArrayList<String>
     68     */
     69    List<String> getAttributeNames() {
     70        if (attributeNames == null) {
     71            attributeNames= new ArrayList<String>();
     72
     73            for (Enumeration e = xml.enumerateAttributeNames(); e.hasMoreElements();)
     74                attributeNames.add(new String((String) e.nextElement()));
     75        }
     76
     77        return attributeNames;
     78    }
    6379
    6480    String getAttribute(String name) {
     
    87103    private Node next;
    88104    private Node children[];
     105    private String attributeNames[];
    89106
    90107    Node(ParsedXML tinyNode) {
     
    128145        return children;
    129146    }
    130 
     147   
    131148    String getAttribute(String name) {
    132149        return tinyNode.getAttribute(name);
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Parser.java

    r348 r416  
    11// Copyright (C) 2001-2003 Jon A. Maxwell (JAM)
    2 // Copyright (C) 2009 Red Hat, Inc.
     2// Copyright (C) 2012 Red Hat, Inc.
    33//
    44// This library is free software; you can redistribute it and/or
     
    2929import net.sourceforge.jnlp.UpdateDesc.Check;
    3030import net.sourceforge.jnlp.UpdateDesc.Policy;
     31import net.sourceforge.jnlp.runtime.JNLPRuntime;
    3132import net.sourceforge.nanoxml.*;
    3233
     
    111112     */
    112113    public Parser(JNLPFile file, URL base, Node root, boolean strict, boolean allowExtensions) throws ParseException {
     114        this(file, base, root, strict, allowExtensions, null);
     115    }
     116
     117    /**
     118     * Create a parser for the JNLP file.  If the location
     119     * parameters is not null it is used as the default codebase
     120     * (does not override value of jnlp element's href
     121     * attribute).<p>
     122     *
     123     * The root node may be normalized as a side effect of this
     124     * constructor.
     125     *
     126     * @param file the (uninitialized) file reference
     127     * @param base if codebase is not specified, a default base for relative URLs
     128     * @param root the root node
     129     * @param strict whether to enforce strict compliance with the JNLP spec
     130     * @param allowExtensions whether to allow extensions to the JNLP spec
     131     * @param codebase codebase to use if we did not parse one from JNLP file.
     132     * @throws ParseException if the JNLP file is invalid
     133     */
     134    public Parser(JNLPFile file, URL base, Node root, boolean strict, boolean allowExtensions, URL codebase) throws ParseException {
    113135        this.file = file;
    114136        this.root = root;
     
    123145        this.spec = getVersion(root, "spec", "1.0+");
    124146        this.codebase = addSlash(getURL(root, "codebase", base));
    125         this.base = (codebase != null) ? codebase : base; // if codebase not specified use default codebase
     147        if (this.codebase == null) // We only override it if it is not specified.
     148            this.codebase = codebase;
     149        this.base = (this.codebase != null) ? this.codebase : base; // if codebase not specified use default codebase
    126150        fileLocation = getURL(root, "href", this.base);
    127151
     
    403427
    404428    /**
     429     * Make sure a title and vendor are present and nonempty and localized as
     430     * best matching as possible for the JVM's current locale. Fallback to a
     431     * generalized title and vendor otherwise. If none is found, throw an exception.
     432     *
     433     * Additionally prints homepage, description, title and vendor to stdout
     434     * if in Debug mode.
     435     * @throws RequiredElementException
     436     */
     437    void checkForInformation() throws RequiredElementException {
     438        if (JNLPRuntime.isDebug()) {
     439            System.out.println("Homepage: " + file.getInformation().getHomepage());
     440            System.out.println("Description: " + file.getInformation().getDescription());
     441        }
     442
     443        String title = file.getTitle();
     444        String vendor = file.getVendor();
     445
     446        if (title == null || title.trim().isEmpty())
     447            throw new MissingTitleException();
     448        else if (JNLPRuntime.isDebug())
     449            System.out.println("Acceptable title tag found, contains: " + title);
     450
     451        if (vendor == null || vendor.trim().isEmpty())
     452            throw new MissingVendorException();
     453        else if (JNLPRuntime.isDebug())
     454            System.out.println("Acceptable vendor tag found, contains: " + vendor);
     455    }
     456
     457    /**
    405458     * Returns all of the information elements under the specified
    406459     * node.
     
    416469        // ensure that there are at least one information section present
    417470        if (info.length == 0)
    418             throw new ParseException(R("PNoInfoElement"));
     471            throw new MissingInformationException();
    419472
    420473        // create objects from the info sections
    421         for (int i = 0; i < info.length; i++)
    422             result.add(getInformationDesc(info[i]));
     474        for (Node infoNode : info) {
     475            result.add(getInformationDesc(infoNode));
     476        }
    423477
    424478        return result;
     
    582636     * @throws ParseException if the JNLP file is invalid
    583637     */
    584     public Object getLauncher(Node parent) throws ParseException {
     638    public LaunchDesc getLauncher(Node parent) throws ParseException {
    585639        // check for other than one application type
    586640        if (1 < getChildNodes(parent, "applet-desc").length
     
    869923        String language = localeStr.substring(0, 2);
    870924        String country = (localeStr.length() < 5) ? "" : localeStr.substring(3, 5);
    871         String variant = (localeStr.length() < 7) ? "" : localeStr.substring(6, 8);
     925        String variant = (localeStr.length() > 7) ? localeStr.substring(6) : "";
    872926
    873927        // null is not allowed n locale but "" is
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/PluginBridge.java

    r348 r416  
    11/*
    2  * Copyright 2007 Red Hat, Inc.
     2 * Copyright 2012 Red Hat, Inc.
    33 * This file is part of IcedTea, http://icedtea.classpath.org
    44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     
    2323package net.sourceforge.jnlp;
    2424
     25import java.io.File;
    2526import java.net.URL;
    2627import java.net.MalformedURLException;
    27 import java.util.Hashtable;
     28import java.util.HashSet;
    2829import java.util.Locale;
    2930import java.util.List;
    3031import java.util.ArrayList;
    3132import java.util.Map;
     33import java.util.Set;
    3234
    3335import net.sourceforge.jnlp.runtime.JNLPRuntime;
    3436
     37/**
     38 * Allows reuse of code that expects a JNLPFile object,
     39 * while overriding behaviour specific to applets.
     40 */
    3541public class PluginBridge extends JNLPFile {
    3642
    37     String name;
    38     String[] jars = new String[0];
    39     String[] cacheJars = new String[0];
    40     String[] cacheExJars = new String[0];
    41     Hashtable<String, String> atts;
     43    private String name;
     44    private Set<String> jars = new HashSet<String>();
     45    //Folders can be added to the code-base through the archive tag
     46    private List<String> codeBaseFolders = new ArrayList<String>();
     47    private String[] cacheJars = new String[0];
     48    private String[] cacheExJars = new String[0];
     49    private Map<String, String> atts;
    4250    private boolean usePack;
    4351    private boolean useVersion;
    4452    private boolean codeBaseLookup;
    45 
     53    private boolean useJNLPHref;
     54
     55    /**
     56     * Creates a new PluginBridge using a default JNLPCreator.
     57     */
    4658    public PluginBridge(URL codebase, URL documentBase, String jar, String main,
    47                         int width, int height, Hashtable<String, String> atts)
     59                        int width, int height, Map<String, String> atts,
     60                        String uKey)
     61            throws Exception {
     62        this(codebase, documentBase, jar, main, width, height, atts, uKey, new JNLPCreator());
     63    }
     64
     65    /**
     66     * Handles archive tag entries, which may be folders or jar files
     67     * @param archives the components of the archive tag
     68     */
     69    private void addArchiveEntries(String[] archives) {
     70        for (String archiveEntry : archives){
     71            // trim white spaces
     72            archiveEntry = archiveEntry.trim();
     73
     74            /*Only '/' on linux, '/' or '\\' on windows*/
     75            if (archiveEntry.endsWith("/") || archiveEntry.endsWith(File.pathSeparator)) {
     76                this.codeBaseFolders.add(archiveEntry);
     77            } else {
     78                this.jars.add(archiveEntry);
     79            }
     80        }
     81    }
     82
     83    public PluginBridge(URL codebase, URL documentBase, String archive, String main,
     84                        int width, int height, Map<String, String> atts,
     85                        String uKey, JNLPCreator jnlpCreator)
    4886            throws Exception {
    4987        specVersion = new Version("1.0");
     
    5189        this.codeBase = codebase;
    5290        this.sourceLocation = documentBase;
     91        this.atts = atts;
    5392
    5493        if (atts.containsKey("jnlp_href")) {
     94            useJNLPHref = true;
    5595            try {
    56                 URL jnlp = new URL(codeBase.toExternalForm() + atts.get("jnlp_href"));
    57                 JNLPFile jnlpFile = new JNLPFile(jnlp);
     96                // Use codeBase as the context for the URL. If jnlp_href's
     97                // value is a complete URL, it will replace codeBase's context.
     98                URL jnlp = new URL(codeBase, atts.get("jnlp_href"));
     99                JNLPFile jnlpFile = jnlpCreator.create(jnlp, null, false, JNLPRuntime.getDefaultUpdatePolicy(), codeBase);
    58100                Map<String, String> jnlpParams = jnlpFile.getApplet().getParameters();
     101                info = jnlpFile.info;
    59102
    60103                // Change the parameter name to lowercase to follow conventions.
    61104                for (Map.Entry<String, String> entry : jnlpParams.entrySet()) {
    62                     atts.put(entry.getKey().toLowerCase(), entry.getValue());
     105                    this.atts.put(entry.getKey().toLowerCase(), entry.getValue());
    63106                }
     107                JARDesc[] jarDescs = jnlpFile.getResources().getJARs();
     108                for (JARDesc jarDesc : jarDescs) {
     109                     String fileName = jarDesc.getLocation().toExternalForm();
     110                     this.jars.add(fileName);
     111                 }
    64112            } catch (MalformedURLException e) {
    65113                // Don't fail because we cannot get the jnlp file. Parameters are optional not required.
    66114                // it is the site developer who should ensure that file exist.
    67                 System.err.println("Unable to get JNLP file at: " + codeBase.toExternalForm()
    68                         + atts.get("jnlp_href"));
    69             }
     115                System.err.println("Unable to get JNLP file at: " + atts.get("jnlp_href")
     116                        + " with context of URL as: " + codeBase.toExternalForm());
     117            }
     118        } else {
     119            // Should we populate this list with applet attribute tags?
     120            info = new ArrayList<InformationDesc>();
     121            useJNLPHref = false;
    70122        }
    71123
     
    100152        }
    101153
    102         if (jar != null && jar.length() > 0) {
    103             this.jars = jar.split(",");
    104 
    105             // trim white spaces
    106             for (int i = 0; i < this.jars.length; i++) {
    107                 this.jars[i] = this.jars[i].trim();
    108             }
     154        if (archive != null && archive.length() > 0) {
     155            String[] archives = archive.split(",");
     156
     157            addArchiveEntries(archives);
    109158
    110159            if (JNLPRuntime.isDebug()) {
    111                 System.err.println("Jar string: " + jar);
    112                 System.err.println("jars length: " + jars.length);
    113             }
    114         }
    115         this.atts = atts;
     160                System.err.println("Jar string: " + archive);
     161                System.err.println("jars length: " + archives.length);
     162            }
     163        }
    116164
    117165        name = atts.get("name");
     
    124172            main = main.substring(0, main.length() - 6);
    125173
    126         launchType = new AppletDesc(name, main, documentBase, width,
     174        // the class name should be of the form foo.bar.Baz not foo/bar/Baz
     175        String mainClass = main.replace('/', '.');
     176        launchType = new AppletDesc(name, mainClass, documentBase, width,
    127177                                    height, atts);
    128178
     
    133183            security = null;
    134184
    135         /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html,
    136          * classloaders are shared iff these properties match:
    137          * codebase, cache_archive, java_archive, archive
    138          *
    139          * To achieve this, we create the uniquekey based on those 4 values,
    140          * always in the same order. The initial "<NAME>=" parts ensure a
    141          * bad tag cannot trick the loader into getting shared with another.
    142          */
    143 
    144         // Firefox sometimes skips the codebase if it is default  -- ".",
    145         // so set it that way if absent
    146         String codebaseAttr =      atts.get("codebase") != null ?
    147                                    atts.get("codebase") : ".";
    148 
    149         String cache_archiveAttr = atts.get("cache_archive") != null ?
    150                                    atts.get("cache_archive") : "";
    151 
    152         String java_archiveAttr =  atts.get("java_archive") != null ?
    153                                    atts.get("java_archive") : "";
    154 
    155         String archiveAttr =       atts.get("archive") != null ?
    156                                    atts.get("archive") : "";
    157 
    158         this.uniqueKey = "codebase=" + codebaseAttr +
    159                          "cache_archive=" + cache_archiveAttr +
    160                          "java_archive=" + java_archiveAttr +
    161                          "archive=" +  archiveAttr;
    162 
     185        this.uniqueKey = uKey;
    163186        usePack = false;
    164187        useVersion = false;
     
    184207    }
    185208
     209    public boolean useJNLPHref() {
     210        return useJNLPHref;
     211    }
     212
    186213    /**
    187214     * {@inheritdoc }
     
    194221    public String getTitle() {
    195222        return name;
    196     }
    197 
    198     public InformationDesc getInformation(final Locale locale) {
    199         return new InformationDesc(this, new Locale[] { locale }) {
    200             protected List<Object> getItems(Object key) {
    201                 // Should we populate this list with applet attribute tags?
    202                 return new ArrayList<Object>();
    203             }
    204         };
    205223    }
    206224
     
    218236                        jarDescs.addAll(sharedResources.getResources(JARDesc.class));
    219237
    220                         for (int i = 0; i < jars.length; i++)
    221                             if (jars[i].length() > 0)
    222                                 jarDescs.add(new JARDesc(new URL(codeBase, jars[i]),
     238                        for (String name : jars) {
     239                            if (name.length() > 0)
     240                                jarDescs.add(new JARDesc(new URL(codeBase, name),
    223241                                        null, null, false, true, false, true));
     242                        }
    224243
    225244                        boolean cacheable = true;
     
    229248                            cacheable = false;
    230249
    231                         for (int i = 0; i < cacheJars.length; i++) {
    232 
    233                             String[] jarAndVer = cacheJars[i].split(";");
     250                        for (String cacheJar : cacheJars) {
     251
     252                            String[] jarAndVer = cacheJar.split(";");
    234253
    235254                            String jar = jarAndVer[0];
     
    247266                        }
    248267
    249                         for (int i = 0; i < cacheExJars.length; i++) {
    250 
    251                             if (cacheExJars[i].length() == 0)
     268                        for (String cacheExJar : cacheExJars) {
     269
     270                            if (cacheExJar.length() == 0)
    252271                                continue;
    253272
    254                             String[] jarInfo = cacheExJars[i].split(";");
     273                            String[] jarInfo = cacheExJar.split(";");
    255274
    256275                            String jar = jarInfo[0].trim();
     
    302321
    303322    /**
     323     * Returns the list of folders to be added to the codebase
     324     */
     325    public List<String> getCodeBaseFolders() {
     326        return new ArrayList<String>(codeBaseFolders);
     327    }
     328
     329    /**
    304330     * Returns the resources section of the JNLP file for the
    305331     * specified locale, os, and arch.
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/ResourcesDesc.java

    r348 r416  
    7676        JARDesc jars[] = getJARs();
    7777
    78         for (int i = 0; i < jars.length; i++)
    79             if (jars[i].isMain())
    80                 return jars[i];
     78        for (JARDesc jar : jars) {
     79            if (jar.isMain())
     80                return jar;
     81        }
    8182
    8283        if (jars.length > 0)
     
    161162        Map<String, String> properties = new HashMap<String, String>();
    162163        List<PropertyDesc> resources = getResources(PropertyDesc.class);
    163         for (int i = 0; i < resources.size(); i++) {
    164             PropertyDesc prop = resources.get(i);
     164        for (PropertyDesc prop : resources) {
    165165            properties.put(prop.getKey(), prop.getValue());
    166166        }
     
    206206        List<T> result = new ArrayList<T>();
    207207
    208         for (int i = 0; i < resources.size(); i++)
    209             if (type.isAssignableFrom(resources.get(i).getClass()))
    210                 result.add(type.cast(resources.get(i)));
     208        for (Object resource : resources) {
     209            if (type.isAssignableFrom(resource.getClass()))
     210                result.add(type.cast(resource));
     211        }
    211212
    212213        return result;
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/SecurityDesc.java

    r348 r416  
    203203
    204204        // discard sandbox, give all
    205         if (type == ALL_PERMISSIONS) {
     205        if (ALL_PERMISSIONS.equals(type)) {
    206206            permissions = new Permissions();
    207207            if (customTrustedPolicy == null) {
     
    214214
    215215        // add j2ee to sandbox if needed
    216         if (type == J2EE_PERMISSIONS)
     216        if (J2EE_PERMISSIONS.equals(type))
    217217            for (int i = 0; i < j2eePermissions.length; i++)
    218218                permissions.add(j2eePermissions[i]);
     
    239239                permissions.add(jnlpRIAPermissions[i]);
    240240
    241         if (downloadHost != null)
     241        if (downloadHost != null && downloadHost.length() > 0)
    242242            permissions.add(new SocketPermission(downloadHost,
    243243                                                 "connect, accept"));
     
    245245        return permissions;
    246246    }
     247   
     248    /**
     249     * Returns all the names of the basic JNLP system properties accessible by RIAs
     250     */
     251    public static String[] getJnlpRIAPermissions() {
     252        String[] jnlpPermissions = new String[jnlpRIAPermissions.length];
     253
     254        for (int i = 0; i < jnlpRIAPermissions.length; i++)
     255            jnlpPermissions[i] = jnlpRIAPermissions[i].getName();
     256
     257        return jnlpPermissions;
     258    }
    247259
    248260}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/Version.java

    r348 r416  
    231231
    232232        // compare as integers
     233        // for normalization key, compare exact object, not using .equals
    233234        try {
    234235            if (!(part1 == emptyString)) // compare to magic normalization key
     
    243244        }
    244245
    245         if (part1 == emptyString)
     246        if (part1 == emptyString) // compare to magic normalization key
    246247            part1 = "";
    247         if (part2 == emptyString)
     248        if (part2 == emptyString) // compare to magic normalization key
    248249            part2 = "";
    249250
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java

    r348 r416  
    3737package net.sourceforge.jnlp.cache;
    3838
     39import java.util.Set;
     40import static  net.sourceforge.jnlp.runtime.Translator.R;
     41
    3942import java.io.File;
    4043import java.io.IOException;
     
    4447import java.util.Collections;
    4548import java.util.Comparator;
     49import java.util.Iterator;
    4650import java.util.List;
    4751import java.util.Map.Entry;
     
    6872
    6973    /* location of cache directory */
    70     private final String cacheDir = new File(JNLPRuntime.getConfiguration()
    71             .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath();
     74    private final String setCachePath = JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR);
     75    private final String cacheDir = new File(setCachePath != null ? setCachePath : System.getProperty("java.io.tmpdir")).getPath();
    7276
    7377    /*
     
    105109     */
    106110    public synchronized void load() {
    107         cacheOrder.load();
     111        boolean loaded = cacheOrder.load();
     112        /*
     113         * clean up possibly corrupted entries
     114         */
     115        if (loaded && checkData()) {
     116            if (JNLPRuntime.isDebug()) {
     117                new LruCacheException().printStackTrace();
     118            }
     119            System.out.println(R("CFakeCache"));
     120            store();
     121            System.out.println(R("CFakedCache"));
     122        }
     123    }
     124
     125    /**
     126     * check content of cacheOrder and remove invalid/corrupt entries
     127     *
     128     * @return true, if cache was corrupted and affected entry removed
     129     */
     130    private boolean checkData () {
     131        boolean modified = false;
     132        Set<Entry<Object, Object>> q = cacheOrder.entrySet();
     133        for (Iterator<Entry<Object, Object>> it = q.iterator(); it.hasNext();) {
     134            Entry<Object, Object> currentEntry = it.next();
     135
     136            final String key = (String) currentEntry.getKey();
     137            final String path = (String) currentEntry.getValue();
     138
     139            // 1. check key format: "milliseconds,number"
     140            try {
     141                String sa[] = key.split(",");
     142                Long l1 = Long.parseLong(sa[0]);
     143                Long l2 = Long.parseLong(sa[1]);
     144            } catch (Exception ex) {
     145                it.remove();
     146                modified = true;
     147                continue;
     148            }
     149
     150            // 2. check path format - does the path look correct?
     151            if (path != null) {
     152                if (path.indexOf(cacheDir) < 0) {
     153                    it.remove();
     154                    modified = true;
     155                }
     156            } else {
     157                it.remove();
     158                modified = true;
     159            }
     160        }
     161       
     162        return modified;
    108163    }
    109164
     
    173228            @Override
    174229            public int compare(Entry<String, String> e1, Entry<String, String> e2) {
    175                 try {
    176                     Long t1 = Long.parseLong(e1.getKey().split(",")[0]);
    177                     Long t2 = Long.parseLong(e2.getKey().split(",")[0]);
    178 
    179                     int c = t1.compareTo(t2);
    180                     return c < 0 ? 1 : (c > 0 ? -1 : 0);
    181                 } catch (NumberFormatException e) {
    182                     // Perhaps an error is too harsh. Maybe just somehow turn
    183                     // caching off if this is the case.
    184                     throw new InternalError("Corrupt LRU file entries");
    185                 }
     230                Long t1 = Long.parseLong(e1.getKey().split(",")[0]);
     231                Long t2 = Long.parseLong(e2.getKey().split(",")[0]);
     232
     233                int c = t1.compareTo(t2);
     234                return c < 0 ? 1 : (c > 0 ? -1 : 0);
    186235            }
    187236        });
     
    250299        return System.currentTimeMillis() + "," + getIdForCacheFolder(path);
    251300    }
     301
     302    void clearLRUSortedEntries() {
     303        cacheOrder.clear();
     304    }
    252305}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/CacheUtil.java

    r348 r416  
    4848public class CacheUtil {
    4949
    50     private static final String cacheDir = new File(JNLPRuntime.getConfiguration()
    51             .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath(); // Do this with file to standardize it.
     50    private static final String setCacheDir = JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR);
     51    private static final String cacheDir = new File(setCacheDir != null ? setCacheDir : System.getProperty("java.io.tmpdir")).getPath(); // Do this with file to standardize it.
    5252    private static final CacheLRUWrapper lruHandler = CacheLRUWrapper.getInstance();
    5353    private static final HashMap<String, FileLock> propertiesLockPool = new HashMap<String, FileLock>();
     
    6262     */
    6363    public static boolean urlEquals(URL u1, URL u2) {
    64         if (u1 == u2)
     64        if (u1 == u2) {
    6565            return true;
    66         if (u1 == null || u2 == null)
    67             return false;
    68 
    69         if (!compare(u1.getProtocol(), u2.getProtocol(), true) ||
    70                 !compare(u1.getHost(), u2.getHost(), true) ||
    71                 //u1.getDefaultPort() != u2.getDefaultPort() || // only in 1.4
    72                 !compare(u1.getPath(), u2.getPath(), false) ||
    73                 !compare(u1.getQuery(), u2.getQuery(), false) ||
    74                 !compare(u1.getRef(), u2.getRef(), false))
    75             return false;
    76         else
     66        }
     67        if (u1 == null || u2 == null) {
     68            return false;
     69        }
     70
     71        if (notNullUrlEquals(u1, u2)) {
    7772            return true;
    78     }
    79 
     73        }
     74        try {
     75            URL nu1 = ResourceTracker.normalizeUrl(u1, false);
     76            URL nu2 = ResourceTracker.normalizeUrl(u2, false);
     77            if (notNullUrlEquals(nu1, nu2)) {
     78                return true;
     79            }
     80        } catch (Exception ex) {
     81            //keep silent here and return false
     82        }
     83        return false;
     84    }
     85
     86    private static boolean notNullUrlEquals(URL u1, URL u2) {
     87        if (!compare(u1.getProtocol(), u2.getProtocol(), true)
     88                || !compare(u1.getHost(), u2.getHost(), true)
     89                || //u1.getDefaultPort() != u2.getDefaultPort() || // only in 1.4
     90                !compare(u1.getPath(), u2.getPath(), false)
     91                || !compare(u1.getQuery(), u2.getQuery(), false)
     92                || !compare(u1.getRef(), u2.getRef(), false)) {
     93            return false;
     94        } else {
     95            return true;
     96        }
     97    }
    8098    /**
    8199     * Caches a resource and returns a URL for it in the cache;
     
    145163     * and we check for those by calling {@link #okToClearCache()}
    146164     */
    147     public static void clearCache() {
     165    public static boolean clearCache() {
    148166
    149167        if (!okToClearCache()) {
    150168            System.err.println(R("CCannotClearCache"));
    151             return;
     169            return false;
    152170        }
    153171
    154172        File cacheDir = new File(CacheUtil.cacheDir);
    155173        if (!(cacheDir.isDirectory())) {
    156             return;
     174            return false;
    157175        }
    158176
     
    166184            throw new RuntimeException(e);
    167185        }
     186        return true;
    168187    }
    169188
     
    307326            if (cacheFile == null) { // We did not find a copy of it.
    308327                cacheFile = makeNewCacheFile(source, version);
    309             }
    310             lruHandler.store();
     328            } else
     329                lruHandler.store();
    311330            lruHandler.unlock();
    312331        }
     
    329348                final String path = e.getValue();
    330349
    331                 if (path != null) {
    332                     if (pathToURLPath(path).equals(urlPath.getPath())) { // Match found.
    333                         cacheFile = new File(path);
    334                         lruHandler.updateEntry(key);
    335                         break; // Stop searching since we got newest one already.
    336                     }
     350                if (pathToURLPath(path).equals(urlPath.getPath())) { // Match found.
     351                    cacheFile = new File(path);
     352                    lruHandler.updateEntry(key);
     353                    break; // Stop searching since we got newest one already.
    337354                }
    338355            }
     
    484501            // only resources not starting out downloaded are displayed
    485502            List<URL> urlList = new ArrayList<URL>();
    486             for (int i = 0; i < resources.length; i++) {
    487                 if (!tracker.checkResource(resources[i]))
    488                     urlList.add(resources[i]);
     503            for (URL url : resources) {
     504                if (!tracker.checkResource(url))
     505                    urlList.add(url);
    489506            }
    490507            URL undownloaded[] = urlList.toArray(new URL[urlList.size()]);
     
    496513                long total = 0;
    497514
    498                 for (int i = 0; i < undownloaded.length; i++) {
     515                for (URL url : undownloaded) {
    499516                    // add in any -1's; they're insignificant
    500                     total += tracker.getTotalSize(undownloaded[i]);
    501                     read += tracker.getAmountRead(undownloaded[i]);
     517                    total += tracker.getTotalSize(url);
     518                    read += tracker.getAmountRead(url);
    502519                }
    503520
    504521                int percent = (int) ((100 * read) / Math.max(1, total));
    505522
    506                 for (int i = 0; i < undownloaded.length; i++)
    507                     listener.progress(undownloaded[i], "version",
    508                                       tracker.getAmountRead(undownloaded[i]),
    509                                       tracker.getTotalSize(undownloaded[i]),
     523                for (URL url : undownloaded) {
     524                    listener.progress(url, "version",
     525                                      tracker.getAmountRead(url),
     526                                      tracker.getTotalSize(url),
    510527                                      percent);
     528                }
    511529            } while (!tracker.waitForResources(resources, indicator.getUpdateRate()));
    512530
    513531            // make sure they read 100% until indicator closes
    514             for (int i = 0; i < undownloaded.length; i++)
    515                 listener.progress(undownloaded[i], "version",
    516                                   tracker.getTotalSize(undownloaded[i]),
    517                                   tracker.getTotalSize(undownloaded[i]),
     532            for (URL url : undownloaded) {
     533                listener.progress(url, "version",
     534                                  tracker.getTotalSize(url),
     535                                  tracker.getTotalSize(url),
    518536                                  100);
    519 
     537            }
    520538        } catch (InterruptedException ex) {
    521539            if (JNLPRuntime.isDebug())
     
    531549     */
    532550    public static void cleanCache() {
     551
    533552        if (okToClearCache()) {
    534553            // First we want to figure out which stuff we need to delete.
     
    549568                // Check if the item is contained in cacheOrder.
    550569                final String key = e.getKey();
    551                 final String value = e.getValue();
    552 
    553                 if (value != null) {
    554                     File file = new File(value);
    555                     PropertiesFile pf = new PropertiesFile(new File(value + ".info"));
    556                     boolean delete = Boolean.parseBoolean(pf.getProperty("delete"));
    557 
    558                     /*
    559                      * This will get me the root directory specific to this cache item.
    560                      * Example:
    561                      *  cacheDir = /home/user1/.icedtea/cache
    562                      *  file.getPath() = /home/user1/.icedtea/cache/0/http/www.example.com/subdir/a.jar
    563                      *  rStr first becomes: /0/http/www.example.com/subdir/a.jar
    564                      *  then rstr becomes: /home/user1/.icedtea/cache/0
    565                      */
    566                     String rStr = file.getPath().substring(cacheDir.length());
    567                     rStr = cacheDir + rStr.substring(0, rStr.indexOf(File.separatorChar, 1));
    568                     long len = file.length();
    569 
    570                     if (keep.contains(file.getPath().substring(rStr.length()))) {
    571                         lruHandler.removeEntry(key);
    572                         continue;
    573                     }
    574                    
    575                     /*
    576                      * we remove entries from our lru if any of the following condition is met.
    577                      * Conditions:
    578                      *  - delete: file has been marked for deletion.
    579                      *  - !file.isFile(): if someone tampered with the directory, file doesn't exist.
    580                      *  - maxSize >= 0 && curSize + len > maxSize: If a limit was set and the new size
    581                      *  on disk would exceed the maximum size.
    582                      */
    583                     if (delete || !file.isFile() || (maxSize >= 0 && curSize + len > maxSize)) {
    584                         lruHandler.removeEntry(key);
    585                         remove.add(rStr);
    586                     } else {
    587                         curSize += len;
    588                         keep.add(file.getPath().substring(rStr.length()));
    589 
    590                         for (File f : file.getParentFile().listFiles()) {
    591                             if (!(f.equals(file) || f.equals(pf.getStoreFile()))){
    592                                 try {
    593                                     FileUtils.recursiveDelete(f, f);
    594                                 } catch (IOException e1) {
    595                                     e1.printStackTrace();
    596                                 }
    597                             }
     570                final String path = e.getValue();
     571
     572                File file = new File(path);
     573                PropertiesFile pf = new PropertiesFile(new File(path + ".info"));
     574                boolean delete = Boolean.parseBoolean(pf.getProperty("delete"));
     575
     576                /*
     577                 * This will get me the root directory specific to this cache item.
     578                 * Example:
     579                 *  cacheDir = /home/user1/.icedtea/cache
     580                 *  file.getPath() = /home/user1/.icedtea/cache/0/http/www.example.com/subdir/a.jar
     581                 *  rStr first becomes: /0/http/www.example.com/subdir/a.jar
     582                 *  then rstr becomes: /home/user1/.icedtea/cache/0
     583                 */
     584                String rStr = file.getPath().substring(cacheDir.length());
     585                rStr = cacheDir + rStr.substring(0, rStr.indexOf(File.separatorChar, 1));
     586                long len = file.length();
     587
     588                if (keep.contains(file.getPath().substring(rStr.length()))) {
     589                    lruHandler.removeEntry(key);
     590                    continue;
     591                }
     592
     593                /*
     594                 * we remove entries from our lru if any of the following condition is met.
     595                 * Conditions:
     596                 *  - delete: file has been marked for deletion.
     597                 *  - !file.isFile(): if someone tampered with the directory, file doesn't exist.
     598                 *  - maxSize >= 0 && curSize + len > maxSize: If a limit was set and the new size
     599                 *  on disk would exceed the maximum size.
     600                 */
     601                if (delete || !file.isFile() || (maxSize >= 0 && curSize + len > maxSize)) {
     602                    lruHandler.removeEntry(key);
     603                    remove.add(rStr);
     604                    continue;
     605                }
     606
     607                curSize += len;
     608                keep.add(file.getPath().substring(rStr.length()));
     609
     610                for (File f : file.getParentFile().listFiles()) {
     611                    if (!(f.equals(file) || f.equals(pf.getStoreFile()))) {
     612                        try {
     613                            FileUtils.recursiveDelete(f, f);
     614                        } catch (IOException e1) {
     615                            e1.printStackTrace();
    598616                        }
    599617                    }
    600                 } else {
    601                     lruHandler.removeEntry(key);
     618
    602619                }
    603620            }
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java

    r348 r416  
    2929
    3030import net.sourceforge.jnlp.runtime.*;
     31import net.sourceforge.jnlp.util.ImageResources;
    3132
    3233/**
     
    5859    /** the display window */
    5960    private static JFrame frame;
     61    private static final Object frameMutex = new Object();
    6062
    6163    /** shared constraint */
     
    98100        DownloadPanel result = new DownloadPanel(downloadName);
    99101
    100         if (frame == null) {
    101             frame = new JFrame(downloading + "...");
    102             frame.getContentPane().setLayout(new GridBagLayout());
    103         }
    104 
    105         if (resources != null)
    106             for (int i = 0; i < resources.length; i++)
    107                 result.addProgressPanel(resources[i], null);
    108 
    109         frame.getContentPane().add(result, vertical);
    110         frame.pack();
    111 
    112         if (!frame.isVisible()) {
    113             Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    114             Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(frame.getGraphicsConfiguration());
    115             Dimension screen = new Dimension(screenSize.width - insets.left,
    116                     screenSize.height - insets.top);
    117             frame.setLocation(screen.width - frame.getWidth(),
    118                               screen.height - frame.getHeight());
    119         }
    120 
    121         frame.setVisible(true);
    122 
    123         return result;
     102        synchronized (frameMutex) {
     103            if (frame == null) {
     104                frame = new JFrame(downloading + "...");
     105                frame.setIconImages(ImageResources.INSTANCE.getApplicationImages());
     106                frame.getContentPane().setLayout(new GridBagLayout());
     107            }
     108
     109            if (resources != null) {
     110                for (URL url : resources) {
     111                    result.addProgressPanel(url, null);
     112                }
     113            }
     114
     115            frame.getContentPane().add(result, vertical);
     116            frame.pack();
     117
     118            if (!frame.isVisible()) {
     119                Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
     120                Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(frame.getGraphicsConfiguration());
     121                Dimension screen = new Dimension(screenSize.width - insets.left,
     122                        screenSize.height - insets.top);
     123                frame.setLocation(screen.width - frame.getWidth(),
     124                        screen.height - frame.getHeight());
     125            }
     126
     127            frame.setVisible(true);
     128
     129            return result;
     130        }
    124131    }
    125132
     
    135142        ActionListener hider = new ActionListener() {
    136143            public void actionPerformed(ActionEvent evt) {
    137                 if (frame.getContentPane().getComponentCount() == 1)
    138                     frame.setVisible(false);
    139 
    140                 frame.getContentPane().remove((DownloadPanel) listener);
    141                 frame.pack();
     144                synchronized(frameMutex) {
     145                    frame.getContentPane().remove((DownloadPanel) listener);
     146                    frame.pack();
     147
     148                    if (frame.getContentPane().getComponentCount() == 0) {
     149                        frame.setVisible(false);
     150                        frame.dispose();
     151                        frame = null;
     152                    }
     153                }
    142154            }
    143155        };
     
    187199
    188200                add(panel, verticalIndent);
    189                 frame.pack();
     201                synchronized (frameMutex) {
     202                    frame.pack();
     203                }
    190204
    191205                urls.add(url);
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/Resource.java

    r348 r416  
    273273        }
    274274
    275         for (int i = 0; i < send.size(); i++) {
    276             ResourceTracker rt = send.get(i);
     275        for (ResourceTracker rt : send) {
    277276            rt.fireDownloadEvent(this);
    278277        }
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/cache/ResourceTracker.java

    r348 r416  
    2525import java.io.InputStream;
    2626import java.io.OutputStream;
     27import java.io.UnsupportedEncodingException;
    2728import java.net.HttpURLConnection;
    2829import java.net.MalformedURLException;
    2930import java.net.URL;
    3031import java.net.URLConnection;
     32import java.net.URLDecoder;
     33import java.net.URLEncoder;
    3134import java.security.AccessController;
    3235import java.security.PrivilegedAction;
     
    109112    private static final int STARTED = Resource.STARTED;
    110113
     114    // normalization of url
     115    private static final char PATH_DELIMITER_MARK = '/';
     116    private static final String PATH_DELIMITER = "" + PATH_DELIMITER_MARK;
     117    private static final char QUERY_DELIMITER_MARK = '&';
     118    private static final String QUERY_DELIMITER = "" + QUERY_DELIMITER_MARK;
     119    private static final char QUERY_MARK = '?';
     120    private static final char HREF_MARK = '#';
     121    private static final String UTF8 = "utf-8";
     122
    111123    /** max threads */
    112124    private static final int maxThreads = 5;
     
    173185    public void addResource(URL location, Version version, DownloadOptions options, UpdatePolicy updatePolicy) {
    174186        if (location == null)
    175             throw new IllegalArgumentException("location==null");
    176 
     187            throw new IllegalResourceDescriptorException("location==null");
     188        try {
     189            location = normalizeUrl(location, JNLPRuntime.isDebug());
     190        } catch (Exception ex) {
     191            System.err.println("Normalization of " + location.toString() + " have failed");
     192            ex.printStackTrace();
     193        }
    177194        Resource resource = Resource.getResource(location, version, updatePolicy);
    178195        boolean downloaded = false;
     
    209226     * collected.
    210227     *
    211      * @throws IllegalArgumentException if the resource is not being tracked
     228     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    212229     */
    213230    public void removeResource(URL location) {
     
    315332
    316333        DownloadEvent event = new DownloadEvent(this, resource);
    317         for (int i = 0; i < l.length; i++) {
     334        for (DownloadListener dl : l) {
    318335            if (0 != ((ERROR | DOWNLOADED) & status))
    319                 l[i].downloadCompleted(event);
     336                dl.downloadCompleted(event);
    320337            else if (0 != (DOWNLOADING & status))
    321                 l[i].downloadStarted(event);
     338                dl.downloadStarted(event);
    322339            else if (0 != (CONNECTING & status))
    323                 l[i].updateStarted(event);
     340                dl.updateStarted(event);
    324341        }
    325342    }
     
    335352     * @param location the resource location
    336353     * @return the resource, or null if it could not be downloaded
    337      * @throws IllegalArgumentException if the resource is not being tracked
     354     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    338355     * @see CacheUtil#isCacheable
    339356     */
     
    362379     * @param location the resource location
    363380     * @return a local file containing the resource, or null
    364      * @throws IllegalArgumentException if the resource is not being tracked
     381     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    365382     * @see CacheUtil#isCacheable
    366383     */
     
    402419     *
    403420     * @throws IOException if there was an error opening the stream
    404      * @throws IllegalArgumentException if the resource is not being tracked
     421     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    405422     */
    406423    public InputStream getInputStream(URL location) throws IOException {
     
    426443     * @param timeout the time in ms to wait before returning, 0 for no timeout
    427444     * @return whether the resources downloaded before the timeout
    428      * @throws IllegalArgumentException if the resource is not being tracked
     445     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    429446     */
    430447    public boolean waitForResources(URL urls[], long timeout) throws InterruptedException {
     
    433450        synchronized (resources) {
    434451            // keep the lock so getResource doesn't have to aquire it each time
    435             for (int i = 0; i < urls.length; i++)
     452            for (int i = 0; i < urls.length; i++) {
    436453                resources[i] = getResource(urls[i]);
     454            }
    437455        }
    438456
     
    451469     * @return whether the resource downloaded before the timeout
    452470     * @throws InterruptedException if another thread interrupted the wait
    453      * @throws IllegalArgumentException if the resource is not being tracked
     471     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    454472     */
    455473    public boolean waitForResource(URL location, long timeout) throws InterruptedException {
     
    462480     * @param location the resource location
    463481     * @return the number of bytes transferred
    464      * @throws IllegalArgumentException if the resource is not being tracked
     482     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    465483     */
    466484    public long getAmountRead(URL location) {
     
    474492     * accessed with the getCacheFile method).
    475493     *
    476      * @throws IllegalArgumentException if the resource is not being tracked
     494     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    477495     */
    478496    public boolean checkResource(URL location) {
     
    488506     *
    489507     * @return true if the resource is already downloaded (or an error occurred)
    490      * @throws IllegalArgumentException if the resource is not being tracked
     508     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    491509     */
    492510    public boolean startResource(URL location) {
     
    501519     *
    502520     * @return true if the resource is already downloaded (or an error occurred)
    503      * @throws IllegalArgumentException if the resource is not being tracked
     521     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    504522     */
    505523    private boolean startResource(Resource resource) {
     
    533551     * @param location the resource location
    534552     * @return the number of bytes, or -1
    535      * @throws IllegalArgumentException if the resource is not being tracked
     553     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    536554     */
    537555    public long getTotalSize(URL location) {
     
    589607        synchronized (lock) {
    590608            if (!resource.isSet(CONNECT | DOWNLOAD))
    591                 throw new IllegalArgumentException("Invalid resource state (resource: " + resource + ")");
     609                throw new IllegalResourceDescriptorException("Invalid resource state (resource: " + resource + ")");
    592610
    593611            queue.add(resource);
     
    852870        }
    853871        URL bestUrl = null;
    854         for (int i = 0; i < urls.size(); i++) {
    855             URL url = urls.get(i);
     872        for (URL url : urls) {
    856873            try {
    857874                URLConnection connection = url.openConnection();
     
    9831000        int score = Integer.MAX_VALUE;
    9841001
    985         for (int i = 0; i < source.size(); i++) {
    986             Resource resource = source.get(i);
     1002        for (Resource resource : source) {
    9871003            boolean selectable = false;
    9881004
     
    9951011                int activeCount = 0;
    9961012
    997                 for (int j = 0; j < active.size(); j++)
    998                     if (active.get(j) == resource.getTracker())
     1013                for (ResourceTracker rt : active) {
     1014                    if (rt == resource.getTracker())
    9991015                        activeCount++;
     1016                }
    10001017
    10011018                // try to spread out the downloads so that a slow host
     
    10141031     * Return the resource matching the specified URL.
    10151032     *
    1016      * @throws IllegalArgumentException if the resource is not being tracked
     1033     * @throws IllegalResourceDescriptorException if the resource is not being tracked
    10171034     */
    10181035    private Resource getResource(URL location) {
    10191036        synchronized (resources) {
    1020             for (int i = 0; i < resources.size(); i++) {
    1021                 Resource resource = resources.get(i);
    1022 
     1037            for (Resource resource : resources) {
    10231038                if (CacheUtil.urlEquals(resource.location, location))
    10241039                    return resource;
     
    10261041        }
    10271042
    1028         throw new IllegalArgumentException("Location does not specify a resource being tracked.");
     1043        throw new IllegalResourceDescriptorException("Location does not specify a resource being tracked.");
    10291044    }
    10301045
     
    10421057
    10431058        // start them downloading / connecting in background
    1044         for (int i = 0; i < resources.length; i++)
    1045             startResource(resources[i]);
     1059        for (Resource resource : resources) {
     1060            startResource(resource);
     1061        }
    10461062
    10471063        // wait for completion
     
    10511067            synchronized (lock) {
    10521068                // check for completion
    1053                 for (int i = 0; i < resources.length; i++) {
     1069                for (Resource resource : resources) {
    10541070                    //NetX Deadlocking may be solved by removing this
    10551071                    //synch block.
    1056                     synchronized (resources[i]) {
    1057                         if (!resources[i].isSet(DOWNLOADED | ERROR)) {
     1072                    synchronized (resource) {
     1073                        if (!resource.isSet(DOWNLOADED | ERROR)) {
    10581074                            finished = false;
    10591075                            break;
     
    11281144    };
    11291145
     1146    private static String normalizeChunk(String base, boolean debug) throws UnsupportedEncodingException {
     1147        if (base == null) {
     1148            return base;
     1149        }
     1150        if ("".equals(base)) {
     1151            return base;
     1152        }
     1153        String result = base;
     1154        String ssE = URLDecoder.decode(base, UTF8);
     1155        //            System.out.println("*" + base + "*");
     1156        //            System.out.println("-" + ssE + "-");
     1157        if (base.equals(ssE)) {
     1158            result = URLEncoder.encode(base, UTF8);
     1159            if (debug) {
     1160                System.out.println(base + " chunk needs to be encoded => " + result);
     1161            }
     1162        } else {
     1163            if (debug) {
     1164                System.out.println(base + " chunk already encoded");
     1165            }
     1166        }
     1167        return result;
     1168    }
     1169
     1170    public static URL normalizeUrl(URL u, boolean debug) throws MalformedURLException, UnsupportedEncodingException {
     1171        if (u == null) {
     1172            return null;
     1173        }
     1174        String protocol = u.getProtocol();
     1175        if (protocol == null || "file".equals(protocol)) {
     1176            return u;
     1177        }
     1178        String file = u.getPath();
     1179        if (file == null) {
     1180            return u;
     1181        }
     1182        String host = u.getHost();
     1183        String ref = u.getRef();
     1184        int port = u.getPort();
     1185        String query = u.getQuery();
     1186        String[] qq = {};
     1187        if (query != null) {
     1188            qq = query.split(QUERY_DELIMITER);
     1189        }
     1190        String[] ss = file.split(PATH_DELIMITER);
     1191        int normalized = 0;
     1192        if (debug) {
     1193            System.out.println("normalizing path " + file + " in " + u.toString());
     1194        }
     1195        for (int i = 0; i < ss.length; i++) {
     1196            String base = ss[i];
     1197            String r = normalizeChunk(base, debug);
     1198            if (!r.equals(ss[i])) {
     1199                normalized++;
     1200            }
     1201            ss[i] = r;
     1202        }
     1203        if (debug) {
     1204            System.out.println("normalizing query " + query + " in " + u.toString());
     1205        }
     1206        for (int i = 0; i < qq.length; i++) {
     1207            String base = qq[i];
     1208            String r = normalizeChunk(base, debug);
     1209            if (!r.equals(qq[i])) {
     1210                normalized++;
     1211            }
     1212            qq[i] = r;
     1213        }
     1214        if (normalized == 0) {
     1215            if (debug) {
     1216                System.out.println("Nothing was normalized in this url");
     1217            }
     1218            return u;
     1219        } else {
     1220            if (debug) {
     1221                System.out.println(normalized + " chunks normalized, rejoining url");
     1222            }
     1223        }
     1224        StringBuilder composed = new StringBuilder("");
     1225        for (int i = 0; i < ss.length; i++) {
     1226            String string = ss[i];
     1227            if (ss.length <= 1 || (string != null && !"".equals(string))) {
     1228                composed.append(PATH_DELIMITER_MARK).append(string);
     1229            }
     1230        }
     1231        String composed1 = composed.toString();
     1232        if (query != null && !query.trim().equals("")) {
     1233            composed.append(QUERY_MARK);
     1234            for (int i = 0; i < qq.length; i++) {
     1235                String string = qq[i];
     1236                if ((string != null && !"".equals(string))) {
     1237                    composed.append(string);
     1238                    if (i != qq.length - 1) {
     1239                        composed.append(QUERY_DELIMITER_MARK);
     1240                    }
     1241                }
     1242            }
     1243        }
     1244        String composed2 = composed.substring(composed1.length() - 1);
     1245        if (ref != null && !ref.trim().equals("")) {
     1246            composed.append(HREF_MARK).append(ref);
     1247        }
     1248
     1249        URL result = new URL(protocol, host, port, composed.toString());
     1250
     1251        if (debug) {
     1252            System.out.println("normalized `" + composed1 + "` and `" + composed2 + "` in " + result.toString());
     1253        }
     1254        return result;
     1255
     1256    }
    11301257}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java

    r348 r416  
    3232import net.sourceforge.jnlp.config.DeploymentConfiguration;
    3333import net.sourceforge.jnlp.runtime.Translator;
     34import net.sourceforge.jnlp.util.ImageResources;
    3435
    3536/**
     
    5556    public AdvancedProxySettingsDialog(DeploymentConfiguration config) {
    5657        super((Frame) null, dialogTitle, true); // Don't need a parent.
     58        setIconImages(ImageResources.INSTANCE.getApplicationImages());
     59
    5760        this.config = config;
    5861
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java

    r348 r416  
    3131import net.sourceforge.jnlp.config.DeploymentConfiguration;
    3232import net.sourceforge.jnlp.runtime.Translator;
     33import net.sourceforge.jnlp.util.ImageResources;
    3334
    3435/**
     
    5253    public CacheViewer(DeploymentConfiguration config) {
    5354        super((Frame) null, dialogTitle, true); // Don't need a parent.
     55        setIconImages(ImageResources.INSTANCE.getApplicationImages());
    5456        this.config = config;
    5557
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java

    r348 r416  
    5656import net.sourceforge.jnlp.security.KeyStores;
    5757import net.sourceforge.jnlp.security.viewer.CertificatePane;
     58import net.sourceforge.jnlp.util.ImageResources;
    5859
    5960/**
     
    103104        super();
    104105        setTitle(Translator.R("CPHead"));
     106        setIconImages(ImageResources.INSTANCE.getApplicationImages());
    105107
    106108        this.config = config;
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java

    r348 r416  
    2727import java.awt.event.ItemEvent;
    2828import java.awt.event.ItemListener;
     29import java.io.File;
    2930
    3031import javax.swing.JButton;
     
    3435import javax.swing.JFileChooser;
    3536import javax.swing.JLabel;
     37import javax.swing.JOptionPane;
    3638import javax.swing.JPanel;
    3739import javax.swing.JSlider;
     
    110112                JFileChooser fileChooser = new JFileChooser();
    111113                fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
     114                fileChooser.setFileHidingEnabled(false);
    112115                if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
     116                    // Check if we have permission to write to that location.
    113117                    String result = fileChooser.getSelectedFile().getAbsolutePath();
    114                     location.setText(result);
    115                     config.setProperty(properties[1], result);
     118                    File dirLocation = new File(result);
     119                    boolean canWrite = dirLocation.canWrite();
     120                    while (!canWrite && dirLocation != null){ // File does not exist, or no permission.
     121                       
     122                        if (dirLocation.exists()) {
     123                            JOptionPane.showMessageDialog(null, "No permission to write to this location.");
     124                            return;
     125                        }
     126                       
     127                        dirLocation = dirLocation.getParentFile();
     128                        canWrite = dirLocation.canWrite();
     129                    }
     130                   
     131                    if (canWrite) {
     132                        location.setText(result);
     133                        config.setProperty(properties[1], result);
     134                    }
    116135                }
    117136            }
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/resources/Messages.properties

    r348 r416  
    8181LSignedAppJarUsingUnsignedJar=Signed application using unsigned jars.
    8282LSignedAppJarUsingUnsignedJarInfo=The main application jar is signed, but some of the jars it is using aren't.
    83 
     83LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file.
     84LNoSecInstance=Error: No security instance for {0}. The application may have trouble continuing
     85LCertFoundIn={0} found in cacerts ({1})
     86 
    8487JNotApplet=File is not an applet.
    8588JNotApplication=File is not an application.
     
    104107PTwoMains=Duplicate main JAR defined in a resources element (there can be only one)
    105108PNativeHasMain=Cannot specify main attribute on native JARs.
    106 PNoInfoElement=No information section defined
     109PNoInfoElement=No information section defined.
     110PMissingTitle=title
     111PMissingVendor=vendor
     112PMissingElement=The {0} section has not been defined for your locale nor does a default value exist in the JNLP file.
    107113PTwoDescriptions=Duplicate description of kind {0}
    108114PSharing=Element "sharing-allowed" is illegal in a standard JNLP file
     
    120126PUrlNotInCodebase=Relative URL does not specify a subdirectory of the codebase. (node={0}, href={1}, base={2})
    121127PBadRelativeUrl=Invalid relative URL (node={0}, href={1}, base={2})
    122 PBadNonrelativeUrl=Invalid non-relative URL (node={0}, href={0}).
     128PBadNonrelativeUrl=Invalid non-relative URL (node={0}, href={1})
    123129PNeedsAttribute=The {0} element must specify a {1} attribute.
    124130PBadXML=Invalid XML document syntax.
     
    190196CChooseCacheDir=Cache directory
    191197CCannotClearCache=Can not clear cache at this time
     198CFakeCache=Cache is corrupt. Fixing.
     199CFakedCache=Cache is corrupt and has been fixed. It is strongly recommended that you run 'javaws -Xclearcache' and rerun your application as soon as possible.
    192200
    193201# Security
     
    199207SSignatureError=The application's digital signature has an error. Do you want to run the application?
    200208SUntrustedSource=The digital signature could not be verified by a trusted source. Only run if you trust the origin of the application.
     209SWarnFullPermissionsIgnorePolicy=The code executed will be given full permissions, ignoring any java policies you may have.
    201210STrustedSource=The digital signature has been validated by a trusted source.
    202211SClipboardReadAccess=The application has requested read-only access to the system clipboard. Do you want to allow this action?
     
    205214SNetworkAccess=The application has requested permission to establish connections to {0}. Do you want to allow this action?
    206215SNoAssociatedCertificate=<no associated certificate>
     216SUnverified=(unverified)
    207217SAlwaysTrustPublisher=Always trust content from this publisher
    208 SHttpsUnverified=The website's certificate cannot be verified.
     218SHttpsUnverified=The website's HTTPS certificate cannot be verified.
    209219SNotAllSignedSummary=Only parts of this application code are signed.
    210220SNotAllSignedDetail=This application contains both signed and unsigned code. While signed code is safe if you trust the provider, unsigned code may imply code outside of the trusted provider's control.
    211221SNotAllSignedQuestion=Do you wish to proceed and run this application anyway?
    212222SAuthenticationPrompt=The {0} server at {1} is requesting authentication. It says "{2}"
     223SJNLPFileIsNotSigned=This application contains a digital signature in which the launching JNLP file is not signed.
    213224
    214225# Security - used for the More Information dialog
     
    241252CVDetails=Details
    242253CVExport=Export
     254CVExportPasswordMessage=Enter password to protect key file:
    243255CVImport=Import
     256CVImportPasswordMessage=Enter password to access file:
    244257CVIssuedBy=Issued By
    245258CVIssuedTo=Issued To
     259CVPasswordTitle=Authentication Required
    246260CVRemove=Remove
    247261CVRemoveConfirmMessage=Are you sure you want to remove the selected certificate?
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java

    r348 r416  
    117117
    118118        List<AppletAudioClip> clips = weakClips.hardList();
    119         for (int i = 0; i < clips.size(); i++) {
    120             clips.get(i).dispose();
     119        for (AppletAudioClip clip : clips) {
     120            clip.dispose();
    121121        }
    122122    }
     
    208208
    209209    /**
     210     * Set the applet of this environment; can only be called once.
     211     */
     212    public void setApplet(Applet applet) {
     213        if (this.applet != null) {
     214            if (JNLPRuntime.isDebug()) {
     215                Exception ex = new IllegalStateException("Applet can only be set once.");
     216                ex.printStackTrace();
     217            }
     218            return;
     219        }
     220        this.applet = applet;
     221    }
     222
     223    /**
    210224     * Returns an enumeration that contains only the applet
    211225     * from the JNLP file.
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/AppletInstance.java

    r348 r416  
    5050
    5151        this.environment = new AppletEnvironment(file, this);
     52    }
     53
     54    /**
     55     * Set the applet of this launched application; can only be called once.
     56     */
     57    public void setApplet(Applet applet) {
     58        if (this.applet != null) {
     59            if (JNLPRuntime.isDebug()) {
     60                Exception ex = new IllegalStateException("Applet can only be set once.");
     61                ex.printStackTrace();
     62            }
     63            return;
     64        }
     65        this.applet = applet;
    5266    }
    5367
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java

    r348 r416  
    232232        PrivilegedAction<Object> installProps = new PrivilegedAction<Object>() {
    233233            public Object run() {
    234                 for (int i = 0; i < props.length; i++) {
    235                     System.setProperty(props[i].getKey(), props[i].getValue());
     234                for (PropertyDesc propDesc : props) {
     235                    System.setProperty(propDesc.getKey(), propDesc.getValue());
    236236                }
    237237
     
    273273        try {
    274274            // destroy resources
    275             for (int i = 0; i < weakWindows.size(); i++) {
    276                 Window w = weakWindows.get(i);
     275            for (Window w : weakWindows) {
    277276                if (w != null)
    278277                    w.dispose();
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/Boot.java

    r348 r416  
    157157            JNLPRuntime.setForksAllowed(false);
    158158        }
     159        if (null != getOption("-Xtrustall")) {
     160            JNLPRuntime.setTrustAll(true);
     161        }
    159162
    160163        JNLPRuntime.setInitialArgments(Arrays.asList(argsIn));
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java

    r348 r416  
    9595        if (UrlUtils.isLocalFile(localUrl)) {
    9696            // if it is known to us, just return the cached file
    97             return new JarFile(localUrl.getPath());
     97            JarFile returnFile = new JarFile(localUrl.getPath());
     98           
     99            try {
     100               
     101                // Blank out the class-path because:
     102                // 1) Web Start does not support it
     103                // 2) For the plug-in, we want to cache files from class-path so we do it manually
     104                returnFile.getManifest().getMainAttributes().putValue("Class-Path", "");
     105
     106                if (JNLPRuntime.isDebug()) {
     107                    System.err.println("Class-Path attribute cleared for " + returnFile.getName());
     108                }
     109
     110            } catch (NullPointerException npe) {
     111                // Discard NPE here. Maybe there was no manifest, maybe there were no attributes, etc.
     112            }
     113
     114            return returnFile;
    98115        } else {
    99116            // throw new IllegalStateException("a non-local file in cache");
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java

    r348 r416  
    1818import static net.sourceforge.jnlp.runtime.Translator.R;
    1919
     20import java.io.Closeable;
    2021import java.io.File;
    2122import java.io.FileOutputStream;
     23import java.io.FileReader;
    2224import java.io.IOException;
    2325import java.io.InputStream;
     26import java.io.InputStreamReader;
    2427import java.net.MalformedURLException;
     28import java.net.SocketPermission;
    2529import java.net.URL;
    2630import java.net.URLClassLoader;
    2731import java.security.AccessControlContext;
     32import java.security.AccessControlException;
    2833import java.security.AccessController;
    2934import java.security.AllPermission;
     
    3338import java.security.Permissions;
    3439import java.security.PrivilegedAction;
     40import java.security.PrivilegedActionException;
     41import java.security.PrivilegedExceptionAction;
     42import java.security.ProtectionDomain;
    3543import java.util.ArrayList;
     44import java.util.Arrays;
     45import java.util.Collection;
    3646import java.util.Collections;
    3747import java.util.Enumeration;
    3848import java.util.HashMap;
    3949import java.util.HashSet;
     50import java.util.Iterator;
    4051import java.util.LinkedList;
    4152import java.util.List;
     
    4455import java.util.TreeSet;
    4556import java.util.Vector;
     57import java.util.concurrent.ConcurrentHashMap;
    4658import java.util.jar.JarEntry;
    4759import java.util.jar.JarFile;
    4860import java.util.jar.Manifest;
    4961
     62import net.sourceforge.jnlp.AppletDesc;
     63import net.sourceforge.jnlp.ApplicationDesc;
    5064import net.sourceforge.jnlp.DownloadOptions;
    5165import net.sourceforge.jnlp.ExtensionDesc;
    5266import net.sourceforge.jnlp.JARDesc;
    5367import net.sourceforge.jnlp.JNLPFile;
     68import net.sourceforge.jnlp.JNLPMatcher;
     69import net.sourceforge.jnlp.JNLPMatcherException;
     70import net.sourceforge.jnlp.LaunchDesc;
    5471import net.sourceforge.jnlp.LaunchException;
    5572import net.sourceforge.jnlp.ParseException;
     
    5976import net.sourceforge.jnlp.Version;
    6077import net.sourceforge.jnlp.cache.CacheUtil;
     78import net.sourceforge.jnlp.cache.IllegalResourceDescriptorException;
    6179import net.sourceforge.jnlp.cache.ResourceTracker;
    6280import net.sourceforge.jnlp.cache.UpdatePolicy;
    6381import net.sourceforge.jnlp.security.SecurityDialogs;
    6482import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
    65 import net.sourceforge.jnlp.tools.JarSigner;
     83import net.sourceforge.jnlp.tools.JarCertVerifier;
    6684import net.sourceforge.jnlp.util.FileUtils;
    6785import sun.misc.JarIndex;
     
    82100    // resources in an extension.
    83101
     102    /** Signed JNLP File and Template */
     103    final public static String TEMPLATE = "JNLP-INF/APPLICATION_TEMPLATE.JNLP";
     104    final public static String APPLICATION = "JNLP-INF/APPLICATION.JNLP";
     105   
     106    /** True if the application has a signed JNLP File */
     107    private boolean isSignedJNLP = false;
     108   
    84109    /** map from JNLPFile url to shared classloader */
    85110    private static Map<String, JNLPClassLoader> urlToLoader =
     
    134159    private ArrayList<String> unverifiedJars = null;
    135160
    136     /** the jarsigner tool to verify our jars */
    137     private JarSigner js = null;
     161    /** the jar cert verifier tool to verify our jars */
     162    private JarCertVerifier jcv = null;
    138163
    139164    private boolean signing = false;
     
    151176    private HashMap<URL, SecurityDesc> jarLocationSecurityMap =
    152177            new HashMap<URL, SecurityDesc>();
     178
     179    /*Set to prevent once tried-to-get resources to be tried again*/
     180    private Set<URL> alreadyTried = Collections.synchronizedSet(new HashSet<URL>());
    153181   
    154182    /** Loader for codebase (which is a path, rather than a file) */
    155183    private CodeBaseClassLoader codeBaseLoader;
     184   
     185    /** True if the jar with the main class has been found
     186     * */
     187    private boolean foundMainJar= false;
     188
     189    /** Name of the application's main class */
     190    private String mainClass = null;
     191
     192    /**
     193     * Variable to track how many times this loader is in use
     194     */
     195    private int useCount = 0;
    156196
    157197    /**
     
    161201     */
    162202    protected JNLPClassLoader(JNLPFile file, UpdatePolicy policy) throws LaunchException {
     203        this(file,policy,null);
     204    }
     205
     206    /**
     207     * Create a new JNLPClassLoader from the specified file.
     208     *
     209     * @param file the JNLP file
     210     * @param name of the application's main class
     211     */
     212    protected JNLPClassLoader(JNLPFile file, UpdatePolicy policy, String mainName) throws LaunchException {
    163213        super(new URL[0], JNLPClassLoader.class.getClassLoader());
    164214
     
    169219        this.updatePolicy = policy;
    170220        this.resources = file.getResources();
     221
     222        this.mainClass = mainName;
    171223
    172224        // initialize extensions
     
    276328     */
    277329    public static JNLPClassLoader getInstance(JNLPFile file, UpdatePolicy policy) throws LaunchException {
     330        return getInstance(file, policy, null);
     331    }
     332
     333    /**
     334     * Returns a JNLP classloader for the specified JNLP file.
     335     *
     336     * @param file the file to load classes for
     337     * @param policy the update policy to use when downloading resources
     338     * @param mainName Overrides the main class name of the application
     339     */
     340    public static JNLPClassLoader getInstance(JNLPFile file, UpdatePolicy policy, String mainName) throws LaunchException {
    278341        JNLPClassLoader baseLoader = null;
    279342        JNLPClassLoader loader = null;
     
    292355                     !baseLoader.getJNLPFile().getFileLocation().equals(file.getFileLocation()))) {
    293356
    294                 loader = new JNLPClassLoader(file, policy);
     357                loader = new JNLPClassLoader(file, policy, mainName);
    295358
    296359                // New loader init may have caused extentions to create a
     
    304367
    305368                    loader.merge(extLoader);
     369                    extLoader.decrementLoaderUseCount(); // loader urls have been merged, ext loader is no longer used
    306370                }
    307371
     
    309373                // the baseLoader
    310374                if (baseLoader != null && baseLoader != loader) {
    311                     loader.merge(baseLoader);
     375                   loader.merge(baseLoader);
    312376                }
    313377
     
    316380                if (!file.isApplication()) {
    317381                    // If this is an applet, we do need to consider its loader
    318                     loader = new JNLPClassLoader(file, policy);
     382                   loader = new JNLPClassLoader(file, policy, mainName);
    319383
    320384                    if (baseLoader != null)
     
    330394        // loaders are mapped to a unique key. Only extensions and parent
    331395        // share a key, so it is safe to always share based on it
    332         urlToLoader.put(uniqueKey, loader);
     396       
     397        loader.incrementLoaderUseCount();
     398        synchronized(urlToLoader) {
     399            urlToLoader.put(uniqueKey, loader);
     400        }
    333401
    334402        return loader;
     
    342410     * @param version the file's version
    343411     * @param policy the update policy to use when downloading resources
    344      */
    345     public static JNLPClassLoader getInstance(URL location, String uniqueKey, Version version, UpdatePolicy policy)
     412     * @param mainName Overrides the main class name of the application
     413     */
     414    public static JNLPClassLoader getInstance(URL location, String uniqueKey, Version version, UpdatePolicy policy, String mainName)
    346415            throws IOException, ParseException, LaunchException {
    347416        JNLPClassLoader loader = urlToLoader.get(uniqueKey);
    348417
    349         if (loader == null || !location.equals(loader.getJNLPFile().getFileLocation()))
    350             loader = getInstance(new JNLPFile(location, uniqueKey, version, false, policy), policy);
     418        if (loader == null || !location.equals(loader.getJNLPFile().getFileLocation())) {
     419            JNLPFile jnlpFile = new JNLPFile(location, uniqueKey, version, false, policy);
     420
     421            loader = getInstance(jnlpFile, policy, mainName);
     422        }
    351423
    352424        return loader;
     
    362434
    363435        loaderList.add(this);
     436
     437        if (mainClass == null) {
     438            Object obj = file.getLaunchInfo();
     439
     440            if (obj instanceof ApplicationDesc) {
     441                ApplicationDesc ad = (ApplicationDesc) file.getLaunchInfo();
     442                mainClass = ad.getMainClass();
     443            } else if (obj instanceof AppletDesc) {
     444                AppletDesc ad = (AppletDesc) file.getLaunchInfo();
     445                mainClass = ad.getMainClass();
     446            }
     447        }
    364448
    365449        //if (ext != null) {
     
    367451            try {
    368452                String uniqueKey = this.getJNLPFile().getUniqueKey();
    369                 JNLPClassLoader loader = getInstance(ext[i].getLocation(), uniqueKey, ext[i].getVersion(), updatePolicy);
     453                JNLPClassLoader loader = getInstance(ext[i].getLocation(), uniqueKey, ext[i].getVersion(), updatePolicy, mainClass);
    370454                loaderList.add(loader);
    371455            } catch (Exception ex) {
     
    401485
    402486    /**
     487     * Check if a described jar file is invalid
     488     * @param jar the jar to check
     489     * @return true if file exists AND is an invalid jar, false otherwise
     490     */
     491    private boolean isInvalidJar(JARDesc jar){
     492        File cacheFile = tracker.getCacheFile(jar.getLocation());
     493        if (cacheFile == null)
     494            return false;//File cannot be retrieved, do not claim it is an invalid jar
     495        boolean isInvalid = false;
     496        try {
     497            JarFile jarFile = new JarFile(cacheFile.getAbsolutePath());
     498            jarFile.close();
     499        } catch (IOException ioe){
     500            //Catch a ZipException or any other read failure
     501            isInvalid = true;
     502        }
     503        return isInvalid;
     504    }
     505
     506    /**
     507     * Determine how invalid jars should be handled
     508     * @return whether to filter invalid jars, or error later on
     509     */
     510    private boolean shouldFilterInvalidJars(){
     511        if (file instanceof PluginBridge){
     512            PluginBridge pluginBridge = (PluginBridge)file;
     513            /*Ignore on applet, ie !useJNLPHref*/
     514            return !pluginBridge.useJNLPHref();
     515        }
     516        return false;//Error is default behaviour
     517    }
     518
     519    /**
    403520     * Load all of the JARs used in this JNLP file into the
    404521     * ResourceTracker for downloading.
    405522     */
    406523    void initializeResources() throws LaunchException {
     524        if (file instanceof PluginBridge){
     525            PluginBridge bridge = (PluginBridge)file;
     526
     527            for (String codeBaseFolder : bridge.getCodeBaseFolders()){
     528                try {
     529                    addToCodeBaseLoader(new URL(file.getCodeBase(), codeBaseFolder));
     530                } catch (MalformedURLException mfe) {
     531                    System.err.println("Problem trying to add folder to code base:");
     532                    System.err.println(mfe.getMessage());
     533                }
     534            }
     535        }
     536
    407537        JARDesc jars[] = resources.getJARs();
    408         if (jars == null || jars.length == 0)
     538
     539        if (jars == null || jars.length == 0) {
     540
     541            boolean allSigned = true;
     542            for (int i = 1; i < loaders.length; i++) {
     543                if (!loaders[i].getSigning()) {
     544                    allSigned = false;
     545                    break;
     546                }
     547            }
     548
     549            if(allSigned)
     550                signing = true;
     551
     552            //Check if main jar is found within extensions
     553            foundMainJar = foundMainJar || hasMainInExtensions();
     554
    409555            return;
     556        }
    410557        /*
    411558        if (jars == null || jars.length == 0) {
     
    429576                               );
    430577        }
     578       
     579        //If there are no eager jars, initialize the first jar
     580        if(initialJars.size() == 0)
     581            initialJars.add(jars[0]);
    431582
    432583        if (strict)
    433584            fillInPartJars(initialJars); // add in each initial part's lazy jars
    434585
     586        waitForJars(initialJars); //download the jars first.
     587
     588        //A ZipException will propagate later on if the jar is invalid and not checked here
     589        if (shouldFilterInvalidJars()){
     590            //We filter any invalid jars
     591            Iterator<JARDesc> iterator = initialJars.iterator();
     592            while (iterator.hasNext()){
     593                JARDesc jar = iterator.next();
     594                if (isInvalidJar(jar)) {
     595                    //Remove this jar as an available jar
     596                    iterator.remove();
     597                    tracker.removeResource(jar.getLocation());
     598                    available.remove(jar);
     599                }
     600            }
     601        }
     602
    435603        if (JNLPRuntime.isVerifying()) {
    436604
    437             JarSigner js;
    438             waitForJars(initialJars); //download the jars first.
     605            JarCertVerifier jcv;
    439606
    440607            try {
    441                 js = verifyJars(initialJars);
     608                jcv = verifyJars(initialJars);
    442609            } catch (Exception e) {
    443                 //we caught an Exception from the JarSigner class.
     610                //we caught an Exception from the JarCertVerifier class.
    444611                //Note: one of these exceptions could be from not being able
    445612                //to read the cacerts or trusted.certs files.
     
    450617
    451618            //Case when at least one jar has some signing
    452             if (js.anyJarsSigned() && js.isFullySignedByASingleCert()) {
     619            if (jcv.anyJarsSigned() && jcv.isFullySignedByASingleCert()) {
    453620                signing = true;
    454621
    455                 if (!js.allJarsSigned() &&
     622                if (!jcv.allJarsSigned() &&
    456623                                    !SecurityDialogs.showNotAllSignedWarningDialog(file))
    457624                    throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo"));
    458625
     626
     627                // Check for main class in the downloaded jars, and check/verify signed JNLP fill
     628                checkForMain(initialJars);
     629
     630                // If jar with main class was not found, check available resources
     631                while (!foundMainJar && available != null && available.size() != 0)
     632                    addNextResource();
     633
     634                // If the jar with main class was not found, check extension
     635                // jnlp's resources
     636                foundMainJar = foundMainJar || hasMainInExtensions();
     637
     638                // If jar with main class was not found and there are no more
     639                // available jars, throw a LaunchException
     640                if (file.getLaunchInfo() != null) {
     641                    if (!foundMainJar
     642                            && (available == null || available.size() == 0))
     643                        throw new LaunchException(file, null, R("LSFatal"),
     644                                R("LCClient"), R("LCantDetermineMainClass"),
     645                                R("LCantDetermineMainClassInfo"));
     646                }
     647
     648                // If main jar was found, but a signed JNLP file was not located
     649                if (!isSignedJNLP && foundMainJar)
     650                    file.setSignedJNLPAsMissing();
     651               
    459652                //user does not trust this publisher
    460                 if (!js.getAlreadyTrustPublisher()) {
    461                     checkTrustWithUser(js);
     653                if (!jcv.getAlreadyTrustPublisher()) {
     654                    checkTrustWithUser(jcv);
    462655                } else {
    463656                    /**
     
    476669        for (JARDesc jarDesc : file.getResources().getJARs()) {
    477670            try {
    478                 File cachedFile = tracker.getCacheFile(jarDesc.getLocation());
     671
     672                File cachedFile;
     673
     674                try {
     675                    cachedFile = tracker.getCacheFile(jarDesc.getLocation());
     676                } catch (IllegalResourceDescriptorException irde){
     677                    //Caused by ignored resource being removed due to not being valid
     678                    System.err.println("JAR " + jarDesc.getLocation() + " is not a valid jar file. Continuing.");
     679                    continue;
     680                }
    479681
    480682                if (cachedFile == null) {
     
    515717            }
    516718        }
    517 
    518719        activateJars(initialJars);
    519720    }
    520 
    521     private void checkTrustWithUser(JarSigner js) throws LaunchException {
    522         if (!js.getRootInCacerts()) { //root cert is not in cacerts
     721   
     722    /***
     723     * Checks for the jar that contains the main class. If the main class was
     724     * found, it checks to see if the jar is signed and whether it contains a
     725     * signed JNLP file
     726     *
     727     * @param jars Jars that are checked to see if they contain the main class
     728     * @throws LaunchException Thrown if the signed JNLP file, within the main jar, fails to be verified or does not match
     729     */
     730    private void checkForMain(List<JARDesc> jars) throws LaunchException {
     731
     732        // Check launch info
     733        if (mainClass == null) {
     734            LaunchDesc launchDesc = file.getLaunchInfo();
     735            if (launchDesc == null) {
     736                return;
     737            }
     738
     739            mainClass = launchDesc.getMainClass();
     740        }
     741
     742        // The main class may be specified in the manifest
     743
     744        // Check main jar
     745        if (mainClass == null) {
     746            JARDesc mainJarDesc = file.getResources().getMainJAR();
     747            mainClass = getMainClassName(mainJarDesc.getLocation());
     748        }
     749
     750        // Check first jar
     751        if (mainClass == null) {
     752            JARDesc firstJarDesc = jars.get(0);
     753            mainClass = getMainClassName(firstJarDesc.getLocation());
     754        }
     755
     756        // Still not found? Iterate and set if only 1 was found
     757        if (mainClass == null) {
     758
     759            for (JARDesc jarDesc: jars) {
     760                String mainClassInThisJar = getMainClassName(jarDesc.getLocation());
     761
     762                if (mainClassInThisJar != null) {
     763
     764                    if (mainClass == null) { // first main class
     765                        mainClass = mainClassInThisJar;
     766                    } else { // There is more than one main class. Set to null and break.
     767                        mainClass = null;
     768                        break;
     769                    }
     770                }
     771            }
     772        }
     773
     774        String desiredJarEntryName = mainClass + ".class";
     775
     776        for (int i = 0; i < jars.size(); i++) {
     777
     778            try {
     779                File localFile = tracker
     780                        .getCacheFile(jars.get(i).getLocation());
     781
     782                if (localFile == null) {
     783                    System.err.println("JAR " + jars.get(i).getLocation() + " not found. Continuing.");
     784                    continue; // JAR not found. Keep going.
     785                }
     786
     787                JarFile jarFile = new JarFile(localFile);
     788                Enumeration<JarEntry> entries = jarFile.entries();
     789                JarEntry je;
     790
     791                while (entries.hasMoreElements()) {
     792                    je = entries.nextElement();
     793                    String jeName = je.getName().replaceAll("/", ".");
     794                    if (jeName.equals(desiredJarEntryName)) {
     795                        foundMainJar = true;
     796                        verifySignedJNLP(jars.get(i), jarFile);
     797                        break;
     798                    }
     799                }
     800            } catch (IOException e) {
     801                /*
     802                 * After this exception is caught, it is escaped. This will skip
     803                 * the jarFile that may have thrown this exception and move on
     804                 * to the next jarFile (if there are any)
     805                 */
     806            }
     807        }
     808    }
     809
     810    /**
     811     * Gets the name of the main method if specified in the manifest
     812     *
     813     * @param location The JAR location
     814     * @return the main class name, null if there isn't one of if there was an error
     815     */
     816    private String getMainClassName(URL location) {
     817
     818        String mainClass = null;
     819        File f = tracker.getCacheFile(location);
     820
     821        if( f != null) {
     822            try {
     823                JarFile mainJar = new JarFile(f);
     824                mainClass = mainJar.getManifest().
     825                        getMainAttributes().getValue("Main-Class");
     826            } catch (IOException ioe) {
     827                mainClass = null;
     828            }
     829        }
     830
     831        return mainClass;
     832    }
     833
     834    /**
     835     * Returns true if this loader has the main jar
     836     */
     837    public boolean hasMainJar() {
     838        return this.foundMainJar;
     839    }
     840
     841    /**
     842     * Returns true if extension loaders have the main jar
     843     */
     844    private boolean hasMainInExtensions() {
     845        boolean foundMain = false;
     846
     847        for (int i = 1; i < loaders.length && !foundMain; i++) {
     848            foundMain = loaders[i].hasMainJar();
     849        }
     850
     851        return foundMain;
     852    }
     853
     854    /**
     855     * Is called by checkForMain() to check if the jar file is signed and if it
     856     * contains a signed JNLP file.
     857     *
     858     * @param jarDesc JARDesc of jar
     859     * @param jarFile the jar file
     860     * @throws LaunchException thrown if the signed JNLP file, within the main jar, fails to be verified or does not match
     861     */
     862    private void verifySignedJNLP(JARDesc jarDesc, JarFile jarFile)
     863            throws LaunchException {
     864
     865        JarCertVerifier signer = new JarCertVerifier();
     866        List<JARDesc> desc = new ArrayList<JARDesc>();
     867        desc.add(jarDesc);
     868
     869        // Initialize streams
     870        InputStream inStream = null;
     871        InputStreamReader inputReader = null;
     872        FileReader fr = null;
     873        InputStreamReader jnlpReader = null;
     874
     875        try {
     876            signer.verifyJars(desc, tracker);
     877
     878            if (signer.allJarsSigned()) { // If the jar is signed
     879
     880                Enumeration<JarEntry> entries = jarFile.entries();
     881                JarEntry je;
     882
     883                while (entries.hasMoreElements()) {
     884                    je = entries.nextElement();
     885                    String jeName = je.getName().toUpperCase();
     886
     887                    if (jeName.equals(TEMPLATE) || jeName.equals(APPLICATION)) {
     888
     889                        if (JNLPRuntime.isDebug())
     890                            System.err.println("Creating Jar InputStream from JarEntry");
     891
     892                        inStream = jarFile.getInputStream(je);
     893                        inputReader = new InputStreamReader(inStream);
     894
     895                        if (JNLPRuntime.isDebug())
     896                            System.err.println("Creating File InputStream from lauching JNLP file");
     897
     898                        JNLPFile jnlp = this.getJNLPFile();
     899                        URL url = jnlp.getFileLocation();
     900                        File jn = null;
     901
     902                        // If the file is on the local file system, use original path, otherwise find cached file
     903                        if (url.getProtocol().toLowerCase().equals("file"))
     904                            jn = new File(url.getPath());
     905                        else
     906                            jn = CacheUtil.getCacheFile(url, null);
     907
     908                        fr = new FileReader(jn);
     909                        jnlpReader = fr;
     910
     911                        // Initialize JNLPMatcher class
     912                        JNLPMatcher matcher;
     913
     914                        if (jeName.equals(APPLICATION)) { // If signed application was found
     915                            if (JNLPRuntime.isDebug())
     916                                System.err.println("APPLICATION.JNLP has been located within signed JAR. Starting verfication...");
     917                           
     918                            matcher = new JNLPMatcher(inputReader, jnlpReader, false);
     919                        } else { // Otherwise template was found
     920                            if (JNLPRuntime.isDebug())
     921                                System.err.println("APPLICATION_TEMPLATE.JNLP has been located within signed JAR. Starting verfication...");
     922                           
     923                            matcher = new JNLPMatcher(inputReader, jnlpReader,
     924                                    true);
     925                        }
     926
     927                        // If signed JNLP file does not matches launching JNLP file, throw JNLPMatcherException
     928                        if (!matcher.isMatch())
     929                            throw new JNLPMatcherException("Signed Application did not match launching JNLP File");
     930
     931                        this.isSignedJNLP = true;
     932                        if (JNLPRuntime.isDebug())
     933                            System.err.println("Signed Application Verification Successful");
     934
     935                        break;
     936                    }
     937                }
     938            }
     939        } catch (JNLPMatcherException e) {
     940
     941            /*
     942             * Throws LaunchException if signed JNLP file fails to be verified
     943             * or fails to match the launching JNLP file
     944             */
     945
     946            throw new LaunchException(file, null, R("LSFatal"), R("LCClient"),
     947                    R("LSignedJNLPFileDidNotMatch"), R(e.getMessage()));
     948
     949            /*
     950             * Throwing this exception will fail to initialize the application
     951             * resulting in the termination of the application
     952             */
     953
     954        } catch (Exception e) {
     955           
     956            if (JNLPRuntime.isDebug())
     957                e.printStackTrace(System.err);
     958
     959            /*
     960             * After this exception is caught, it is escaped. If an exception is
     961             * thrown while handling the jar file, (mainly for
     962             * JarCertVerifier.verifyJars) it assumes the jar file is unsigned and
     963             * skip the check for a signed JNLP file
     964             */
     965           
     966        } finally {
     967
     968            //Close all streams
     969            closeStream(inStream);
     970            closeStream(inputReader);
     971            closeStream(fr);
     972            closeStream(jnlpReader);
     973        }
     974
     975        if (JNLPRuntime.isDebug())
     976            System.err.println("Ending check for signed JNLP file...");
     977    }
     978
     979    /***
     980     * Closes a stream
     981     *
     982     * @param stream the stream that will be closed
     983     */
     984    private void closeStream (Closeable stream) {
     985        if (stream != null)
     986            try {
     987                stream.close();
     988            } catch (Exception e) {
     989                e.printStackTrace(System.err);
     990            }
     991    }
     992   
     993    private void checkTrustWithUser(JarCertVerifier jcv) throws LaunchException {
     994        if (JNLPRuntime.isTrustAll()){
     995            return;
     996        }
     997        if (!jcv.getRootInCacerts()) { //root cert is not in cacerts
    523998            boolean b = SecurityDialogs.showCertWarningDialog(
    524                     AccessType.UNVERIFIED, file, js);
     999                    AccessType.UNVERIFIED, file, jcv);
    5251000            if (!b)
    5261001                throw new LaunchException(null, null, R("LSFatal"),
    5271002                        R("LCLaunching"), R("LNotVerified"), "");
    528         } else if (js.getRootInCacerts()) { //root cert is in cacerts
     1003        } else if (jcv.getRootInCacerts()) { //root cert is in cacerts
    5291004            boolean b = false;
    530             if (js.noSigningIssues())
     1005            if (jcv.noSigningIssues())
    5311006                b = SecurityDialogs.showCertWarningDialog(
    532                         AccessType.VERIFIED, file, js);
    533             else if (!js.noSigningIssues())
     1007                        AccessType.VERIFIED, file, jcv);
     1008            else if (!jcv.noSigningIssues())
    5341009                b = SecurityDialogs.showCertWarningDialog(
    535                         AccessType.SIGNING_ERROR, file, js);
     1010                        AccessType.SIGNING_ERROR, file, jcv);
    5361011            if (!b)
    5371012                throw new LaunchException(null, null, R("LSFatal"),
     
    5831058     */
    5841059    protected PermissionCollection getPermissions(CodeSource cs) {
    585         Permissions result = new Permissions();
    586 
    587         // should check for extensions or boot, automatically give all
    588         // access w/o security dialog once we actually check certificates.
    589 
    590         // copy security permissions from SecurityDesc element
    591         if (security != null) {
    592             // Security desc. is used only to track security settings for the
    593             // application. However, an application may comprise of multiple
    594             // jars, and as such, security must be evaluated on a per jar basis.
    595 
    596             // set default perms
    597             PermissionCollection permissions = security.getSandBoxPermissions();
    598 
    599             // If more than default is needed:
    600             // 1. Code must be signed
    601             // 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
    602             if (cs.getCodeSigners() != null &&
    603                     (getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.ALL_PERMISSIONS) ||
    604                      getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.J2EE_PERMISSIONS))) {
    605 
    606                 permissions = getCodeSourceSecurity(cs.getLocation()).getPermissions(cs);
    607             }
    608 
    609             Enumeration<Permission> e = permissions.elements();
    610             while (e.hasMoreElements())
    611                 result.add(e.nextElement());
    612         }
    613 
    614         // add in permission to read the cached JAR files
    615         for (int i = 0; i < resourcePermissions.size(); i++)
    616             result.add(resourcePermissions.get(i));
    617 
    618         // add in the permissions that the user granted.
    619         for (int i = 0; i < runtimePermissions.size(); i++)
    620             result.add(runtimePermissions.get(i));
    621 
    622         return result;
     1060        try {
     1061            Permissions result = new Permissions();
     1062
     1063            // should check for extensions or boot, automatically give all
     1064            // access w/o security dialog once we actually check certificates.
     1065
     1066            // copy security permissions from SecurityDesc element
     1067            if (security != null) {
     1068                // Security desc. is used only to track security settings for the
     1069                // application. However, an application may comprise of multiple
     1070                // jars, and as such, security must be evaluated on a per jar basis.
     1071
     1072                // set default perms
     1073                PermissionCollection permissions = security.getSandBoxPermissions();
     1074
     1075                // If more than default is needed:
     1076                // 1. Code must be signed
     1077                // 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
     1078                if (cs == null) {
     1079                    throw new NullPointerException("Code source was null");
     1080                }
     1081                if (cs.getCodeSigners() != null) {
     1082                    if (cs.getLocation() == null) {
     1083                        throw new NullPointerException("Code source location was null");
     1084                    }
     1085                    if (getCodeSourceSecurity(cs.getLocation()) == null) {
     1086                        throw new NullPointerException("Code source security was null");
     1087                    }
     1088                    if (getCodeSourceSecurity(cs.getLocation()).getSecurityType() == null) {
     1089                        if (JNLPRuntime.isDebug()){
     1090                        new NullPointerException("Warning! Code source security type was null").printStackTrace();
     1091                        }
     1092                    }
     1093                    Object securityType = getCodeSourceSecurity(cs.getLocation()).getSecurityType();
     1094                    if (SecurityDesc.ALL_PERMISSIONS.equals(securityType)
     1095                            || SecurityDesc.J2EE_PERMISSIONS.equals(securityType)) {
     1096
     1097                        permissions = getCodeSourceSecurity(cs.getLocation()).getPermissions(cs);
     1098                    }
     1099                }
     1100
     1101                Enumeration<Permission> e = permissions.elements();
     1102                while (e.hasMoreElements()) {
     1103                    result.add(e.nextElement());
     1104                }
     1105            }
     1106
     1107            // add in permission to read the cached JAR files
     1108            for (int i = 0; i < resourcePermissions.size(); i++) {
     1109                result.add(resourcePermissions.get(i));
     1110            }
     1111
     1112            // add in the permissions that the user granted.
     1113            for (int i = 0; i < runtimePermissions.size(); i++) {
     1114                result.add(runtimePermissions.get(i));
     1115            }
     1116
     1117            // Class from host X should be allowed to connect to host X
     1118            if (cs.getLocation().getHost().length() > 0)
     1119                result.add(new SocketPermission(cs.getLocation().getHost(),
     1120                        "connect, accept"));
     1121
     1122            return result;
     1123        } catch (RuntimeException ex) {
     1124            if (JNLPRuntime.isDebug()) {
     1125                ex.printStackTrace();
     1126            }
     1127            throw ex;
     1128        }
    6231129    }
    6241130
     
    7191225                                    }
    7201226
    721                                     JarSigner signer = new JarSigner();
     1227                                    JarCertVerifier signer = new JarCertVerifier();
    7221228                                    List<JARDesc> jars = new ArrayList<JARDesc>();
    7231229                                    JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false);
     
    7801286                            JarFile jarFile = new JarFile(localFile.getAbsolutePath());
    7811287                            Manifest mf = jarFile.getManifest();
    782                             classpaths.addAll(getClassPathsFromManifest(mf, jar.getLocation().getPath()));
     1288
     1289                            // Only check classpath if this is the plugin and there is no jnlp_href usage.
     1290                            // Note that this is different from proprietary plugin behaviour.
     1291                            // If jnlp_href is used, the app should be treated similarly to when
     1292                            // it is run from javaws as a webstart.
     1293                            if (file instanceof PluginBridge && !((PluginBridge) file).useJNLPHref()) {
     1294                                classpaths.addAll(getClassPathsFromManifest(mf, jar.getLocation().getPath()));
     1295                            }
     1296
    7831297                            JarIndex index = JarIndex.getJarIndex(jarFile, null);
    7841298                            if (index != null)
     
    9641478         * @param jars the jars to be verified.
    9651479         */
    966     private JarSigner verifyJars(List<JARDesc> jars) throws Exception {
    967 
    968         js = new JarSigner();
    969         js.verifyJars(jars, tracker);
    970         return js;
     1480    private JarCertVerifier verifyJars(List<JARDesc> jars) throws Exception {
     1481
     1482        jcv = new JarCertVerifier();
     1483        jcv.verifyJars(jars, tracker);
     1484        return jcv;
    9711485    }
    9721486
     
    9781492            Class result = null;
    9791493
    980             if (loaders[i] == this)
    981                 result = super.findLoadedClass(name);
    982             else
     1494            if (loaders[i] == this) {
     1495                final String fName = name;
     1496                try {
     1497                    result = AccessController.doPrivileged(
     1498                            new PrivilegedExceptionAction<Class<?>>() {
     1499                                public Class<?> run() {
     1500                                    return JNLPClassLoader.super.findLoadedClass(fName);
     1501                                }
     1502                            }, getAccessControlContextForClassLoading());
     1503                } catch (PrivilegedActionException pae) {
     1504                    result = null;
     1505                }
     1506            } else {
    9831507                result = loaders[i].findLoadedClassAll(name);
     1508            }
    9841509
    9851510            if (result != null)
     
    10951620     * @param desc the JARDesc for the new jar
    10961621     */
    1097     private void addNewJar(JARDesc desc) {
     1622    private void addNewJar(final JARDesc desc) {
    10981623
    10991624        available.add(desc);
     
    11051630                );
    11061631
    1107         URL remoteURL = desc.getLocation();
    1108         URL cachedUrl = tracker.getCacheURL(remoteURL);
    1109         addURL(remoteURL);
    1110         CachedJarFileCallback.getInstance().addMapping(remoteURL, cachedUrl);
     1632        // Give read permissions to the cached jar file
     1633        AccessController.doPrivileged(new PrivilegedAction<Void>() {
     1634            public Void run() {
     1635                Permission p = CacheUtil.getReadPermission(desc.getLocation(),
     1636                        desc.getVersion());
     1637
     1638                resourcePermissions.add(p);
     1639
     1640                return null;
     1641            }
     1642        });
     1643
     1644        final URL remoteURL = desc.getLocation();
     1645        final URL cachedUrl = tracker.getCacheURL(remoteURL); // blocks till download
     1646
     1647        available.remove(desc); // Resource downloaded. Remove from available list.
     1648       
     1649        try {
     1650
     1651            // Verify if needed
     1652
     1653            final JarCertVerifier signer = new JarCertVerifier();
     1654            final List<JARDesc> jars = new ArrayList<JARDesc>();
     1655            jars.add(desc);
     1656
     1657            // Decide what level of security this jar should have
     1658            // The verification and security setting functions rely on
     1659            // having AllPermissions as those actions normally happen
     1660            // during initialization. We therefore need to do those
     1661            // actions as privileged.
     1662
     1663            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
     1664                public Void run() throws Exception {
     1665                    signer.verifyJars(jars, tracker);
     1666
     1667                    if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) {
     1668                        checkTrustWithUser(signer);
     1669                    }
     1670
     1671                    final SecurityDesc security;
     1672                    if (signer.anyJarsSigned()) {
     1673                        security = new SecurityDesc(file,
     1674                                SecurityDesc.ALL_PERMISSIONS,
     1675                                file.getCodeBase().getHost());
     1676                    } else {
     1677                        security = new SecurityDesc(file,
     1678                                SecurityDesc.SANDBOX_PERMISSIONS,
     1679                                file.getCodeBase().getHost());
     1680                    }
     1681
     1682                    jarLocationSecurityMap.put(remoteURL, security);
     1683
     1684                    return null;
     1685                }
     1686            });
     1687
     1688            addURL(remoteURL);
     1689            CachedJarFileCallback.getInstance().addMapping(remoteURL, cachedUrl);
     1690
     1691        } catch (Exception e) {
     1692            // Do nothing. This code is called by loadClass which cannot
     1693            // throw additional exceptions. So instead, just ignore it.
     1694            // Exception => jar will not get added to classpath, which will
     1695            // result in CNFE from loadClass.
     1696            e.printStackTrace();
     1697        }
    11111698    }
    11121699
     
    11171704        for (int i = 0; i < loaders.length; i++) {
    11181705            try {
    1119                 if (loaders[i] == this)
    1120                     return super.findClass(name);
    1121                 else
     1706                if (loaders[i] == this) {
     1707                    final String fName = name;
     1708                    return AccessController.doPrivileged(
     1709                            new PrivilegedExceptionAction<Class<?>>() {
     1710                                public Class<?> run() throws ClassNotFoundException {
     1711                                    return JNLPClassLoader.super.findClass(fName);
     1712                                }
     1713                            }, getAccessControlContextForClassLoading());
     1714                } else {
    11221715                    return loaders[i].findClass(name);
     1716                }
    11231717            } catch (ClassNotFoundException ex) {
    11241718            } catch (ClassFormatError cfe) {
     1719            } catch (PrivilegedActionException pae) {
    11251720            }
    11261721        }
     
    11281723        // Try codebase loader
    11291724        if (codeBaseLoader != null)
    1130             return codeBaseLoader.findClass(name);
    1131        
     1725            return codeBaseLoader.findClass(name, true);
     1726
    11321727        // All else failed. Throw CNFE
    11331728        throw new ClassNotFoundException(name);
     
    11511746        // add resources until found
    11521747        while (true) {
    1153             JNLPClassLoader addedTo = addNextResource();
     1748            JNLPClassLoader addedTo = null;
     1749           
     1750            try {
     1751                addedTo = addNextResource();
     1752            } catch (LaunchException e) {
     1753
     1754                /*
     1755                 * This method will never handle any search for the main class
     1756                 * [It is handled in initializeResources()]. Therefore, this
     1757                 * exception will never be thrown here and is escaped
     1758                 */
     1759
     1760                throw new IllegalStateException(e);
     1761            }
    11541762
    11551763            if (addedTo == null)
     
    11661774     * Finds the resource in this, the parent, or the extension
    11671775     * class loaders.
    1168      */
    1169     public URL getResource(String name) {
    1170         URL result = super.getResource(name);
    1171 
    1172         for (int i = 1; i < loaders.length; i++)
    1173             if (result == null)
    1174                 result = loaders[i].getResource(name);
     1776     *
     1777     * @return a <code>URL</code> for the resource, or <code>null</code>
     1778     * if the resource could not be found.
     1779     */
     1780    @Override
     1781    public URL findResource(String name) {
     1782        URL result = null;
     1783
     1784        try {
     1785            Enumeration<URL> e = findResources(name);
     1786            if (e.hasMoreElements()) {
     1787                result = e.nextElement();
     1788            }
     1789        } catch (IOException e) {
     1790            if (JNLPRuntime.isDebug()) {
     1791                e.printStackTrace();
     1792            }
     1793        }
    11751794       
    11761795        // If result is still null, look in the codebase loader
    11771796        if (result == null && codeBaseLoader != null)
    1178             result = codeBaseLoader.getResource(name);
     1797            result = codeBaseLoader.findResource(name);
    11791798
    11801799        return result;
     
    11821801
    11831802    /**
    1184      * Finds the resource in this, the parent, or the extension
    1185      * class loaders.
     1803     * Find the resources in this, the parent, or the extension
     1804     * class loaders. Load lazy resources if not found in current resources.
    11861805     */
    11871806    @Override
    11881807    public Enumeration<URL> findResources(String name) throws IOException {
    1189         Vector<URL> resources = new Vector<URL>();
    1190         Enumeration<URL> e;
     1808        Enumeration<URL> resources = findResourcesBySearching(name);
     1809
     1810        try {
     1811            // if not found, load all lazy resources; repeat search
     1812            while (!resources.hasMoreElements() && addNextResource() != null) {
     1813                resources = findResourcesBySearching(name);
     1814            }
     1815        } catch (LaunchException le) {
     1816            le.printStackTrace();
     1817        }
     1818
     1819        return resources;
     1820    }
     1821
     1822    /**
     1823     * Find the resources in this, the parent, or the extension
     1824     * class loaders.
     1825     */
     1826    private Enumeration<URL> findResourcesBySearching(String name) throws IOException {
     1827        List<URL> resources = new ArrayList<URL>();
     1828        Enumeration<URL> e = null;
    11911829
    11921830        for (int i = 0; i < loaders.length; i++) {
    1193 
    1194             if (loaders[i] == this)
    1195                 e = super.findResources(name);
    1196             else
     1831            // TODO check if this will blow up or not
     1832            // if loaders[1].getResource() is called, wont it call getResource() on
     1833            // the original caller? infinite recursion?
     1834
     1835            if (loaders[i] == this) {
     1836                final String fName = name;
     1837                try {
     1838                    e = AccessController.doPrivileged(
     1839                            new PrivilegedExceptionAction<Enumeration<URL>>() {
     1840                                public Enumeration<URL> run() throws IOException {
     1841                                    return JNLPClassLoader.super.findResources(fName);
     1842                                }
     1843                            }, getAccessControlContextForClassLoading());
     1844                } catch (PrivilegedActionException pae) {
     1845                }
     1846            } else {
    11971847                e = loaders[i].findResources(name);
    1198 
    1199             while (e.hasMoreElements())
    1200                 resources.add(e.nextElement());
     1848            }
     1849
     1850            final Enumeration<URL> fURLEnum = e;
     1851            try {
     1852                resources.addAll(AccessController.doPrivileged(
     1853                    new PrivilegedExceptionAction<Collection<URL>>() {
     1854                        public Collection<URL> run() {
     1855                            List<URL> resources = new ArrayList<URL>();
     1856                            while (fURLEnum != null && fURLEnum.hasMoreElements()) {
     1857                                resources.add(fURLEnum.nextElement());
     1858                            }
     1859                            return resources;
     1860                        }
     1861                    }, getAccessControlContextForClassLoading()));
     1862            } catch (PrivilegedActionException pae) {
     1863            }
    12011864        }
    12021865
     
    12091872        }
    12101873
    1211         return resources.elements();
     1874        return Collections.enumeration(resources);
    12121875    }
    12131876
     
    12421905     *
    12431906     * @return the classloader that resources were added to, or null
    1244      */
    1245     protected JNLPClassLoader addNextResource() {
     1907     * @throws LaunchException Thrown if the signed JNLP file, within the main jar, fails to be verified or does not match
     1908     */
     1909    protected JNLPClassLoader addNextResource() throws LaunchException {
    12461910        if (available.size() == 0) {
    12471911            for (int i = 1; i < loaders.length; i++) {
     
    12591923
    12601924        fillInPartJars(jars);
     1925        checkForMain(jars);
    12611926        activateJars(jars);
    12621927
     
    13061971
    13071972    protected SecurityDesc getCodeSourceSecurity(URL source) {
    1308         return jarLocationSecurityMap.get(source);
     1973        SecurityDesc sec=jarLocationSecurityMap.get(source);
     1974        if (sec == null && !alreadyTried.contains(source)) {
     1975            alreadyTried.add(source);
     1976            //try to load the jar which is requesting the permissions, but was NOT downloaded by standard way
     1977            if (JNLPRuntime.isDebug()) {
     1978                System.out.println("Application is trying to get permissions for " + source.toString() + ", which was not added by standard way. Trying to download and verify!");
     1979            }
     1980            try {
     1981                JARDesc des = new JARDesc(source, null, null, false, false, false, false);
     1982                addNewJar(des);
     1983                sec = jarLocationSecurityMap.get(source);
     1984            } catch (Throwable t) {
     1985                if (JNLPRuntime.isDebug()) {
     1986                    t.printStackTrace();
     1987                }
     1988                sec = null;
     1989            }
     1990        }
     1991        if (sec == null){
     1992            System.out.println(Translator.R("LNoSecInstance",source.toString()));
     1993        }
     1994        return sec;
    13091995    }
    13101996
     
    13472033     */
    13482034    private void addToCodeBaseLoader(URL u) {
     2035        if (u == null) {
     2036            return;
     2037        }
    13492038
    13502039        // Only paths may be added
     
    14032092        return result;
    14042093    }
     2094   
     2095    /**
     2096     * Increments loader use count by 1
     2097     *
     2098     * @throws SecurityException if caller is not trusted
     2099     */
     2100    private synchronized void incrementLoaderUseCount() {
     2101       
     2102        // For use by trusted code only
     2103        if (System.getSecurityManager() != null)
     2104            System.getSecurityManager().checkPermission(new AllPermission());
     2105       
     2106        useCount++;
     2107    }
     2108
     2109    /**
     2110     * Decrements loader use count by 1
     2111     *
     2112     * If count reaches 0, loader is removed from list of available loaders
     2113     *
     2114     * @throws SecurityException if caller is not trusted
     2115     */
     2116    public synchronized void decrementLoaderUseCount() {
     2117
     2118        // For use by trusted code only
     2119        if (System.getSecurityManager() != null)
     2120            System.getSecurityManager().checkPermission(new AllPermission());
     2121
     2122        useCount--;
     2123
     2124        if (useCount <= 0) {
     2125            synchronized(urlToLoader) {
     2126                urlToLoader.remove(file.getUniqueKey());
     2127            }
     2128        }
     2129    }
     2130
     2131    /**
     2132     * Returns an appropriate AccessControlContext for loading classes in
     2133     * the running instance.
     2134     *
     2135     * The default context during class-loading only allows connection to
     2136     * codebase. However applets are allowed to load jars from arbitrary
     2137     * locations and the codebase only access falls short if a class from
     2138     * one location needs a class from another.
     2139     *
     2140     * Given protected access since CodeBaseClassloader uses this function too.
     2141     *
     2142     * @return The appropriate AccessControlContext for loading classes for this instance
     2143     */
     2144    public AccessControlContext getAccessControlContextForClassLoading() {
     2145        AccessControlContext context = AccessController.getContext();
     2146
     2147        try {
     2148            context.checkPermission(new AllPermission());
     2149            return context; // If context already has all permissions, don't bother
     2150        } catch (AccessControlException ace) {
     2151            // continue below
     2152        } catch (ClassCircularityError cce) {
     2153            // continue below
     2154        }
     2155
     2156        // Since this is for class-loading, technically any class from one jar
     2157        // should be able to access a class from another, therefore making the
     2158        // original context code source irrelevant
     2159        PermissionCollection permissions = this.security.getSandBoxPermissions();
     2160
     2161        // Local cache access permissions
     2162        for (Permission resourcePermission : resourcePermissions) {
     2163            permissions.add(resourcePermission);
     2164        }
     2165
     2166        // Permissions for all remote hosting urls
     2167        for (URL u: jarLocationSecurityMap.keySet()) {
     2168            permissions.add(new SocketPermission(u.getHost(),
     2169                                                 "connect, accept"));
     2170        }
     2171
     2172        // Permissions for codebase urls (if there is a loader)
     2173        if (codeBaseLoader != null) {
     2174            for (URL u : codeBaseLoader.getURLs()) {
     2175                permissions.add(new SocketPermission(u.getHost(),
     2176                        "connect, accept"));
     2177            }
     2178        }
     2179
     2180        ProtectionDomain pd = new ProtectionDomain(null, permissions);
     2181
     2182        return new AccessControlContext(new ProtectionDomain[] { pd });
     2183    }
    14052184
    14062185    /*
     
    14122191        JNLPClassLoader parentJNLPClassLoader;
    14132192       
     2193        /**
     2194         * Classes that are not found, so that findClass can skip them next time
     2195         */
     2196        ConcurrentHashMap<String, URL[]> notFoundResources = new ConcurrentHashMap<String, URL[]>();
     2197
    14142198        public CodeBaseClassLoader(URL[] urls, JNLPClassLoader cl) {
    14152199            super(urls);
     
    14232207
    14242208        @Override
    1425         public Class<?> findClass(String name) throws ClassNotFoundException {
    1426             return super.findClass(name);
     2209        public Class<?> findClass(String name) throws ClassNotFoundException {
     2210            return findClass(name, false);
     2211        }
     2212
     2213        public Class<?> findClass(String name, boolean recursivelyInvoked) throws ClassNotFoundException {
     2214
     2215            if (!recursivelyInvoked) {
     2216                try {
     2217                    return parentJNLPClassLoader.findClass(name);
     2218                } catch (ClassNotFoundException cnfe) {
     2219                    // continue
     2220                }
     2221            }
     2222
     2223            // If we have searched this path before, don't try again
     2224            if (Arrays.equals(super.getURLs(), notFoundResources.get(name)))
     2225                throw new ClassNotFoundException(name);
     2226
     2227            try {
     2228                final String fName = name;
     2229                return AccessController.doPrivileged(
     2230                        new PrivilegedExceptionAction<Class<?>>() {
     2231                            public Class<?> run() throws ClassNotFoundException {
     2232                                return CodeBaseClassLoader.super.findClass(fName);
     2233                            }
     2234                        }, parentJNLPClassLoader.getAccessControlContextForClassLoading());
     2235            } catch (PrivilegedActionException pae) {
     2236                notFoundResources.put(name, super.getURLs());
     2237                throw new ClassNotFoundException("Could not find class " + name);
     2238            }
    14272239        }
    14282240
     
    14512263        @Override
    14522264        public Enumeration<URL> findResources(String name) throws IOException {
     2265
     2266            // If we have searched this path before, don't try again
     2267            if (Arrays.equals(super.getURLs(), notFoundResources.get(name)))
     2268                return (new Vector<URL>(0)).elements();
     2269
    14532270            if (!name.startsWith("META-INF")) {
    1454                 return super.findResources(name);
    1455             }
     2271                Enumeration<URL> urls = super.findResources(name);
     2272
     2273                if (!urls.hasMoreElements()) {
     2274                    notFoundResources.put(name, super.getURLs());
     2275                }
     2276
     2277                return urls;
     2278            }
     2279
    14562280            return (new Vector<URL>(0)).elements();
    14572281        }
     
    14592283        @Override
    14602284        public URL findResource(String name) {
     2285
     2286            // If we have searched this path before, don't try again
     2287            if (Arrays.equals(super.getURLs(), notFoundResources.get(name)))
     2288                return null;
     2289
     2290            URL url = null;
    14612291            if (!name.startsWith("META-INF")) {
    1462                 return super.findResource(name);
    1463             }
     2292                try {
     2293                    final String fName = name;
     2294                    url = AccessController.doPrivileged(
     2295                            new PrivilegedExceptionAction<URL>() {
     2296                                public URL run() {
     2297                                    return CodeBaseClassLoader.super.findResource(fName);
     2298                                }
     2299                            }, parentJNLPClassLoader.getAccessControlContextForClassLoading());
     2300                } catch (PrivilegedActionException pae) {
     2301                }
     2302
     2303                if (url == null) {
     2304                    notFoundResources.put(name, super.getURLs());
     2305                }
     2306
     2307                return url;
     2308            }
     2309
    14642310            return null;
    14652311        }
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java

    r348 r416  
    3030import javax.naming.ConfigurationException;
    3131import javax.net.ssl.HttpsURLConnection;
     32import javax.net.ssl.KeyManagerFactory;
    3233import javax.net.ssl.SSLContext;
    3334import javax.net.ssl.SSLSocketFactory;
     
    9495    private static UpdatePolicy updatePolicy = UpdatePolicy.ALWAYS;
    9596
    96     /** netx window icon */
    97     private static Image windowIcon = null;
    98 
    9997    /** whether initialized */
    10098    private static boolean initialized = false;
     
    124122    private static boolean forksAllowed = true;
    125123
     124    /** all security dialogs will be consumed and pretented as beeing verified by user and allowed.*/
     125    private static boolean trustAll=false;
     126
    126127    /** contains the arguments passed to the jnlp runtime */
    127128    private static List<String> initialArguments;
     
    132133    public static final String STDERR_FILE = "java.stderr";
    133134    public static final String STDOUT_FILE = "java.stdout";
     135
    134136
    135137    /**
     
    184186            checkHeadless();
    185187
    186         if (!headless && windowIcon == null)
    187             loadWindowIcon();
    188 
    189188        if (!headless && indicator == null)
    190189            indicator = new DefaultDownloadIndicator();
     
    192191        if (handler == null) {
    193192            if (headless) {
    194                 handler = new DefaultLaunchHandler();
     193                handler = new DefaultLaunchHandler(System.err);
    195194            } else {
    196                 handler = new GuiLaunchHandler();
     195                handler = new GuiLaunchHandler(System.err);
    197196            }
    198197        }
     
    222221            SSLSocketFactory sslSocketFactory;
    223222            SSLContext context = SSLContext.getInstance("SSL");
     223            KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS);
     224            KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
     225            kmf.init(ks, KeyStores.getPassword());
    224226            TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() };
    225             context.init(null, trust, null);
     227            context.init(kmf.getKeyManagers(), trust, null);
    226228            sslSocketFactory = context.getSocketFactory();
    227229
     
    326328    public static boolean isWebstartApplication() {
    327329        return isWebstartApplication;
    328     }
    329 
    330     /**
    331      * Returns the window icon.
    332      */
    333     public static Image getWindowIcon() {
    334         return windowIcon;
    335     }
    336 
    337     /**
    338      * Sets the window icon that is displayed in Java applications
    339      * and applets instead of the default Java icon.
    340      *
    341      * @throws IllegalStateException if caller is not the exit class
    342      */
    343     public static void setWindowIcon(Image image) {
    344         checkExitClass();
    345         windowIcon = image;
    346330    }
    347331
     
    611595        } catch (Exception ex) {
    612596            throw new IllegalStateException("Missing resource bundle in netx.jar:net/sourceforge/jnlp/resource/Messages.properties");
    613         }
    614     }
    615 
    616     /**
    617      * Load the window icon.
    618      */
    619     private static void loadWindowIcon() {
    620         if (windowIcon != null)
    621             return;
    622 
    623         try {
    624             windowIcon = new javax.swing.ImageIcon((new sun.misc.Launcher())
    625                         .getClassLoader().getResource("net/sourceforge/jnlp/resources/netx-icon.png")).getImage();
    626         } catch (Exception ex) {
    627             if (JNLPRuntime.isDebug())
    628                 ex.printStackTrace();
    629597        }
    630598    }
     
    733701    }
    734702
     703    static void setTrustAll(boolean b) {
     704        trustAll=b;
     705    }
     706
     707    public static boolean isTrustAll() {
     708        return trustAll;
     709    }
     710
    735711}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java

    r348 r416  
    282282            //            }
    283283
    284             try {
    285                 super.checkPermission(perm);
    286             } catch (SecurityException se) {
    287 
    288                 //This section is a special case for dealing with SocketPermissions.
    289                 if (JNLPRuntime.isDebug())
    290                     System.err.println("Requesting permission: " + perm.toString());
    291 
    292                 //Change this SocketPermission's action to connect and accept
    293                 //(and resolve). This is to avoid asking for connect permission
    294                 //on every address resolve.
    295                 Permission tmpPerm = null;
    296                 if (perm instanceof SocketPermission) {
    297                     tmpPerm = new SocketPermission(perm.getName(),
    298                                                         SecurityConstants.SOCKET_CONNECT_ACCEPT_ACTION);
    299 
    300                     // before proceeding, check if we are trying to connect to same origin
    301                     ApplicationInstance app = getApplication();
    302                     JNLPFile file = app.getJNLPFile();
    303 
    304                     String srcHost = file.getSourceLocation().getAuthority();
    305                     String destHost = name;
    306 
    307                     // host = abc.xyz.com or abc.xyz.com:<port>
    308                     if (destHost.indexOf(':') >= 0)
    309                         destHost = destHost.substring(0, destHost.indexOf(':'));
    310 
    311                     // host = abc.xyz.com
    312                     String[] hostComponents = destHost.split("\\.");
    313 
    314                     int length = hostComponents.length;
    315                     if (length >= 2) {
    316 
    317                         // address is in xxx.xxx.xxx format
    318                         destHost = hostComponents[length - 2] + "." + hostComponents[length - 1];
    319 
    320                         // host = xyz.com i.e. origin
    321                         boolean isDestHostName = false;
    322 
    323                         // make sure that it is not an ip address
    324                         try {
    325                             Integer.parseInt(hostComponents[length - 1]);
    326                         } catch (NumberFormatException e) {
    327                             isDestHostName = true;
    328                         }
    329 
    330                         if (isDestHostName) {
    331                             // okay, destination is hostname. Now figure out if it is a subset of origin
    332                             if (srcHost.endsWith(destHost)) {
    333                                 addPermission(tmpPerm);
    334                                 return;
    335                             }
    336                         }
    337                     }
    338                 } else {
    339                     tmpPerm = perm;
    340                 }
    341 
    342                 if (tmpPerm != null) {
    343                     //askPermission will only prompt the user on SocketPermission
    344                     //meaning we're denying all other SecurityExceptions that may arise.
    345                     if (askPermission(tmpPerm)) {
    346                         addPermission(tmpPerm);
    347                         //return quietly.
    348                     } else {
    349                         throw se;
    350                     }
    351                 }
    352             }
     284            super.checkPermission(perm);
    353285        } catch (SecurityException ex) {
    354286            if (JNLPRuntime.isDebug()) {
     
    418350            app.addWindow(w);
    419351        }
    420 
    421         // change coffee cup to netx for default icon
    422         if (window instanceof Window)
    423             for (Window w = (Window) window; w != null; w = w.getOwner())
    424                 if (window instanceof Frame)
    425                     ((Frame) window).setIconImage(JNLPRuntime.getWindowIcon());
    426352
    427353        // todo: set awt.appletWarning to custom message
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/runtime/pac-funcs.js

    r348 r416  
    326326 */
    327327function dateRange() {
    328 
    329     // note: watch out for wrapping around of dates. date ranges, like
    330     // month=9 to month=8, wrap around and cover the entire year. this
    331     // makes everything more interesting
    332 
    333     var gmt;
    334         if (arguments.length > 1) {
    335                 if (arguments[arguments.length-1] === "GMT") {
    336                         gmt = true;
    337             arguments.splice(0,arguments.length-1);
    338         }
    339         }
     328    switch (arguments.length) {
     329       case 1: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0]);
     330       case 2: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1]);
     331       case 3: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2]);
     332       case 4: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3]);
     333       case 5: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]);
     334       case 6: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);
     335       case 7: return isDateInRange_internallForIcedTeaWebTesting(new Date(),arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]); //GMT
     336       default:
     337           return false;
     338    }
     339}
     340
     341function isDateInRange_internallForIcedTeaWebTesting() {
    340342
    341343    function isDate(date) {
     
    414416
    415417    function inYearRange(today, year1, year2) {
    416         if (year1 <= today.getYear() && today.getYear() <= year2) {
     418        if (year1 <= today.getFullYear() && today.getFullYear() <= year2) {
    417419            return true;
    418420        } else {
     
    481483    function inYearMonthRange(today, month1, year1, month2, year2) {
    482484        if (year1 === year2) {
    483             if (today.getYear() === year1) {
     485            if (today.getFullYear() === year1) {
    484486               if (month1 <= today.getMonth() && today.getMonth() <= month2) {
    485487                   return true;
     
    492494        }
    493495        if (year1 < year2) {
    494             if (year1 <= today.getYear() && today.getYear() <= year2) {
    495                 if (today.getYear() === year1) {
     496            if (year1 <= today.getFullYear() && today.getFullYear() <= year2) {
     497                if (today.getFullYear() === year1) {
    496498                    if (today.getMonth() >= month1) {
    497499                        return true;
     
    499501                        return false;
    500502                    }
    501                 } else if (today.getYear() === year2) {
     503                } else if (today.getFullYear() === year2) {
    502504                    if (today.getMonth() <= month2) {
    503505                        return true;
     
    514516            return false;
    515517        }
    516 
    517518    }
    518519
    519520    function inYearMonthDateRange(today, date1, month1, year1, date2, month2, year2) {
    520521        if (year1 === year2) {
    521             if (year1 === today.getYear()) {
     522            if (year1 === today.getFullYear()) {
    522523                if ((month1 <= today.getMonth()) && (today.getMonth() <= month2)) {
    523524                    if (month1 === month2) {
     
    549550            }
    550551        } else if (year1 < year2) {
    551             if (year1 <= today.getYear() && today.getYear() <= year2) {
    552                 if (today.getYear() === year1) {
     552            if (year1 <= today.getFullYear() && today.getFullYear() <= year2) {
     553                if (today.getFullYear() === year1) {
    553554                    if (today.getMonth() === month1) {
    554555                        if (today.getDate() >= date1) {
     
    562563                        return false;
    563564                    }
    564                 } else if (today.getYear() === year2) {
    565                     if (today.getMonth() <= month2) {
    566 
    567                     } else {
    568                         return true;
    569                     }
    570                 } else {
    571                     return true;
    572                 }
    573             } else {
    574                 return false;
    575             }
    576         } else {
    577             return false;
    578         }
    579     }
    580 
     565                } else if (today.getFullYear() === year2) {
     566                    if (today.getMonth() === month2) {
     567                        if (today.getDate() <= date1) {
     568                            return true;
     569                        } else {
     570                            return false;
     571                        }
     572                    } else if (today.getMonth() < month2) {
     573                        return true;
     574                    } else {
     575                        return false;
     576                    }
     577                } else {
     578                    return true;
     579                }
     580            } else {
     581                return false;
     582            }
     583        } else {
     584            return false;
     585        }
     586    }
     587
     588    // note: watch out for wrapping around of dates. date ranges, like
     589    // month=9 to month=8, wrap around and cover the entire year. this
     590    // makes everything more interesting
     591
     592    var gmt;
     593        if (arguments.length > 2) {
     594                if (arguments[arguments.length-1] === "GMT") {
     595                        gmt = true;
     596            arguments.splice(0,arguments.length-1);
     597        }
     598        }
    581599    // TODO: change date to gmt, whatever
    582     var today = new Date();
     600    var today = arguments[0]
    583601
    584602    var arg1;
     
    589607    var arg6;
    590608
    591     switch (arguments.length) {
     609    switch (arguments.length-1) {
    592610        case 1:
    593             var arg = arguments[0];
     611            var arg = arguments[1];
    594612            if (isDate(arg)) {
    595613                if (today.getDate() === arg) {
     
    605623                }
    606624            } else { // year
    607                 if (today.getYear() === arg) {
     625                if (today.getFullYear() === arg) {
    608626                    return true;
    609627                } else {
     
    612630            }
    613631        case 2:
    614             arg1 = arguments[0];
    615             arg2 = arguments[1];
     632            arg1 = arguments[1];
     633            arg2 = arguments[2];
    616634            if (isDate(arg1) && isDate(arg2)) {
    617635                var date1 = arg1;
     
    635653            }
    636654        case 4:
    637             arg1 = arguments[0];
    638             arg2 = arguments[1];
    639             arg3 = arguments[2];
    640             arg4 = arguments[3];
     655            arg1 = arguments[1];
     656            arg2 = arguments[2];
     657            arg3 = arguments[3];
     658            arg4 = arguments[4];
    641659
    642660            if (isDate(arg1) && isMonth(arg2) && isDate(arg3) && isMonth(arg4)) {
     
    659677            }
    660678        case 6:
    661             arg1 = arguments[0];
    662             arg2 = arguments[1];
    663             arg3 = arguments[2];
    664             arg4 = arguments[3];
    665             arg5 = arguments[4];
    666             arg6 = arguments[5];
     679            arg1 = arguments[1];
     680            arg2 = arguments[2];
     681            arg3 = arguments[3];
     682            arg4 = arguments[4];
     683            arg5 = arguments[5];
     684            arg6 = arguments[6];
    667685            if (isDate(arg1) && isMonth(arg2) && isYear(arg3) &&
    668686                isDate(arg4) && isMonth(arg5) && isYear(arg6)) {
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/AccessWarningPane.java

    r348 r416  
    105105
    106106        try {
    107             publisher = file.getInformation().getVendor() != null ? file.getInformation().getVendor() : R("SNoAssociatedCertificate");
     107            publisher = file.getInformation().getVendor() != null ?
     108                    file.getInformation().getVendor() + " " + R("SUnverified") :
     109                    R("SNoAssociatedCertificate");
    108110        } catch (Exception e) {
    109111        }
     
    151153        }
    152154
    153         ImageIcon icon = new ImageIcon((new sun.misc.Launcher()).getClassLoader().getResource("net/sourceforge/jnlp/resources/warning.png"));
     155        ImageIcon icon = new ImageIcon((new sun.misc.Launcher()).getClassLoader().getResource("net/sourceforge/jnlp/resources/question.png"));
    154156        JLabel topLabel = new JLabel(htmlWrap(topLabelText), icon, SwingConstants.LEFT);
    155157        topLabel.setFont(new Font(topLabel.getFont().toString(),
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertWarningPane.java

    r348 r416  
    11/* CertWarningPane.java
    2    Copyright (C) 2008 Red Hat, Inc.
     2   Copyright (C) 2012 Red Hat, Inc.
    33
    44This file is part of IcedTea.
     
    9797        AccessType type = parent.getAccessType();
    9898        JNLPFile file = parent.getFile();
    99         Certificate c = parent.getJarSigner().getPublisher();
     99        Certificate c = parent.getCertVerifier().getPublisher();
    100100
    101101        String name = "";
     
    133133        }
    134134
    135         //Top label
     135        // Labels
    136136        String topLabelText = "";
     137        String bottomLabelText = parent.getCertVerifier().getRootInCacerts() ?
     138                                 R("STrustedSource") : R("SUntrustedSource");
    137139        String propertyName = "";
     140        String iconLocation = "net/sourceforge/jnlp/resources/";
     141        boolean alwaysTrustSelected = false;
    138142        if (certVerifier instanceof HttpsCertVerifier) {
    139             topLabelText = R("SHttpsUnverified") + " " +
    140                                  R("Continue");
     143            // HTTPS certs that are verified do not prompt for a dialog.
     144            // @see VariableX509TrustManager#checkServerTrusted
     145            topLabelText = R("SHttpsUnverified") + " " + R("Continue");
    141146            propertyName = "OptionPane.warningIcon";
     147            iconLocation += "warning.png";
    142148        } else
    143149            switch (type) {
     
    145151                    topLabelText = R("SSigVerified");
    146152                    propertyName = "OptionPane.informationIcon";
     153                    iconLocation += "question.png";
     154                    alwaysTrustSelected = true;
    147155                    break;
    148156                case UNVERIFIED:
    149157                    topLabelText = R("SSigUnverified");
    150158                    propertyName = "OptionPane.warningIcon";
     159                    iconLocation += "warning.png";
     160                    bottomLabelText += " " + R("SWarnFullPermissionsIgnorePolicy");
    151161                    break;
    152162                case SIGNING_ERROR:
    153163                    topLabelText = R("SSignatureError");
    154164                    propertyName = "OptionPane.warningIcon";
     165                    iconLocation += "warning.png";
     166                    bottomLabelText += " " + R("SWarnFullPermissionsIgnorePolicy");
    155167                    break;
    156168            }
     169
    157170        ImageIcon icon = new ImageIcon((new sun.misc.Launcher())
    158                                 .getClassLoader().getResource("net/sourceforge/jnlp/resources/warning.png"));
     171                                .getClassLoader().getResource(iconLocation));
    159172        JLabel topLabel = new JLabel(htmlWrap(topLabelText), icon, SwingConstants.LEFT);
    160173        topLabel.setFont(new Font(topLabel.getFont().toString(),
     
    163176        topPanel.setBackground(Color.WHITE);
    164177        topPanel.add(topLabel, BorderLayout.CENTER);
    165         topPanel.setPreferredSize(new Dimension(400, 60));
     178        topPanel.setPreferredSize(new Dimension(400, 75));
    166179        topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    167180
     
    176189        alwaysTrust = new JCheckBox(R("SAlwaysTrustPublisher"));
    177190        alwaysTrust.setEnabled(true);
     191        alwaysTrust.setSelected(alwaysTrustSelected);
    178192
    179193        JPanel infoPanel = new JPanel(new GridLayout(4, 1));
     
    211225        add(buttonPanel);
    212226
    213         JLabel bottomLabel;
     227        JLabel bottomLabel = new JLabel(htmlWrap(bottomLabelText));;
    214228        JButton moreInfo = new JButton(R("ButMoreInformation"));
    215229        moreInfo.addActionListener(new MoreInfoButtonListener());
    216 
    217         if (parent.getJarSigner().getRootInCacerts())
    218             bottomLabel = new JLabel(htmlWrap(R("STrustedSource")));
    219         else
    220             bottomLabel = new JLabel(htmlWrap(R("SUntrustedSource")));
    221230
    222231        JPanel bottomPanel = new JPanel();
     
    224233        bottomPanel.add(bottomLabel);
    225234        bottomPanel.add(moreInfo);
    226         bottomPanel.setPreferredSize(new Dimension(500, 100));
     235        bottomPanel.setPreferredSize(new Dimension(600, 100));
    227236        bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    228237        add(bottomPanel);
     
    232241    private class MoreInfoButtonListener implements ActionListener {
    233242        public void actionPerformed(ActionEvent e) {
    234             SecurityDialog.showMoreInfoDialog(parent.getJarSigner(),
     243            SecurityDialog.showMoreInfoDialog(parent.getCertVerifier(),
    235244                                parent);
    236245        }
     
    245254                try {
    246255                    KeyStore ks = KeyStores.getKeyStore(Level.USER, Type.CERTS);
    247                     X509Certificate c = (X509Certificate) parent.getJarSigner().getPublisher();
     256                    X509Certificate c = (X509Certificate) parent.getCertVerifier().getPublisher();
    248257                    CertificateUtils.addToKeyStore(c, ks);
    249258                    File keyStoreFile = new File(KeyStores.getKeyStoreLocation(Level.USER, Type.CERTS));
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertificateUtils.java

    r348 r416  
    3939
    4040import java.io.BufferedInputStream;
     41import java.io.BufferedOutputStream;
    4142import java.io.File;
    4243import java.io.FileInputStream;
     44import java.io.FileOutputStream;
    4345import java.io.IOException;
    4446import java.io.PrintStream;
    4547import java.math.BigInteger;
     48import java.security.InvalidKeyException;
     49import java.security.Key;
    4650import java.security.KeyStore;
    4751import java.security.KeyStoreException;
     52import java.security.NoSuchAlgorithmException;
     53import java.security.NoSuchProviderException;
     54import java.security.SignatureException;
    4855import java.security.cert.Certificate;
    4956import java.security.cert.CertificateException;
    5057import java.security.cert.CertificateFactory;
    5158import java.security.cert.X509Certificate;
     59import java.util.Enumeration;
    5260import java.util.Random;
    5361
    5462import net.sourceforge.jnlp.runtime.JNLPRuntime;
    55 
    56 import sun.misc.BASE64Encoder;
     63import net.sourceforge.jnlp.runtime.Translator;
     64import net.sourceforge.jnlp.util.replacements.BASE64Encoder;
    5765import sun.security.provider.X509Factory;
    5866
     
    114122    }
    115123
     124    public static void addPKCS12ToKeyStore(File file, KeyStore ks, char[] password)
     125            throws Exception {
     126        BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
     127        KeyStore keyStore = KeyStore.getInstance("PKCS12");
     128        keyStore.load(bis, password);
     129
     130        Enumeration<String> aliasList = keyStore.aliases();
     131
     132        while (aliasList.hasMoreElements()) {
     133            String alias = aliasList.nextElement();
     134            Certificate[] certChain = keyStore.getCertificateChain(alias);
     135            Key key = keyStore.getKey(alias, password);
     136            addPKCS12ToKeyStore(certChain, key, ks);
     137        }
     138    }
     139
     140    public static void addPKCS12ToKeyStore(Certificate[] certChain, Key key, KeyStore ks)
     141            throws KeyStoreException {
     142        String alias = null;
     143
     144        // does this certificate already exist?
     145        alias = ks.getCertificateAlias(certChain[0]);
     146        if (alias != null) {
     147            return;
     148        }
     149
     150        // create a unique alias for this new certificate
     151        Random random = new Random();
     152        do {
     153            alias = new BigInteger(20, random).toString();
     154        } while (ks.getCertificate(alias) != null);
     155
     156        ks.setKeyEntry(alias, key, KeyStores.getPassword(), certChain);
     157    }
     158
    116159    /**
    117160     * Checks whether an X509Certificate is already in one of the keystores
     
    123166        for (int i = 0; i < keyStores.length; i++) {
    124167            try {
    125                 if (keyStores[i].getCertificateAlias(c) != null) {
    126                     if (JNLPRuntime.isDebug()) {
    127                         System.out.println(c.getSubjectX500Principal().getName() + " found in cacerts");
    128                     }
    129                     return true;
     168                // Check against all certs
     169                Enumeration<String> aliases = keyStores[i].aliases();
     170                while (aliases.hasMoreElements()) {
     171
     172                    // Verify against this entry
     173                    String alias = aliases.nextElement();
     174
     175                    if (c.equals(keyStores[i].getCertificate(alias))) {
     176                        if (JNLPRuntime.isDebug()) {
     177                            System.out.println(Translator.R("LCertFoundIn", c.getSubjectX500Principal().getName(), KeyStores.getPathToKeystore(keyStores[i].hashCode())));
     178                        }
     179
     180                        return true;
     181                    } // else continue
    130182                }
     183
    131184            } catch (KeyStoreException e) {
    132185                e.printStackTrace();
     
    149202        out.println(X509Factory.END_CERT);
    150203    }
     204
     205    public static void dumpPKCS12(String alias, File file, KeyStore ks, char[] password)
     206            throws Exception {
     207        Certificate[] certChain = ks.getCertificateChain(alias);
     208        Key key = ks.getKey(alias, KeyStores.getPassword());
     209        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
     210        KeyStore keyStore = KeyStore.getInstance("PKCS12");
     211        keyStore.load(null, null);
     212        keyStore.setKeyEntry(alias, key, password, certChain);
     213        keyStore.store(bos, password);
     214    }
    151215}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/CertsInfoPane.java

    r348 r416  
    8585     */
    8686    void buildTree() {
    87         certPath = parent.getJarSigner().getCertPath();
     87        certPath = parent.getCertVerifier().getCertPath();
    8888        X509Certificate firstCert =
    8989                        ((X509Certificate) certPath.getCertificates().get(0));
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/KeyStores.java

    r348 r416  
    4848import java.security.cert.CertificateException;
    4949import java.util.ArrayList;
     50import java.util.HashMap;
    5051import java.util.List;
     52import java.util.Map;
    5153import java.util.StringTokenizer;
    5254
     
    7678    }
    7779
     80    public static final Map<Integer,String> keystoresPaths=new HashMap<Integer, String>();
     81
    7882    private static DeploymentConfiguration config = null;
    7983
     
    134138        try {
    135139            ks = createKeyStoreFromFile(new File(location), create, DEFAULT_PASSWORD);
     140            //hashcode is used instead of instance so when no references are left
     141            //to keystore, then this will not be blocker for garbage collection
     142            keystoresPaths.put(ks.hashCode(),location);
    136143        } catch (Exception e) {
    137144            e.printStackTrace();
    138145        }
    139146        return ks;
     147    }
     148
     149    public static String getPathToKeystore(int k) {
     150        String s = keystoresPaths.get(k);
     151        if (s == null) {
     152            return "unknown keystore location";
     153        }
     154        return s;
    140155    }
    141156
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/MoreInfoPane.java

    r348 r416  
    6262public class MoreInfoPane extends SecurityDialogPanel {
    6363
     64    private boolean showSignedJNLPWarning;
     65
    6466    public MoreInfoPane(SecurityDialog x, CertVerifier certVerifier) {
    6567        super(x, certVerifier);
     68        showSignedJNLPWarning= x.requiresSignedJNLPWarning();
    6669        addComponents();
    6770    }
     
    7376        ArrayList<String> details = certVerifier.getDetails();
    7477
     78        // Show signed JNLP warning if the signed main jar does not have a
     79        // signed JNLP file and the launching JNLP file contains special properties
     80        if(showSignedJNLPWarning)
     81            details.add(R("SJNLPFileIsNotSigned"));
     82           
    7583        int numLabels = details.size();
    7684        JPanel errorPanel = new JPanel(new GridLayout(numLabels, 1));
     
    8997            errorPanel.add(new JLabel(htmlWrap(details.get(i)), icon, SwingConstants.LEFT));
    9098        }
     99       
     100        // Removes signed JNLP warning after it has been used. This will avoid
     101        // any alteration to certVerifier.
     102        if(showSignedJNLPWarning)
     103            details.remove(details.size()-1);
    91104
    92105        JPanel buttonsPanel = new JPanel(new BorderLayout());
     
    106119    private class CertInfoButtonListener implements ActionListener {
    107120        public void actionPerformed(ActionEvent e) {
    108             SecurityDialog.showCertInfoDialog(parent.getJarSigner(),
     121            SecurityDialog.showCertInfoDialog(parent.getCertVerifier(),
    109122                                parent);
    110123        }
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialog.java

    r348 r416  
    4242import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
    4343import net.sourceforge.jnlp.security.SecurityDialogs.DialogType;
     44import net.sourceforge.jnlp.util.ImageResources;
    4445
    4546import java.awt.*;
     
    9394    private Object value;
    9495
    95     SecurityDialog(DialogType dialogType, AccessType accessType,
    96                 JNLPFile file, CertVerifier jarSigner, X509Certificate cert, Object[] extras) {
     96    /** Should show signed JNLP file warning */
     97    private boolean requiresSignedJNLPWarning;
     98
     99    SecurityDialog(DialogType dialogType, AccessType accessType,
     100                JNLPFile file, CertVerifier JarCertVerifier, X509Certificate cert, Object[] extras) {
    97101        super();
     102        setIconImages(ImageResources.INSTANCE.getApplicationImages());
    98103        this.dialogType = dialogType;
    99104        this.accessType = accessType;
    100105        this.file = file;
    101         this.certVerifier = jarSigner;
     106        this.certVerifier = JarCertVerifier;
    102107        this.cert = cert;
    103108        this.extras = extras;
    104109        initialized = true;
    105110
     111        if(file != null)
     112            requiresSignedJNLPWarning= file.requiresSignedJNLPWarning();
     113
    106114        initDialog();
    107115    }
     
    119127     */
    120128    SecurityDialog(DialogType dialogType, AccessType accessType,
    121                         JNLPFile file, CertVerifier jarSigner) {
    122         this(dialogType, accessType, file, jarSigner, null, null);
     129                        JNLPFile file, CertVerifier certVerifier) {
     130        this(dialogType, accessType, file, certVerifier, null, null);
    123131    }
    124132
     
    159167     * Shows more information regarding jar code signing
    160168     *
    161      * @param jarSigner the JarSigner used to verify this application
     169     * @param certVerifier the JarCertVerifier used to verify this application
    162170     * @param parent the parent option pane
    163171     */
    164172    public static void showMoreInfoDialog(
    165                 CertVerifier jarSigner, SecurityDialog parent) {
    166 
     173                CertVerifier certVerifier, SecurityDialog parent) {
     174
     175        JNLPFile file= parent.getFile();
    167176        SecurityDialog dialog =
    168                         new SecurityDialog(DialogType.MORE_INFO, null, null,
    169                                 jarSigner);
     177                        new SecurityDialog(DialogType.MORE_INFO, null, file,
     178                                certVerifier);
    170179        dialog.setModalityType(ModalityType.APPLICATION_MODAL);
    171180        dialog.setVisible(true);
     
    176185     * Displays CertPath information in a readable table format.
    177186     *
    178      * @param jarSigner the JarSigner used to verify this application
     187     * @param certVerifier the JarCertVerifier used to verify this application
    179188     * @param parent the parent option pane
    180189     */
    181     public static void showCertInfoDialog(CertVerifier jarSigner,
     190    public static void showCertInfoDialog(CertVerifier certVerifier,
    182191                SecurityDialog parent) {
    183192        SecurityDialog dialog = new SecurityDialog(DialogType.CERT_INFO,
    184                         null, null, jarSigner);
     193                        null, null, certVerifier);
    185194        dialog.setLocationRelativeTo(parent);
    186195        dialog.setModalityType(ModalityType.APPLICATION_MODAL);
     
    208217
    209218        String dialogTitle = "";
    210         if (dialogType == DialogType.CERT_WARNING)
    211             dialogTitle = "Warning - Security";
    212         else if (dialogType == DialogType.MORE_INFO)
     219        if (dialogType == DialogType.CERT_WARNING) {
     220            if (accessType == AccessType.VERIFIED)
     221                dialogTitle = "Security Approval Required";
     222            else
     223                dialogTitle = "Security Warning";
     224        } else if (dialogType == DialogType.MORE_INFO)
    213225            dialogTitle = "More Information";
    214226        else if (dialogType == DialogType.CERT_INFO)
     
    267279    }
    268280
    269     public CertVerifier getJarSigner() {
     281    public CertVerifier getCertVerifier() {
    270282        return certVerifier;
    271283    }
     
    370382        listeners.add(listener);
    371383    }
     384   
     385    public boolean requiresSignedJNLPWarning()
     386    {
     387        return requiresSignedJNLPWarning;
     388    }
    372389
    373390}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/SecurityDialogs.java

    r348 r416  
    181181     * @param accessType the type of warning dialog to show
    182182     * @param file the JNLPFile associated with this warning
    183      * @param jarSigner the JarSigner used to verify this application
     183     * @param certVerifier the JarCertVerifier used to verify this application
     184     *
     185     * @return true if the user accepted the certificate
    184186     */
    185187    public static boolean showCertWarningDialog(AccessType accessType,
    186             JNLPFile file, CertVerifier jarSigner) {
     188            JNLPFile file, CertVerifier certVerifier) {
    187189
    188190        if (!shouldPromptUser()) {
     
    194196        message.accessType = accessType;
    195197        message.file = file;
    196         message.certVerifier = jarSigner;
     198        message.certVerifier = certVerifier;
    197199
    198200        Object selectedValue = getUserResponse(message);
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java

    r348 r416  
    3838package net.sourceforge.jnlp.security;
    3939
     40import java.security.AccessController;
    4041import java.security.KeyStore;
     42import java.security.PrivilegedAction;
    4143import java.security.cert.Certificate;
    4244import java.security.cert.CertificateException;
     
    5456
    5557import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager;
     58import net.sourceforge.jnlp.runtime.JNLPRuntime;
    5659
    5760import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
     
    380383     * @return user's response
    381384     */
    382     private boolean askUser(X509Certificate[] chain, String authType,
    383                             boolean isTrusted, boolean hostMatched,
    384                             String hostName) {
    385         return SecurityDialogs.showCertWarningDialog(
     385    private boolean askUser(final X509Certificate[] chain, final String authType,
     386                            final boolean isTrusted, final boolean hostMatched,
     387                            final String hostName) {
     388        if (JNLPRuntime.isTrustAll()){
     389            return true;
     390        }
     391        final VariableX509TrustManager trustManager = this;
     392        return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
     393            @Override
     394            public Boolean run() {
     395                return SecurityDialogs.showCertWarningDialog(
    386396                        AccessType.UNVERIFIED, null,
    387                         new HttpsCertVerifier(this, chain, authType,
     397                        new HttpsCertVerifier(trustManager, chain, authType,
    388398                                              isTrusted, hostMatched,
    389399                                              hostName));
     400            }
     401        });
    390402    }
    391403
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java

    r348 r416  
    6767import javax.swing.JOptionPane;
    6868import javax.swing.JPanel;
     69import javax.swing.JPasswordField;
    6970import javax.swing.JScrollPane;
    7071import javax.swing.JTabbedPane;
     
    101102            new CertificateType(KeyStores.Type.CERTS),
    102103            new CertificateType(KeyStores.Type.JSSE_CERTS),
     104            new CertificateType(KeyStores.Type.CLIENT_CERTS)
    103105        };
    104106
     
    302304    }
    303305
     306    private char[] getPassword(final String label) {
     307        JPasswordField jpf = new JPasswordField();
     308        int result = JOptionPane.showConfirmDialog(parent,
     309                                new Object[]{label, jpf},  R("CVPasswordTitle"),
     310                                JOptionPane.OK_CANCEL_OPTION,
     311                                JOptionPane.INFORMATION_MESSAGE);
     312        if (result == JOptionPane.OK_OPTION)
     313            return jpf.getPassword();
     314        else
     315            return null;
     316    }
     317
    304318    /** Allows storing KeyStores.Types in a JComponent */
    305319    private static class CertificateType {
     
    365379                try {
    366380                    KeyStore ks = keyStore;
    367                     CertificateUtils.addToKeyStore(chooser.getSelectedFile(), ks);
     381                    if (currentKeyStoreType == KeyStores.Type.CLIENT_CERTS) {
     382                        char[] password = getPassword(R("CVImportPasswordMessage"));
     383                        if (password != null) {
     384                            CertificateUtils.addPKCS12ToKeyStore(
     385                                       chooser.getSelectedFile(), ks, password);
     386                        } else {
     387                            return;
     388                        }
     389                    } else {
     390                        CertificateUtils.addToKeyStore(chooser.getSelectedFile(), ks);
     391                    }
    368392                    File keyStoreFile = new File(KeyStores
    369393                                        .getKeyStoreLocation(currentKeyStoreLevel, currentKeyStoreType));
     
    409433                                                        .get(selectedRow));
    410434                        if (alias != null) {
    411                             Certificate c = keyStore.getCertificate(alias);
    412                             PrintStream ps = new PrintStream(chooser.getSelectedFile().getAbsolutePath());
    413                             CertificateUtils.dump(c, ps);
     435                            if (currentKeyStoreType == KeyStores.Type.CLIENT_CERTS) {
     436                                char[] password = getPassword(R("CVExportPasswordMessage"));
     437                                if (password != null)
     438                                    CertificateUtils.dumpPKCS12(alias, chooser.getSelectedFile(), keyStore, password);
     439                            } else {
     440                                Certificate c = keyStore.getCertificate(alias);
     441                                PrintStream ps = new PrintStream(chooser.getSelectedFile().getAbsolutePath());
     442                                CertificateUtils.dump(c, ps);
     443                            }
    414444                            repopulateTables();
    415445                        }
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java

    r348 r416  
    5252
    5353import net.sourceforge.jnlp.runtime.JNLPRuntime;
     54import net.sourceforge.jnlp.util.ImageResources;
    5455
    5556public class CertificateViewer extends JDialog {
     
    6263    public CertificateViewer() {
    6364        super((Frame) null, dialogTitle, true);
     65        setIconImages(ImageResources.INSTANCE.getApplicationImages());
    6466
    6567        Container contentPane = getContentPane();
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/ServiceUtil.java

    r348 r416  
    236236                Object... extras) {
    237237
    238         if (app == null)
    239             app = JNLPRuntime.getApplication();
    240 
    241         boolean codeTrusted = true;
    242 
    243         StackTraceElement[] stack = Thread.currentThread().getStackTrace();
    244 
    245         for (int i = 0; i < stack.length; i++) {
    246 
    247             Class c = null;
    248 
    249             try {
    250                 c = Class.forName(stack[i].getClassName());
    251             } catch (Exception e1) {
    252                 try {
    253                     c = Class.forName(stack[i].getClassName(), false, app.getClassLoader());
    254                 } catch (Exception e2) {
    255                     System.err.println(e2.getMessage());
    256                 }
    257             }
    258 
    259             // Everything up to the desired class/method must be trusted
    260             if (c == null || // class not found
    261                     (c.getProtectionDomain().getCodeSource() != null && // class is not in bootclasspath
    262                     c.getProtectionDomain().getCodeSource().getCodeSigners() == null) // class is trusted
    263             ) {
    264                 codeTrusted = false;
    265             }
    266         }
    267 
    268         if (!codeTrusted) {
     238        boolean trusted = isSigned(app);
     239
     240        if (!trusted) {
    269241
    270242            if (!shouldPromptUser()) {
    271243                return false;
    272244            }
     245            if (app == null)
     246                app = JNLPRuntime.getApplication();
    273247
    274248            final AccessType tmpType = type;
     
    308282        });
    309283    }
     284   
     285    /**
     286     * Returns whether the app requesting a JNLP service is a trusted
     287     * application
     288     *
     289     * @param app
     290     *            the application which is requesting the check. If null, the
     291     *            current application is used.
     292     * @return true, if the app is a trusted application; false otherwise
     293     */
     294
     295    public static boolean isSigned(ApplicationInstance app) {
     296
     297        if (app == null)
     298            app = JNLPRuntime.getApplication();
     299
     300        StackTraceElement[] stack = Thread.currentThread().getStackTrace();
     301
     302        for (int i = 0; i < stack.length; i++) {
     303
     304            Class c = null;
     305
     306            try {
     307                c = Class.forName(stack[i].getClassName());
     308            } catch (Exception e1) {
     309                try {
     310                    c = Class.forName(stack[i].getClassName(), false,
     311                            app.getClassLoader());
     312                } catch (Exception e2) {
     313                    System.err.println(e2.getMessage());
     314                }
     315            }
     316
     317            // Everything up to the desired class/method must be trusted
     318            if (c == null || // class not found
     319                    (c.getProtectionDomain().getCodeSource() != null && // class is not in bootclasspath
     320                    c.getProtectionDomain().getCodeSource().getCodeSigners() == null) // class is trusted
     321            ) {
     322                return false;
     323            }
     324        }
     325        return true;
     326    }
    310327
    311328}
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/services/XPersistenceService.java

    r348 r416  
    5353
    5454        URL source = app.getJNLPFile().getCodeBase();
     55       
     56        if (!source.getHost().equalsIgnoreCase(location.getHost())
     57                && !ServiceUtil.isSigned(app)) // Allow trusted application to have access to data from a different host
     58            throw new MalformedURLException(
     59                    "Untrusted application cannot access data from a different host.");
    5560
    56         if (!source.getHost().equalsIgnoreCase(location.getHost()))
    57             throw new MalformedURLException("Cannot access data from a different host.");
    5861
    5962        // test for above codebase, not perfect but works for now
     
    7073        }
    7174
    72         if (!source.getFile().startsWith(requestPath))
    73             throw new MalformedURLException("Cannot access data below source URL path.");
     75        if (!source.getFile().startsWith(requestPath)
     76                && !ServiceUtil.isSigned(app)) // Allow trusted application to have access to data below source URL path
     77            throw new MalformedURLException(
     78                    "Cannot access data below source URL path.");
    7479    }
    7580
     
    123128
    124129        File file = toCacheFile(location);
    125         if (!file.exists())
     130        if (!file.exists()) {
    126131            throw new FileNotFoundException("Persistence store for "
    127132                    + location.toString() + " is not found.");
     133        }
    128134        FileUtils.createParentDir(file, "Persistence store for "
    129135                    + location.toString());
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/tools/KeyStoreUtil.java

    r348 r416  
    3434
    3535    // Class and methods marked as public so that they can be
    36     // accessed by JarSigner, which although lies in a package
     36    // accessed by JarCertVerifier, which although lies in a package
    3737    // with the same name, but bundled in tools.jar and loaded
    3838    // by another class loader, hence in a different *runtime*
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/BasicExceptionDialog.java

    r348 r416  
    8383        JOptionPane optionPane = new JOptionPane(mainPanel, JOptionPane.ERROR_MESSAGE);
    8484        final JDialog errorDialog = optionPane.createDialog(R("Error"));
     85        errorDialog.setIconImages(ImageResources.INSTANCE.getApplicationImages());
    8586
    8687        final JPanel quickInfoPanel = new JPanel();
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/jnlp/util/PropertiesFile.java

    r348 r416  
    3636    /** the header string */
    3737    String header = "netx file";
    38 
    39     /** lazy loaded on getProperty */
    40     boolean loaded = false;
     38   
     39    /** time of last modification, lazy loaded on getProperty */
     40    long lastStore;
    4141
    4242    /**
     
    6565     */
    6666    public String getProperty(String key) {
    67         if (!loaded)
     67        if (lastStore == 0)
    6868            load();
    6969
     
    7676     */
    7777    public String getProperty(String key, String defaultValue) {
    78         if (!loaded)
     78        if (lastStore == 0)
    7979            load();
    8080
     
    8888     */
    8989    public Object setProperty(String key, String value) {
    90         if (!loaded)
     90        if (lastStore == 0)
    9191            load();
    9292
     
    105105     * loaded; call this method before calling any method defined by
    106106     * a superclass.
     107     *
     108     * @return true, if file was (re-)loaded
     109     *         false, if file was still current
    107110     */
    108     public void load() {
    109         loaded = true;
     111    public boolean load() {
    110112
    111         InputStream s = null;
    112         try {
    113             if (!file.exists())
    114                 return;
     113        if (!file.exists()) {
     114            return false;
     115        }
    115116
     117        long currentStore = file.lastModified();
     118        long currentTime = System.currentTimeMillis();
     119
     120        /* (re)load file, if
     121         *  - it wasn't loaded/stored, yet (lastStore == 0)
     122         *  - current file modification timestamp has changed since last store (currentStore != lastStore) OR
     123         *  - current file modification timestamp has not changed since last store AND current system time equals current file modification timestamp
     124         *    This is necessary because some filesystems seems only to provide accuracy of the timestamp on the level of seconds!
     125         */
     126        if(lastStore == 0 || currentStore != lastStore || (currentStore == lastStore && currentStore / 1000 == currentTime / 1000)) {
     127            InputStream s = null;
    116128            try {
    117                 s = new FileInputStream(file);
    118                 load(s);
    119             } finally {
    120                 if (s != null) s.close();
     129
     130                try {
     131                    s = new FileInputStream(file);
     132                    load(s);
     133                } finally {
     134                    if (s != null) {
     135                        s.close();
     136                        lastStore=currentStore;
     137                        return true;
     138                    }
     139                }
     140            } catch (IOException ex) {
     141                ex.printStackTrace();
    121142            }
    122         } catch (IOException ex) {
    123             ex.printStackTrace();
    124143        }
     144
     145        return false;
    125146    }
    126147
     
    129150     */
    130151    public void store() {
    131         if (!loaded)
    132             return; // nothing could have changed so save unnecessary load/save
    133152
    134         OutputStream s = null;
     153        FileOutputStream s = null;
    135154        try {
    136155            try {
     156                file.getParentFile().mkdirs();
    137157                s = new FileOutputStream(file);
    138158                store(s, header);
     159
     160                // fsync()
     161                s.getChannel().force(true);
     162                lastStore = file.lastModified();
    139163            } finally {
    140164                if (s != null) s.close();
  • branches/vendor/sourceforge/icedtea-web/current/netx/net/sourceforge/nanoxml/XMLElement.java

    r348 r416  
    11671167     *             xml file.
    11681168     */
    1169     public void sanitizeInput(InputStreamReader isr, PipedOutputStream pout) {
     1169    public void sanitizeInput(Reader isr, OutputStream pout) {
    11701170        try {
    11711171            PrintStream out = new PrintStream(pout);
     
    12211221                this.sanitizeCharReadTooMuch = next;
    12221222
    1223                 // If the next char is a ? or !, then we've hit a special tag,
     1223                // If the next chars are !--, then we've hit a comment tag,
    12241224                // and should skip it.
    1225                 if (prev == '<' && (next == '!' || next == '?')) {
    1226                     this.skipSpecialTag(0);
    1227                     this.sanitizeCharReadTooMuch = '\0';
     1225                if (ch == '<' && sanitizeCharReadTooMuch == '!') {
     1226                    ch = (char) this.reader.read();
     1227                    if (ch == '-') {
     1228                        ch = (char) this.reader.read();
     1229                        if (ch == '-') {
     1230                            this.skipComment();
     1231                            this.sanitizeCharReadTooMuch = '\0';
     1232                        } else {
     1233                            out.print('<');
     1234                            out.print('!');
     1235                            out.print('-');
     1236                            this.sanitizeCharReadTooMuch = ch;
     1237                            if (JNLPRuntime.isDebug()) {
     1238                                System.out.print('<');
     1239                                System.out.print('!');
     1240                                System.out.print('-');
     1241                            }
     1242                        }
     1243                    } else {
     1244                        out.print('<');
     1245                        out.print('!');
     1246                        this.sanitizeCharReadTooMuch = ch;
     1247                        if (JNLPRuntime.isDebug()) {
     1248                            System.out.print('<');
     1249                            System.out.print('!');
     1250                        }
     1251                    }
    12281252                }
    12291253                // Otherwise we haven't hit a comment, and we should write ch.
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc

    r348 r416  
    905905    {
    906906        className = "java.lang.String";
    907 #if MOZILLA_VERSION_COLLAPSED < 1090200
    908         stringArg += NPVARIANT_TO_STRING(variant).utf8characters;
    909 #else
    910         stringArg += NPVARIANT_TO_STRING(variant).UTF8Characters;
    911 #endif
     907        stringArg = IcedTeaPluginUtilities::NPVariantAsString(variant);
    912908    } else if (NPVARIANT_IS_OBJECT(variant))
    913909    {
     
    922918            PLUGIN_DEBUG("NPObject is not a Java object\n");
    923919            NPIdentifier length_id = browser_functions.getstringidentifier("length");
     920            bool isJSObjectArray = false;
    924921
    925922            // FIXME: We currently only handle <= 2 dim arrays. Do we really need more though?
     
    937934                IcedTeaPluginUtilities::itoa(NPVARIANT_TO_INT32(length), &length_str);
    938935
    939                 if (NPVARIANT_TO_INT32(length) > 0)
     936                if (NPVARIANT_TO_INT32(length) >= 0)
    940937                {
    941938                    NPIdentifier id_0 = browser_functions.getintidentifier(0);
     
    957954                        getArrayTypeForJava(instance, first_element, &java_array_type);
    958955                    }
    959                 } else
    960                     java_array_type.append("jsobject");
     956                }
     957
     958                // For JSObject arrays, we create a regular object (accessible via JSObject.getSlot())
     959                if (NPVARIANT_TO_INT32(length) < 0 || !java_array_type.compare("jsobject"))
     960                {
     961                    isJSObjectArray = true;
     962                    goto createRegularObject;
     963                }
    961964
    962965                java_result = java_request.newArray(java_array_type, length_str);
     
    996999                // Got here => no errors above. We're good to return!
    9971000                return;
    998             } else // Else it is not an array
     1001            }
     1002
     1003            createRegularObject:
     1004            if (!IcedTeaPluginUtilities::isObjectJSArray(instance, obj) || isJSObjectArray) // Else it is not an array
    9991005            {
    10001006
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaNPPlugin.cc

    r348 r416  
    9090#define PLUGIN_FULL_NAME PLUGIN_NAME " (using " PLUGIN_VERSION ")"
    9191#define PLUGIN_DESC "The <a href=\"" PACKAGE_URL "\">" PLUGIN_NAME "</a> executes Java applets."
     92
     93#ifdef HAVE_JAVA7
     94 #define JPI_VERSION "1.7.0_" JDK_UPDATE_VERSION
     95 #define PLUGIN_APPLET_MIME_DESC7 \
     96  "application/x-java-applet;version=1.7:class,jar:IcedTea;"
     97 #define PLUGIN_BEAN_MIME_DESC7 \
     98  "application/x-java-bean;version=1.7:class,jar:IcedTea;"
     99#else
     100 #define JPI_VERSION "1.6.0_" JDK_UPDATE_VERSION
     101 #define PLUGIN_APPLET_MIME_DESC7
     102 #define PLUGIN_BEAN_MIME_DESC7
     103#endif
    92104
    93105#define PLUGIN_MIME_DESC                                               \
     
    108120  "application/x-java-applet;version=1.5:class,jar:IcedTea;"           \
    109121  "application/x-java-applet;version=1.6:class,jar:IcedTea;"           \
    110   "application/x-java-applet;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"  \
     122  PLUGIN_APPLET_MIME_DESC7 \
     123  "application/x-java-applet;jpi-version=" JPI_VERSION ":class,jar:IcedTea;"  \
    111124  "application/x-java-bean:class,jar:IcedTea;"                         \
    112125  "application/x-java-bean;version=1.1:class,jar:IcedTea;"             \
     
    124137  "application/x-java-bean;version=1.5:class,jar:IcedTea;"             \
    125138  "application/x-java-bean;version=1.6:class,jar:IcedTea;"             \
    126   "application/x-java-bean;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"    \
     139  PLUGIN_BEAN_MIME_DESC7 \
     140  "application/x-java-bean;jpi-version=" JPI_VERSION ":class,jar:IcedTea;"    \
    127141  "application/x-java-vm-npruntime::IcedTea;"
    128142
     
    250264pthread_cond_t cond_message_available = PTHREAD_COND_INITIALIZER;
    251265
     266
     267#ifdef LEGACY_GLIB
     268// Returns key from first item stored in hashtable
     269gboolean
     270find_first_item_in_hash_table(gpointer key, gpointer value, gpointer user_data)
     271{
     272    user_data = key;
     273    return (gboolean)TRUE;
     274}
     275
     276int
     277g_strcmp0(char *str1, char *str2)
     278{
     279   if (str1 != NULL)
     280     return str2 != NULL ? strcmp(str1, str2) : 1;
     281   else // str1 == NULL
     282     return str2 != NULL ? 1 : 0;
     283}
     284
     285
     286#endif
     287
     288
     289/*
     290 * Find first member in GHashTable* depending on version of glib
     291 */
     292gpointer getFirstInTableInstance(GHashTable* table)
     293{
     294      gpointer id, instance;
     295      #ifndef LEGACY_GLIB
     296        GHashTableIter iter;
     297        g_hash_table_iter_init (&iter, table);
     298        g_hash_table_iter_next (&iter, &instance, &id);
     299      #else
     300        g_hash_table_find(table, (GHRFunc)find_first_item_in_hash_table, &instance);
     301      #endif
     302        return instance;
     303}
     304
    252305// Functions prefixed by ITNP_ are instance functions.  They are called
    253306// by the browser and operate on instances of ITNPPluginData.
     
    375428
    376429 cleanup_appletviewer_mutex:
    377   g_free (data->appletviewer_mutex);
     430  g_mutex_free (data->appletviewer_mutex);
    378431  data->appletviewer_mutex = NULL;
    379432
     
    873926get_cookie_info(const char* siteAddr, char** cookieString, uint32_t* len)
    874927{
     928  // Only attempt to perform this operation if there is a valid plugin instance
     929  if (g_hash_table_size(instance_to_id_map) <= 0)
     930  {
     931    return NPERR_GENERIC_ERROR;
     932  }
    875933#if MOZILLA_VERSION_COLLAPSED < 1090100
    876934  nsresult rv;
     
    916974  if (browser_functions.getvalueforurl)
    917975  {
    918       GHashTableIter iter;
    919       gpointer id, instance;
    920 
    921       g_hash_table_iter_init (&iter, instance_to_id_map);
    922       g_hash_table_iter_next (&iter, &instance, &id);
    923 
     976      gpointer instance=getFirstInTableInstance(instance_to_id_map);
    924977      return browser_functions.getvalueforurl((NPP) instance, NPNURLVCookie, siteAddr, cookieString, len);
    925978  } else
     
    931984
    932985  return NPERR_NO_ERROR;
     986}
     987
     988static NPError
     989set_cookie_info(const char* siteAddr, const char* cookieString, uint32_t len)
     990{
     991  // Only attempt to perform this operation if there is a valid plugin instance
     992  if (g_hash_table_size(instance_to_id_map) > 0 && browser_functions.getvalueforurl)
     993  {
     994      // We arbitrarily use the first valid instance we can grab
     995      // For an explanation of the logic behind this, see get_cookie_info
     996      gpointer instance = getFirstInTableInstance(instance_to_id_map);
     997      return browser_functions.setvalueforurl((NPP) instance, NPNURLVCookie, siteAddr, cookieString, len);
     998  }
     999
     1000  return NPERR_GENERIC_ERROR;;
    9331001}
    9341002
     
    10461114                               href_id, &href);
    10471115
    1048   // Strip everything after the last "/"
    1049 #if MOZILLA_VERSION_COLLAPSED < 1090200
    1050   gchar** parts = g_strsplit (NPVARIANT_TO_STRING(href).utf8characters, "/", -1);
    1051 #else
    1052   gchar** parts = g_strsplit (NPVARIANT_TO_STRING(href).UTF8Characters, "/", -1);
    1053 #endif
    1054   guint parts_sz = g_strv_length (parts);
    1055 
    1056   std::string location_str;
    1057   for (int i=0; i < parts_sz - 1; i++)
    1058   {
    1059       location_str += parts[i];
    1060       location_str += "/";
    1061   }
    1062 
    1063   documentbase_copy = g_strdup (location_str.c_str());
     1116  std::string href_str = IcedTeaPluginUtilities::NPVariantAsString(href);
     1117  documentbase_copy = g_strdup (href_str.c_str());
    10641118
    10651119  // Release references.
     
    11511205}
    11521206
     1207static
     1208void consume_plugin_message(gchar* message) {
     1209  // internal plugin related message
     1210  gchar** parts = g_strsplit (message, " ", 5);
     1211  if (g_str_has_prefix(parts[1], "PluginProxyInfo"))
     1212  {
     1213    gchar* proxy;
     1214    uint32_t len;
     1215
     1216    gchar* decoded_url = (gchar*) calloc(strlen(parts[4]) + 1, sizeof(gchar));
     1217    IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
     1218    PLUGIN_DEBUG("parts[0]=%s, parts[1]=%s, reference, parts[3]=%s, parts[4]=%s -- decoded_url=%s\n", parts[0], parts[1], parts[3], parts[4], decoded_url);
     1219
     1220    gchar* proxy_info;
     1221
     1222#if MOZILLA_VERSION_COLLAPSED < 1090100
     1223        proxy = (char*) malloc(sizeof(char)*2048);
     1224#endif
     1225
     1226    proxy_info = g_strconcat ("plugin PluginProxyInfo reference ", parts[3], " ", NULL);
     1227    if (get_proxy_info(decoded_url, &proxy, &len) == NPERR_NO_ERROR)
     1228      {
     1229        proxy_info = g_strconcat (proxy_info, proxy, NULL);
     1230      }
     1231
     1232    PLUGIN_DEBUG("Proxy info: %s\n", proxy_info);
     1233    plugin_send_message_to_appletviewer(proxy_info);
     1234
     1235    free(decoded_url);
     1236    decoded_url = NULL;
     1237    g_free(proxy_info);
     1238    proxy_info = NULL;
     1239
     1240#if MOZILLA_VERSION_COLLAPSED < 1090100
     1241        g_free(proxy);
     1242        proxy = NULL;
     1243#endif
     1244
     1245  } else if (g_str_has_prefix(parts[1], "PluginCookieInfo"))
     1246  {
     1247    gchar* decoded_url = (gchar*) calloc(strlen(parts[4])+1, sizeof(gchar));
     1248    IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
     1249
     1250    gchar* cookie_info = g_strconcat ("plugin PluginCookieInfo reference ", parts[3], " ", NULL);
     1251    gchar* cookie_string;
     1252    uint32_t len;
     1253    if (get_cookie_info(decoded_url, &cookie_string, &len) == NPERR_NO_ERROR)
     1254    {
     1255        cookie_info = g_strconcat (cookie_info, cookie_string, NULL);
     1256    }
     1257
     1258    PLUGIN_DEBUG("Cookie info: %s\n", cookie_info);
     1259    plugin_send_message_to_appletviewer(cookie_info);
     1260
     1261    free(decoded_url);
     1262    decoded_url = NULL;
     1263    g_free(cookie_info);
     1264    cookie_info = NULL;
     1265  } else if (g_str_has_prefix(parts[1], "PluginSetCookie"))
     1266  {
     1267    // Message structure: plugin PluginSetCookie reference -1 <url> <cookie>
     1268    gchar** cookie_parts = g_strsplit (message, " ", 6);
     1269
     1270    if (g_strv_length(cookie_parts) < 6)
     1271    {
     1272       g_strfreev (parts);
     1273       g_strfreev (cookie_parts);
     1274       return; // Defensive, message _should_ be properly formatted
     1275    }
     1276
     1277    gchar* decoded_url = (gchar*) calloc(strlen(cookie_parts[4])+1, sizeof(gchar));
     1278    IcedTeaPluginUtilities::decodeURL(cookie_parts[4], &decoded_url);
     1279
     1280    gchar* cookie_string = cookie_parts[5];
     1281    uint32_t len = strlen(cookie_string);
     1282    if (set_cookie_info(decoded_url, cookie_string, len) == NPERR_NO_ERROR)
     1283    {
     1284          PLUGIN_DEBUG("Setting cookie for URL %s to %s\n", decoded_url, cookie_string);
     1285    } else
     1286    {
     1287          PLUGIN_DEBUG("Not able to set cookie for URL %s to %s\n", decoded_url, cookie_string);
     1288    }
     1289
     1290    free(decoded_url);
     1291    decoded_url = NULL;
     1292    g_strfreev (cookie_parts);
     1293    cookie_parts = NULL;
     1294  }
     1295
     1296  g_strfreev (parts);
     1297  parts = NULL;
     1298}
     1299
    11531300void consume_message(gchar* message) {
    11541301
     
    11801327
    11811328          // clear the "instance X status" parts
    1182           sprintf(parts[0], "");
    1183           sprintf(parts[1], "");
    1184           sprintf(parts[2], "");
     1329          strcpy(parts[0], "");
     1330          strcpy(parts[1], "");
     1331          strcpy(parts[2], "");
    11851332
    11861333          // join the rest
     
    12131360  else if (g_str_has_prefix (message, "plugin "))
    12141361    {
    1215       // internal plugin related message
    1216       gchar** parts = g_strsplit (message, " ", 5);
    1217       if (g_str_has_prefix(parts[1], "PluginProxyInfo"))
    1218       {
    1219         gchar* proxy;
    1220         uint32_t len;
    1221 
    1222         gchar* decoded_url = (gchar*) calloc(strlen(parts[4]) + 1, sizeof(gchar));
    1223         IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
    1224         PLUGIN_DEBUG("parts[0]=%s, parts[1]=%s, reference, parts[3]=%s, parts[4]=%s -- decoded_url=%s\n", parts[0], parts[1], parts[3], parts[4], decoded_url);
    1225 
    1226         gchar* proxy_info;
    1227 
    1228 #if MOZILLA_VERSION_COLLAPSED < 1090100
    1229         proxy = (char*) malloc(sizeof(char)*2048);
    1230 #endif
    1231 
    1232         proxy_info = g_strconcat ("plugin PluginProxyInfo reference ", parts[3], " ", NULL);
    1233         if (get_proxy_info(decoded_url, &proxy, &len) == NPERR_NO_ERROR)
    1234           {
    1235             proxy_info = g_strconcat (proxy_info, proxy, NULL);
    1236           }
    1237 
    1238         PLUGIN_DEBUG("Proxy info: %s\n", proxy_info);
    1239         plugin_send_message_to_appletviewer(proxy_info);
    1240 
    1241         g_free(decoded_url);
    1242         decoded_url = NULL;
    1243         g_free(proxy_info);
    1244         proxy_info = NULL;
    1245 
    1246 #if MOZILLA_VERSION_COLLAPSED < 1090100
    1247         g_free(proxy);
    1248         proxy = NULL;
    1249 #endif
    1250 
    1251       } else if (g_str_has_prefix(parts[1], "PluginCookieInfo"))
    1252       {
    1253         gchar* decoded_url = (gchar*) calloc(strlen(parts[4])+1, sizeof(gchar));
    1254         IcedTeaPluginUtilities::decodeURL(parts[4], &decoded_url);
    1255 
    1256         gchar* cookie_info = g_strconcat ("plugin PluginCookieInfo reference ", parts[3], " ", NULL);
    1257         gchar* cookie_string;
    1258         uint32_t len;
    1259         if (get_cookie_info(decoded_url, &cookie_string, &len) == NPERR_NO_ERROR)
    1260         {
    1261             cookie_info = g_strconcat (cookie_info, cookie_string, NULL);
    1262         }
    1263 
    1264         PLUGIN_DEBUG("Cookie info: %s\n", cookie_info);
    1265         plugin_send_message_to_appletviewer(cookie_info);
    1266 
    1267         g_free(decoded_url);
    1268         decoded_url = NULL;
    1269         g_free(cookie_info);
    1270         cookie_info = NULL;
    1271       }
     1362        consume_plugin_message(message);
    12721363    }
    12731364  else
     
    12751366        g_print ("  Unable to handle message: %s\n", message);
    12761367    }
     1368
    12771369}
    12781370
     
    12941386get_proxy_info(const char* siteAddr, char** proxy, uint32_t* len)
    12951387{
     1388  // Only attempt to perform this operation if there is a valid plugin instance
     1389  if (g_hash_table_size(instance_to_id_map) <= 0)
     1390  {
     1391          return NPERR_GENERIC_ERROR;
     1392  }
    12961393#if MOZILLA_VERSION_COLLAPSED < 1090100
    12971394  nsresult rv;
     
    13681465
    13691466      // As in get_cookie_info, we use the first active instance
    1370       GHashTableIter iter;
    1371       gpointer id, instance;
    1372 
    1373       g_hash_table_iter_init (&iter, instance_to_id_map);
    1374       g_hash_table_iter_next (&iter, &instance, &id);
    1375 
     1467      gpointer instance=getFirstInTableInstance(instance_to_id_map);
    13761468      browser_functions.getvalueforurl((NPP) instance, NPNURLVProxy, siteAddr, proxy, len);
    13771469  } else
     
    19582050
    19592051  // cleanup_appletviewer_mutex:
    1960   g_free (tofree->appletviewer_mutex);
     2052  g_mutex_free (tofree->appletviewer_mutex);
    19612053  tofree->appletviewer_mutex = NULL;
    19622054
     
    19812073}
    19822074
    1983 // FACTORY FUNCTIONS
    1984 
    1985 // Provides the browser with pointers to the plugin functions that we
    1986 // implement and initializes a local table with browser functions that
    1987 // we may wish to call.  Called once, after browser startup and before
    1988 // the first plugin instance is created.
    1989 // The field 'initialized' is set to true once this function has
    1990 // finished. If 'initialized' is already true at the beginning of
    1991 // this function, then it is evident that NP_Initialize has already
    1992 // been called. There is no need to call this function more than once and
    1993 // this workaround avoids any duplicate calls.
    1994 NPError
    1995 NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable)
    1996 {
    1997   PLUGIN_DEBUG ("NP_Initialize\n");
    1998 
    1999   if ((browserTable == NULL) || (pluginTable == NULL))
     2075static bool
     2076initialize_browser_functions(const NPNetscapeFuncs* browserTable)
     2077{
     2078#if MOZILLA_VERSION_COLLAPSED < 1090100
     2079#define NPNETSCAPEFUNCS_LAST_FIELD_USED (browserTable->pluginthreadasynccall)
     2080#else
     2081#define NPNETSCAPEFUNCS_LAST_FIELD_USED (browserTable->setvalueforurl)
     2082#endif
     2083
     2084  //Determine the size in bytes, as a difference of the address past the last used field
     2085  //And the browser table address
     2086  size_t usedSize = (char*)(1 + &NPNETSCAPEFUNCS_LAST_FIELD_USED) - (char*)browserTable;
     2087
     2088  // compare the reported size versus the size we required
     2089  if (browserTable->size < usedSize)
    20002090  {
    2001     PLUGIN_ERROR ("Browser or plugin function table is NULL.");
    2002 
    2003     return NPERR_INVALID_FUNCTABLE_ERROR;
     2091    return false;
    20042092  }
    20052093
    2006   // Ensure that the major version of the plugin API that the browser
    2007   // expects is not more recent than the major version of the API that
    2008   // we've implemented.
    2009   if ((browserTable->version >> 8) > NP_VERSION_MAJOR)
    2010     {
    2011       PLUGIN_ERROR ("Incompatible version.");
    2012 
    2013       return NPERR_INCOMPATIBLE_VERSION_ERROR;
    2014     }
    2015 
    2016   // Ensure that the plugin function table we've received is large
    2017   // enough to store the number of functions that we may provide.
    2018   if (pluginTable->size < sizeof (NPPluginFuncs))
    2019     {
    2020       PLUGIN_ERROR ("Invalid plugin function table.");
    2021 
    2022       return NPERR_INVALID_FUNCTABLE_ERROR;
    2023     }
    2024 
    2025   // Ensure that the browser function table is large enough to store
    2026   // the number of browser functions that we may use.
    2027   if (browserTable->size < sizeof (NPNetscapeFuncs))
    2028     {
    2029       fprintf (stderr, "ERROR: Invalid browser function table. Some functionality may be restricted.\n");
    2030     }
    2031 
    2032   // Store in a local table the browser functions that we may use.
    2033   browser_functions.size                    = browserTable->size;
    2034   browser_functions.version                 = browserTable->version;
    2035   browser_functions.geturlnotify            = browserTable->geturlnotify;
    2036   browser_functions.geturl                  = browserTable->geturl;
    2037   browser_functions.posturlnotify           = browserTable->posturlnotify;
    2038   browser_functions.posturl                 = browserTable->posturl;
    2039   browser_functions.requestread             = browserTable->requestread;
    2040   browser_functions.newstream               = browserTable->newstream;
    2041   browser_functions.write                   = browserTable->write;
    2042   browser_functions.destroystream           = browserTable->destroystream;
    2043   browser_functions.status                  = browserTable->status;
    2044   browser_functions.uagent                  = browserTable->uagent;
    2045   browser_functions.memalloc                = browserTable->memalloc;
    2046   browser_functions.memfree                 = browserTable->memfree;
    2047   browser_functions.memflush                = browserTable->memflush;
    2048   browser_functions.reloadplugins           = browserTable->reloadplugins;
    2049   browser_functions.getJavaEnv              = browserTable->getJavaEnv;
    2050   browser_functions.getJavaPeer             = browserTable->getJavaPeer;
    2051   browser_functions.getvalue                = browserTable->getvalue;
    2052   browser_functions.setvalue                = browserTable->setvalue;
    2053   browser_functions.invalidaterect          = browserTable->invalidaterect;
    2054   browser_functions.invalidateregion        = browserTable->invalidateregion;
    2055   browser_functions.forceredraw             = browserTable->forceredraw;
    2056   browser_functions.getstringidentifier     = browserTable->getstringidentifier;
    2057   browser_functions.getstringidentifiers    = browserTable->getstringidentifiers;
    2058   browser_functions.getintidentifier        = browserTable->getintidentifier;
    2059   browser_functions.identifierisstring      = browserTable->identifierisstring;
    2060   browser_functions.utf8fromidentifier      = browserTable->utf8fromidentifier;
    2061   browser_functions.intfromidentifier       = browserTable->intfromidentifier;
    2062   browser_functions.createobject            = browserTable->createobject;
    2063   browser_functions.retainobject            = browserTable->retainobject;
    2064   browser_functions.releaseobject           = browserTable->releaseobject;
    2065   browser_functions.invoke                  = browserTable->invoke;
    2066   browser_functions.invokeDefault           = browserTable->invokeDefault;
    2067   browser_functions.evaluate                = browserTable->evaluate;
    2068   browser_functions.getproperty             = browserTable->getproperty;
    2069   browser_functions.setproperty             = browserTable->setproperty;
    2070   browser_functions.removeproperty          = browserTable->removeproperty;
    2071   browser_functions.hasproperty             = browserTable->hasproperty;
    2072   browser_functions.hasmethod               = browserTable->hasmethod;
    2073   browser_functions.releasevariantvalue     = browserTable->releasevariantvalue;
    2074   browser_functions.setexception            = browserTable->setexception;
    2075   browser_functions.pluginthreadasynccall   = browserTable->pluginthreadasynccall;
    2076 #if MOZILLA_VERSION_COLLAPSED >= 1090100
    2077   browser_functions.getvalueforurl          = browserTable->getvalueforurl;
    2078   browser_functions.setvalueforurl          = browserTable->setvalueforurl;
    2079 #endif
    2080 
    2081   // Return to the browser the plugin functions that we implement.
     2094  //Ensure any unused fields are NULL
     2095  memset(&browser_functions, 0, sizeof(NPNetscapeFuncs));
     2096
     2097  //browserTable->size can be larger than sizeof(NPNetscapeFuncs) (PR1106)
     2098  size_t copySize = browserTable->size < sizeof(NPNetscapeFuncs) ?
     2099                    browserTable->size : sizeof(NPNetscapeFuncs);
     2100
     2101  //Copy fields according to given size
     2102  memcpy(&browser_functions, browserTable, copySize);
     2103
     2104  return true;
     2105}
     2106
     2107/* Set the plugin table to the correct contents, taking care not to write past
     2108 * the provided object space */
     2109static bool
     2110initialize_plugin_table(NPPluginFuncs* pluginTable)
     2111{
     2112#define NPPLUGINFUNCS_LAST_FIELD_USED (pluginTable->getvalue)
     2113
     2114  //Determine the size in bytes, as a difference of the address past the last used field
     2115  //And the browser table address
     2116  size_t usedSize = (char*)(1 + &NPPLUGINFUNCS_LAST_FIELD_USED) - (char*)pluginTable;
     2117
     2118  // compare the reported size versus the size we required
     2119  if (pluginTable->size < usedSize)
     2120    return false;
     2121
    20822122  pluginTable->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
    20832123  pluginTable->size = sizeof (NPPluginFuncs);
     
    21092149#endif
    21102150
     2151  return true;
     2152}
     2153
     2154// FACTORY FUNCTIONS
     2155
     2156// Provides the browser with pointers to the plugin functions that we
     2157// implement and initializes a local table with browser functions that
     2158// we may wish to call.  Called once, after browser startup and before
     2159// the first plugin instance is created.
     2160// The field 'initialized' is set to true once this function has
     2161// finished. If 'initialized' is already true at the beginning of
     2162// this function, then it is evident that NP_Initialize has already
     2163// been called. There is no need to call this function more than once and
     2164// this workaround avoids any duplicate calls.
     2165NPError
     2166NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable)
     2167{
     2168  PLUGIN_DEBUG ("NP_Initialize\n");
     2169
     2170  if ((browserTable == NULL) || (pluginTable == NULL))
     2171  {
     2172    PLUGIN_ERROR ("Browser or plugin function table is NULL.");
     2173
     2174    return NPERR_INVALID_FUNCTABLE_ERROR;
     2175  }
     2176
     2177  // Ensure that the major version of the plugin API that the browser
     2178  // expects is not more recent than the major version of the API that
     2179  // we've implemented.
     2180  if ((browserTable->version >> 8) > NP_VERSION_MAJOR)
     2181    {
     2182      PLUGIN_ERROR ("Incompatible version.");
     2183
     2184      return NPERR_INCOMPATIBLE_VERSION_ERROR;
     2185    }
     2186
     2187  // Copy into a global table (browser_functions) the browser functions that we may use.
     2188  // If the browser functions needed change, update NPNETSCAPEFUNCS_LAST_FIELD_USED
     2189  // within this function
     2190  bool browser_functions_supported = initialize_browser_functions(browserTable);
     2191
     2192  // Check if everything we rely on is supported
     2193  if ( !browser_functions_supported )
     2194  {
     2195        PLUGIN_ERROR ("Invalid browser function table.");
     2196
     2197        return NPERR_INVALID_FUNCTABLE_ERROR;
     2198  }
     2199
     2200  // Return to the browser the plugin functions that we implement.
     2201  // If the plugin functions needed change, update NPPLUGINFUNCS_LAST_FIELD_USED
     2202  // within this function
     2203  bool plugin_functions_supported = initialize_plugin_table(pluginTable);
     2204
     2205  // Check if everything we rely on is supported
     2206  if ( !plugin_functions_supported )
     2207  {
     2208    PLUGIN_ERROR ("Invalid plugin function table.");
     2209
     2210    return NPERR_INVALID_FUNCTABLE_ERROR;
     2211  }
     2212
    21112213  // Re-setting the above tables multiple times is OK (as the
    21122214  // browser may change its function locations). However
     
    22632365// Returns a string describing the MIME type that this plugin
    22642366// handles.
    2265 char*
     2367#ifdef LEGACY_XULRUNNERAPI
     2368  char*
     2369#else
     2370  const char*
     2371#endif
    22662372NP_GetMIMEDescription ()
    22672373{
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc

    r348 r416  
    124124            this->sendWindow(message_parts);
    125125            return true;
     126        } else if (!command->find("Finalize"))
     127        {
     128            // Object can be finalized from the main thread only. And this
     129                // call returns immediately, so we do it in the same thread.
     130            this->finalize(message_parts);
     131            return true;
    126132        } else if (!command->find("GetMember") ||
    127133                   !command->find("SetMember") ||
     
    131137                   !command->find("SetSlot") ||
    132138                   !command->find("Eval") ||
    133                    !command->find("Finalize") ||
    134139                   !command->find("LoadURL"))
    135140        {
     
    242247    IcedTeaPluginUtilities::callAndWaitForResult(instance, &_eval, &thread_data);
    243248
    244     NPVariant* result_variant = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
    245     std::string result_variant_jniid = std::string();
    246     createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
    247 
    248249    IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
    249250    response += " JavaScriptEval ";
    250     response += result_variant_jniid;
     251    response += thread_data.result;
    251252
    252253    plugin_to_java_bus->post(response.c_str());
     
    275276    NPVariant* result_variant;
    276277    std::string result_variant_jniid = std::string();
    277     NPVariant* args_array;
     278    NPVariant* args_array = NULL;
    278279    AsyncCallThreadData thread_data = AsyncCallThreadData();
    279280
     
    331332    IcedTeaPluginUtilities::callAndWaitForResult(instance, &_call, &thread_data);
    332333
    333     result_variant = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
    334 
    335     if (result_variant)
    336     {
    337         createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
    338     } else
    339     {
    340         result_variant_jniid = "0";
    341     }
    342 
    343334    IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
    344335    response += " JavaScriptCall ";
    345     response += result_variant_jniid;
     336    response += thread_data.result;
    346337
    347338    plugin_to_java_bus->post(response.c_str());
     
    410401    NPP instance;
    411402    NPVariant* member;
    412     NPIdentifier property_identifier;
     403    std::string property_id = std::string();
     404    bool int_identifier;
    413405
    414406    JavaRequestProcessor java_request = JavaRequestProcessor();
     
    440432    if (*(message_parts->at(4)) == "SetSlot")
    441433    {
    442         property_identifier = browser_functions.getintidentifier(atoi(message_parts->at(6)->c_str()));
     434        property_id.append(*(message_parts->at(6)));
     435        int_identifier = true;
    443436    } else
    444437    {
     
    452445        }
    453446
    454         property_identifier = browser_functions.getstringidentifier(java_result->return_string->c_str());
     447        property_id.append(*(java_result->return_string));
     448        int_identifier = false;
    455449    }
    456450
     
    462456    thread_data.parameters.push_back(instance);
    463457    thread_data.parameters.push_back(NPVARIANT_TO_OBJECT(*member));
    464     thread_data.parameters.push_back(&property_identifier);
     458    thread_data.parameters.push_back(&property_id);
    465459    thread_data.parameters.push_back(&value);
     460    thread_data.parameters.push_back(&int_identifier);
    466461
    467462    IcedTeaPluginUtilities::callAndWaitForResult(instance, &_setMember, &thread_data);
     
    478473 * can only be requested from the main thread in Mozilla, this function
    479474 * does whatever it can seperately, and then makes an internal request that
    480  * causes _sendMember to do the rest of the work.
     475 * causes _getMember to do the rest of the work.
    481476 *
    482477 * @param message_parts The request message
     
    491486    JavaResultData* java_result;
    492487    NPVariant* parent_ptr;
     488    NPVariant* member_ptr;
    493489
    494490    //int reference;
    495491    std::string member_id = std::string();
    496     std::string jsObjectClassID = std::string();
    497     std::string jsObjectConstructorID = std::string();
    498492    std::string response = std::string();
     493    std::string result_id = std::string();
    499494
    500495    NPIdentifier member_identifier;
     
    503498    int instance_id;
    504499    int reference;
     500    bool int_identifier;
    505501
    506502    // debug printout of parent thread data
     
    517513    if (*(message_parts->at(4)) == "GetSlot")
    518514    {
    519         member_identifier = browser_functions.getintidentifier(atoi(member_id.c_str()));
     515        int_identifier=true;
    520516    } else
    521517    {
     
    530526        }
    531527
    532         member_identifier = browser_functions.getstringidentifier(java_result->return_string->c_str());
     528        member_id.assign(*(java_result->return_string));
     529        int_identifier=false;
    533530    }
    534531
     
    546543    thread_data.parameters.push_back(instance);
    547544    thread_data.parameters.push_back(NPVARIANT_TO_OBJECT(*parent_ptr));
    548     thread_data.parameters.push_back(&member_identifier);
     545    thread_data.parameters.push_back(&member_id);
     546    thread_data.parameters.push_back(&int_identifier);
    549547
    550548    IcedTeaPluginUtilities::callAndWaitForResult(instance, &_getMember, &thread_data);
    551549
    552     PLUGIN_DEBUG("Member PTR after internal request: %s\n", thread_data.result.c_str());
    553 
    554     java_result = java_request.findClass(0, "netscape.javascript.JSObject");
    555 
    556     // the result we want is in result_string (assuming there was no error)
    557     if (java_result->error_occurred)
    558     {
    559         printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
    560         //goto cleanup;
    561     }
    562 
    563     jsObjectClassID.append(*(java_result->return_string));
    564 
    565     args = std::vector<std::string>();
    566     std::string longArg = "J";
    567     args.push_back(longArg);
    568 
    569     java_result = java_request.getMethodID(jsObjectClassID,
    570                                            browser_functions.getstringidentifier("<init>"),
    571                                            args);
    572 
    573     // the result we want is in result_string (assuming there was no error)
    574     if (java_result->error_occurred)
    575     {
    576         printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
    577         //goto cleanup;
    578     }
    579 
    580     jsObjectConstructorID.append(*(java_result->return_string));
    581 
    582     // We have the method id. Now create a new object.
    583 
    584     args.clear();
    585     args.push_back(thread_data.result);
    586     java_result = java_request.newObjectWithConstructor("",
    587                                          jsObjectClassID,
    588                                          jsObjectConstructorID,
    589                                          args);
    590 
    591     // the result we want is in result_string (assuming there was no error)
    592     if (java_result->error_occurred)
    593     {
    594         printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
    595         //goto cleanup;
    596     }
    597 
    598 
    599550    IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
    600     if (*(message_parts->at(2)) == "GetSlot")
    601     {
     551    if (*(message_parts->at(4)) == "GetSlot")
     552    {
     553        response.append(" JavaScriptGetSlot ");
     554    } else {
    602555        response.append(" JavaScriptGetMember ");
    603     } else {
    604         response.append(" JavaScriptGetSlot ");
    605     }
    606     response.append(java_result->return_string->c_str());
     556    }
     557    response.append(thread_data.result);
    607558    plugin_to_java_bus->post(response.c_str());
    608559}
     
    756707                processor->setMember(message_parts);
    757708                pthread_mutex_unlock(&syn_write_mutex);
    758             } else if (command == "Finalize")
    759             {
    760                 // write methods are synchronized
    761                 pthread_mutex_lock(&syn_write_mutex);
    762                 processor->finalize(message_parts);
    763                 pthread_mutex_unlock(&syn_write_mutex);
    764709            } else if (command == "LoadURL") // For instance X url <url> <target>
    765710            {
     
    804749    NPVariant value_variant = NPVariant();
    805750    NPObject* member;
    806     NPIdentifier* property;
     751    NPIdentifier property_identifier;
     752
    807753
    808754    std::vector<void*> parameters = ((AsyncCallThreadData*) data)->parameters;
    809755    instance = (NPP) parameters.at(0);
    810756    member = (NPObject*) parameters.at(1);
    811     property = (NPIdentifier*) parameters.at(2);
     757    std::string*  property_id = (std::string*) parameters.at(2);
    812758    value = (std::string*) parameters.at(3);
    813 
    814     PLUGIN_DEBUG("Setting %s on instance %p, object %p to value %s\n", browser_functions.utf8fromidentifier(*property), instance, member, value->c_str());
     759    bool* int_identifier = (bool*) parameters.at(4);
     760
     761    if(*int_identifier==true)
     762        property_identifier = browser_functions.getintidentifier(atoi(property_id->c_str()));
     763    else
     764        property_identifier = browser_functions.getstringidentifier(property_id->c_str());
     765
     766    PLUGIN_DEBUG("Setting %s on instance %p, object %p to value %s\n", browser_functions.utf8fromidentifier(property_identifier), instance, member, value->c_str());
    815767
    816768    IcedTeaPluginUtilities::javaResultToNPVariant(instance, value, &value_variant);
    817769
    818     ((AsyncCallThreadData*) data)->call_successful = browser_functions.setproperty(instance, member, *property, &value_variant);
     770    ((AsyncCallThreadData*) data)->call_successful = browser_functions.setproperty(instance, member, property_identifier, &value_variant);
    819771
    820772    ((AsyncCallThreadData*) data)->result_ready = true;
     
    833785    instance = (NPP) parameters.at(0);
    834786    parent_ptr = (NPObject*) parameters.at(1);
    835     NPIdentifier* member_identifier = (NPIdentifier*) parameters.at(2);
     787    std::string*  member_id = (std::string*) parameters.at(2);
     788    NPIdentifier member_identifier;
     789
     790    bool* int_identifier = (bool*) parameters.at(3);
     791
     792    if(*int_identifier==true)
     793        member_identifier = browser_functions.getintidentifier(atoi(member_id->c_str()));
     794    else
     795        member_identifier = browser_functions.getstringidentifier(member_id->c_str());
    836796
    837797    // Get the NPVariant corresponding to this member
    838     PLUGIN_DEBUG("Looking for %p %p %p (%s)\n", instance, parent_ptr, member_identifier, browser_functions.utf8fromidentifier(*member_identifier));
    839 
    840     if (!browser_functions.hasproperty(instance, parent_ptr, *member_identifier))
    841     {
    842         printf("%s not found!\n", browser_functions.utf8fromidentifier(*member_identifier));
    843     }
    844     ((AsyncCallThreadData*) data)->call_successful = browser_functions.getproperty(instance, parent_ptr, *member_identifier, member_ptr);
     798    PLUGIN_DEBUG("Looking for %p %p %p (%s)\n", instance, parent_ptr, member_identifier, browser_functions.utf8fromidentifier(member_identifier));
     799
     800    if (!browser_functions.hasproperty(instance, parent_ptr, member_identifier))
     801    {
     802        printf("%s not found!\n", browser_functions.utf8fromidentifier(member_identifier));
     803    }
     804    ((AsyncCallThreadData*) data)->call_successful = browser_functions.getproperty(instance, parent_ptr, member_identifier, member_ptr);
    845805
    846806    IcedTeaPluginUtilities::printNPVariant(*member_ptr);
     
    848808    if (((AsyncCallThreadData*) data)->call_successful)
    849809    {
    850         IcedTeaPluginUtilities::JSIDToString(member_ptr, &member_ptr_str);
     810        createJavaObjectFromVariant(instance, *member_ptr, &member_ptr_str);
    851811        ((AsyncCallThreadData*) data)->result.append(member_ptr_str);
     812
    852813    }
    853814    ((AsyncCallThreadData*) data)->result_ready = true;
     
    867828    NPIdentifier script_identifier;
    868829    NPString script = NPString();
    869     NPVariant* eval_result = new NPVariant();
    870     std::string eval_result_ptr_str = std::string();
     830    NPVariant* eval_variant = new NPVariant();
     831    std::string eval_variant_str = std::string();
    871832
    872833    PLUGIN_DEBUG("_eval called\n");
     
    882843    script.utf8length = script_str->size();
    883844
    884     PLUGIN_DEBUG("Evaluating: %s\n", script.utf8characters);
     845    PLUGIN_DEBUG("Evaluating: %s\n", script_str->c_str());
    885846#else
    886847    script.UTF8Characters = script_str->c_str();
    887848    script.UTF8Length = script_str->size();
    888849
    889     PLUGIN_DEBUG("Evaluating: %s\n", script.UTF8Characters);
     850    PLUGIN_DEBUG("Evaluating: %s\n", script_str->c_str());
    890851#endif
    891852
    892     ((AsyncCallThreadData*) data)->call_successful = browser_functions.evaluate(instance, window_ptr, &script, eval_result);
    893     IcedTeaPluginUtilities::printNPVariant(*eval_result);
     853    ((AsyncCallThreadData*) data)->call_successful = browser_functions.evaluate(instance, window_ptr, &script, eval_variant);
     854    IcedTeaPluginUtilities::printNPVariant(*eval_variant);
    894855
    895856    if (((AsyncCallThreadData*) data)->call_successful)
    896857    {
    897         IcedTeaPluginUtilities::JSIDToString(eval_result, &eval_result_ptr_str);
    898         ((AsyncCallThreadData*) data)->result.append(eval_result_ptr_str);
    899     }
     858        if (eval_variant)
     859        {
     860            createJavaObjectFromVariant(instance, *eval_variant, &eval_variant_str);
     861        } else
     862        {
     863            eval_variant_str = "0";
     864        }
     865    } else
     866    {
     867        eval_variant_str = "0";
     868    }
     869
     870    ((AsyncCallThreadData*) data)->result.append(eval_variant_str);
    900871    ((AsyncCallThreadData*) data)->result_ready = true;
    901872
     
    940911    if (((AsyncCallThreadData*) data)->call_successful)
    941912    {
    942         IcedTeaPluginUtilities::JSIDToString(call_result, &call_result_ptr_str);
    943         ((AsyncCallThreadData*) data)->result.append(call_result_ptr_str);
    944     }
    945 
     913
     914        if (call_result)
     915        {
     916            createJavaObjectFromVariant(instance, *call_result, &call_result_ptr_str);
     917        } else
     918        {
     919                call_result_ptr_str = "0";
     920        }
     921    } else
     922    {
     923        call_result_ptr_str = "0";
     924    }
     925
     926    ((AsyncCallThreadData*) data)->result.append(call_result_ptr_str);
    946927    ((AsyncCallThreadData*) data)->result_ready = true;
    947928
     
    1014995    ((AsyncCallThreadData*) data)->result_ready = true;
    1015996
    1016     g_free(decoded_url);
     997    free(decoded_url);
    1017998    decoded_url = NULL;
    1018999
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.cc

    r348 r416  
    147147IcedTeaPluginUtilities::JSIDToString(void* id, std::string* result)
    148148{
    149 
    150         char* id_str = (char*) malloc(sizeof(char)*20); // max = long long = 8446744073709551615 == 19 chars
     149        char id_str[NUM_STR_BUFFER_SIZE];
    151150
    152151        if (sizeof(void*) == sizeof(long long))
    153152        {
    154                 sprintf(id_str, "%llu", id);
     153                snprintf(id_str, NUM_STR_BUFFER_SIZE, "%llu", id);
    155154        }
    156155        else
    157156        {
    158                 sprintf(id_str, "%lu", id); // else use long
     157                snprintf(id_str, NUM_STR_BUFFER_SIZE, "%lu", id); // else use long
    159158        }
    160159
     
    162161
    163162        PLUGIN_DEBUG("Converting pointer %p to %s\n", id, id_str);
    164         free(id_str);
    165163}
    166164
     
    258256IcedTeaPluginUtilities::itoa(int i, std::string* result)
    259257{
    260         // largest possible integer is 10 digits long
    261         char* int_str = (char*) malloc(sizeof(char)*11);
    262         sprintf(int_str, "%d", i);
     258        char int_str[NUM_STR_BUFFER_SIZE];
     259        snprintf(int_str, NUM_STR_BUFFER_SIZE, "%d", i);
    263260        result->append(int_str);
    264 
    265         free(int_str);
    266261}
    267262
     
    293288 * @param str The string to split
    294289 * @param The delimiters to split on
    295  * @return A string vector containing the aplit components
     290 * @return A string vector containing the split components
    296291 */
    297292
     
    303298        char* copy;
    304299
    305         // Tokening is done on a copy
     300        // Tokenization is done on a copy
    306301        copy = (char*) malloc (sizeof(char)*strlen(str) + 1);
    307302        strcpy(copy, str);
     
    314309            // Allocation on heap since caller has no way to knowing how much will
    315310            // be needed. Make sure caller cleans up!
    316                 std::string* s = new std::string();
    317                 s->append(tok_ptr);
    318                 v->push_back(s);
    319                 tok_ptr = strtok (NULL, " ");
     311            std::string* s = new std::string();
     312            s->append(tok_ptr);
     313            v->push_back(s);
     314            tok_ptr = strtok (NULL, delim);
    320315        }
     316        free(copy);
    321317
    322318        return v;
     
    372368        ostream << length;
    373369
    374         // UTF-8 characters are 4-bytes max + space + '\0'
    375         char* hex_value = (char*) malloc(sizeof(char)*10);
     370        char hex_value[NUM_STR_BUFFER_SIZE];
    376371
    377372        for (int i = 0; i < str->length(); i++)
    378373        {
    379                 sprintf(hex_value, " %hx", str->at(i));
     374                snprintf(hex_value, NUM_STR_BUFFER_SIZE," %hx", str->at(i));
    380375                ostream << hex_value;
    381376        }
     
    384379        *utf_str = ostream.str();
    385380
    386         free(hex_value);
    387381        PLUGIN_DEBUG("Converted %s to UTF-8 string %s\n", str->c_str(), utf_str->c_str());
    388382}
     
    669663    else if (NPVARIANT_IS_STRING(variant))
    670664    {
    671 #if MOZILLA_VERSION_COLLAPSED < 1090200
    672         PLUGIN_DEBUG("STRING: %s\n", NPVARIANT_TO_STRING(variant).utf8characters);
    673 #else
    674         PLUGIN_DEBUG("STRING: %s\n", NPVARIANT_TO_STRING(variant).UTF8Characters);
    675 #endif
     665        std::string str = IcedTeaPluginUtilities::NPVariantAsString(variant);
     666        PLUGIN_DEBUG("STRING: %s (length=%d)\n", str.c_str(), str.size());
    676667    }
    677668    else
     
    684675IcedTeaPluginUtilities::NPVariantToString(NPVariant variant, std::string* result)
    685676{
    686         char* str = (char*) malloc(sizeof(char)*32); // enough for everything except string
    687 
    688     if (NPVARIANT_IS_VOID(variant))
    689     {
    690         sprintf(str, "%p", variant);
    691     }
    692     else if (NPVARIANT_IS_NULL(variant))
    693     {
    694         sprintf(str, "NULL");
    695     }
    696     else if (NPVARIANT_IS_BOOLEAN(variant))
    697     {
    698         if (NPVARIANT_TO_BOOLEAN(variant))
    699                 sprintf(str, "true");
    700         else
    701                 sprintf(str, "false");
    702     }
    703     else if (NPVARIANT_IS_INT32(variant))
    704     {
    705         sprintf(str, "%d", NPVARIANT_TO_INT32(variant));
    706     }
    707     else if (NPVARIANT_IS_DOUBLE(variant))
    708     {
    709         sprintf(str, "%f", NPVARIANT_TO_DOUBLE(variant));;
    710     }
    711     else if (NPVARIANT_IS_STRING(variant))
    712     {
    713         free(str);
    714 #if MOZILLA_VERSION_COLLAPSED < 1090200
    715         str = (char*) malloc(sizeof(char)*NPVARIANT_TO_STRING(variant).utf8length);
    716         sprintf(str, "%s", NPVARIANT_TO_STRING(variant).utf8characters);
    717 #else
    718         str = (char*) malloc(sizeof(char)*NPVARIANT_TO_STRING(variant).UTF8Length);
    719         sprintf(str, "%s", NPVARIANT_TO_STRING(variant).UTF8Characters);
    720 #endif
    721     }
     677  char conv_str[NUM_STR_BUFFER_SIZE]; // conversion buffer
     678  bool was_string_already = false;
     679
     680  if (NPVARIANT_IS_STRING(variant))
     681  {
     682    result->append(IcedTeaPluginUtilities::NPVariantAsString(variant));
     683    was_string_already = true;
     684  }
     685  else if (NPVARIANT_IS_VOID(variant))
     686  {
     687    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "%p", variant);
     688  }
     689  else if (NPVARIANT_IS_NULL(variant))
     690  {
     691    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "NULL");
     692  }
     693  else if (NPVARIANT_IS_BOOLEAN(variant))
     694  {
     695    if (NPVARIANT_TO_BOOLEAN(variant))
     696      snprintf(conv_str, NUM_STR_BUFFER_SIZE, "true");
    722697    else
    723     {
    724         sprintf(str, "[Object %p]", variant);
    725     }
    726 
    727     result->append(str);
    728     free(str);
     698      snprintf(conv_str, NUM_STR_BUFFER_SIZE, "false");
     699  }
     700  else if (NPVARIANT_IS_INT32(variant))
     701  {
     702    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "%d", NPVARIANT_TO_INT32(variant));
     703  }
     704  else if (NPVARIANT_IS_DOUBLE(variant))
     705  {
     706    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "%f", NPVARIANT_TO_DOUBLE(variant));
     707  }
     708  else
     709  {
     710    snprintf(conv_str, NUM_STR_BUFFER_SIZE, "[Object %p]", variant);
     711  }
     712
     713  if (!was_string_already){
     714    result->append(conv_str);
     715  }
    729716}
    730717
     
    865852    IcedTeaPluginUtilities::printNPVariant(constructor_str);
    866853
    867     std::string constructor_name = std::string();
    868 
    869 #if MOZILLA_VERSION_COLLAPSED < 1090200
    870     constructor_name.append(NPVARIANT_TO_STRING(constructor_str).utf8characters);
    871 #else
    872     constructor_name.append(NPVARIANT_TO_STRING(constructor_str).UTF8Characters);
    873 #endif
     854    std::string constructor_name = IcedTeaPluginUtilities::NPVariantAsString(constructor_str);
    874855
    875856    PLUGIN_DEBUG("Constructor for NPObject is %s\n", constructor_name.c_str());
     
    914895}
    915896
     897/* Copies a variant data type into a C++ string */
     898std::string
     899IcedTeaPluginUtilities::NPVariantAsString(NPVariant variant)
     900{
     901#if MOZILLA_VERSION_COLLAPSED < 1090200
     902  return std::string(
     903    NPVARIANT_TO_STRING(variant).utf8characters,
     904    NPVARIANT_TO_STRING(variant).utf8length);
     905#else
     906  return std::string(
     907    NPVARIANT_TO_STRING(variant).UTF8Characters,
     908    NPVARIANT_TO_STRING(variant).UTF8Length);
     909#endif
     910}
    916911
    917912/**
     
    10671062                PLUGIN_DEBUG("Error: Unable to initialize message queue mutex: %d\n", ret);
    10681063
    1069         PLUGIN_DEBUG("Mutexs %p and %p initialized\n", &subscriber_mutex, &msg_queue_mutex);
     1064        PLUGIN_DEBUG("Mutexes %p and %p initialized\n", &subscriber_mutex, &msg_queue_mutex);
    10701065}
    10711066
     
    11311126MessageBus::post(const char* message)
    11321127{
    1133         char* msg = (char*) malloc(sizeof(char)*strlen(message) + 1);
    11341128        bool message_consumed = false;
    1135 
    1136         // consumer frees this memory
    1137         strcpy(msg, message);
    11381129
    11391130        PLUGIN_DEBUG("Trying to lock %p...\n", &msg_queue_mutex);
    11401131        pthread_mutex_lock(&subscriber_mutex);
    11411132
    1142     PLUGIN_DEBUG("Message %s received on bus. Notifying subscribers.\n", msg);
     1133    PLUGIN_DEBUG("Message %s received on bus. Notifying subscribers.\n", message);
    11431134
    11441135    std::list<BusSubscriber*>::const_iterator i;
    11451136    for( i = subscribers.begin(); i != subscribers.end() && !message_consumed; ++i ) {
    1146         PLUGIN_DEBUG("Notifying subscriber %p of %s\n", *i, msg);
    1147         message_consumed = ((BusSubscriber*) *i)->newMessageOnBus(msg);
     1137        PLUGIN_DEBUG("Notifying subscriber %p of %s\n", *i, message);
     1138        message_consumed = ((BusSubscriber*) *i)->newMessageOnBus(message);
    11481139    }
    11491140
     
    11511142
    11521143    if (!message_consumed)
    1153         PLUGIN_DEBUG("Warning: No consumer found for message %s\n", msg);
     1144        PLUGIN_DEBUG("Warning: No consumer found for message %s\n", message);
    11541145
    11551146    PLUGIN_DEBUG("%p unlocked...\n", &msg_queue_mutex);
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/IcedTeaPluginUtils.h

    r348 r416  
    9797     (*c >= 'A' && *c <= 'F'))
    9898
     99//long long max ~ 19 chars + terminator
     100//leave some room for converting strings like "<var> = %d"
     101const size_t NUM_STR_BUFFER_SIZE = 32;
     102
    99103/*
    100104 * This struct holds data specific to a Java operation requested by the plugin
     
    206210        static void itoa(int i, std::string* result);
    207211
     212        /* Copies a variant data type into a C++ string */
     213        static std::string NPVariantAsString(NPVariant variant);
     214
    208215        /* Frees the given vector and the strings that its contents point to */
    209216        static void freeStringPtrVector(std::vector<std::string*>* v);
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/netscape/javascript/JSObject.java

    r348 r416  
    131131            boolean mayProceed = false;
    132132
    133             for (int i = 0; i < stack.length; i++) {
    134                 if (stack[i].getClassName().equals("netscape.javascript.JSObject") &&
    135                         stack[i].getMethodName().equals("getWindow")) {
     133            for (StackTraceElement element : stack) {
     134                if (element.getClassName().equals("netscape.javascript.JSObject") &&
     135                        element.getMethodName().equals("getWindow")) {
    136136                    mayProceed = true;
    137137                }
     
    210210
    211211        PluginDebug.debug("JSObject.call ", methodName);
    212         for (int i = 0; i < args.length; i++)
    213             PluginDebug.debug(" ", args[i]);
     212        for (Object arg : args) {
     213            PluginDebug.debug(" ", arg);
     214        }
    214215        PluginDebug.debug("");
    215216        return PluginAppletViewer.call(internal, methodName, args);
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java

    r348 r416  
    1 /* VoidPluginCallRequest -- represent Java-to-JavaScript requests
     1/* AppletSecurityContextManager -- handles messages in an appropriate security
     2 context
     3
    24   Copyright (C) 2008  Red Hat
    35
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java

    r348 r416  
    5151        // FIXME: Is it even possible to distinguish between null and void
    5252        // here?
    53         if (args[3] != "null" && args[3] != "void")
     53        if (!"null".equals(args[3]) && !"void".equals(args[3]))
    5454            object = AppletSecurityContextManager.getSecurityContext(0).getObject(Integer.parseInt(args[3]));
    5555        setDone(true);
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/JavaConsole.java

    r348 r416  
    6666import net.sourceforge.jnlp.config.DeploymentConfiguration;
    6767import net.sourceforge.jnlp.runtime.JNLPRuntime;
     68import net.sourceforge.jnlp.util.ImageResources;
    6869
    6970/**
     
    9394
    9495        consoleWindow = new JFrame("Java Console");
     96        consoleWindow.setIconImages(ImageResources.INSTANCE.getApplicationImages());
    9597
    9698        JPanel contentPanel = new JPanel();
     
    307309        boolean toShowConsole = false;
    308310
    309         for (int i = 0; i < args.length; i++) {
    310             if (args[i] == "--show-console") {
     311        for (String arg : args) {
     312            if ("--show-console".equals(arg)) {
    311313                toShowConsole = true;
    312314            }
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java

    r348 r416  
    244244        if (System.getSecurityManager() == null) {
    245245            JNLPRuntime.initialize(/* isApplication */false);
    246             JNLPRuntime.setDefaultLaunchHandler(new DefaultLaunchHandler());
     246            JNLPRuntime.setDefaultLaunchHandler(new DefaultLaunchHandler(System.err));
    247247        }
    248248
     
    12961296        Permissions grantedPermissions = new Permissions();
    12971297
    1298         for (int i = 0; i < nsPrivilegeList.length; i++) {
    1299             String privilege = nsPrivilegeList[i];
    1300 
     1298        for (String privilege : nsPrivilegeList) {
    13011299            if (privilege.equals("UniversalBrowserRead")) {
    13021300                BrowserReadPermission bp = new BrowserReadPermission();
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java

    r348 r416  
    124124
    125125    public AppletPanel createPanel(PluginStreamHandler streamhandler,
    126                                     int identifier,
    127                                     long handle, int x, int y,
    128                                     final URL doc,
    129                                     final Hashtable<String, String> atts) {
     126                                   final int identifier,
     127                                   final long handle, int x, int y,
     128                                   final URL doc,
     129                                   final Hashtable<String, String> atts) {
    130130        final NetxPanel panel = AccessController.doPrivileged(new PrivilegedAction<NetxPanel>() {
    131131            public NetxPanel run() {
     
    137137        });
    138138
    139         // create the frame.
    140         PluginAppletViewer.framePanel(identifier, handle, panel);
    141 
    142         panel.init();
    143 
    144         // Start the applet
    145         initEventQueue(panel);
     139        // Framing the panel needs to happen in a thread whose thread group
     140        // is the same as the threadgroup of the applet thread. If this
     141        // isn't the case, the awt eventqueue thread's context classloader
     142        // won't be set to a JNLPClassLoader, and when an applet class needs
     143        // to be loaded from the awt eventqueue, it won't be found.
     144        Thread panelInit = new Thread(panel.getThreadGroup(), new Runnable() {
     145            @Override public void run() {
     146                panel.createNewAppContext();
     147                // create the frame.
     148                PluginAppletViewer.framePanel(identifier, handle, panel);
     149                panel.init();
     150                // Start the applet
     151                initEventQueue(panel);
     152            }
     153        }, "NetXPanel initializer");
     154
     155        panelInit.start();
     156        while(panelInit.isAlive()) {
     157            try {
     158                panelInit.join();
     159            } catch (InterruptedException e) {
     160            }
     161        }
    146162
    147163        // Wait for the panel to initialize
     
    222238            String[] events = eventList.split(",");
    223239
    224             for (int i = 0; i < events.length; i++) {
    225                 PluginDebug.debug("Adding event to queue: ", events[i]);
    226                 if (events[i].equals("dispose"))
     240            for (String event : events) {
     241                PluginDebug.debug("Adding event to queue: ", event);
     242                if ("dispose".equals(event))
    227243                    panel.sendEvent(AppletPanel.APPLET_DISPOSE);
    228                 else if (events[i].equals("load"))
     244                else if ("load".equals(event))
    229245                    panel.sendEvent(AppletPanel.APPLET_LOAD);
    230                 else if (events[i].equals("init"))
     246                else if ("init".equals(event))
    231247                    panel.sendEvent(AppletPanel.APPLET_INIT);
    232                 else if (events[i].equals("start"))
     248                else if ("start".equals(event))
    233249                    panel.sendEvent(AppletPanel.APPLET_START);
    234                 else if (events[i].equals("stop"))
     250                else if ("stop".equals(event))
    235251                    panel.sendEvent(AppletPanel.APPLET_STOP);
    236                 else if (events[i].equals("destroy"))
     252                else if ("destroy".equals(event))
    237253                    panel.sendEvent(AppletPanel.APPLET_DESTROY);
    238                 else if (events[i].equals("quit"))
     254                else if ("quit".equals(event))
    239255                    panel.sendEvent(AppletPanel.APPLET_QUIT);
    240                 else if (events[i].equals("error"))
     256                else if ("error".equals(event))
    241257                    panel.sendEvent(AppletPanel.APPLET_ERROR);
    242258                else
    243259                    // non-fatal error if we get an unrecognized event
    244                     PluginDebug.debug("Unrecognized event name: ", events[i]);
     260                    PluginDebug.debug("Unrecognized event name: ", event);
    245261            }
    246262
     
    16101626                appletShutdown(p);
    16111627                appletPanels.removeElement(p);
     1628               
     1629                // Mark classloader unusable
     1630                ((JNLPClassLoader) cl).decrementLoaderUseCount();
    16121631
    16131632                try {
     
    19051924                        String att = t.get("name");
    19061925
    1907                         if (atts.containsKey(att))
    1908                             continue;
    1909 
    19101926                        if (att == null) {
    19111927                            statusMsgStream.println(requiresNameWarning);
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequest.java

    r348 r416  
    3838package sun.applet;
    3939
    40 // FIXME: for each type of request extend a new (anonymous?)
    41 // PluginCallRequest.
    4240public abstract class PluginCallRequest {
    4341    private String message;
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java

    r348 r416  
    1 /* VoidPluginCallRequest -- represent Java-to-JavaScript requests
     1/* PluginCallRequestFactory -- contains factory methods for dispatching
     2 an appropriate PluginCallRequest.
    23   Copyright (C) 2008  Red Hat
    34
     
    4243    public PluginCallRequest getPluginCallRequest(String id, String message, Long reference) {
    4344
    44         if (id == "member") {
     45        if ("member".equals(id)) {
    4546            return new GetMemberPluginCallRequest(message, reference);
    46         } else if (id == "void") {
     47        } else if ("void".equals(id)) {
    4748            return new VoidPluginCallRequest(message, reference);
    48         } else if (id == "window") {
     49        } else if ("window".equals(id)) {
    4950            return new GetWindowPluginCallRequest(message, reference);
    50         } else if (id == "proxyinfo") {
     51        } else if ("proxyinfo".equals(id)) {
    5152            return new PluginProxyInfoRequest(message, reference);
    52         } else if (id == "cookieinfo") {
     53        } else if ("cookieinfo".equals(id)) {
    5354            return new PluginCookieInfoRequest(message, reference);
    5455        } else {
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginCookieManager.java

    r348 r416  
    4646import java.util.Map;
    4747
     48import com.sun.jndi.toolkit.url.UrlUtil;
     49
    4850public class PluginCookieManager extends CookieManager {
     51    private PluginStreamHandler streamHandler;
     52
     53    public PluginCookieManager(PluginStreamHandler streamHandler) {
     54        this.streamHandler = streamHandler;
     55    }
     56
     57    @Override
    4958    public Map<String, List<String>> get(URI uri,
    5059            Map<String, List<String>> requestHeaders) throws IOException {
     
    8594        return false;
    8695    }
     96
     97    @Override
     98    public void put(URI uri,
     99            Map<String, List<String>> responseHeaders) throws IOException {
     100        super.put(uri, responseHeaders);
     101
     102        for (Map.Entry<String, List<String>> headerEntry : responseHeaders.entrySet()) {
     103            String type = headerEntry.getKey();
     104            if ("Set-Cookie".equalsIgnoreCase(type) || "Set-Cookie2".equalsIgnoreCase(type)) {
     105                List<String> cookies = headerEntry.getValue();
     106                for (String cookie : cookies) {
     107                    streamHandler.write("plugin PluginSetCookie reference -1 " + UrlUtil.encode(uri.toString(), "UTF-8") + " " + cookie);
     108                }
     109            }
     110
     111        }
     112    }
    87113}
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginException.java

    r348 r416  
    1 /* VoidPluginCallRequest -- represent Java-to-JavaScript requests
     1/* PluginException -- represents an exception in handling a plugin message
    22   Copyright (C) 2008  Red Hat
    33
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMain.java

    r348 r416  
    119119            // Streams set. Start processing.
    120120            streamHandler.startProcessing();
     121
     122            setCookieHandler(streamHandler);
     123
    121124        } catch (Exception e) {
    122125            e.printStackTrace();
     
    200203        // override the proxy selector set by JNLPRuntime
    201204        ProxySelector.setDefault(new PluginProxySelector());
    202 
    203         CookieManager ckManager = new PluginCookieManager();
     205    }
     206
     207    private static void setCookieHandler(PluginStreamHandler streamHandler) {
     208        CookieManager ckManager = new PluginCookieManager(streamHandler);
    204209        CookieHandler.setDefault(ckManager);
    205210    }
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java

    r348 r416  
    1 /* VoidPluginCallRequest -- represent Java-to-JavaScript requests
     1/* PluginMessageHandlerWorker -- worker thread for handling messages
    22   Copyright (C) 2008  Red Hat
    33
  • branches/vendor/sourceforge/icedtea-web/current/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java

    r348 r416  
    6060
    6161    private PluginMessageConsumer consumer;
    62     private Boolean shuttingDown = false;
     62    private volatile boolean shuttingDown = false;
    6363
    6464
     
    323323
    324324            if (message == null || message.equals("shutdown")) {
    325                 synchronized (shuttingDown) {
    326                     shuttingDown = true;
    327                 }
     325                shuttingDown = true;
    328326                try {
    329327                    // Close input/output channels to plugin.
     
    363361                // if we are shutting down, ignore write failures as
    364362                // pipe may have closed
    365                 synchronized (shuttingDown) {
    366                     if (!shuttingDown) {
    367                         e.printStackTrace();
    368                     }
     363                if (!shuttingDown) {
     364                    e.printStackTrace();
    369365                }
    370366
  • branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/CommandLine.java

    r348 r416  
    88 */
    99
     10import java.io.File;
    1011import java.util.ArrayList;
    1112import java.util.List;
     
    3536        for (String each : args) {
    3637            try {
     38                if (each.contains("$")) continue;
     39                if (each.toLowerCase().endsWith(".jnlp")) continue;
    3740                classes.add(Class.forName(each));
    3841            } catch (ClassNotFoundException e) {
     
    4043            }
    4144        }
     45        RunListener jXmlOutput = new JunitLikeXmlOutputListener(system, new File("tests-output.xml"));
     46        addListener(jXmlOutput);
    4247        RunListener listener = new LessVerboseTextListener(system);
    4348        addListener(listener);
  • branches/vendor/sourceforge/icedtea-web/current/tests/junit-runner/LessVerboseTextListener.java

    r348 r416  
    77 */
    88import java.io.PrintStream;
     9import java.lang.reflect.Method;
     10import net.sourceforge.jnlp.annotations.KnownToFail;
    911
    1012import org.junit.internal.JUnitSystem;
     
    1820    private PrintStream writer;
    1921    private boolean testFailed = false;
     22    private int  totalK2F=0;
     23    private int  failedK2F=0;
     24    private int  passedK2F=0;
     25    private int  ignoredK2F=0;
    2026
    2127    public LessVerboseTextListener(JUnitSystem system) {
     
    2935
    3036    @Override
     37    public void testIgnored(Description description) throws Exception {
     38        writer.println("Ignored: " + description.getClassName() + "." + description.getMethodName());
     39        printK2F(writer, null, description);
     40    }
     41
     42
     43    @Override
    3144    public void testFailure(Failure failure) {
    3245        testFailed = true;
    3346        writer.println("FAILED: " + failure.getTestHeader() + " " + failure.getMessage());
     47        printK2F(writer,true,failure.getDescription());
    3448    }
    3549
     
    3852        if (!testFailed) {
    3953            writer.println("Passed: " + description.getClassName() + "." + description.getMethodName());
     54            printK2F(writer,false,description);
    4055        }
    4156    }
     
    4661        int failed = result.getFailureCount();
    4762        int ignored = result.getIgnoreCount();
     63        writer.println("Total tests run: "+result.getRunCount()+"; From  those : " + totalK2F + " known to fail");
     64        writer.println("Test known to fail: passed: " + passedK2F + "; failed: " + failedK2F + "; ignored: " + ignoredK2F);
    4865        writer.println("Test results: passed: " + passed + "; failed: " + failed + "; ignored: " + ignored);
     66
     67    }
     68
     69    private void printK2F(PrintStream writer, Boolean failed, Description description) {
     70        try {
     71            KnownToFail k2f = getK2F(description);
     72            if (k2f != null) {
     73                totalK2F++;
     74                if (failed != null) {
     75                    if (failed) {
     76                        failedK2F++;
     77                    } else {
     78                        passedK2F++;
     79                    }
     80                } else {
     81                    ignoredK2F++;
     82                }
     83                if (failed != null && !failed) {
     84                    writer.println(" - WARNING This test is known to fail, but have passed!");
     85                } else {
     86                    writer.println(" - This test is known to fail");
     87                }
     88            }
     89
     90
     91        } catch (Exception ex) {
     92            ex.printStackTrace();
     93        }
     94    }
     95
     96    public static  KnownToFail getK2F(Description description) {
     97        try {
     98            Class q = description.getTestClass();
     99            if (q != null) {
     100                String qs = description.getMethodName();
     101                if (qs.contains(" - ")) {
     102                    qs = qs.replaceAll(" - .*", "");
     103                }
     104                Method qm = q.getMethod(qs);
     105                if (qm != null) {
     106                    KnownToFail k2f = qm.getAnnotation(KnownToFail.class);
     107                    return k2f;
     108
     109                }
     110            }
     111        } catch (Exception ex) {
     112            ex.printStackTrace();
     113        }
     114        return null;
    49115    }
    50116
  • branches/vendor/sourceforge/icedtea-web/current/tests/netx/pac/pac-funcs-test.js

    r348 r416  
    2222        testDnsDomainLevels();
    2323        testShExpMatch();
    24         testWeekdayRange();
    2524        testDateRange();
    2625        testTimeRange();
     26        testWeekdayRange();
     27        testDateRange2();
     28        testDateRange3();
    2729
    2830        java.lang.System.out.println("Test results: passed: " + testsPassed + "; failed: " + testsFailed + ";");
     
    3032
    3133function runTests(name, tests) {
    32 
    3334        var undefined_var;
    34 
    3535        for ( var i = 0; i < tests.length; i++) {
    36 
    37                 var expectedVal = tests[i][0];
    38                 var args = tests[i].slice(1);
    39                 var returnVal;
    40                 try {
    41                         returnVal = name.apply(null, args);
    42                 } catch (e) {
    43                         returnVal = e;
    44                 }
    45                 if (returnVal === expectedVal) {
    46                         java.lang.System.out.println("Passed: " + name.name + "(" + args.join(", ") + ")");
    47                         testsPassed++;
    48                 } else {
    49                         java.lang.System.out.println("FAILED: " + name.name + "(" + args.join(", ") + ")");
    50                         java.lang.System.out.println("        Expected '" + expectedVal + "' but got '" + returnVal + "'");
    51                         testsFailed++;
    52                 }
     36                runTest(name, tests[i]);
    5337        }
    5438}
     39
     40function runTest(name, test) {
     41    var expectedVal = test[0];
     42    var args = test.slice(1);
     43    var returnVal;
     44    try {
     45        returnVal = name.apply(null, args);
     46    } catch (e) {
     47        returnVal = e;
     48    }
     49    if (returnVal === expectedVal) {
     50        java.lang.System.out.println("Passed: " + name.name + "(" + args.join(", ") + ")");
     51        testsPassed++;
     52    } else {
     53        java.lang.System.out.println("FAILED: " + name.name + "(" + args.join(", ") + ")");
     54        java.lang.System.out.println("        Expected '" + expectedVal + "' but got '" + returnVal + "'");
     55        testsFailed++;
     56    }
     57}
     58
    5559
    5660function testIsPlainHostName() {
     
    236240       [ false, dayToStr(day-1) ],
    237241    ];
     242
     243    runTests(weekdayRange, tests);
     244}
     245
     246/** Returns an array: [day, month, year] */
     247function incDate() {
     248    if ((arguments.length >= 3) && (arguments.length % 2 === 1)) {
     249        var date = arguments[0];
     250        var result = date;
     251        var index = 1;
     252        while (index < arguments.length) {
     253            var whichThing = arguments[index];
     254            var by = arguments[index+1];
     255            switch (whichThing) {
     256                case 'year':
     257                    result = new Date(result.getFullYear()+by, result.getMonth(), result.getDate());
     258                    break;
     259                case 'month':
     260                    result = new Date(result.getFullYear(), result.getMonth()+by, result.getDate());
     261                    break;
     262                case 'day':
     263                    result = new Date(result.getFullYear(), result.getMonth(), result.getDate()+by);
     264                    break;
     265            }
     266            index += 2;
     267        }
     268        return [result.getDate(), result.getMonth(), result.getFullYear()];
     269    }
     270    throw "Please call incDate properly";
     271}
     272
     273function monthToStr(month) {
     274    switch (month) {
     275        case -1: return "DEC";
     276        case 0: return "JAN";
     277        case 1: return "FEB";
     278        case 2: return "MAR";
     279        case 3: return "APR";
     280        case 4: return "MAY";
     281        case 5: return "JUN";
     282        case 6: return "JUL";
     283        case 7: return "AUG";
     284        case 8: return "SEP";
     285        case 9: return "OCT";
     286        case 10: return "NOV";
     287        case 11: return "DEC";
     288        case 12: return "JAN";
     289        default: throw "Invalid Month" + month;
     290    }
    238291}
    239292
    240293function testDateRange() {
    241294
    242     function incDate(date) {
    243         return (date + 1 - 1) % 31 +1 ;
    244     }
    245 
    246     function decDate(date) {
    247         return (date - 1 - 1 + 31) % 31 + 1;
    248     }
    249 
    250     function monthToStr(month) {
    251         switch (month) {
    252             case -1: return "DEC";
    253             case 0: return "JAN";
    254             case 1: return "FEB";
    255             case 2: return "MAR";
    256             case 3: return "APR";
    257             case 4: return "MAY";
    258             case 5: return "JUN";
    259             case 6: return "JUL";
    260             case 7: return "AUG";
    261             case 8: return "SEP";
    262             case 9: return "OCT";
    263             case 10: return "NOV";
    264             case 11: return "DEC";
    265             case 12: return "JAN";
    266             default: throw "Invalid Month";
    267         }
    268     }
    269 
    270     var today = new Date();
    271     var date = today.getDate();
    272     var month = today.getMonth();
    273     var year = today.getYear();
    274 
    275     var tests = [
    276         [ true, date ],
    277         [ false, incDate(date) ],
    278         [ false, decDate(date) ],
    279 
    280         [ true, monthToStr(month) ],
    281         [ false, monthToStr(month+1) ],
    282         [ false, monthToStr(month-1) ],
    283 
    284         [ true, year ],
    285         [ false, year - 1],
    286         [ false, year + 1],
    287 
    288         [ true, date, date ],
    289         [ true, date, incDate(date) ],
    290         [ true, decDate(date), date ],
    291         [ true, decDate(date), incDate(date) ],
    292         [ false, incDate(date), decDate(date) ],
    293         [ false, decDate(decDate(date)), decDate(date) ],
    294         [ false, incDate(date), incDate(incDate(date)) ],
    295 
    296         [ true, monthToStr(month), monthToStr(month) ],
    297         [ true, monthToStr(month), monthToStr(month+1) ],
    298         [ true, monthToStr(month-1), monthToStr(month) ],
    299         [ true, monthToStr(month-1), monthToStr(month+1) ],
    300         [ true, "JAN", "DEC" ],
    301         [ true, "DEC", "NOV" ],
    302         [ true, "JUL", "JUN"],
    303         [ false, monthToStr(month+1), monthToStr(month+1) ],
    304         [ false, monthToStr(month-1), monthToStr(month-1) ],
    305         [ false, monthToStr(month+1), monthToStr(month-1) ],
    306 
    307         [ true, year, year ],
    308         [ true, year, year+1 ],
    309         [ true, year-1, year ],
    310         [ true, year-1, year+1 ],
    311         [ false, year-2, year-1 ],
    312         [ false, year+1, year+1 ],
    313         [ false, year+1, year+2 ],
    314         [ false, year+1, year-1 ],
    315 
    316         [ true, date, monthToStr(month) , date, monthToStr(month) ],
    317         [ true, decDate(date), monthToStr(month) , date, monthToStr(month) ],
    318         [ false, decDate(date), monthToStr(month) , decDate(date), monthToStr(month) ],
    319         [ true, date, monthToStr(month) , incDate(date), monthToStr(month) ],
    320         [ false, incDate(date), monthToStr(month) , incDate(date), monthToStr(month) ],
    321         [ true, decDate(date), monthToStr(month) , incDate(date), monthToStr(month) ],
    322         [ false, incDate(date), monthToStr(month) , decDate(date), monthToStr(month) ],
    323         [ true, date, monthToStr(month-1) , date, monthToStr(month) ],
    324         [ true, date, monthToStr(month) , date, monthToStr(month+1) ],
    325         [ true, date, monthToStr(month-1) , date, monthToStr(month+1) ],
    326         [ true, incDate(date), monthToStr(month-1) , date, monthToStr(month+1) ],
    327         [ true, date, monthToStr(month-1) , decDate(date), monthToStr(month+1) ],
    328         [ false, date, monthToStr(month+1) , date, monthToStr(month-1) ],
    329         [ false, incDate(date), monthToStr(month+1) , incDate(date), monthToStr(month-1) ],
    330         [ false, decDate(date), monthToStr(month+1) , decDate(date), monthToStr(month-1) ],
    331         [ true, 1, "JAN", 31, "DEC" ],
    332         [ true, 2, "JAN", 1, "JAN" ],
    333         [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ],
    334         [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ],
    335 
    336         [ true, monthToStr(month), year, monthToStr(month), year ],
    337         [ true, monthToStr(month-1), year, monthToStr(month), year ],
    338         [ true, monthToStr(month), year, monthToStr(month+1), year ],
    339         [ true, monthToStr(month-1), year, monthToStr(month+1), year ],
    340         [ true, monthToStr(0), year, monthToStr(11), year ],
    341         [ false, monthToStr(month+1), year, monthToStr(month-1), year ],
    342         [ false, monthToStr(month+1), year, monthToStr(month+1), year ],
    343         [ false, monthToStr(month-1), year, monthToStr(month-1), year ],
    344         [ false, monthToStr(month), year-1, monthToStr(month-1), year ],
    345         [ true, monthToStr(month), year, monthToStr(month), year + 1 ],
    346         [ true, monthToStr(month), year-1, monthToStr(month), year ],
    347         [ true, monthToStr(month), year-1, monthToStr(month), year+1 ],
    348         [ true, monthToStr(0), year, monthToStr(0), year+1 ],
    349         [ true, monthToStr(0), year-1, monthToStr(0), year+1 ],
    350         [ false, monthToStr(0), year-1, monthToStr(11), year-1 ],
    351         [ false, monthToStr(0), year+1, monthToStr(11), year+1 ],
    352 
    353         [ true, date, monthToStr(month), year, date, monthToStr(month), year ],
    354         [ true, decDate(date), monthToStr(month), year, incDate(date), monthToStr(month), year ],
    355         [ true, decDate(date), monthToStr(month-1), year, incDate(date), monthToStr(month+1), year ],
    356         [ true, decDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ],
    357         [ true, incDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ],
    358         [ false, incDate(date), monthToStr(month), year, incDate(date), monthToStr(month+1), year+1 ],
    359         [ false, date, monthToStr(month+1), year, incDate(date), monthToStr(month+1), year+1 ],
    360         [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ],
    361         [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ],
    362         [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ],
    363         [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ],
    364         [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ],
    365 
    366     ];
    367 
    368     runTests(dateRange, tests);
    369 
     295    {
     296        var current = new Date();
     297        var date = current.getDate();
     298        var month = current.getMonth();
     299        var year = current.getFullYear();
     300
     301        var today = incDate(current, 'day', 0);
     302        var tomorrow = incDate(current, 'day', 1);
     303        var yesterday = incDate(current, 'day', -1);
     304
     305        runTest(dateRange, [ true, date ]);
     306        runTest(dateRange, [ false, tomorrow[0] ]);
     307        runTest(dateRange, [ false, yesterday[0] ]);
     308
     309        runTest(dateRange, [ true, monthToStr(month) ]);
     310        runTest(dateRange, [ false, monthToStr(month+1) ]);
     311        runTest(dateRange, [ false, monthToStr(month-1) ]);
     312
     313        runTest(dateRange, [ true, year ]);
     314        runTest(dateRange, [ false, year - 1]);
     315        runTest(dateRange, [ false, year + 1]);
     316
     317        runTest(dateRange, [ true, date, date ]);
     318        runTest(dateRange, [ true, today[0], tomorrow[0] ]);
     319        runTest(dateRange, [ true, yesterday[0], today[0] ]);
     320        runTest(dateRange, [ true, yesterday[0], tomorrow[0] ]);
     321        runTest(dateRange, [ false, tomorrow[0], yesterday[0] ]);
     322        runTest(dateRange, [ false, incDate(current,'day',-2)[0], yesterday[0] ]);
     323        runTest(dateRange, [ false, tomorrow[0], incDate(current,'day',2)[0] ]);
     324
     325        runTest(dateRange, [ true, monthToStr(month), monthToStr(month) ]);
     326        runTest(dateRange, [ true, monthToStr(month), monthToStr(month+1) ]);
     327        runTest(dateRange, [ true, monthToStr(month-1), monthToStr(month) ]);
     328        runTest(dateRange, [ true, monthToStr(month-1), monthToStr(month+1) ]);
     329        runTest(dateRange, [ true, "JAN", "DEC" ]);
     330        runTest(dateRange, [ true, "FEB", "JAN" ]);
     331        runTest(dateRange, [ true, "DEC", "NOV" ]);
     332        runTest(dateRange, [ true, "JUL", "JUN"]);
     333        runTest(dateRange, [ false, monthToStr(month+1), monthToStr(month+1) ]);
     334        runTest(dateRange, [ false, monthToStr(month-1), monthToStr(month-1) ]);
     335        runTest(dateRange, [ false, monthToStr(month+1), monthToStr(month-1) ]);
     336
     337        runTest(dateRange, [ true, year, year ]);
     338        runTest(dateRange, [ true, year, year+1 ]);
     339        runTest(dateRange, [ true, year-1, year ]);
     340        runTest(dateRange, [ true, year-1, year+1 ]);
     341        runTest(dateRange, [ false, year-2, year-1 ]);
     342        runTest(dateRange, [ false, year+1, year+1 ]);
     343        runTest(dateRange, [ false, year+1, year+2 ]);
     344        runTest(dateRange, [ false, year+1, year-1 ]);
     345
     346        runTest(dateRange, [ true, date, monthToStr(month) , date, monthToStr(month) ]);
     347        runTest(dateRange, [ true, yesterday[0], monthToStr(yesterday[1]) , date, monthToStr(month) ]);
     348        runTest(dateRange, [ false, yesterday[0], monthToStr(yesterday[1]) , yesterday[0], monthToStr(yesterday[1]) ]);
     349        runTest(dateRange, [ true, date, monthToStr(month) , tomorrow[0], monthToStr(tomorrow[1]) ]);
     350        runTest(dateRange, [ false, tomorrow[0], monthToStr(tomorrow[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
     351        runTest(dateRange, [ true, yesterday[0], monthToStr(yesterday[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
     352        runTest(dateRange, [ false, tomorrow[0], monthToStr(tomorrow[1]) , yesterday[0], monthToStr(yesterday[1]) ]);
     353    }
     354
     355    {
     356        var lastMonth = incDate(new Date(), 'month', -1);
     357        var thisMonth = incDate(new Date(), 'month', 0);
     358        var nextMonth = incDate(new Date(), 'month', +1);
     359        runTest(dateRange, [ true, lastMonth[0], monthToStr(lastMonth[1]) , thisMonth[0], monthToStr(thisMonth[1]) ]);
     360        runTest(dateRange, [ true, thisMonth[0], monthToStr(thisMonth[1]) , nextMonth[0], monthToStr(nextMonth[1]) ]);
     361        runTest(dateRange, [ true, lastMonth[0], monthToStr(lastMonth[1]) , nextMonth[0], monthToStr(nextMonth[1]) ]);
     362        var date1 = incDate(new Date(), 'day', +1, 'month', -1);
     363        var date2 = incDate(new Date(), 'day', -1, 'month', +1);
     364        runTest(dateRange, [ true, date1[0], monthToStr(date1[1]) , nextMonth[0], monthToStr(nextMonth[1]) ]);
     365        runTest(dateRange, [ true, lastMonth[0], monthToStr(lastMonth[1]) , date2[0], monthToStr(date2[1]) ]);
     366        runTest(dateRange, [ false, nextMonth[0], monthToStr(nextMonth[1]) , lastMonth[0], monthToStr(lastMonth[1]) ]);
     367        var date3 = incDate(new Date(), 'day', +1, 'month', +1);
     368        var date4 = incDate(new Date(), 'day', +1, 'month', -1);
     369        runTest(dateRange, [ false, date3[0], monthToStr(date3[1]) , date4[0], monthToStr(date4[1]) ]);
     370
     371        var date5 = incDate(new Date(), 'day', -1, 'month', -1);
     372        runTest(dateRange, [ false, date2[0], monthToStr(date2[1]) , date5[0], monthToStr(date5[1]) ]);
     373
     374        runTest(dateRange, [ true, 1, "JAN", 31, "DEC" ]);
     375        runTest(dateRange, [ true, 2, "JAN", 1, "JAN" ]);
     376
     377        var month = new Date().getMonth();
     378        runTest(dateRange, [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ]);
     379        runTest(dateRange, [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ]);
     380    }
     381
     382
     383    {
     384        var lastMonth = incDate(new Date(), 'month', -1);
     385        var thisMonth = incDate(new Date(), 'month', 0);
     386        var nextMonth = incDate(new Date(), 'month', +1);
     387        runTest(dateRange, [ true, monthToStr(thisMonth[1]), thisMonth[2], monthToStr(thisMonth[1]), thisMonth[2] ]);
     388        runTest(dateRange, [ true, monthToStr(lastMonth[1]), lastMonth[2], monthToStr(thisMonth[1]), thisMonth[2] ]);
     389        runTest(dateRange, [ true, monthToStr(thisMonth[1]), thisMonth[2], monthToStr(nextMonth[1]), nextMonth[2] ]);
     390        runTest(dateRange, [ true, monthToStr(lastMonth[1]), lastMonth[2], monthToStr(nextMonth[1]), nextMonth[2] ]);
     391        runTest(dateRange, [ true, monthToStr(0), year, monthToStr(11), year ]);
     392
     393        runTest(dateRange, [ false, monthToStr(nextMonth[1]), nextMonth[2], monthToStr(lastMonth[1]), lastMonth[2] ]);
     394        runTest(dateRange, [ false, monthToStr(nextMonth[1]), nextMonth[2], monthToStr(nextMonth[1]), nextMonth[2] ]);
     395        runTest(dateRange, [ false, monthToStr(lastMonth[1]), lastMonth[2], monthToStr(lastMonth[1]), lastMonth[2] ]);
     396
     397        var lastYear = incDate(new Date(), 'year', -1);
     398        var nextYear = incDate(new Date(), 'year', +1);
     399
     400        runTest(dateRange, [ false, monthToStr(lastYear[1]), lastYear[2], monthToStr(lastMonth[1]), lastMonth[2] ]);
     401        runTest(dateRange, [ true, monthToStr(thisMonth[1]), thisMonth[2], monthToStr(nextYear[1]), nextYear[2] ]);
     402
     403        var year = new Date().getFullYear();
     404        var month = new Date().getMonth();
     405
     406        runTest(dateRange, [ true, monthToStr(month), year-1, monthToStr(month), year ]);
     407        runTest(dateRange, [ true, monthToStr(month), year-1, monthToStr(month), year+1 ]);
     408        runTest(dateRange, [ true, monthToStr(0), year, monthToStr(0), year+1 ]);
     409        runTest(dateRange, [ true, monthToStr(0), year-1, monthToStr(0), year+1 ]);
     410        runTest(dateRange, [ false, monthToStr(0), year-1, monthToStr(11), year-1 ]);
     411        runTest(dateRange, [ false, monthToStr(0), year+1, monthToStr(11), year+1 ]);
     412    }
     413
     414    {
     415        var today = incDate(new Date(), 'day', 0);
     416        var yesterday = incDate(new Date(), 'day', -1);
     417        var tomorrow = incDate(new Date(), 'day', +1);
     418        runTest(dateRange, [ true,
     419            today[0], monthToStr(today[1]), today[2], today[0], monthToStr(today[1]), today[2] ]);
     420        runTest(dateRange, [ true,
     421            yesterday[0], monthToStr(yesterday[1]), yesterday[2], tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2] ]);
     422    }
     423
     424    {
     425        var dayLastMonth = incDate(new Date(), 'day', -1, 'month', -1);
     426        var dayNextMonth = incDate(new Date(), 'day', +1, 'month', +1);
     427        runTest(dateRange, [ true,
     428            dayLastMonth[0], monthToStr(dayLastMonth[1]), dayLastMonth[2], dayNextMonth[0], monthToStr(dayNextMonth[1]), dayNextMonth[2] ]);
     429    }
     430
     431    {
     432        var dayLastYear = incDate(new Date(), 'day', -1, 'month', -1, 'year', -1);
     433        var dayNextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
     434        runTest(dateRange, [ true,
     435            dayLastYear[0], monthToStr(dayLastYear[1]), dayLastYear[2], dayNextYear[0], monthToStr(dayNextYear[1]), dayNextYear[2] ]);
     436    }
     437
     438    {
     439        var dayLastYear = incDate(new Date(), 'day', +1, 'month', -1, 'year', -1);
     440        var dayNextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
     441        runTest(dateRange, [ true,
     442            dayLastYear[0], monthToStr(dayLastYear[1]), dayLastYear[2], dayNextYear[0], monthToStr(dayNextYear[1]), dayNextYear[2] ]);
     443    }
     444
     445    {
     446        var tomorrow = incDate(new Date(), 'day', +1);
     447        var dayNextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
     448        runTest(dateRange, [ false,
     449            tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2], dayNextYear[0], monthToStr(dayNextYear[1]), dayNextYear[2] ]);
     450
     451    }
     452
     453    {
     454        var nextMonth = incDate(new Date(), 'month', +1);
     455        var nextYear = incDate(new Date(), 'day', +1, 'month', +1, 'year', +1);
     456        runTest(dateRange, [ false,
     457            nextMonth[0], monthToStr(nextMonth[1]), nextMonth[2], nextYear[0], monthToStr(nextYear[1]), nextYear[2] ]);
     458    }
     459
     460    {
     461        runTest(dateRange, [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ]);
     462        runTest(dateRange, [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ]);
     463        runTest(dateRange, [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ]);
     464        runTest(dateRange, [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ]);
     465        runTest(dateRange, [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ]);
     466     }
     467
     468}
     469
     470function testDateRange2() {
     471
     472  var dates = [   
     473        new Date("January 31, 2011 3:33:33"),
     474        new Date("February 28, 2011 3:33:33"),
     475        new Date("February 29, 2012 3:33:33"),
     476        new Date("March 31, 2011 3:33:33"),
     477        new Date("April 30, 2011 3:33:33"),
     478        new Date("May 31, 2011 3:33:33"),
     479        new Date("June 30, 2011 3:33:33"),
     480        new Date("July 31, 2011 3:33:33"),
     481        new Date("August 31, 2011 3:33:33"),
     482        new Date("September 30, 2011 3:33:33"),
     483        new Date("October 31, 2011 3:33:33"),
     484        new Date("November 30, 2011 3:33:33"),
     485        new Date("December 31, 2011 3:33:33"),
     486]
     487  for (var i = 0; i < dates.length; i++)  {
     488      var current = dates[i];
     489      var today = incDate(current, 'day', 0);
     490      var yesterday = incDate(current, 'day', -1);
     491      var tomorrow = incDate(current, 'day', 1);
     492      var aYearFromNow = new Date(current.getFullYear()+1, current.getMonth()+1, current.getDate()+1);
     493      var later = [aYearFromNow.getDate(), aYearFromNow.getMonth(), aYearFromNow.getFullYear()];
     494
     495      runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
     496        today[0], monthToStr(today[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
     497      runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
     498        yesterday[0], monthToStr(yesterday[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
     499      runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
     500        yesterday[0], monthToStr(yesterday[1]), yesterday[2], tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2] ]);
     501      runTest(isDateInRange_internallForIcedTeaWebTesting, [ false, current,
     502        tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2], later[0], monthToStr(later[1]), later[2] ]);
     503  }
     504
     505}
     506
     507function testDateRange3() {
     508  var dates = [   
     509        new Date("January 1, 2011 1:11:11"),
     510        new Date("February 1, 2011 1:11:11"),
     511        new Date("March 1, 2011 1:11:11"),
     512        new Date("April 1, 2011 1:11:11"),
     513        new Date("May 1, 2011 1:11:11"),
     514        new Date("June 1, 2011 1:11:11"),
     515        new Date("July 1, 2011 1:11:11"),
     516        new Date("August 1, 2011 1:11:11"),
     517        new Date("September 1, 2011 1:11:11"),
     518        new Date("October 1, 2011 1:11:11"),
     519        new Date("November 1, 2011 1:11:11"),
     520        new Date("December 1, 2011 1:11:11"),
     521
     522    ]
     523
     524
     525
     526  for (var i = 0; i < dates.length; i++)  {
     527    var current = dates[i];
     528    var yesterday = incDate(current,'day',-1);
     529    var today = incDate(current,'day',0);
     530    var tomorrow = incDate(current,'day',1);
     531    runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
     532      yesterday[0], monthToStr(yesterday[1]) , today[0], monthToStr(today[1]) ]);
     533    runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
     534      yesterday[0], monthToStr(yesterday[1]) , tomorrow[0], monthToStr(tomorrow[1]) ]);
     535    runTest(isDateInRange_internallForIcedTeaWebTesting, [ true, current,
     536      yesterday[0], monthToStr(yesterday[1]), yesterday[2], tomorrow[0], monthToStr(tomorrow[1]), tomorrow[2] ]);
     537  }
    370538}
    371539
  • branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java

    r348 r416  
    3939
    4040import java.io.ByteArrayInputStream;
     41import java.io.IOException;
     42import java.io.StringReader;
     43import net.sourceforge.jnlp.annotations.KnownToFail;
    4144
    42 import org.junit.After;
     45import net.sourceforge.nanoxml.XMLElement;
     46import net.sourceforge.nanoxml.XMLParseException;
     47
    4348import org.junit.Assert;
    44 import org.junit.Before;
    4549import org.junit.Test;
    4650
    4751/** Test various corner cases of the parser */
    4852public class ParserCornerCases {
     53
     54    @Test
     55    public void testCdata() throws ParseException, XMLParseException, IOException {
     56        String data = "<argument><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <!DOCTYPE properties SYSTEM \"http://java.sun.com/dtd/properties.dtd\"> <properties> <entry key=\"key\">value</entry> </properties> ]]></argument>";
     57        XMLElement elem = new XMLElement();
     58        elem.parseFromReader(new StringReader(data));
     59        XMLElement target = elem;
     60        Assert.assertEquals("argument", target.getName());
     61        Assert.assertTrue("too small", target.getContent().length() > 20);
     62        Assert.assertTrue(target.getContent().contains("xml"));
     63        Assert.assertTrue(target.getContent().contains("DOCTYPE"));
     64        Assert.assertTrue(target.getContent().contains("<entry key=\"key\">value</entry>"));
     65
     66        Node node = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
     67        Assert.assertEquals("argument", node.getNodeName());
     68        String contents = node.getNodeValue();
     69        Assert.assertTrue(contents.contains("xml"));
     70        Assert.assertTrue(contents.contains("DOCTYPE"));
     71        Assert.assertTrue(contents.contains("<entry key=\"key\">value</entry>"));
     72    }
     73
     74    @Test
     75    public void testCdataNested() throws ParseException, XMLParseException, IOException {
     76        String data = "<jnlp>\n" +
     77                "<application-desc>\n" +
     78                "<argument>\n" +
     79                "<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <!DOCTYPE properties SYSTEM \"http://java.sun.com/dtd/properties.dtd\"> <properties> <entry key=\"key\">value</entry> </properties> ]]>" +
     80                "</argument>\n" +
     81                "<argument>1</argument>\n" +
     82                "</application-desc>\n" +
     83                "</jnlp>";
     84        XMLElement elem = new XMLElement();
     85        elem.parseFromReader(new StringReader(data));
     86        XMLElement target = (XMLElement) ((XMLElement) elem.enumerateChildren().nextElement()).enumerateChildren().nextElement();
     87        Assert.assertEquals("argument", target.getName());
     88        Assert.assertTrue("too small", target.getContent().length() > 20);
     89        Assert.assertTrue(target.getContent().contains("xml"));
     90        Assert.assertTrue(target.getContent().contains("DOCTYPE"));
     91        Assert.assertTrue(target.getContent().contains("<entry key=\"key\">value</entry>"));
     92
     93        Node node = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()));
     94        node = node.getFirstChild().getFirstChild();
     95        Assert.assertEquals("argument", node.getNodeName());
     96        String contents = node.getNodeValue();
     97        Assert.assertTrue(contents.contains("xml"));
     98        Assert.assertTrue(contents.contains("DOCTYPE"));
     99        Assert.assertTrue(contents.contains("<entry key=\"key\">value</entry>"));
     100    }
     101
     102    @Test
     103    @KnownToFail
     104    public void testCDataFirstChild() throws XMLParseException, IOException {
     105        String xml = "<?xml version=\"1.0\"?>\n" +
     106                "<jnlp spec=\"1.5+\">\n" +
     107                "<![CDATA[Text you want to escape goes here...<test> random tag test </test>]]>\n" +
     108                "<information/>\n" +
     109                "</jnlp>";
     110        XMLElement elem = new XMLElement();
     111        elem.parseFromReader(new StringReader(xml));
     112    }
     113
     114    @Test
     115    @KnownToFail
     116    public void testCDataSecondChild() throws XMLParseException, IOException {
     117        String xml = "<?xml version=\"1.0\"?>\n" +
     118                "<jnlp spec=\"1.5+\">\n" +
     119                "<information/>\n" +
     120                "<![CDATA[Text you want to escape goes here...<test> random tag test </test>]]>\n" +
     121                "</jnlp>";
     122        XMLElement elem = new XMLElement();
     123        elem.parseFromReader(new StringReader(xml));
     124    }
     125
    49126    @Test
    50127    public void testUnsupportedSpecNumber() throws ParseException {
     
    72149
    73150    @Test
     151    public void testCommentInElements2() throws ParseException {
     152        String malformedJnlp = "<?xml?><jnlp <!-- comment --> spec='1.0'> </jnlp>";
     153        Node root = Parser.getRootNode(new ByteArrayInputStream(malformedJnlp.getBytes()));
     154        Parser p = new Parser(null, null, root, false, false);
     155        Assert.assertEquals("1.0", p.getSpecVersion().toString());
     156    }
     157
     158    @Test
     159    @KnownToFail
    74160    public void testCommentInAttributes() throws ParseException {
    75161        String malformedJnlp = "<?xml?><jnlp spec='<!-- something -->'></jnlp>";
     
    82168    public void testNestedComments() throws ParseException {
    83169        String malformedJnlp = "<?xml?>" +
    84                 "<jnlp><information><description>" +
     170                "<jnlp><information><title>testNestedComments</title>" +
     171                "<vendor>IcedTea</vendor><description>" +
    85172                "<!-- outer <!-- inner --> -->" +
    86173                "</description></information></jnlp>";
     
    89176        Assert.assertEquals(" -->", p.getInfo(root).get(0).getDescription());
    90177    }
     178
     179    @Test
     180    public void testDoubleDashesInComments() throws ParseException {
     181        String malformedJnlp = "<?xml?>" +
     182                "<jnlp> <!-- \n" +
     183                " -- a very very long and \n" +
     184                " -- multiline comment \n" +
     185                " -- that contains double dashes \n" +
     186                " -->\n" +
     187                "  <information/>" +
     188                "</jnlp>";
     189        Node root = Parser.getRootNode(new ByteArrayInputStream(malformedJnlp.getBytes()));
     190        Parser p = new Parser(null, null, root, false, false);
     191    }
     192
    91193}
  • branches/vendor/sourceforge/icedtea-web/current/tests/netx/unit/net/sourceforge/jnlp/ParserMalformedXml.java

    r348 r416  
    4343import java.io.InputStreamReader;
    4444import java.io.IOException;
     45import net.sourceforge.jnlp.annotations.KnownToFail;
    4546
    4647import org.junit.BeforeClass;
     
    7576
    7677    @Test
     78    @KnownToFail
    7779    public void testMalformedArguments() throws ParseException {
    7880        String malformedJnlp = originalJnlp.replace("arg2</argument", "arg2<argument");
     
    8183
    8284    @Test
     85    @KnownToFail
    8386    public void testTagNotClosed() throws ParseException {
    8487        String malformedJnlp = originalJnlp.replace("</jnlp>", "<jnlp>");
     
    8790
    8891    @Test
     92    @KnownToFail
    8993    public void testUnquotedAttributes() throws ParseException {
    9094        String malformedJnlp = originalJnlp.replace("'jnlp.jnlp'", "jnlp.jnlp");
Note: See TracChangeset for help on using the changeset viewer.