Skip to content
Go back

Mac 编译安装 RDM

Updated:  at  07:25 PM

Table of contents

Open Table of contents

准备

macOS Mojave 版本 10.14.6

homebrew、git

安装 qt

brew install qt

homebrew 使用的是源码编译安装 qt,编译时间很长的,花了一个多小时吧。

编译安装

下载源码

git clone --recursive [email protected]:uglide/RedisDesktopManager.git -b 2019.3 rdm && cd ./rdm

注意需要使用 --recursive 参数,依赖了第三方的项目,也需要拉下来

使用 https 的方式 --recursive 参数没有起作用,所以用 ssh 的方式

直接拉取的 2019.3 的 tag,目前(2019-8-30)是最新的 tag

编译 crashreporter

cd 3rdparty/crashreporter && /usr/local/opt/qt/bin/qmake DESTDIR=./bin && make -s -j 8

这是一个第三方的库,rdm 2019.3 这个标签依赖的 crashreporter commit id 是 0202f9b

但是编译会出错,可以选择使用 7ec6f00 这个 commit id 来进行编译

所以上面的那句可以改成下面这个

cd 3rdparty/crashreporter

git checkout 7ec6f00

/usr/local/opt/qt/bin/qmake DESTDIR=./bin && make -s -j 8

编译好后,放到 rdm/bin/osx/release 目录下去

mkdir -p ../../bin/osx/release && mv bin/crashreporter ../../bin/osx/release

修改 rdm 参数

# 进入 rdm/src 目录
cd ../../src

cp resources/Info.plist.sample resources/Info.plist

# 修改 rdm.pro 文件
sed -i '' 's/debug: CONFIG-=app_bundle/#debug: CONFIG-=app_bundle/g' rdm.pro

需要创建一个 version.h,在 rdm/src 目录

内容如下

#ifndef RDM_VERSION
    #define RDM_VERSION "2019.3.0"
#endif

2019.3 这个版本 configure 脚本会检查是否有 version.h 这个文件

编译 rdm

# 在 rdm/src 目录
./configure
/usr/local/opt/qt/bin/qmake CONFIG-=debug
make -s -j 8

运行 configure 的时候,会自动使用 homebrew 安装一些必要的东西

执行 configure 遇到的坑,执行下面这个 brew install openssl 的时候,会出错,导致终端,实际上我电脑上已经安装过 openssl 的,所以注释掉了,然后就成功完成了。

编译成功

成功后,在 rdm/bin/osx/release 目录下面应该就有一个 rdm.app 了,把它放入应用程序目录,就可以使用了。

最后

用起来还是没有问题的,不过界面还是有点丑,有时间再来折腾一下。



Next Post
Spring Cloud 之 Zuul 网关