Skip to content
l2y edited this page Jan 20, 2018 · 4 revisions

This article is a stub. Don't edit it unless you know what you are doing. Don't follow it unless you know what you are doing.

Pre-built package

Download the latest .mpkg file from Releases, double-click and follow the instructions.

NOTE: we are looking for maintainers to support Homebrew, MacPorts etc. Open an issue if you are willing to help.

Semi-automatic install

Install git, clone the repository, execute quickinstall and follow the instructions:

git clone https://github.com/mattanger/ckb-next.git
cd ckb-next
./quickinstall

Build from source

Install git and clone the repository:

git clone https://github.com/mattanger/ckb-next.git
cd ckb-next

NOTE: git is the preferred way to obtain the source code, because it is used to versionize the binary.

ckb-next uses CMake during the build process. See CMake Options for the list of available switches.

Install the latest version of Xcode from the App Store. Then open a terminal and execute xcode-select --install to install Command Line Tools. Then open Xcode, accept the license agreement and wait for it to install any additional components. After you finally see the "Welcome to Xcode" screen, from the top bar choose Xcode -> Preferences -> Locations -> Command Line Tools and select an SDK version.

Install Homebrew and the dependencies:

brew install qt5 quazip

Generate the desired configuration with CMake, compile and install:

cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DSAFE_INSTALL=ON -DSAFE_UNINSTALL=ON
cmake --build build --target all -- -j
sudo cmake --build build --target install

Uninstallation

If you were using a pre-built package of ckb-next or ckb (any version):

killall -KILL ckb
killall -KILL ckb-next
sudo launchctl unload -w /Library/LaunchDaemons/com.ckb.daemon.plist
sudo launchctl unload -w /Library/LaunchDaemons/org.next.ckb.daemon.plist
sudo rm -rf /Applications/ckb.app
sudo rm -rf /Applications/ckb-next.app
sudo rm -rf /Library/LaunchDaemons/com.ckb.daemon.plist
sudo rm -rf /Library/LaunchDaemons/org.next.ckb.daemon.plist
sudo rm -rf /Library/Application\ Support/ckb-next-daemon

Otherwise, ckb-next provides uninstall target, but it's a bit tricky. You should recall all -DOPTION=VALUE flags you have used when generating the configuration for installation, build install target and then build uninstall target. For example:

cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DSAFE_INSTALL=ON -DSAFE_UNINSTALL=ON -DWITH_GUI=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBEXECDIR=lib
cmake --build build --target all -- -j
sudo cmake --build build --target install
sudo cmake --build build --target uninstall

The compilation and installation steps are required because install target generates an install manifest that later allows to determine which files to remove and what is their location.

NOTE: this method works only with ckb-next >=0.2.9.

NOTE: this method is the preferred and supported way to remove ckb-next.

NOTE: this method will not remove any of the files belonging to ckb-next <=0.2.8 or ckb <=0.2.7 if they are not overlapping with ckb-next >=0.2.9. It will only ensure it is safe to remove any ckb-related files, whatever the version would be, and only remove ckb-next >=0.2.9 components.

If you have been using ckb-next 0.2.8 (with old ckb and ckb-daemon binaries) or even ckb <=0.2.7 (by ccMSC), you will have to remove files manually. The example of removal for pre-built packages above is also suitable for removal after manual compilation. It is possible to encounter some leftovers, those commands are not panacea.