Skip to content

Commit 2debb4e

Browse files
committed
update teh windows build
1 parent f5d0e40 commit 2debb4e

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/java_bindings.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ name: CI
66
# events but only for the master branch
77
on:
88
push:
9-
tags:
10-
- '*'
9+
- '*'
1110

1211
concurrency:
1312
group: ${{ github.workflow }}-${{ github.ref }}
@@ -44,7 +43,7 @@ jobs:
4443
cp ./build/src/libmanifold.dylib ./bindings/java/src/main/resources/manifold3d/natives/mac-arm64/
4544
cp ./build/bindings/c/libmanifoldc.dylib ./bindings/java/src/main/resources/manifold3d/natives/mac-arm64/
4645
cd bindings/java/
47-
mvn test --file pom.xml
46+
mvn test --file pom.xml --no-transfer-progress
4847
- name: Upload native libraries
4948
uses: actions/upload-artifact@v4
5049
with:
@@ -82,7 +81,7 @@ jobs:
8281
run: |
8382
bash bindings/java/scripts/linux/buildC-arm.sh
8483
cd bindings/java/
85-
mvn test --file pom.xml
84+
mvn test --file pom.xml --no-transfer-progress
8685
- name: Upload native libraries
8786
uses: actions/upload-artifact@v4
8887
with:
@@ -120,7 +119,7 @@ jobs:
120119
run: |
121120
bash bindings/java/scripts/linux/buildC.sh
122121
cd bindings/java/
123-
mvn test --file pom.xml
122+
mvn test --file pom.xml --no-transfer-progress
124123
- name: Upload native libraries
125124
uses: actions/upload-artifact@v4
126125
with:
@@ -147,16 +146,16 @@ jobs:
147146
- name: Build for Java
148147
shell: powershell
149148
run: |
150-
cmake . -DMANIFOLD_CROSS_SECTION=ON -DMANIFOLD_USE_BUILTIN_CLIPPER2=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DMANIFOLD_STRICT=ON -DMANIFOLD_USE_BUILTIN_TBB=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_ASSERT=ON -DMANIFOLD_PAR=ON -A x64 -B build
149+
cmake . -DMANIFOLD_CROSS_SECTION=ON -DMANIFOLD_USE_BUILTIN_CLIPPER2=ON -DCMAKE_BUILD_TYPE=Release -DASSIMP_ENABLE=ON -DBUILD_SHARED_LIBS=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_EXPORT=ON -DMANIFOLD_PAR=ON -DMANIFOLD_USE_BUILTIN_TBB=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -A x64 -B build
151150
cd build
152151
cmake --build . --target ALL_BUILD --config Release
153152
cd ..
154153
mkdir -p bindings\java\src\main\resources\manifold3d\natives\win-x86_64\
155154
Get-ChildItem -Path . -Recurse -Filter *.dll | Select-Object -ExpandProperty FullName
156-
cp build\lib\Release\manifold.dll bindings\java\src\main\resources\manifold3d\natives\win-x86_64\libmanifold.dll
157-
cp build\lib\Release\manifoldc.dll bindings\java\src\main\resources\manifold3d\natives\win-x86_64\libmanifoldc.dll
155+
cp build\lib\Release\manifold.dll bindings\java\src\main\resources\manifold3d\natives\win-x86_64\manifold.dll
156+
cp build\lib\Release\manifoldc.dll bindings\java\src\main\resources\manifold3d\natives\win-x86_64\manifoldc.dll
158157
cd bindings\java
159-
mvn test --file pom.xml
158+
mvn test --file pom.xml --no-transfer-progress
160159
cd ..
161160
cd ..
162161
- name: Upload native libraries

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ private static void loadNativeLibrary(String libName, File cacheDirectory) throw
4141
if (os.contains("win")) {
4242
platform = "win-" + arch;
4343
extension = ".dll";
44+
if(libName.startsWith("lib")) {
45+
libName=libName.substring(3, libName.length());
46+
}
4447
} else if (os.contains("mac")) {
4548
platform = "mac-" + arch;
4649
extension = ".dylib";
@@ -94,7 +97,7 @@ private static void loadNativeLibrary(String libName, File cacheDirectory) throw
9497
} else {
9598
System.out.println("Copy not performed, already in cache");
9699
}
97-
100+
System.out.println("Loading library "+libFile.getAbsolutePath());
98101
System.load(libFile.getAbsolutePath());
99102
loaded = true;
100103
} catch (Exception e) {

0 commit comments

Comments
 (0)