Add classpath for native pscrypto libraries

This commit is contained in:
Chord 2016-07-25 18:34:40 -04:00
parent aeaaba50f5
commit 35a592476f
3 changed files with 18 additions and 2 deletions

2
.gitignore vendored
View file

@ -17,3 +17,5 @@ out/
*.so *.so
*.dll *.dll
*.exe *.exe
*.zip
pscrypto-lib/

View file

@ -18,6 +18,12 @@ lazy val commonSettings = Seq(
) )
) )
lazy val pscryptoSettings = Seq(
unmanagedClasspath in Test += (baseDirectory in ThisBuild).value / "pscrypto-lib",
unmanagedClasspath in Runtime += (baseDirectory in ThisBuild).value / "pscrypto-lib",
unmanagedResources in Runtime += (baseDirectory in ThisBuild).value / "pscrypto-lib"
)
lazy val root = (project in file(".")). lazy val root = (project in file(".")).
settings(commonSettings: _*). settings(commonSettings: _*).
aggregate(pslogin, common) aggregate(pslogin, common)
@ -26,10 +32,13 @@ lazy val pslogin = (project in file("pslogin")).
settings(commonSettings: _*). settings(commonSettings: _*).
settings( settings(
name := "pslogin" name := "pslogin"
).settings(packAutoSettings: _*).dependsOn(common) ).
settings(pscryptoSettings: _*).
settings(packAutoSettings: _*).dependsOn(common)
lazy val common = (project in file("common")). lazy val common = (project in file("common")).
settings(commonSettings: _*). settings(commonSettings: _*).
settings( settings(
name := "common" name := "common"
) ).
settings(pscryptoSettings: _*)

View file

@ -43,7 +43,12 @@ object CryptoInterface {
val classpathEntries = classpath.split(File.pathSeparator) val classpathEntries = classpath.split(File.pathSeparator)
val myLibraryPath = System.getProperty("user.dir") val myLibraryPath = System.getProperty("user.dir")
val jnaLibrary = System.getProperty("jna.library.path")
val javaLibrary = System.getProperty("java.library.path")
println("User dir: " + myLibraryPath) println("User dir: " + myLibraryPath)
println("JNA Lib: " + jnaLibrary)
println("Java Lib: " + javaLibrary)
print("Classpath: ")
classpathEntries.foreach(println) classpathEntries.foreach(println)
println("Required data model: " + System.getProperty("sun.arch.data.model")) println("Required data model: " + System.getProperty("sun.arch.data.model"))