Skip to content

Instantly share code, notes, and snippets.

@lehitoskin
Created April 18, 2014 02:12
Show Gist options
  • Select an option

  • Save lehitoskin/11021411 to your computer and use it in GitHub Desktop.

Select an option

Save lehitoskin/11021411 to your computer and use it in GitHub Desktop.
Patch for functions.rkt for use with Jenkins
--- functions.rkt.old 2014-04-17 17:41:23.072375074 -0700
+++ functions.rkt 2014-04-17 18:56:25.685927724 -0700
@@ -5,7 +5,17 @@
(require ffi/unsafe
ffi/unsafe/define)
-(define-ffi-definer define-tox (ffi-lib "libtoxcore"))
+; jenkins junk
+(define exe-path (path->string (find-system-path 'run-file)))
+
+; shenanigans to get the binary to be called from anywhere and still work
+(define lib-path (string->path (string-append
+ (substring exe-path 0
+ (- (string-length exe-path)
+ 6))
+ "../lib/libtoxcore")))
+
+(define-ffi-definer define-tox (ffi-lib lib-path))
#|
# this code is verbose, messy, and probably doesn't work at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment