Skip to content

适用于瀚文键盘系列的上位机,拥有完整的扩展管理功能与插件系统

Notifications You must be signed in to change notification settings

Huiyicc/hw75-tools

Repository files navigation

hw75-tools

瀚文75助手
支持平台: Windows, Linux, MacOS

环境配置

Windows

windows推荐使用MSYS2下的MINGW64

# 进入MSYS2的MINGW64环境
pacman -Syy mingw64/mingw-w64-x86_64-toolchain
pacman -Syy mingw64/mingw-w64-x86_64-protobuf
pacman -Syy mingw64/mingw-w64-x86_64-hidapi
# qt6的扩展看情况安装
pacman -S mingw64/mingw-w64-x86_64-qt6
# 或者可以使用我配置环境使用的命令
pacman -Syy mingw64/mingw-w64-x86_64-openssl mingw64/mingw-w64-x86_64-qt6 mingw64/mingw-w64-x86_64-qt6-tools mingw64/mingw-w64-x86_64-qt6-websockets mingw64/mingw-w64-x86_64-qt6-websockets-debug mingw64/mingw-w64-x86_64-qt6-doc mingw64/mingw-w64-x86_64-qt6-declarative mingw64/mingw-w64-x86_64-qt6-declarative-debug mingw64/mingw-w64-x86_64-qt6-base-debug mingw64/mingw-w64-x86_64-qt6-base mingw64/mingw-w64-x86_64-qt-creator mingw64/mingw-w64-x86_64-qt-creator-devel mingw64/mingw-w64-x86_64-editorconfig-qtcreator

MacOS

你已经预先安装了Homebrew与c++工具链

# 安装Homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
# 安装c++工具链
brew install cmake gcc gdb
brew install qt@6
brew install qt-creator
brew install hidapi
brew install protobuf
brew install qwt
brew install openssl

当你安装完成这些库之后直接编译可能会出现找不到库的情况,这时候需要手动配置一下库的路径

# 编辑你当前的bash配置文件
vim ~/.zprofile

# 以下皆为brew安装对应库之后需要添加的路径,如果你的库安装路径不同,请自行修改(大部分时候版本号都不一样)
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/Cellar/hidapi/0.14.0/include
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/Cellar/protobuf/21.12/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/Cellar/hidapi/0.14.0/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/Cellar/protobuf/21.12/include
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Cellar/hidapi/0.14.0/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Cellar/protobuf/21.12/lib
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/Cellar/hidapi/0.14.0/lib
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/Cellar/protobuf/21.12/lib

构建qwt

首先克隆子仓库

git submodule update --init --recursive

使用qtcreator打开lib/qwt/qwt.pro
打开qwt.prf,找到QMAKE_RPATHDIR,删除注释
qtcreator切换成release模式
执行qmake
使用build构建
编译结果文件夹下lib文件夹内有4个文件

libqwt.dll.a
libqwtd.dll.a
qwt.dll
qwtd.dll

libqwtd.alibqwt.a复制到Qt安装目录下对应的lib文件夹下
将编译文件夹中的lib文件夹下的qwt.dllqwtd.dll文件复制到Qt安装目录下对应的bin文件夹下
将编译文件夹中的designer/plugins/designer文件夹下的qwt_designer_plugin.dll文件和libqwt_designer_plugin.a文件复制到Qtcreator安装目录下的plugins/designer文件夹下
在Qt安装目录下对应的include文件夹下新建Qwt文件夹
将主程序lib/qwt/src内文件全部复制过去

About

适用于瀚文键盘系列的上位机,拥有完整的扩展管理功能与插件系统

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages