├── README-mac.md ├── README.md ├── README_0.9.8.md ├── binaries ├── redis-desktop-manager-0.9.5.exe ├── redis-desktop-manager-0.9.8.exe ├── redis-desktop-manager-0.9.9.exe ├── redis-desktop-manager-2019.0.0.exe ├── redis-desktop-manager-2020.2.0.dmg ├── redis-desktop-manager-2020.2.0_x64.exe └── redis-desktop-manager-2020.2.0_x86.exe ├── images ├── rdm.jpg ├── rdm_build.jpg ├── rdm_language.jpg ├── rdm_project.jpg ├── rdm_release.jpg └── visualstudio.jpg └── scripts ├── build-x64.bat ├── build-x86.bat ├── conf ├── 3rdparty_x64.pri ├── 3rdparty_x86.pri ├── installer_x86.nsi ├── pyotherside_x64.pri └── pyotherside_x86.pri ├── prepare-x64.bat └── prepare-x86.bat /README-mac.md: -------------------------------------------------------------------------------- 1 | # Redis Desktop Manager for Mac 2 | 3 | 4 | ## 下载源码 5 | git clone --recursive https://github.com/uglide/RedisDesktopManager.git 6 | 7 | ## 安装XCode 8 | 9 | ## 安装Homebrew 10 | 由于编译rdm需要用到其他工具或三方库,因此系统最好安装有包管理器方便下载或更新其他软件包 11 | 12 | ## 拷贝plist文件 13 | ```bash 14 | cd ./src 15 | cp ./resources/Info.plist.sample ./resources/Info.plist 16 | ``` 17 | 修改Info.plist 18 | 设置 `Bundle version` `Bundle version string (short)` , 修改为当前编译的版本 19 | 修改最低系统要求 `Minimum system version` , 经测试可以设置为 10.13.0 20 | 21 | ## 安装依赖软件包 22 | brew install openssl cmake 23 | 安装python 3.7.x installer 24 | **使用Python官网上提供的安装包**,经测试如果使用brew安装,无法找到Python的依赖,该问题待解决 25 | 26 | 27 | ## 安装QT 5.13.x 28 | 下载QT 5.13.2版本 29 | 安装时选择 `OS X` 和 `Qt Charts` 30 | 31 | ## 编译语言文件 32 | 使用QT打开项目,编译语言文件 33 | 工具 -> 外部 -> QT语言家 34 | 按照以下顺序执行:更新翻译(lupdate) -> 发布翻译(lrelease),如果只用英文界面的话这步可忽略 35 | 36 | ## 安装 Python 依赖 37 | ```bash 38 | cd src 39 | pip3 install -t ./bin/osx/release -r py/requirements.txt --upgrade 40 | ``` 41 | 42 | ## 编译 43 | ```bash 44 | # 生成 Makefile 45 | ~/Qt5.13.2/5.13.2/clang_64/bin/qmake CONFIG-=debug CONFIG+=sdk_no_version_check 46 | # make 47 | make -s -j 8 48 | ``` 49 | 50 | 51 | ## QT Framework 52 | ```bash 53 | cd bin/osx/release 54 | ~/Qt5.13.2/5.13.2/clang_64/bin/macdeployqt Redis\ Desktop\ Manager.app -qmldir=../../../src/qml 55 | ``` 56 | 57 | ## 打包 58 | 创建一个文件夹,命名为 `Redis Desktop Manager` 59 | 将 `Redis Desktop Manager.app` 放到文件夹中,在用户应用程序目录右键制作替身,将生成的链接也访问文件夹中 60 | 打开磁盘管理工具,点击 文件 -> 新建映像 -> 来自文件夹的映像,选择上面的文件夹,选择保存dmg文件的位置,保存 61 | 62 | 至此安装包制作完成 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Redis Desktop Manager 编译 2 | 3 | - [更多 Redis Desktpo Manager 版本](https://github.com/fansys/rdm-builder) 4 | 5 | 如果电脑运行Redis Desktop Manager时提示: 由于找不到MSVCP140.dll,无法继续执行代码。 6 | 7 | 那么先安装所需环境(VC_redist 2015): 8 | 9 | [https://www.microsoft.com/zh-CN/download/details.aspx?id=48145](https://www.microsoft.com/zh-CN/download/details.aspx?id=48145) 10 | 11 | PS: 编译步骤还是比较多的, 还要下载很多国外网站的工具, 网速不好得下好久, 下完之后又是各种配置, 没几个小时搞完不完, 不过弄好一次之后下次新版本编译10分钟搞定, 我写这篇文章已经踩了一天的坑= =!, 希望后边的小伙伴少踩坑我已经是能写多详细写多详细了. 12 | 13 | 编译环境 14 | ---- 15 | 16 | OS:Windows 7 x64 17 | 18 | Visual Studio 2017 Community Edition 19 | 20 | QT 5.13.2 21 | 22 | Python 3.7.9 23 | 24 | OpenSSL 1.1.1.g 25 | 26 | NSIS 27 | 28 | 29 | 30 | 软件安装 31 | ---- 32 | 33 | 先看官方编译步骤: [http://docs.redisdesktop.com/en/latest/install/#build-from-source](http://docs.redisdesktop.com/en/latest/install/#build-from-source) 注意Qt和Python的需要版本 34 | 35 | ### Visual Studio 2017 Community 36 | 37 | ​ 下载地址: [https://docs.microsoft.com/zh-cn/visualstudio/productinfo/vs2017-system-requirements-vs](https://docs.microsoft.com/zh-cn/visualstudio/productinfo/vs2017-system-requirements-vs) 38 | 39 | ​ 使用 Community 版即可 40 | 41 | ​ 安装时在工作负载界面勾选 `使用C++的桌面开发` 选项 42 | 43 | ### QT 5.13.x 44 | 45 | ​ QT有以下3中安装途径 46 | 47 | ​ [https://www.qt.io/download-qt-installer](https://www.qt.io/download-qt-installer) 在线安装工具(需要C盘临时空间有7G) 48 | 49 | ​ [http://download.qt.io/official_releases/qt/](http://download.qt.io/official_releases/qt/) 完整包下载(3.6G) 50 | 51 | ​ [https://mirrors.ustc.edu.cn/qtproject/archive/qt/](https://mirrors.ustc.edu.cn/qtproject/archive/qt/) 完整包下载(镜像网站) 52 | 53 | ​ QT安装时组件要勾选: `MSVC 2017 64-bit` 和 `Qt Charts` 54 | 55 | ​ 如果需要编译x86版本,需要勾选 `MSVC 2017 32-bit` 56 | 57 | ### Python 3.7.x 58 | 59 | ​ 下载地址: https://www.python.org/downloads/](https://www.python.org/downloads/) 60 | 61 | ​ 需要下载以下两个版本 62 | 63 | - executable installer: Python开发工具,需要安装 64 | - embeddable zip: 提供rdm的运行库,打包时使用 65 | 66 | ​ 安装时勾选: `Add Python to environment variables` 和 `Download debug bnaries (requires Vs 2015 or later)` 安装目录:`C:\Python37-x64` 67 | 68 | ​ 如果需要编译rdm32位版本,则下载 `Windows x86` 版本,并安装到`C:\Python37-x86` 69 | 70 | ### OpenSSL 71 | 72 | ​ 下载地址: [https://slproweb.com/products/Win32OpenSSL.html](https://slproweb.com/products/Win32OpenSSL.html) 73 | 74 | ​ 安装目录:`C:\OpenSSL-Win64` 75 | 76 | ​ 如果需要编译rdm32位版本,则下载 `Win32` 版本,并安装到`C:\OpenSSL-Win32` 77 | 78 | ### Nuget 79 | 80 | ​ 下载地址: [https://www.nuget.org/downloads](https://www.nuget.org/downloads) 81 | 82 | ​ 下载最新版本, 单独的exe程序, 用来下载一个依赖包 83 | 84 | ​ 需要配置环境变量以便命令行可以访问 85 | 86 | ### NSIS 3.xx 87 | 88 | ​ 下载地址: [http://nsis.sourceforge.net/Download](http://nsis.sourceforge.net/Download) 89 | 90 | ​ 打包rdm安装包,如不需要打包可不装 91 | 92 | 93 | 94 | 源码下载 95 | -------- 96 | 97 | 源码下载有两种方式 98 | 99 | ### 1. git clone仓库 100 | 101 | ​ 执行以下命令即可递归克隆主项目和依赖的项目源码 102 | 103 | ```bash 104 | git clone --recursive https://github.com/uglide/RedisDesktopManager.git 105 | ``` 106 | 107 | 108 | 109 | ### 2. 下载仓库zip包(适用于网络比较慢的情况) 110 | 111 | ​ RedisDesktopManager 的GitHub地址: [https://github.com/uglide/RedisDesktopManager](https://github.com/uglide/RedisDesktopManager) 查看 `3rdparty`目录,找到依赖的项目,这些项目是链接过去的 112 | 113 | ​ **本文下载时间2020-08-24, 后面这些依赖可能会变** 114 | 115 | ​ **主源码**: [https://github.com/uglide/RedisDesktopManager/releases/tag/2020.2](https://github.com/uglide/RedisDesktopManager/releases/tag/2020.2) 下载Source code (zip) 116 | 117 | > - 主源码依赖 pyotherside: [https://github.com/uglide/pyotherside/tree/c1a8cc03266b3b620ba9195e365e8751a8e4c9ef](https://github.com/uglide/pyotherside/tree/c1a8cc03266b3b620ba9195e365e8751a8e4c9ef) Code下载ZIP包 118 | > 119 | > - 主源码依赖 qredisclient: [https://github.com/uglide/qredisclient/tree/9fe79f7c13b9811228db33abf75a83464a7cd2e2](https://github.com/uglide/qredisclient/tree/9fe79f7c13b9811228db33abf75a83464a7cd2e2) Code下载ZIP包 120 | > 121 | > - qredisclient 依赖 asyncfuture: [https://github.com/benlau/asyncfuture/tree/5ca03043bc54f310bae3097553c5a034f2032ec5](https://github.com/benlau/asyncfuture/tree/5ca03043bc54f310bae3097553c5a034f2032ec5) Code下载ZIP包 122 | > 123 | > - qredisclient 依赖 hiredis: [https://github.com/redis/hiredis/tree/685030652cd98c5414ce554ff5b356dfe8437870](https://github.com/redis/hiredis/tree/685030652cd98c5414ce554ff5b356dfe8437870) Code下载ZIP包 124 | 125 | ​ 将下载的依赖包按照主源码仓库的目录结构解压到主源码 `3rdparty` 目录下 126 | 127 | 128 | 129 | 源码编译 130 | --------- 131 | 132 | ### 1. 应用 hiredis 补丁 133 | 134 | ​ 3rdparty/qredisclient/3rdparty/hiredis目录,打开cmd窗口执行 `git apply ../hiredis-win.patch` 如果没有提示就是成功,有提示就是失败了,这是修复windows平台下代码格式的兼容性问题的,如果不执行,编译时就会报各种中语法错误少了;号之类的 135 | 136 | 137 | 138 | ### 2. 下载 zlib-msvc14 139 | 140 | ​ 进入3rdparty目录打开cmd窗口执行: `nuget install zlib-msvc14-x64 -Version 1.2.11.7795` 会下载zlib依赖 141 | 142 | ​ 确保nuget.exe已配置环境变量或拼写nuget.exe全路径,否则会找不到命令 143 | 144 | ​ 如果需要编译rdm32位版本,则执行: `nuget install zlib-msvc14-x86 -Version 1.2.11.7795` 145 | 146 | 147 | 148 | ### 3. 安装 Python 依赖包 149 | 150 | ​ 进入 src/py 路径,打开cmd窗口执行: `pip install -r requirements.txt` 确保已经安装好了Python 3.7.x才能执行该命令 151 | 152 | ​ 如果提示找不到 pip,需要配置 Python 安装路径下的Scripts文件夹到环境变量,或者使用pip.exe的全路径 153 | 154 | 155 | 156 | ### 4. 使用 Qt Creator 打开项目 157 | 158 | ​ 进入 src 目录, 使用 Qt Creator 打开`rdm.pro`文件, 确保已经安装好了Qt才能打开该文件 159 | 160 | ​ 代码结构如图所示: 161 | 162 | ​ 尤其看依赖项目的结构是否配置正确 163 | 164 | ![](https://github.com/fansys/redis-desktop-manager/blob/master/images/rdm_project.jpg) 165 | 166 | 167 | 168 | ### 5. 修改版本号 169 | 170 | ​ 编辑视图中打开rdm/rdm.pro文件,修改版本号`VERSION=2020.2.0-dev` 改为 `VERSION=2020.2.0` 改完保存(必须改,否则编译时报版本号必须为数值型错误) 171 | 172 | 173 | 174 | ### 6. 检查编译依赖路径 175 | 176 | ​ 检查以下几个文件,确认配置的依赖路径与实际路径一致 177 | 178 | ​ 如果需要编译32位版本RDM,此时就需要将这三个依赖配置为32位的版本的路径 179 | 180 | - 3rdparty/3rdparty.pri, `OPENSSL_LIB_PATH` 项配置的 OpenSSL 路径,和 `ZLIBDIR` 项配置的 Zlib 路径 181 | - 3rdparty/pyotherside.pri , 开头 Python 下的 `QMAKE_LIBS` 和 `INCLUDEPATH` 项配置的 Python 路径 182 | - 183 | 184 | ### 7. 修改构建配置为Release 185 | 186 | ​ 转到项目视图,左侧选择Build版本,然后设置Build的编译构建配置为Release 187 | 188 | - 如果需要编译64位版本rdm,则选择Deskto Qt 5.13.2 MSVC2017 64bit 189 | 190 | - 如果需要编译32位版本rdm,则选择Deskto Qt 5.13.2 MSVC2017 32bit 191 | 192 | ![](https://github.com/fansys/redis-desktop-manager/blob/master/images/rdm_release.jpg) 193 | 194 | 195 | 196 | ### 8.更新语言文件 197 | 198 | 编译之前先更新语言文件 199 | 200 | 按照以下顺序执行:更新翻译(lupdate) -> 发布翻译(lrelease),如果只用英文界面的话这步可忽略 201 | 202 | ![](https://github.com/fansys/redis-desktop-manager/blob/master/images/rdm_language.jpg) 203 | 204 | 205 | 206 | ### 9. 构建 207 | 208 | ​ 点Qt界面左下角图标是锤子的按钮进行构建, 右下角就会弹出构建的进度, 显示绿色为构建完成 209 | 210 | ![](https://github.com/fansys/redis-desktop-manager/blob/master/images/rdm_build.jpg) 211 | 212 | 213 | 214 | ### 10. 生成发布文件 215 | 216 | ​ 编译好后进入 bin/windows/release 目录如果能看到 `rdm.exe` 文件则没问题, 然后将 `rdm.exe` 文件复制到 build/windows/installer/resources 目录中 217 | 218 | ​ 在 build/windows/installer/resources 目录中执行以下命令生成运行需要的依赖 219 | 220 | ```bash 221 | # 注意: 命令中的windeployqt是一个exe程序, 该程序的目录需要按实际Qt的安装位置修改, src\qml目录也是按源码解压时所在位置的绝对路径修改 222 | C:\Qt\Qt5.13.2\5.13.2\msvc2017_64\bin\windeployqt --no-angle --no-opengl-sw --no-compiler-runtime --no-translations --release --force --qmldir C:\project\rdm-2020.2\src\qml rdm.exe 223 | # 删除不需要的文件 224 | rmdir /S /Q .\QtGraphicalEffects 225 | del /Q .\imageformats\qtiff.dll 226 | del /Q .\imageformats\qwebp.dll 227 | ``` 228 | 229 | 230 | 231 | ### 11. 验证 rdm.exe 可以运行 232 | 233 | ​ 至此双击打开 `rdm.exe` 程序应该是可以看到界面的了 234 | 235 | ![](https://github.com/fansys/redis-desktop-manager/blob/master/images/rdm.jpg) 236 | 237 | ### 12. 添加 Python 运行环境 238 | 239 | ​ 如果没有安装Python工具,运行rdm是会提示找不到Python37.dll,因此需要将Python的运行环境打包到安装包中 240 | 241 | ​ 使用到下载好的 `python-3.7.x-embed-amd64.zip` 包将里边的 `python37.dll` 和 `python37.zip` 复制到build/windows/installer/resources目录中 242 | 243 | ​ 如果编译的是32位版本,这里使用的Python包也需要使用32位版本的 244 | 245 | 246 | 247 | ### 13. 添加 Python 依赖包 248 | 249 | ​ a. 进入Python的安装目录,进入Lib/site-packages下复制以下文件到 build/windows/installer/resources/Lib/site-packages 目录中 250 | 251 | > cbor 252 | > msgpack 253 | > rdbtools 254 | > redis 255 | > bitstring.py 256 | > lzf.cp37-win_amd64.pyd 257 | 258 | ​ b. 进入 src/py 目录复制所有文件到 build/windows/installer/resources/Lib/site-packages 目录中 259 | 260 | ​ c. 进入 src/phpserialize 目录复制 phpserialize.py 到 build/windows/installer/resources/Lib/site-packages 目录中 261 | 262 | ​ 以上完成后,在 build/windows/installer/resources/Lib/site-packages 目录下,执行以下命令编译 .py 文件 263 | 264 | ```bash 265 | # 编译 .py 266 | python -m compileall -b . 267 | 268 | # 编译完成后删除py源码文件, 保留pyc文件 269 | del /s .\*.py 270 | ``` 271 | 272 | 273 | 274 | ### 14. 制作安装包 275 | 276 | ​ 这个时候其实已经是绿色版的rdm工具了,发给别人自己用都可以,但是想做成安装包,装完注册在系统上就需要用到NSIS工具. 277 | 278 | ​ 项目根目录执行以下命令打包exe 279 | 280 | ```bash 281 | set VERSION=2020.2.0 282 | "c:\Program Files (x86)\NSIS\makensis.exe" /V1 /DVERSION=%VERSION% ./build/windows/installer/installer.nsi 283 | ``` 284 | 285 | ​ 编译完成后进入 build/windows/installer` 目录就能看到编译好的安装程序了 286 | 287 | ​ 如果是编译32位版本,需要修改installer.nsi,删除以下代码 288 | 289 | ```bash 290 | ${IfNot} ${RunningX64} 291 | MessageBox MB_OK "Starting from version 2019.0.0, Redis Desktop Manager doesn't support 32-bit Windows" 292 | Quit 293 | ${EndIf} 294 | ``` 295 | 296 | 297 | 298 | 299 | 300 | ## Q&A 301 | 302 | ### 1. module 'formatters' has no attribute 'get.formatters_list' 303 | 304 | ​ 启动后在日志中提示以下错误,这个错误是没有添加Python安装目录下Lib/site-packages中依赖包,重新执行 12.添加Python依赖包的 a步骤 305 | 306 | ```bash 307 | Formatters: Function not found: 'formatters.get_formatters_list' (Traceback (most recent call last): 308 | File "", line 1, in 309 | AttributeError: module 'formatters' has no attribute 'get.formatters_list' 310 | ) 311 | ``` 312 | 313 | 314 | 315 | ### 2. 屏蔽RDM更新 316 | 317 | ​ 屏蔽更新检查提示: 318 | 319 | ​ 编辑 src/modules/updater/updater.cpp 文件注释以下代码: 320 | 321 | ```c++ 322 | // manager->get(QNetworkRequest(updateUrl)); 323 | ``` 324 | -------------------------------------------------------------------------------- /README_0.9.8.md: -------------------------------------------------------------------------------- 1 | # redis-desktop-manager 2 | Redis Decktop Manager Binary 3 | 4 | ## 前言 5 | 6 | 因为作者在 0.9.4 版本之后选择对所有的安装包收费,不再提供安装包下载,但是源码依旧公开。 7 | 8 | 更新:觉得麻烦的,可以直接下载本人编译打包好的[安装包](https://github.com/fansys/redis-desktop-manager/releases) 9 | 10 | 参考:necan 的Github (https://github.com/necan/RedisDesktopManager-Windows) 11 | 12 | ## 编译过程 13 | 14 | ### 安装工具 15 | 16 | #### 安装 VSCode 2015 17 | 18 | 到 [http://blog.postcha.com/read/66](http://blog.postcha.com/read/66) 下载 Visual Studio 专业版,自定义安装,一定要勾选 VC ++,然后一直下一步,视机器配置而定,一般大约一个半小时装完。 19 | 20 | #### 安装 Qt 5.9 21 | 22 | 到 [http://mirrors.ustc.edu.cn/qtproject/archive/qt/5.9/](http://mirrors.ustc.edu.cn/qtproject/archive/qt/5.9/) 下载最新到 Qt 5.9 版本,一直下一步就行,大约半个小时左右。 23 | 24 | #### 安装 CMake 25 | 26 | 到 [https://cmake.org/download/](https://cmake.org/download/) 下载 32 位的版本,安装时注意勾选添加到 PATH 27 | 28 | #### 安装 NSIS 29 | 30 | 安装打包工具 [http://nsis.sourceforge.net/Download](http://nsis.sourceforge.net/Download) 31 | 32 | #### 安装 Python 2 33 | 34 | 到 https://www.python.org/downloads/ 下载安装 Python 2.7 35 | 36 | #### 安装 OpenSSL 37 | 38 | 下载并安装 [Win 32 OpenSSL 1.0.x](https://slproweb.com/products/Win32OpenSSL.html) 版本 39 | 40 | ### 编译 Redis Desktop Manager 41 | 42 | 打开 “VS2015 x86 本机工具命令提示符” 43 | 44 | #### 获取源码 45 | 46 | ```powershell 47 | git clone --recursive https://github.com/uglide/RedisDesktopManager.git D:\redisdesktopmanager 48 | cd D:\redisdesktopmanager 49 | ``` 50 | 51 | #### 编译 libssh2 52 | ```powershell 53 | cd ./3rdparty/qredisclient/3rdparty/qsshclient/3rdparty/libssh2 54 | cmake -G "Visual Studio 14 2015" -DCRYPTO_BACKEND=OpenSSL -DBUILD_EXAMPLES=off -DBUILD_TESTING=off -H. -Bbuild 55 | cmake --build build --config "Release" 56 | ``` 57 | 58 | #### 设置版本号 59 | 60 | 版本号自己到 Github 找(0.9.8版本开始不需要) 61 | 62 | ```powershell 63 | cd D:\redisdesktopmanager 64 | set VERSION=0.9.4.1055 65 | "D:\Program Files\Python\python27\python.exe" ./build/utils/set_version.py %VERSION% > ./src/version.h 66 | "D:\Program Files\Python\python27\python.exe" ./build/utils/set_version.py %VERSION% > ./3rdparty/crashreporter/src/version.h 67 | ``` 68 | 69 | #### 编译 crashreporter 70 | 71 | ```powershell 72 | cd ./3rdparty/crashreporter 73 | # 如出错可手动替换字符串,原始文件为Makefile.Release 74 | "D:\Qt\Qt5.9.6\5.9.6\msvc2015\bin\qmake.exe" CONFIG+=release DESTDIR=D:\redisdesktopmanager\bin\windows\release 75 | powershell -Command "(Get-Content Makefile.Release).replace('DEFINES =','DEFINES = -DAPP_NAME=\\\"RedisDesktopManager\\\" -DAPP_VERSION=\\\""%VERSION%"\\\" -DCRASH_SERVER_URL=\\\"https://oops.redisdesktop.com/crash-report\\\"')" > Makefile.Release2 76 | nmake -f Makefile.Release2 77 | ``` 78 | 编译crashrepoter需要一些依赖文件 79 | ``` 80 | 修改INCPATH,新增以下内容 (根据实际路径配置) 81 | INCPATH = -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" 82 | 修改LIBS,新增以下内容 (根据实际路径配置) 83 | LIBS = /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib" -LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86" 84 | ``` 85 | 86 | #### Qt 编译 87 | 88 | 打开 Qt Creator,打开 `./src/rdm.pro` 89 | 90 | 选择 “Deaktop Qt 5.9.6 MSVC2015 32bit”,构建选择 release,点击构建项目。 91 | 92 | ### 打包 93 | 94 | ```powershell 95 | cd D:\redisdesktopmanager 96 | copy /y .\bin\windows\release\rdm.exe .\build\windows\installer\resources\rdm.exe 97 | copy /y .\bin\windows\release\rdm.pdb .\build\windows\installer\resources\rdm.pdb 98 | D:\redisdesktopmanager\3rdparty\gbreakpad\src\tools\windows\binaries\dump_syms .\bin\windows\release\rdm.pdb > .\build\windows\installer\resources\rdm.sym 99 | cd build/windows/installer/resources/ 100 | D:\Qt\Qt5.9.6\5.9.6\msvc2015\bin\windeployqt --no-angle --no-opengl-sw --no-compiler-runtime --no-translations --release --force --qmldir D:\redisdesktopmanager\src\qml rdm.exe 101 | rmdir /S /Q .\platforminputcontexts 102 | rmdir /S /Q .\qmltooling 103 | rmdir /S /Q .\QtGraphicalEffects 104 | del /Q .\imageformats\qtiff.dll 105 | del /Q .\imageformats\qwebp.dll 106 | cd D:\redisdesktopmanager 107 | call "C:\\Program Files (x86)\\NSIS\\makensis.exe" /V1 /DVERSION=%VERSION% ./build/windows/installer/installer.nsi 108 | ``` 109 | 110 | 打包后的文件:`D:\redisdesktopmanager\build\windows\installer\redis-desktop-manager-0.9.4.1055.exe` 111 | -------------------------------------------------------------------------------- /binaries/redis-desktop-manager-0.9.5.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/binaries/redis-desktop-manager-0.9.5.exe -------------------------------------------------------------------------------- /binaries/redis-desktop-manager-0.9.8.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/binaries/redis-desktop-manager-0.9.8.exe -------------------------------------------------------------------------------- /binaries/redis-desktop-manager-0.9.9.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/binaries/redis-desktop-manager-0.9.9.exe -------------------------------------------------------------------------------- /binaries/redis-desktop-manager-2019.0.0.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/binaries/redis-desktop-manager-2019.0.0.exe -------------------------------------------------------------------------------- /binaries/redis-desktop-manager-2020.2.0.dmg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/binaries/redis-desktop-manager-2020.2.0.dmg -------------------------------------------------------------------------------- /binaries/redis-desktop-manager-2020.2.0_x64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/binaries/redis-desktop-manager-2020.2.0_x64.exe -------------------------------------------------------------------------------- /binaries/redis-desktop-manager-2020.2.0_x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/binaries/redis-desktop-manager-2020.2.0_x86.exe -------------------------------------------------------------------------------- /images/rdm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/images/rdm.jpg -------------------------------------------------------------------------------- /images/rdm_build.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/images/rdm_build.jpg -------------------------------------------------------------------------------- /images/rdm_language.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/images/rdm_language.jpg -------------------------------------------------------------------------------- /images/rdm_project.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/images/rdm_project.jpg -------------------------------------------------------------------------------- /images/rdm_release.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/images/rdm_release.jpg -------------------------------------------------------------------------------- /images/visualstudio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/images/visualstudio.jpg -------------------------------------------------------------------------------- /scripts/build-x64.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/scripts/build-x64.bat -------------------------------------------------------------------------------- /scripts/build-x86.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fansys/redis-desktop-manager/d004254b2fd356632203011b68b7ab2977d71ffd/scripts/build-x86.bat -------------------------------------------------------------------------------- /scripts/conf/3rdparty_x64.pri: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Redis Desktop Manager Dependencies 4 | # 5 | #------------------------------------------------- 6 | 7 | DEFINES += ENABLE_EXTERNAL_FORMATTERS 8 | HEADERS += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.h 9 | SOURCES += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.cpp 10 | 11 | # qredisclient 12 | if(win32*):exists( $$PWD/qredisclient/qredisclient.lib ) { 13 | message("Using prebuilt qredisclient") 14 | INCLUDEPATH += $$PWD/qredisclient/src/ 15 | OPENSSL_LIB_PATH = C:\OpenSSL-Win64\lib\VC 16 | LIBS += -L$$OPENSSL_LIB_PATH -llibeay32MD -L$$PWD/qredisclient/ -lqredisclient -lbotan -llibssh2 -lgdi32 -lws2_32 -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 17 | include($$PWD/qredisclient/3rdparty/asyncfuture/asyncfuture.pri) 18 | } else:unix*:exists( $$PWD/qredisclient/libqredisclient.a ) { 19 | message("Using prebuilt qredisclient") 20 | INCLUDEPATH += $$PWD/qredisclient/src/ 21 | LIBS += -L$$PWD/qredisclient/ -lqredisclient -lbotan-2 -lssh2 -lz -lssl -lcrypto 22 | include($$PWD/qredisclient/3rdparty/asyncfuture/asyncfuture.pri) 23 | } else { 24 | message("Using qredisclient source code") 25 | include($$PWD/qredisclient/qredisclient.pri) 26 | } 27 | 28 | 29 | #PyOtherSide 30 | include($$PWD/pyotherside.pri) 31 | 32 | 33 | win32* { 34 | ZLIBDIR = $$PWD/zlib-msvc14-x64.1.2.11.7795/build/native 35 | INCLUDEPATH += $$ZLIBDIR/include 36 | LIBS += $$ZLIBDIR/lib_release/zlibstatic.lib 37 | } 38 | 39 | unix:macx { # OSX 40 | LIBS += /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 41 | LIBS += /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 42 | LIBS += -lz 43 | } 44 | 45 | unix:!macx { # ubuntu & debian 46 | defined(CLEAN_RPATH, var) { # clean default flags 47 | message("DEB package build") 48 | QMAKE_LFLAGS_RPATH= 49 | QMAKE_LFLAGS = -Wl,-rpath=\\\$$ORIGIN/../lib 50 | QMAKE_LFLAGS += -static-libgcc -static-libstdc++ 51 | } else { 52 | # Note: uncomment if qtcreator fails to find QtCore dependencies 53 | #QMAKE_LFLAGS = -Wl,-rpath=/home/user/Qt5.9.3/5.9.3/gcc_64/lib 54 | } 55 | 56 | LIBS += -lz 57 | 58 | # Unix signal watcher 59 | defined(LINUX_SIGNALS, var) { 60 | message("Build with qt-unix-signals") 61 | 62 | DEFINES += LINUX_SIGNALS 63 | HEADERS += $$PWD/qt-unix-signals/sigwatch.h 64 | SOURCES += $$PWD/qt-unix-signals/sigwatch.cpp 65 | INCLUDEPATH += $$PWD/qt-unix-signals/ 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /scripts/conf/3rdparty_x86.pri: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Redis Desktop Manager Dependencies 4 | # 5 | #------------------------------------------------- 6 | 7 | DEFINES += ENABLE_EXTERNAL_FORMATTERS 8 | HEADERS += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.h 9 | SOURCES += $$_PRO_FILE_PWD_/modules/value-editor/externalformattersmanager.cpp 10 | 11 | # qredisclient 12 | if(win32*):exists( $$PWD/qredisclient/qredisclient.lib ) { 13 | message("Using prebuilt qredisclient") 14 | INCLUDEPATH += $$PWD/qredisclient/src/ 15 | OPENSSL_LIB_PATH = C:\OpenSSL-Win32\lib\VC 16 | LIBS += -L$$OPENSSL_LIB_PATH -llibeay32MD -L$$PWD/qredisclient/ -lqredisclient -lbotan -llibssh2 -lgdi32 -lws2_32 -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 17 | include($$PWD/qredisclient/3rdparty/asyncfuture/asyncfuture.pri) 18 | } else:unix*:exists( $$PWD/qredisclient/libqredisclient.a ) { 19 | message("Using prebuilt qredisclient") 20 | INCLUDEPATH += $$PWD/qredisclient/src/ 21 | LIBS += -L$$PWD/qredisclient/ -lqredisclient -lbotan-2 -lssh2 -lz -lssl -lcrypto 22 | include($$PWD/qredisclient/3rdparty/asyncfuture/asyncfuture.pri) 23 | } else { 24 | message("Using qredisclient source code") 25 | include($$PWD/qredisclient/qredisclient.pri) 26 | } 27 | 28 | 29 | #PyOtherSide 30 | include($$PWD/pyotherside.pri) 31 | 32 | 33 | win32* { 34 | ZLIBDIR = $$PWD/zlib-msvc14-x86.1.2.11.7795/build/native 35 | INCLUDEPATH += $$ZLIBDIR/include 36 | LIBS += $$ZLIBDIR/lib_release/zlibstatic.lib 37 | } 38 | 39 | unix:macx { # OSX 40 | LIBS += /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 41 | LIBS += /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 42 | LIBS += -lz 43 | } 44 | 45 | unix:!macx { # ubuntu & debian 46 | defined(CLEAN_RPATH, var) { # clean default flags 47 | message("DEB package build") 48 | QMAKE_LFLAGS_RPATH= 49 | QMAKE_LFLAGS = -Wl,-rpath=\\\$$ORIGIN/../lib 50 | QMAKE_LFLAGS += -static-libgcc -static-libstdc++ 51 | } else { 52 | # Note: uncomment if qtcreator fails to find QtCore dependencies 53 | #QMAKE_LFLAGS = -Wl,-rpath=/home/user/Qt5.9.3/5.9.3/gcc_64/lib 54 | } 55 | 56 | LIBS += -lz 57 | 58 | # Unix signal watcher 59 | defined(LINUX_SIGNALS, var) { 60 | message("Build with qt-unix-signals") 61 | 62 | DEFINES += LINUX_SIGNALS 63 | HEADERS += $$PWD/qt-unix-signals/sigwatch.h 64 | SOURCES += $$PWD/qt-unix-signals/sigwatch.cpp 65 | INCLUDEPATH += $$PWD/qt-unix-signals/ 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /scripts/conf/installer_x86.nsi: -------------------------------------------------------------------------------- 1 | !addincludedir .\include 2 | !addplugindir .\plugin 3 | 4 | Name "Redis Desktop Manager" 5 | 6 | BrandingText "Open source GUI management tool for Redis" 7 | 8 | RequestExecutionLevel admin 9 | 10 | SetCompress force 11 | SetCompressor /SOLID /FINAL lzma 12 | ManifestDPIAware true 13 | 14 | # General Symbol Definitions 15 | !define REGKEY "SOFTWARE\$(Name)" 16 | !define COMPANY "Igor Malinovskiy" 17 | !define URL redisdesktop.com 18 | !define APP_EXE "rdm.exe" 19 | 20 | # MUI Symbol Definitions 21 | !define MUI_ICON "..\..\..\src\resources\images\logo.ico" 22 | !define MUI_FINISHPAGE_NOAUTOCLOSE 23 | !define MUI_FINISHPAGE_RUN $INSTDIR\${APP_EXE} 24 | !define MUI_UNICON "..\..\..\src\resources\images\logo.ico" 25 | !define MUI_WELCOMEFINISHPAGE_BITMAP ".\images\main.bmp" 26 | 27 | # Included files 28 | !include "nsProcess.nsh" 29 | !include "x64.nsh" 30 | !include "install_vcredist_x64.nsh" 31 | !include Sections.nsh 32 | !include MUI2.nsh 33 | 34 | # Variables 35 | Var StartMenuGroup 36 | 37 | # Installer pages 38 | !insertmacro MUI_PAGE_WELCOME 39 | !insertmacro MUI_PAGE_LICENSE ..\..\..\LICENSE 40 | !insertmacro MUI_PAGE_DIRECTORY 41 | !insertmacro MUI_PAGE_INSTFILES 42 | !insertmacro MUI_PAGE_FINISH 43 | !insertmacro MUI_UNPAGE_CONFIRM 44 | !insertmacro MUI_UNPAGE_INSTFILES 45 | 46 | 47 | # Installer languages 48 | !insertmacro MUI_LANGUAGE English 49 | 50 | # Installer attributes 51 | OutFile redis-desktop-manager-${VERSION}.exe 52 | InstallDir $PROGRAMFILES64\RedisDesktopManager 53 | CRCCheck on 54 | XPStyle on 55 | ShowInstDetails show 56 | VIProductVersion ${VERSION}.0 57 | VIAddVersionKey /LANG=${LANG_ENGLISH} ProductName "Redis Desktop Manager" 58 | VIAddVersionKey /LANG=${LANG_ENGLISH} ProductVersion "${VERSION}" 59 | VIAddVersionKey /LANG=${LANG_ENGLISH} CompanyName "${COMPANY}" 60 | VIAddVersionKey /LANG=${LANG_ENGLISH} CompanyWebsite "${URL}" 61 | VIAddVersionKey /LANG=${LANG_ENGLISH} FileVersion "${VERSION}" 62 | VIAddVersionKey /LANG=${LANG_ENGLISH} FileDescription "" 63 | VIAddVersionKey /LANG=${LANG_ENGLISH} LegalCopyright "" 64 | InstallDirRegKey HKLM "${REGKEY}" Path 65 | ShowUninstDetails show 66 | 67 | 68 | # Installer sections 69 | Section -Main SEC0000 70 | ${nsProcess::KillProcess} "${APP_EXE}" $R4 71 | 72 | IfFileExists $INSTDIR\uninstall.exe already_installed not_installed 73 | already_installed: 74 | ExecWait '$INSTDIR\uninstall.exe /S' 75 | Sleep 3000 76 | 77 | not_installed: 78 | SetOutPath $INSTDIR 79 | File /r resources\* 80 | WriteRegStr HKLM "${REGKEY}\Components" Main 1 81 | !insertmacro InstallVCredist 82 | BringToFront 83 | SectionEnd 84 | 85 | Section -post SEC0001 86 | WriteRegStr HKLM "${REGKEY}" Path $INSTDIR 87 | SetOutPath $INSTDIR 88 | WriteUninstaller $INSTDIR\uninstall.exe 89 | SetOutPath $SMPROGRAMS\$StartMenuGroup 90 | 91 | CreateShortCut "$DESKTOP\RedisDesktopManager.lnk" "$INSTDIR\${APP_EXE}" "" 92 | 93 | IfSilent 0 +2 94 | Exec "$INSTDIR\${APP_EXE}" 95 | 96 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\RedisDesktopManager.lnk" "$INSTDIR\${APP_EXE}" 97 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk" $INSTDIR\uninstall.exe 98 | 99 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" 100 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}" 101 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}" 102 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}" 103 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe 104 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe 105 | WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1 106 | WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 107 | SectionEnd 108 | 109 | # Macro for selecting uninstaller sections 110 | !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID 111 | Push $R0 112 | ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}" 113 | StrCmp $R0 1 0 next${UNSECTION_ID} 114 | !insertmacro SelectSection "${UNSECTION_ID}" 115 | GoTo done${UNSECTION_ID} 116 | next${UNSECTION_ID}: 117 | !insertmacro UnselectSection "${UNSECTION_ID}" 118 | done${UNSECTION_ID}: 119 | Pop $R0 120 | !macroend 121 | 122 | # Uninstaller sections 123 | Section /o -un.Main UNSEC0000 124 | ${nsProcess::KillProcess} "${APP_EXE}" $R4 125 | Sleep 1000 126 | Delete /REBOOTOK $INSTDIR\* 127 | RmDir /REBOOTOK /r $INSTDIR\* 128 | DeleteRegValue HKLM "${REGKEY}\Components" Main 129 | SectionEnd 130 | 131 | Section -un.post UNSEC0001 132 | DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" 133 | Delete /REBOOTOK "$DESKTOP\RedisDesktopManager.lnk" 134 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\RedisDesktopManager.lnk" 135 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk" 136 | Delete /REBOOTOK $INSTDIR\uninstall.exe 137 | DeleteRegValue HKLM "${REGKEY}" Path 138 | DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components" 139 | DeleteRegKey /IfEmpty HKLM "${REGKEY}" 140 | RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup 141 | RmDir /REBOOTOK $INSTDIR 142 | SectionEnd 143 | 144 | # Installer functions 145 | Function .onInit 146 | InitPluginsDir 147 | StrCpy $StartMenuGroup RedisDesktopManager 148 | FunctionEnd 149 | 150 | # Uninstaller functions 151 | Function un.onInit 152 | SetAutoClose true 153 | ReadRegStr $INSTDIR HKLM "${REGKEY}" Path 154 | StrCpy $StartMenuGroup RedisDesktopManager 155 | !insertmacro SELECT_UNSECTION Main ${UNSEC0000} 156 | FunctionEnd 157 | 158 | # Installer Language Strings 159 | LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)" 160 | -------------------------------------------------------------------------------- /scripts/conf/pyotherside_x64.pri: -------------------------------------------------------------------------------- 1 | 2 | # Python 3 | win32* { 4 | QMAKE_LIBS += -LC:\Python37-x64\libs -lpython37 5 | INCLUDEPATH += C:\Python37-x64\include\ 6 | } else { 7 | unix:macx { 8 | exists($$PWD/python-3) { 9 | message("Using Python from 3rdparty dir") 10 | LIBS += $$PWD/python-3/lib/libpython3.7m.dylib 11 | INCLUDEPATH += $$PWD/python-3/include/python3.7m 12 | 13 | #deployment 14 | PY_DATA_FILES.files = $$PWD/python-3/lib/libpython3.7m.dylib 15 | PY_DATA_FILES.path = Contents/Frameworks 16 | QMAKE_BUNDLE_DATA += PY_DATA_FILES 17 | 18 | } else { 19 | PYTHON_CONFIG = /usr/local/bin/python3-config 20 | QMAKE_LIBS += $$system($$PYTHON_CONFIG --ldflags --libs) 21 | QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes) 22 | } 23 | } else { 24 | PYTHON_CONFIG = python3-config 25 | 26 | PYTHON_VERSION = $$str_member($$system(python3 --version), 7, 11) 27 | 28 | message("Python version $$PYTHON_VERSION") 29 | 30 | versionAtLeast(PYTHON_VERSION, "3.8.0") { 31 | message("Python >=3.8 needs --embed flag") 32 | QMAKE_LIBS += $$system($$PYTHON_CONFIG --ldflags --libs --embed) 33 | } else { 34 | QMAKE_LIBS += $$system($$PYTHON_CONFIG --ldflags --libs) 35 | } 36 | 37 | QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes) 38 | DEFINES *= HAVE_DLADDR 39 | } 40 | } 41 | 42 | include(pyotherside/pyotherside.pri) 43 | 44 | DEFINES += PYOTHERSIDE_VERSION=\\\"$${VERSION}\\\" 45 | 46 | DEPENDPATH += $$PWD/pyotherside/src 47 | INCLUDEPATH += $$PWD/pyotherside/src 48 | 49 | PYOTHERSIDE_DIR = $$PWD/pyotherside/src/ 50 | 51 | # Importer from Qt Resources 52 | RESOURCES += $$PYOTHERSIDE_DIR/qrc_importer.qrc 53 | 54 | HEADERS += $$PYOTHERSIDE_DIR/pythonlib_loader.h\ 55 | $$PWD/pyotherside/src/callback.h 56 | SOURCES += $$PYOTHERSIDE_DIR/pythonlib_loader.cpp 57 | 58 | # Python QML Object 59 | SOURCES += $$PYOTHERSIDE_DIR/qpython.cpp 60 | HEADERS += $$PYOTHERSIDE_DIR/qpython.h 61 | SOURCES += $$PYOTHERSIDE_DIR/qpython_worker.cpp 62 | HEADERS += $$PYOTHERSIDE_DIR/qpython_worker.h 63 | SOURCES += $$PYOTHERSIDE_DIR/qpython_priv.cpp 64 | HEADERS += $$PYOTHERSIDE_DIR/qpython_priv.h 65 | HEADERS += $$PYOTHERSIDE_DIR/python_wrap.h 66 | 67 | # Globally Load Python hack 68 | SOURCES += $$PYOTHERSIDE_DIR/global_libpython_loader.cpp 69 | HEADERS += $$PYOTHERSIDE_DIR/global_libpython_loader.h 70 | 71 | # Reference-counting PyObject wrapper class 72 | SOURCES += $$PYOTHERSIDE_DIR/pyobject_ref.cpp 73 | HEADERS += $$PYOTHERSIDE_DIR/pyobject_ref.h 74 | 75 | # QObject wrapper class exposed to Python 76 | SOURCES += $$PYOTHERSIDE_DIR/qobject_ref.cpp 77 | HEADERS += $$PYOTHERSIDE_DIR/qobject_ref.h 78 | HEADERS += $$PYOTHERSIDE_DIR/pyqobject.h 79 | 80 | # GIL helper 81 | HEADERS += $$PYOTHERSIDE_DIR/ensure_gil_state.h 82 | 83 | # Type System Conversion Logic 84 | HEADERS += $$PYOTHERSIDE_DIR/converter.h 85 | HEADERS += $$PYOTHERSIDE_DIR/qvariant_converter.h 86 | HEADERS += $$PYOTHERSIDE_DIR/pyobject_converter.h 87 | HEADERS += $$PYOTHERSIDE_DIR/qml_python_bridge.h 88 | -------------------------------------------------------------------------------- /scripts/conf/pyotherside_x86.pri: -------------------------------------------------------------------------------- 1 | 2 | # Python 3 | win32* { 4 | QMAKE_LIBS += -LC:\Python37-x86\libs -lpython37 5 | INCLUDEPATH += C:\Python37-x86\include\ 6 | } else { 7 | unix:macx { 8 | exists($$PWD/python-3) { 9 | message("Using Python from 3rdparty dir") 10 | LIBS += $$PWD/python-3/lib/libpython3.7m.dylib 11 | INCLUDEPATH += $$PWD/python-3/include/python3.7m 12 | 13 | #deployment 14 | PY_DATA_FILES.files = $$PWD/python-3/lib/libpython3.7m.dylib 15 | PY_DATA_FILES.path = Contents/Frameworks 16 | QMAKE_BUNDLE_DATA += PY_DATA_FILES 17 | 18 | } else { 19 | PYTHON_CONFIG = /usr/local/bin/python3-config 20 | QMAKE_LIBS += $$system($$PYTHON_CONFIG --ldflags --libs) 21 | QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes) 22 | } 23 | } else { 24 | PYTHON_CONFIG = python3-config 25 | 26 | PYTHON_VERSION = $$str_member($$system(python3 --version), 7, 11) 27 | 28 | message("Python version $$PYTHON_VERSION") 29 | 30 | versionAtLeast(PYTHON_VERSION, "3.8.0") { 31 | message("Python >=3.8 needs --embed flag") 32 | QMAKE_LIBS += $$system($$PYTHON_CONFIG --ldflags --libs --embed) 33 | } else { 34 | QMAKE_LIBS += $$system($$PYTHON_CONFIG --ldflags --libs) 35 | } 36 | 37 | QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes) 38 | DEFINES *= HAVE_DLADDR 39 | } 40 | } 41 | 42 | include(pyotherside/pyotherside.pri) 43 | 44 | DEFINES += PYOTHERSIDE_VERSION=\\\"$${VERSION}\\\" 45 | 46 | DEPENDPATH += $$PWD/pyotherside/src 47 | INCLUDEPATH += $$PWD/pyotherside/src 48 | 49 | PYOTHERSIDE_DIR = $$PWD/pyotherside/src/ 50 | 51 | # Importer from Qt Resources 52 | RESOURCES += $$PYOTHERSIDE_DIR/qrc_importer.qrc 53 | 54 | HEADERS += $$PYOTHERSIDE_DIR/pythonlib_loader.h\ 55 | $$PWD/pyotherside/src/callback.h 56 | SOURCES += $$PYOTHERSIDE_DIR/pythonlib_loader.cpp 57 | 58 | # Python QML Object 59 | SOURCES += $$PYOTHERSIDE_DIR/qpython.cpp 60 | HEADERS += $$PYOTHERSIDE_DIR/qpython.h 61 | SOURCES += $$PYOTHERSIDE_DIR/qpython_worker.cpp 62 | HEADERS += $$PYOTHERSIDE_DIR/qpython_worker.h 63 | SOURCES += $$PYOTHERSIDE_DIR/qpython_priv.cpp 64 | HEADERS += $$PYOTHERSIDE_DIR/qpython_priv.h 65 | HEADERS += $$PYOTHERSIDE_DIR/python_wrap.h 66 | 67 | # Globally Load Python hack 68 | SOURCES += $$PYOTHERSIDE_DIR/global_libpython_loader.cpp 69 | HEADERS += $$PYOTHERSIDE_DIR/global_libpython_loader.h 70 | 71 | # Reference-counting PyObject wrapper class 72 | SOURCES += $$PYOTHERSIDE_DIR/pyobject_ref.cpp 73 | HEADERS += $$PYOTHERSIDE_DIR/pyobject_ref.h 74 | 75 | # QObject wrapper class exposed to Python 76 | SOURCES += $$PYOTHERSIDE_DIR/qobject_ref.cpp 77 | HEADERS += $$PYOTHERSIDE_DIR/qobject_ref.h 78 | HEADERS += $$PYOTHERSIDE_DIR/pyqobject.h 79 | 80 | # GIL helper 81 | HEADERS += $$PYOTHERSIDE_DIR/ensure_gil_state.h 82 | 83 | # Type System Conversion Logic 84 | HEADERS += $$PYOTHERSIDE_DIR/converter.h 85 | HEADERS += $$PYOTHERSIDE_DIR/qvariant_converter.h 86 | HEADERS += $$PYOTHERSIDE_DIR/pyobject_converter.h 87 | HEADERS += $$PYOTHERSIDE_DIR/qml_python_bridge.h 88 | -------------------------------------------------------------------------------- /scripts/prepare-x64.bat: -------------------------------------------------------------------------------- 1 | set HOME=%cd% 2 | set RDM_HOME=C:\Users\Win\Desktop\RedisDesktopManager 3 | 4 | copy %HOME%\conf\3rdparty_x64.pri %RDM_HOME%\3rdparty\3rdparty.pri /Y 5 | copy %HOME%\conf\pyotherside_x64.pri %RDM_HOME%\3rdparty\pyotherside.pri /Y 6 | 7 | pause . 8 | -------------------------------------------------------------------------------- /scripts/prepare-x86.bat: -------------------------------------------------------------------------------- 1 | set HOME=%cd% 2 | set RDM_HOME=C:\Users\Win\Desktop\RedisDesktopManager 3 | 4 | copy %HOME%\conf\3rdparty_x86.pri %RDM_HOME%\3rdparty\3rdparty.pri /Y 5 | copy %HOME%\conf\pyotherside_x86.pri %RDM_HOME%\3rdparty\pyotherside.pri /Y 6 | 7 | pause . 8 | --------------------------------------------------------------------------------