部署 WebAssembly for Qt5.14

 
 盈帆报表在线报表设计器基于webassembly  http://design.efreport.com/EFReport/login.jsp
 

一、安装 DevelopmentTools

yum group install "Development Libraries"

yum group install "Development Tools"

yum install –y ncurses-devel zlib-devel texinfo gtk+-devel gtk2-devel qt-develtcl-devel tk-devel libX11-devel kernel-headers kernel-devel bison flex gcc-gnatglibc-devel.i686 libgcc.i

 

二、安装 gcc 8.2.0

wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-8.2.0/gcc-8.2.0.tar.gz

tar -zxf gcc-8.2.0.tar.gz

cd gcc-8.2.0

./contrib/download_prerequisites

mkdir build

cd build

../configure --prefix=/storage/app/gnu/gcc-8.2.0 \

             --enable-bootstrap \

             --enable-shared \

             --enable-threads=posix \

             --enable-checking=release \

             --with-system-zlib \

             --enable-__cxa_atexit \

             --disable-libunwind-exceptions \

             --enable-gnu-unique-object \

             --enable-linker-build-id \

             --with-linker-hash-style=gnu \

            --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto \

             --enable-plugin \

             --enable-initfini-array \

             --disable-libgcj \

             --enable-gnu-indirect-function \

             --with-tune=generic \

             --with-arch_32=x86-64 \

             --build=x86_64-redhat-linux

make –j8

make install

 

vim ~/.bash_profile

###gnu gcc

export GCC_HOME=/storage/app/gnu/gcc-8.2.0

export PATH=$GCC_HOME/bin:$PATH

export MANPATH=$GCC_HOME/share/man

export CPATH=$GCC_HOME/include

export LD_LIBRARY_PATH=$GCC_HOME/lib:$GCC_HOME/lib64

export LIBRARY_PATH=$GCC_HOME/lib:$GCC_HOME/lib64

 

三、安装 cmake 3.12.2

wget https://cmake.org/files/v3.12/cmake-3.12.2.tar.gz

tar –xvf cmake-3.12.2.tar.gz

cd cmake-3.12.2

./bootstrap

make –j8

make install

 

四、安装 emscripten

git clone https://github.com/juj/emsdk.git

cd emsdk

./emsdk list gives 查看可安装项

./emsdk install latest

./emsdk install --build=Release sdk-fastcomp-incoming-64bitbinaryen-master-64bit    // 时间视网络速度而定,如中断,可多试几次

./emsdk activate --global --build=Release sdk-fastcomp-incoming-64bitbinaryen-master-64bit

source ./emsdk_env.sh // 每次执行

 

五、编译 Qt5.14

安装Qt5.14.0 到/opt/Qt5.14.0

cd /opt/Qt5.14.0/5.14.0/Src

./configure -xplatform wasm-emscripten -developer-build -release -static -no-feature-thread  -nomake tests -nomake examples -no-dbus -no-headersclean -no-ssl  -no-warnings-are-errors

make –j8

 

最后生成/opt/Qt5.14.0/5.14.0/Src/qtbase/bin/qmake

 

你可能感兴趣的:(C++,webassembly,qt)