dll path
This commit is contained in:
parent
eeae6c3773
commit
fc39e79a5b
|
@ -1,8 +1,19 @@
|
|||
import bumpy, chroma, unicode, vmath
|
||||
import bumpy, chroma, os, unicode, vmath
|
||||
|
||||
export bumpy, chroma, unicode, vmath
|
||||
|
||||
{.push dynlib: "pixie.dll".}
|
||||
let
|
||||
srcPath = currentSourcePath()
|
||||
srcDir = srcPath.parentDir()
|
||||
|
||||
when defined(windows):
|
||||
const dllPath = "pixie.dll"
|
||||
elif defined(macosx):
|
||||
const dllPath = "libpixie.dll"
|
||||
else:
|
||||
const dllPath = "libpixie.so"
|
||||
|
||||
{.push dynlib: srcDir / dllPath.}
|
||||
|
||||
type PixieError = object of ValueError
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@ src_path = Path(__file__).resolve()
|
|||
src_dir = str(src_path.parent)
|
||||
|
||||
if sys.platform == "win32":
|
||||
dllPath = src_dir + "/pixie.dll"
|
||||
dllPath = "pixie.dll"
|
||||
elif sys.platform == "darwin":
|
||||
dllPath = src_dir + "/libpixie.dylib"
|
||||
dllPath = "libpixie.dylib"
|
||||
else:
|
||||
dllPath = src_dir + "/libpixie.so"
|
||||
dll = cdll.LoadLibrary(dllPath)
|
||||
dllPath = "libpixie.so"
|
||||
dll = cdll.LoadLibrary(src_dir + "/" + dllPath)
|
||||
|
||||
class PixieError(Exception):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue