Installation : OS X
This is the newer OCaml version of 0install. There is also an older pure Python version. The OCaml version is completely backwards compatible with the Python version.
To use Zero Install, you will need these two dependencies:
To build Zero Install from source code, you will also need:
- Xcode (Command Line Tools)
- Git (if not included in Xcode already)
- pkg-config (helper tool used when compiling)
- GNU gettext (only "gettext-tools", not "gettext-runtime")
The easiest way of installing Zero Install and its requirements is by using a “package
manager”, to handle building both it and the dependencies (mentioned above) for you.
Or you can use the pre-compiled package bundle, which installs GnuPG and optionally
PyGTK (includes glib/gtk+) and their dependencies, for Mac OS X 10.6 and later versions.
Note: The binary package of 0install requires a 64-bit Intel processor (x86_64) to run.
It will automatically download and install packages for the GnuPG and GTK+ dependencies.
$ brew install pkg-config gettext gnupg gtk+ objective-caml opam $ opam install yojson xmlm ounit react lwt extlib ocurl sha lablgtk $ make $ sudo make install
- Zero Install
Install the Developer Tools, if needed:
open /Applications/Utilities/Terminal.app $ xcode-select --install
Install homebrew using git, if needed:
$ git clone https://github.com/Homebrew/homebrew.git $ export PATH=$PWD/homebrew/bin:$PWD/homebrew/sbin:$PATH
Install build dependencies:
$ brew install pkg-config $ brew install gettext
Install runtime dependencies:
$ brew install gnupg or $ brew install gnupg2
Optionally, install gtk+:
$ brew install gtk+ $ brew install gtk-engines # for the "Clearlooks" theme
Fix homebrew shortcomings:
# the gettext-tools are not linked with homebrew: $ export PATH="`brew --prefix gettext`/bin:$PATH" # the libpng library is not found by homebrew: $ export PKG_CONFIG_PATH="`brew --prefix libpng`/lib/pkgconfig:$PKG_CONFIG_PATH"
Use the Clearlooks theme:
$ export GTK2_RC_FILES="`brew --prefix`/share/themes/Clearlooks/gtk-2.0/gtkrc" $ export GTK_PATH="`brew --prefix`/lib/lib/gtk-2.0"
Install OCaml and OPAM:
$ brew install ocaml $ brew install opam # OS X Mavericks or later or $ brew install opam --without-aspcud # OS X Mountain Lion or lower
Initialize the OPAM root, if needed:
$ export OPAMROOT=$PWD/opamroot $ opam init
Install OPAM packages:
$ eval `opam config env` $ opam install yojson xmlm ounit react lwt extlib ocurl sha # optional, for GUI $ opam install lablgtk
Finally, install 0install itself - using the instructions in the source package.
$ git clone https://github.com/0install/0install.git $ cd 0install $ make && make install_home $ export PATH=$HOME/bin:$PATH
There are some pre-compiled generic binaries available. These work on Linux, and on Darwin (OS X).
Download the appropriate archive for your system, unpack it, and run the install.sh script inside.
$ sudo installer -pkg ZeroInstall.pkg -target /
After the installation
You now have some new commands: 0launch, which takes the URL of a program and runs it, and 0install, which provides access to other features.
$ 0launch URI
Work in Progress
Once a native OS X interface is available, this process will become much simpler...
It will also blend in more with the desktop than what the current GTK interface does.