Qt for WebAssembly测试记录

Ubuntu 16, 阿里云

Emscripten

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

# Enter that directory
cd emsdk

# Fetch the latest version of the emsdk (not needed the first time you clone)
git pull

# install
./emsdk install sdk-fastcomp-1.38.27-64bit
./emsdk activate --embedded sdk-fastcomp-1.38.27-64bit

# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh

Qt

# Download Qt source 5.14.2
wget http://download.qt.io/archive/qt/5.14/5.14.2/single/qt-everywhere-src-5.14.2.tar.xz

# Unpack the archive
xz -d qt-everywhere-src-5.14.2.tar.xz
tar -xvf qt-everywhere-src-5.14.2.tar

# Configure Qt as a cross-compile build for the "wasm-emscripten" platform
./configure -xplatform wasm-emscripten -nomake examples -prefix $PWD/qtbase

# make
make

Test

 

相关推荐