官网
GitHub - dchapyshev/aspia: Remote desktop and file transfer tool.
Index of /dev 已编译的第三方依赖库
aspia/building.md at master · dchapyshev/aspia · GitHub 源码编译说明
GitHub - SoftwareNetwork/binaries: Mirror of sw binaries from https://software-network.org/client/
x86 or x86_64 CPU with SSE2
Windows 7/2008 R2 or higher, Debian/Ubuntu Linux, MacOS X
源码怎么编译?
一、先要安装vcpkg这个工具
1、官网下载最新版 Releases · microsoft/vcpkg · GitHub
2、解压,然后双击执行\vcpkg-2021.05.12\bootstrap-vcpkg.bat,稍等一会,会生成vcpkg.exe
3、cmd命令行执行vcpkg integrate install
C:\Users\firecat>cd T:\tmp-source\aspia\vcpkg-2021.05.12 C:\Users\firecat>T: T:\tmp-source\aspia\vcpkg-2021.05.12>vcpkg integrate install Applied user-wide integration for this vcpkg root. All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available. CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=T:/tmp-source/aspia/vcpkg-2021.05.12/scripts/buildsystems/vcpkg.cmake" T:\tmp-source\aspia\vcpkg-2021.05.12>
更多关于vcpkg的安装知识,详情见:
vcpkg安装和使用--学习入门_你好,Albert的博客-CSDN博客_vcpkg安装
4、VS2019需要安装英文语言包
因为vcpkg的源码写的比较死板(部分路径都是写死的),导致该工具无法识别中文的开发环境。
办法:VS2019菜单-工具-获取工具和功能
二、想编译Aspia v2.1以上的源码,须知:
1、cmkae版本必须在v3.20以上
2、Qt版本必须在v5.14以上,否则会出现Unknown CMake command "qt5_import_plugins"的错误
https://github.com/dchapyshev/aspia/issues/108
3、openssl在1.0.x之前的版本中,文件为libeay32.dll和ssleay32.dll,在1.1.x之后的版本中,名字是libssl.dll和libcrypto.dll
4、第三方库和依赖库都是32位的:
vcpkg install asio:x86-windows-static
vcpkg install gtest:x86-windows-static
vcpkg install libvpx:x86-windows-static
vcpkg install libyuv:x86-windows-static
vcpkg install openssl:x86-windows-static
vcpkg install opus:x86-windows-static
vcpkg install protobuf:x86-windows-static
vcpkg install rapidjson:x86-windows-static
vcpkg install rapidxml:x86-windows-static
vcpkg install sqlite3:x86-windows-static
vcpkg install libwebm:x86-windows-static
vcpkg install zstd:x86-windows-static
5、aspia_host_core必须是dll,要编译成动态库,而非静态库
6、出现Could NOT find Protobuf (missing: Protobuf_PROTOC_EXECUTABLE)这个错误提示,怎么办?请看我的另一篇博文:
Could NOT find Protobuf (missing: Protobuf_PROTOC_EXECUTABLE)_$firecat全宏的代码足迹$-CSDN博客
x、cmake的选项
源码有若干处需要调整
1、qm路径
C:\Users\Administrator\Desktop\aspia-master\source\qt_base\CMakeLists.txt
删除file(GLOB QT_QM_FILES ${Qt5_DIR}/../../qt5/translations/*.qm)
改为file(GLOB QT_QM_FILES ${Qt5_DIR}/../../../translations/*.qm)
if(Qt5LinguistTools_FOUND)
# Get the list of Qt translation files.
#file(GLOB QT_QM_FILES ${Qt5_DIR}/../../qt5/translations/*.qm)
file(GLOB QT_QM_FILES ${Qt5_DIR}/../../../translations/*.qm)
add_qt_translations(aspia_qt_base QRC_FILE "qt_translations.qrc" QM_FILES ${QT_QM_FILES})
else()
message(WARNING "Qt5 linguist tools not found. Internationalization support will be disabled.")
endif()
2、qrc资源文件
C:\Users\Administrator\Desktop\aspia-master\source\qt_base\qt_translations.qrc
C:\Users\Administrator\Desktop\aspia-master\x86\source\qt_base\qt_translations.qrc
删除<file>qtbase_tr.qm</file>
3、编译出错,如下,怎么办?
打开VS配置对话框,导入库里面,把*.dll文件去掉
x、编译时,以下库需要重点关注,VS配置导入库时,需要指向它们
D:\vcpkg\packages\libwebm_x86-windows-static\debug\lib\libwebmd.lib
D:\vcpkg\packages\libwebm_x86-windows-static\lib\libwebm.lib
编译遗留问题
Debug和Release都能顺利编译通过。但是Debug的生成的exe运行会报错。
凡是源码有LOG(...)的语句,debug都过不了。