epfl-lara / ScalaZ3

DSL in Scala for Constraint Solving with Z3 SMT Solver
Apache License 2.0
122 stars 34 forks source link

Load system DLLs directly from user.dir if present. #2

Closed vo1stv closed 12 years ago

vo1stv commented 12 years ago

I found this change useful for debugging the system. It provides the cross-platform user with the advanced option to extract the files from the JAR file and work more directly with the source code until they are comfortable with whatever method their IDE and host system uses to locate external libraries and packages.

vo1stv commented 12 years ago

As requested, but only tested under windows as of this note. The changes rely on proper operation of System.getProperty("file.separator"); and System.mapLibraryName(LIB_NAME); on linux and Mac OS systems.

For the curious, my use of ScalaZ3 involves both console-based testing and servlet deployment within the Eclipse IDE. If I copy the DLL to the folder where eclipse is installed, loading from the System path works for consoles, and loading from the user.dir works for servlets.

psuter commented 12 years ago

Thanks, I merged it now.