macOS从源码安装Redis Desktop Manager

Redis Desktop Manager(RDM)是一款跨平台的Redis桌面客户端, 其支持SSH隧道连接, 批量删除等特性, 是非常优秀的Redis管理工具. 但是在最近的版本中, 作者停止了提供macOS平台的安装包, 需要我们以付费订阅的方式获得. 当然, 作者也提供了从源码安装的方式, 但对于我等又穷又不熟悉QT的小白来说, 方法过于简略.

本人在研究过RDM的Travis脚本后, 成功在macOS平台上编译了app格式的软件包, 在这里把编译方法分享给大家.

  1. 首先, 如果没有安装brew, 请通过以下脚本安装.

    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  2. 安装qt5、openssl、libssh2(不同版本的RDM依赖可能不同, 请根据实际编译时的报错信息安装相应的依赖).

    $ brew update && brew install qt5 openssl libssh2
    $ export PATH=/usr/local/opt/qt5/bin:$PATH

  3. 克隆RDM版本库, 编译并安装CrashReporter.

    $ git clone --recursive git@github.com:uglide/RedisDesktopManager.git rdm && cd rdm
    $ cd 3rdparty/crashreporter && qmake DESTDIR=./bin && make -s -j 8
    $ mkdir -p ../../bin/osx/release && mv bin/crashreporter ../../bin/osx/release

  4. 编译RDM.

    $ cd ../../src && ./configure
    $ qmake CONFIG-=debug && make -s -j 8 && cd ..

  5. 将bin/osx/release文件夹下生成的rdm.app拖到应用程序文件夹中即可完成安装.

最后, 附上本人编译好的rdm.zip, 源码版本是8c439e4821188e11f360236b62e25ccdcab2ba95.

添加新评论