You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2013/01/31 21:07:14 UTC

[jira] [Resolved] (FELIX-3844) Native bundles cannot be installed on Windows 8 and Windows Server 2012

     [ https://issues.apache.org/jira/browse/FELIX-3844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-3844.
------------------------------------

    Resolution: Fixed
      Assignee: Richard S. Hall

I really think we should move our OS aliases to configuration properties, but I don't have time to do that right now so I am applying this patch (i'll open an issue for future work). Please close if you are satisfied. Thanks.
                
> Native bundles cannot be installed on Windows 8 and Windows Server 2012
> -----------------------------------------------------------------------
>
>                 Key: FELIX-3844
>                 URL: https://issues.apache.org/jira/browse/FELIX-3844
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.3
>            Reporter: Nicolas Roduit
>            Assignee: Richard S. Hall
>              Labels: patch
>             Fix For: framework-4.2.0
>
>
> "osname=win32" in the Bundle-NativeCode entry doe not work, this exception is thrown:org.osgi.framework.BundleException: Unresolved constraint in bundle native-lib-windows-x86 [6]: No matching native libraries found.
> This osname alias needs to be added to the felix framework. I made some changes according to the OSGI specifications at http://www.osgi.org/Specifications/Reference .
> Here is the patch:
> Index: src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
> ===================================================================
> --- src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java	(revision 1431008)
> +++ src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java	(working copy)
> @@ -140,11 +140,13 @@
>              || currentOSName.equals("windowsnt")
>              || currentOSName.equals("windows2000")
>              || currentOSName.equals("windows2003")
> -            || currentOSName.equals("windows2008")
> +            || currentOSName.equals("windowsserver2008")
>              || currentOSName.equals("windowsxp")
>              || currentOSName.equals("windowsce")
>              || currentOSName.equals("windowsvista")
> -            || currentOSName.equals("windows7"));
> +            || currentOSName.equals("windows7")
> +            || currentOSName.equals("windows8")
> +            || currentOSName.equals("windowsserver2012"));
>  
>          for (int i = 0; (osnames != null) && (i < osnames.length); i++)
>          {
> @@ -381,7 +383,11 @@
>              }
>              else if (value.indexOf("2008") >= 0)
>              {
> -                os = "windows2008";
> +                os = "windowsserver2008";
> +            }
> +            else if (value.indexOf("2012") >= 0)
> +            {
> +                os = "windowsserver2012";
>              }
>              else if (value.indexOf("xp") >= 0)
>              {
> @@ -396,10 +402,15 @@
>                  os = "windowsvista";
>              }
>              // will need better test here if any future Windows version has a 7 in it!
> -            else if (value.indexOf("7") >= 0)
> +            else if (value.indexOf(" 7") >= 0 || value.equals("win7"))
>              {
>                  os = "windows7";
>              }
> +            else if (value.indexOf(" 8") >= 0 || value.equals("win8"))
> +            {
> +                os = "windows8";
> +            }
> +
>              return os;
>          }
>          else if (value.startsWith("linux"))

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira