栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

RedisDesktopManager源码编译windows版(基于2022.1版本)

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

RedisDesktopManager源码编译windows版(基于2022.1版本)

一、环境依赖 1.Git 2.Visual Studio Community 2019 3.Qt 5.x 4.Python 3.9 5.CMake 6.Windows Openssl 7.NSIS 8.Nuget 二、源码下载 1.clone源码
git clone https://github.com/uglide/RedisDesktopManager.git
2.进入RedisDesktopManager目录,切换到发布tag
git checkout -b 2022.1_release 2022.1
3.下载依赖仓库代码
git submodule update --init --recursive
4.适配windows
#进入3rdparty/qredisclient/3rdparty/hiredis目录

git apply ../hiredis-win.patch
5.下载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 Release
2.编译snappy模块
#3rdpartysnappy目录下
cmake .
cmake --build . --config Release
3.编译lz4模块
#3rdpartylz4buildcmake目录下
cmake -DLZ4_BUNDLED_MODE=ON  .
cmake --build . --config Release
4.编译zstd模块
#3rdpartyzstdbuildcmake目录下
cmake -DCMAKE_BUILD_TYPE=Release .
cmake --build . --config Release
5.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 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/743651.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号