Skip to content

Commit 88d47ec

Browse files
committed
revert anything that would interfere with publishing ffor now
1 parent d1263c0 commit 88d47ec

3 files changed

Lines changed: 19 additions & 13 deletions

File tree

bindings/java/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@
5757
<plugin>
5858
<groupId>org.codehaus.mojo</groupId>
5959
<artifactId>exec-maven-plugin</artifactId>
60-
<version>3.1.0</version> <!-- pin whatever version you need -->
6160
<configuration>
61+
<systemProperties>
62+
<property>
63+
<key>java.library.path</key>
64+
<value>${project.basedir}/native</value>
65+
</property>
66+
</systemProperties>
6267
<commandlineArgs>--enable-preview
6368
--enable-native-access=ALL-UNNAMED</commandlineArgs>
6469
</configuration>

bindings/java/scripts/clojar.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo "Clojar Version: $1"
1414

1515
set -e
1616
cd bindings/java/
17-
mvn versions:set -DnewVersion=$1 --file pom.xml --no-transfer-progress
18-
mvn deploy --settings=settings.xml --no-transfer-progress
17+
mvn versions:set -DnewVersion=$1 --file pom.xml
18+
mvn deploy --settings=settings.xml
1919
cd ../../
2020
set -e

bindings/java/src/main/java/com/cadoodlecad/manifold/ManifoldBindings.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,12 @@ private static void loadNativeLibrary(String libName, File cacheDirectory) throw
4141
if (os.contains("win")) {
4242
platform = "win-" + arch;
4343
extension = ".dll";
44-
libName="lib"+libName;
4544
} else if (os.contains("mac")) {
4645
platform = "mac-" + arch;
4746
extension = ".dylib";
48-
libName="lib"+libName;
4947
} else if (os.contains("nix") || os.contains("nux") || os.contains("aix")) {
5048
platform = "linux-" + arch;
5149
extension = ".so";
52-
libName="lib"+libName;
5350
} else {
5451
throw new RuntimeException("Unsupported OS: " + os);
5552
}
@@ -77,6 +74,12 @@ private static void loadNativeLibrary(String libName, File cacheDirectory) throw
7774
needsCopy = devFile.lastModified() > libFile.lastModified();
7875

7976
if (needsCopy) {
77+
// if (devFile.exists()) {
78+
// java.nio.file.Files.copy(devFile.toPath(), libFile.toPath(),
79+
// java.nio.file.StandardCopyOption.REPLACE_EXISTING,
80+
// java.nio.file.StandardCopyOption.COPY_ATTRIBUTES);
81+
// libFile.setExecutable(true);
82+
// } else {
8083
try (java.io.InputStream in = ManifoldBindings.class
8184
.getResourceAsStream("/manifold3d/natives/" + platform + "/" + fullName)) {
8285
if (in == null)
@@ -86,10 +89,8 @@ private static void loadNativeLibrary(String libName, File cacheDirectory) throw
8689
System.out.println("Extracted to libs/: " + fullName);
8790
if (cacheDirectory == null)
8891
libFile.deleteOnExit();
89-
}catch(Throwable t) {
90-
throw new RuntimeException("Failed to load: " + libName, t);
91-
9292
}
93+
// }
9394
} else {
9495
System.out.println("Copy not performed, already in cache");
9596
}
@@ -102,8 +103,8 @@ private static void loadNativeLibrary(String libName, File cacheDirectory) throw
102103
}
103104

104105
public static void loadNativeLibrarys(File cacheDirectory) throws Exception {
105-
loadNativeLibrary("manifold", cacheDirectory);
106-
loadNativeLibrary("manifoldc", cacheDirectory);
106+
loadNativeLibrary("libmanifold", cacheDirectory);
107+
loadNativeLibrary("libmanifoldc", cacheDirectory);
107108
}
108109

109110
public ManifoldBindings() throws Exception {
@@ -112,8 +113,8 @@ public ManifoldBindings() throws Exception {
112113

113114
public ManifoldBindings(File cacheDirectory) throws Exception {
114115
if (!isNativeLibraryLoaded()) {
115-
loadNativeLibrary("manifold", cacheDirectory);
116-
loadNativeLibrary("manifoldc", cacheDirectory);
116+
loadNativeLibrary("libmanifold", cacheDirectory);
117+
loadNativeLibrary("libmanifoldc", cacheDirectory);
117118
}
118119

119120
this.library = SymbolLookup.loaderLookup();

0 commit comments

Comments
 (0)