git clone https://github.com/uglide/RedisDesktopManager.git2.进入RedisDesktopManager目录,切换到发布tag
git checkout -b 2022.1_release 2022.13.下载依赖仓库代码
git submodule update --init --recursive4.适配windows
#进入3rdparty/qredisclient/3rdparty/hiredis目录 git apply ../hiredis-win.patch5.下载nuget依赖
#在3rdparty/目录下 nuget install zlib-msvc14-x64 -Version 1.2.11.7795三、修改代码 1.修改源代码版本号
#源文件srcresp.pro
!defined(VERSION, var) {
VERSION=2022.1.0
}
2.修改发布包版本号
#源文件buildwindowsinstallerinstaller.nsi #在头部增加 !define VERSION "2022.1.0"3.修改openssl依赖
#源文件3rdparty3rdparty.pri的18行
OPENSSL_LIB_PATH = {{OpenSsl安装目录}}libVC
4.修改python依赖
#源文件3rdpartypyotherside.pri的3~9行
PY_VERSION="39"
PY_WIN_VERSION="3.9.x" //根据实际子版本号修改
PY_LIB_SUFFIX="3.9"
QMAKE_LIBS += -L{{Python安装目录}}Python$${PY_WIN_VERSION}libs -lpython$${PY_VERSION}
INCLUDEPATH += {{Python安装目录}}Python$${PY_WIN_VERSION}include
四、编译源代码
1.编译brotli模块
#3rdpartybrotli目录下 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed . cmake --build . --config Release2.编译snappy模块
#3rdpartysnappy目录下 cmake . cmake --build . --config Release3.编译lz4模块
#3rdpartylz4buildcmake目录下 cmake -DLZ4_BUNDLED_MODE=ON . cmake --build . --config Release4.编译zstd模块
#3rdpartyzstdbuildcmake目录下 cmake -DCMAKE_BUILD_TYPE=Release . cmake --build . --config Release5.Qt编译
使用QtCreator打开src/resp.pro
配置项目为Release、去除debug信息
Ctrl+B构建项目
成功后在binwindowsrelease生成resp.exe文件
五、打包发布 1.拷贝编译exe将binwindowsreleaseresp.exe拷贝到buildwindowsinstallerresources目录下
2.处理Qt依赖在buildwindowsinstallerresources目录下执行windeployqt命令
"{{Qt安装目录}}{{Qt版本号}}msvc2019_64binwindeployqt.exe" --no-angle --no-opengl-sw --no-compiler-runtime --no-translations --release --force --qmldir {{RESP源代码目录}}srcqml resp.exe
3.处理python依赖
拷贝python-3.9.x-embed-amd64发行包中的python39.dll、python39.zip到buildwindowsinstallerresources目录
4.使用NSIS打包使用NSIS打开buildwindowsinstallerinstaller.nsi生成安装包
最后在buildwindowsinstaller目录生成resp-2022.1.0.exe文件
感谢
感谢您的阅读,最后附上打包好的共享链接:
链接:https://pan.baidu.com/s/1Sin7SpfvRjAD95e10u-66w 提取码:3hky



