restoring winp 1.21-patched

This commit is contained in:
Oleg Sukhodolsky
2015-02-18 21:07:24 +03:00
parent 6d35452096
commit 98f97a766d
5 changed files with 31 additions and 8 deletions
+4 -7
View File
@@ -1,15 +1,12 @@
<component name="libraryTable">
<library name="winp">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/winp-1.23.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/winp-1.21-patched.jar!/" />
</CLASSES>
<JAVADOC />
<NATIVE>
<root url="jar://$PROJECT_DIR$/lib/winp-1.23.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/src/winp-1.23-sources.jar!/" />
</NATIVE>
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/src/winp-1.23-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/src/winp-1.21-patched.zip!/winp-1.21/src/main/java" />
<root url="jar://$PROJECT_DIR$/lib/src/winp-1.21-patched.zip!/winp-1.21/src/test/java" />
</SOURCES>
</library>
</component>
</component>
+1 -1
View File
@@ -247,7 +247,7 @@ libraryLicense(name: "TestNG", version: "5.7 snapshot", license: "Apache 2.0", u
libraryLicense(name: "Trilead SSH", libraryName: "trilead-ssh2", version: "build 213 and 217", license: "BSD style (see LICENSE.txt in trilead.jar)", url: "http://www.trilead.com/SSH_Library/")
libraryLicense(name: "Trove4j", version: "1.1 (with patches by JetBrains)", license: "LGPL", url: "http://trove4j.sourceforge.net/", licenseUrl: "http://trove4j.sourceforge.net/html/license.html")
libraryLicense(name: "Velocity", version: "1.7", license: "Apache 2.0", url: "http://velocity.apache.org/", licenseUrl: "http://velocity.apache.org/index.html")
libraryLicense(name: "winp", version: "1.23", license: "MIT", url: "http://java.net/projects/winp", licenseUrl: "http://opensource.org/licenses/mit-license.php")
libraryLicense(name: "winp", version: "1.21 (patched)", license: "MIT", url: "http://java.net/projects/winp", licenseUrl: "http://opensource.org/licenses/mit-license.php")
libraryLicense(name: "Xalan", libraryName:"Xalan-2.7.1", version: "2.7.1", license: "Apache 2.0", url: "http://xml.apache.org/xalan-j/", licenseUrl: "http://xml.apache.org/xalan-j/")
libraryLicense(name: "Xerces", version: "2.9.1", license: "Apache 2.0", url: "http://xerces.apache.org/xerces2-j/", licenseUrl: "http://xerces.apache.org/xerces2-j/")
libraryLicense(name: "XML Commons (xml-apis.jar, resolver.jar)", version: "", license: "Apache 2.0, W3C Software License , public domain", url: "http://xml.apache.org/commons/", licenseUrl: "http://xml.apache.org/commons/licenses.html")
Binary file not shown.
+26
View File
@@ -0,0 +1,26 @@
diff -ur winp-winp-1.17/src/main/java/org/jvnet/winp/Native.java winp-1.17-patched/src/main/java/org/jvnet/winp/Native.java
--- winp-winp-1.17/src/main/java/org/jvnet/winp/Native.java 2013-01-03 09:26:13.000000000 +0400
+++ winp-1.17-patched/src/main/java/org/jvnet/winp/Native.java 2013-02-25 16:23:24.000000000 +0400
@@ -47,6 +47,7 @@
private static final Logger LOGGER = Logger.getLogger(Native.class.getName());
// system property holding the preferred folder for copying the dll file to.
private static final String DLL_TARGET = "winp.folder.preferred";
+ private static final String UNPACK_DLL_TO_PARENT_DIR = "winp.unpack.dll.to.parent.dir";
static {
load();
@@ -61,7 +62,12 @@
final URL res = Native.class.getClassLoader().getResource(dllName+".dll");
if(res!=null) {
String url = res.toExternalForm();
- if(url.startsWith("jar:") || url.startsWith("wsjar:")) {
+
+ //patched by JetBrains: do not try to unpack the dll file to the directory containing the jar file by default.
+ // It can fail because the process has no rights to write to that directory and also pollutes the project directories if the jar is used in development mode.
+ boolean unpackToParentDir = Boolean.parseBoolean(System.getProperty(UNPACK_DLL_TO_PARENT_DIR));
+
+ if(unpackToParentDir && (url.startsWith("jar:") || url.startsWith("wsjar:"))) {
int idx = url.lastIndexOf('!');
String filePortion = url.substring(url.indexOf(':')+1,idx);
while(filePortion.startsWith("/"))
Binary file not shown.