Difference between revisions of "Mac OS X"
(→TODO) |
Uwe Hermann (talk | contribs) m (Updates.) |
||
Line 3: | Line 3: | ||
This page describes how to build sigrok on Mac OS X. | This page describes how to build sigrok on Mac OS X. | ||
== | == Building == | ||
These instructions have been tested on a clean Mac OS X 10.6.8 install. | These instructions have been tested on a clean Mac OS X 10.6.8 install. | ||
=== Requirements === | |||
Install MacPorts, follow the guide on [http://www.macports.org/install.php macports.org] (this step will require Xcode on your machine, which is also a dependency to build sigrok). | |||
Install Qt, download qt-mac-opensource-4.7.4.dmg from [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x qt.nokia.com] (Only needed for sigrok-qt). | |||
TODO: Install GTK+ libs and dependencies for sigrok-gtk. | |||
Install git: | |||
$ '''sudo port install git-core''' | $ '''sudo port install git-core''' | ||
This will also pull in a bunch of dependencies required by git-core (and some of them also by sigrok). | This will also pull in a bunch of dependencies required by git-core (and some of them also by sigrok). | ||
Install libusb, libzip and libftdi, the sigrok build dependencies: | |||
$ '''sudo port install libusb''' | $ '''sudo port install libusb''' | ||
$ '''sudo port install libzip''' | $ '''sudo port install libzip''' | ||
$ '''sudo port install libftdi''' | $ '''sudo port install libftdi''' | ||
Enter some directory where you want to store the sigrok source, and check it out: | |||
$ '''cd some-directory''' | $ '''cd some-directory''' | ||
$ '''git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok''' | $ '''git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok''' | ||
Enter the sigrok source directory: | |||
$ '''cd sigrok''' | $ '''cd sigrok''' | ||
=== libsigrok === | |||
$ '''cd libsigrok''' | |||
$ '''./autogen.sh''' | $ '''./autogen.sh''' | ||
$ '''./configure''' | |||
$ '''make''' | |||
$ '''sudo make install''' | |||
$ '''cd ..''' | |||
=== libsigrokdecode === | |||
$ '''cd libsigrokdecode''' | |||
$ '''./autogen.sh''' | |||
$ '''./configure''' | $ '''./configure''' | ||
$ '''make''' | |||
$ '''sudo make install''' | |||
$ '''cd ..''' | |||
=== sigrok-cli === | |||
$ '''cd sigrok-cli''' | |||
$ '''./autogen.sh''' | |||
$ '''./configure''' | |||
$ '''make''' | $ '''make''' | ||
$ '''sudo make install''' | |||
$ '''cd ..''' | |||
=== sigrok-gtk === | |||
$ '''cd sigrok-gtk''' | |||
$ '''./autogen.sh''' | |||
$ '''./configure''' | |||
$ '''make''' | |||
$ '''sudo make install''' | $ '''sudo make install''' | ||
$ '''cd ..''' | |||
=== sigrok-qt === | |||
$ '''cd gui''' | $ '''cd gui''' | ||
$ '''PKG_CONFIG_PATH=/usr/local/lib/pkgconfig qmake -spec macx-g++''' | $ '''PKG_CONFIG_PATH=/usr/local/lib/pkgconfig qmake -spec macx-g++''' | ||
$ '''make''' | |||
Open the sigrok-gui application just built: | |||
$ '''open -a sigrok-gui.app''' | $ '''open -a sigrok-gui.app''' | ||
== Notes == | == Notes == | ||
To build on Snow Leopard (10.6) you need to use the [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x Cocoa (32bit and 64bit) Qt libraries]. Don't use the default download link on that page but the one you can find further down the page. | * To build on Snow Leopard (10.6) you need to use the [http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x Cocoa (32bit and 64bit) Qt libraries]. Don't use the default download link on that page but the one you can find further down the page. | ||
* Currently we are using [http://www.macports.org/ macports] for the libusb dependency and are relying on the fact that macports are installed in /opt/local. | |||
Currently we are using [http://www.macports.org/ macports] for the libusb dependency and are relying on the fact that macports are installed in /opt/local. | * See also [http://home2.xor-gate.org/writings/sigrok-osx-scratchbuild Wafelijzer's efforts to build Mac OS X binaries]. | ||
== TODO == | == TODO == |
Revision as of 23:11, 18 May 2012
This page describes how to build sigrok on Mac OS X.
Building
These instructions have been tested on a clean Mac OS X 10.6.8 install.
Requirements
Install MacPorts, follow the guide on macports.org (this step will require Xcode on your machine, which is also a dependency to build sigrok).
Install Qt, download qt-mac-opensource-4.7.4.dmg from qt.nokia.com (Only needed for sigrok-qt).
TODO: Install GTK+ libs and dependencies for sigrok-gtk.
Install git:
$ sudo port install git-core
This will also pull in a bunch of dependencies required by git-core (and some of them also by sigrok).
Install libusb, libzip and libftdi, the sigrok build dependencies:
$ sudo port install libusb $ sudo port install libzip $ sudo port install libftdi
Enter some directory where you want to store the sigrok source, and check it out:
$ cd some-directory $ git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok
Enter the sigrok source directory:
$ cd sigrok
libsigrok
$ cd libsigrok $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
libsigrokdecode
$ cd libsigrokdecode $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
sigrok-cli
$ cd sigrok-cli $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
sigrok-gtk
$ cd sigrok-gtk $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
sigrok-qt
$ cd gui $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig qmake -spec macx-g++ $ make
Open the sigrok-gui application just built:
$ open -a sigrok-gui.app
Notes
- To build on Snow Leopard (10.6) you need to use the Cocoa (32bit and 64bit) Qt libraries. Don't use the default download link on that page but the one you can find further down the page.
- Currently we are using macports for the libusb dependency and are relying on the fact that macports are installed in /opt/local.
- See also Wafelijzer's efforts to build Mac OS X binaries.
TODO
- Find a sane way to bundle libusb with the sigrok.app.
- Include an icon with the app.
- Set the relative paths in the binary's and DyLibs
- Building universal DyLibs and binaries
- Bundle the dynamic libraries with MacDylibBundler