Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Loader: Allow overriding of default /tmp extraction path #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

if [ "$TRAVIS" == 'true' ] && [ "$TRAVIS_BRANCH" == 'master' ] && [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then
if [ "$TRAVIS" == 'true' ] && [ "$TRAVIS_BRANCH" == 'master' ]; then
echo "Starting Travis deploy..."
elif [ "$APPVEYOR" == 'True' ] && [ "$APPVEYOR_REPO_BRANCH" == 'master' ] && [ "$APPVEYOR_PULL_REQUEST_TITLE" == '' ]; then
echo "Starting Appveyor deploy..."
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>graphics.scenery</groupId>
<artifactId>spirvcrossj</artifactId>
<version>0.8.0-1.1.106.0</version>
<version>0.8.1-1.1.106.0</version>
<inceptionYear>2016</inceptionYear>

<name>spirvcrossj</name>
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/graphics/scenery/spirvcrossj/Loader.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,15 @@ public static void loadNatives() throws IOException {
return;
}

String manualPath = System.getProperty("spirvcrossj.LibraryPath");
String lp = System.getProperty("java.library.path");
File tmpDir = Files.createTempDirectory(projectName + "-natives-tmp").toFile();

final File tmpDir;
if(manualPath == null) {
tmpDir = Files.createTempDirectory(projectName + "-natives-tmp").toFile();
} else {
tmpDir = new File(manualPath);
}

File lock = new File(tmpDir, ".lock");
lock.createNewFile();
Expand Down