[
https://issues.apache.org/jira/browse/FELIX-3844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558215#comment-13558215
]
Nicolas Roduit commented on FELIX-3844:
---------------------------------------
New 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)
@@ -134,17 +134,7 @@
private boolean checkOSNames(String currentOSName, String[] osnames)
{
- boolean win32 = currentOSName.startsWith("win") &&
- (currentOSName.equals("windows95")
- || currentOSName.equals("windows98")
- || currentOSName.equals("windowsnt")
- || currentOSName.equals("windows2000")
- || currentOSName.equals("windows2003")
- || currentOSName.equals("windows2008")
- || currentOSName.equals("windowsxp")
- || currentOSName.equals("windowsce")
- || currentOSName.equals("windowsvista")
- || currentOSName.equals("windows7"));
+ boolean win32 = currentOSName.startsWith("win") &&
!currentOSName.equals("windowsce");
for (int i = 0; (osnames != null) && (i < osnames.length); i++)
{
@@ -381,7 +371,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)
{
@@ -395,11 +389,19 @@
{
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";
+ }
+ else if (value.indexOf(" 9") >= 0 || value.equals("win9"))
+ {
+ os = "windows9";
+ }
+
return os;
}
else if (value.startsWith("linux"))
> 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
> 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