All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pallet.compute.vmfest.properties.clj Maven / Gradle / Ivy

(ns pallet.compute.vmfest.properties
  "Namespace to guess the vbox.home system property"
  (:use
   [clojure.java.io :only [file]]))

;;; This has to be loaded before the vbox libs are initialised

(def vbox-install-locations
  ["/Applications/VirtualBox.app/Contents/MacOS/"
   "/usr/lib/virtualbox"])

(defn guess-vbox-home []
  (first (filter #(.isDirectory %) (map file vbox-install-locations))))

(when-let [vbox-home (or (System/getProperty "vbox.home") (guess-vbox-home))]
  (System/setProperty "vbox.home" (.getAbsolutePath vbox-home)))




© 2015 - 2025 Weber Informatics LLC | Privacy Policy