$ wget https://ftp.fau.de/qtproject/official_releases/online_installers/qt-unified-linux-x64-online.run
--2023-06-05 18:06:03-- https://ftp.fau.de/qtproject/official_releases/online_installers/qt-unified-linux-x64-online.run
正在解析主机 ftp.fau.de (ftp.fau.de)... 131.188.12.211, 2001:638:a000:1021:21::1
正在连接 ftp.fau.de (ftp.fau.de)|131.188.12.211|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:57561126 (55M)
正在保存至: “qt-unified-linux-x64-online.run”
qt-unified-linux-x64-online 100%[=========================================>] 54.89M 2.86MB/s 用时 25s
2023-06-05 18:06:29 (2.17 MB/s) - 已保存 “qt-unified-linux-x64-online.run” [57561126/57561126])
$
sudo apt update
sudo apt upgrade
sudo apt -y install build-essential libgl1-mesa-dev gdb default-jdk libxcb-util1 git
chmod +x qt-unified-linux-x64-online.run
./qt-unified-linux-x64-online.run
安装路径:
~/Qt
安装选项:
Qt
Qt Design Studio 4.1.0
Qt 6.5.1
Desktop gcc 64-bit
WebAssembly(multi-threaded)
WebAssembly(single-threaded)
Android
Sources
Qt Quick 3D
Qt Wayland Compositor
Qt5 Compatibility Module
Qt Shader Tools
Additional Libraries
All…
Qt Debug Information
Qt Quick Timeline
Developer and Designer Tools
Qt Creator 10.0.1
Qt Creator 10.0.1 Debug Symbols
Qt Installer Framework 4.6
CMake 3.24.2
Ninja 1.10.2
OpenSSL 1.1.1q Tool
sudo ln -s ~/Qt/Tools/CMake/bin/cmake /usr/bin/cmake
下载URL:
fctix4qt6插件-QT文档类资源-CSDN文库
https://download.csdn.net/download/muren/85898608
下载文件:
libfcitxplatforminputcontextplugin-qt6.so
安装目录:
~/Qt/6.5.1/gcc_64/plugins/platforminputcontexts/
~/Qt/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts/
(1)添加android设备
QtCreator/工具/选项/设备/Device,添加Android Device/开启向导
Name: arm64-v8a-mobile
Device definition: Phone | Galaxy Nexus
Architecture(ABI): arm64-v8a
Target API: android-31(default)
SD card size: 512MiB
确定后添加。
(2)配置Java
QtCreator/工具/选项/设备/Android配置页
JDK位置:
/usr/lib/jvm/java-11-openjdk-amd64/
(3)配置Android SDK
Android SDK的路径:
~/Android/Sdk
点击按钮
包 API 修订
工具
SDK Patch Applier v4 1
Sources for Android 32 1
Sources for Android 33 1
NDK(Side by side) 25.1.8937393 25.1.8937393
Android Emulator 32.1.13
Android SDK Platform-Tools 34.0.3
Android SDK Build-Tools 34 34.0.0
Android SDK Build-Tools 31 31.0.0
Android SDK Command-line Tools 9.0
Android-34 34
SDK平台 34 1
Android TV ARM 64 v8a System Image 34 1
Android TV Intel x86 Atom System Image 34 1
Android 12.0(S) 31
SDK平台 31 1
ARM 64 v8a System Image 31 4
Intel x86 Atom_64 System Image 31 5
安卓NDK列表
~/Android/Sdk/ndk/25.1.8937393
检查安卓设置完成的详情,是否所有选项都是打勾,如存在没有打勾的项,则在SDK管理器中,显示所有包,选择缺少的项下载补充,直至所有选项都打勾为止。
(4)勾选为安卓工具链自动创建套件
(5)配置Android OpenSSL
OpenSSL二进制位置:
~/Android/Sdk/android_openssl
(6)配置环境变量
编辑/etc/profile,增加以下行。
export ANDROID_HOME=/home/$USER/Android/Sdk
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
(1)下载安装emsdk
~$ git clone https://github.com/emscripten-core/emsdk.git
~$ cd emsdk
~/emsdk$ ./emsdk install latest
~/emsdk$ ./emsdk activate latest
(2)配置emsdk环境变量,在~/.bashrc文件尾添加
source ~/emsdk/emsdk_env.sh
注销重新登录用户让环境变量生效。
(3)确认安装有效
~$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.41 (71634e036d20209a5d81c2b2171e145b44de1e12)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.~$ em++ --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.41 (71634e036d20209a5d81c2b2171e145b44de1e12)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(4)添加WebAssembly设备
工具/选项/设备/设备页,检查设备下拉列表是否存在选项:Web Browser(Web Browser类型的默认设备),如不存在则点添加按钮,在可用的设备类型中选择WebAssembly Runtime,点击开启向导、确定。
(5)为QtCreator配置emsdk
QtCreator/工具/选项/设备/WebAssembly配置页,浏览选择~/emsdk,自动识别Activated version:3.1.28。
QtCreator/工具/选项/构建套件(Kit)/Qt版本页中自动检测Qt6.5.1 WebAssembly
QtCreator/工具/选项/构建套件(Kit)/编译器中自动识别Emscripten Complier 3.1.41 for C/C++。