summary history branches tags files
author:Trevor Bentley
committer:Trevor Bentley
date:Wed Jul 26 09:57:37 2017 +0200
Don't try to call xcode-select on non-OSX platforms
diff --git a/ b/
line changes: +10/-0
index 4805006..bd45fa5
--- a/
+++ b/
@@ -34,12 +34,22 @@ To communicate with the Touch Bar service, apps using Rubrail *must* be executed
 The included example comes with a bundling script (examples/ and a launcher (examples/ to move itself into an app bundle and execute.
 ### Limitations
 There is no support for changing the UI of an existing bar.  To change the UI layout, you must create a new bar and completely replace the old one.  Scrubbers are an exception: their contents are managed by callbacks, but they do not live-refresh when the bar is visible.  The user must close and re-open the bar to see scrubber content changes.
 The Touch Bar API supports doing just about anything with custom views.  Rubrail does not.  Only a very limited set of UI options are exposed.
+#### Linking
+Rubrail links against the private Apple framework `DFRFoundation.framework`.  This is handled by adding the private framework path in ``.  Applications that _use_ Rubrail do not need to link against it themselves, but should be aware that a dependency does.
+Linking requires an XCode version high enough to support the Touch Bar and the private framework.  The only tested version of XCode is version 8.3.  Applications that use Rubrail **must** build with a new enough XCode version.  If using Travis-CI, this means adding a line like this to your `.travis.yml`:
+`osx_image: xcode8.3`
 ### Known Bugs
 Memory leaks!  Memory leaks as far as the eye can see.

diff --git a/ b/
line changes: +7/-2
index 4a31dd4..430cd11
--- a/
+++ b/
@@ -1,4 +1,5 @@
-fn main() {
+fn add_xcode_private_framework_path() {
     // PrivateFramework dir:
     // `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/PrivateFrameworks/
     let xcode_dir = std::process::Command::new("xcode-select")
@@ -11,7 +12,11 @@ fn main() {
     println!("XCode PrivateFramework dir: {}", framework_dir);
+    println!("cargo:rustc-link-search=framework={}", framework_dir);
+fn main() {
     #[cfg(target_os = "macos")]
     #[cfg(feature = "private_api")]
-    println!("cargo:rustc-link-search=framework={}", framework_dir);
+    add_xcode_private_framework_path();