Qt 5 static build scripts
Jump to navigation
Jump to search
This is a set of scripts to download and build static Qt assembly for purpose to use them on CI
Linux
#!/bin/bash
QtVer=5.10.1
OldDir=$PWD
ArName=qt-everywhere-src-5.10.1.tar.xz
DirName=qt-everywhere-src-5.10.1
if [ ! -f $ArName ]; then
echo "Downloading..."
wget http://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz
fi
if [ ! -d $DirName ]; then
echo "Unpacking..."
tar -xf $ArName
fi
echo "Creating /home/runner/Qt (needs root)..."
if [ ! -d /home/runner/Qt ]; then
MyUsername=$(whoami)
sudo mkdir -p /home/runner/Qt
sudo chown -R $MyUsername /home/runner
fi
cd $DirName
./configure -static -release -silent -c++std c++14 \
-prefix "/home/runner/Qt/${QtVer}_static" \
-opensource -confirm-license -opengl \
-nomake examples \
-skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip qt3d \
-qt-xcb -qt-libpng -no-libjpeg -qt-zlib -qt-pcre -gtk -qt-harfbuzz -qt-freetype -fontconfig \
-pulseaudio -alsa
make -j 4
make install
cd /home/runner/Qt/
tar -cjf qt-$QtVer-static-ubuntu-14-04-x64-gcc6.tar.bz2 "${QtVer}_static"
cd $OldDir
echo "Everything has been completed!"
Mac OS X
Qt 5.11.1
#!/bin/bash
QtVer=5.11.1
OldDir=$PWD
ArName=qt-everywhere-src-5.11.1.tar.xz
DirName=qt-everywhere-src-5.11.1
MacVer=$(sw_vers -productVersion)
MacArVer=${MacVer//\./\-}
QtArVer=${QtVer//\./\-}
if [ ! -f $ArName ]; then
echo "Downloading..."
qqqurl="http://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz"
wget ${qqqurl}
# axel -a -n 10 ${qqqurl}
fi
if [ ! -d $DirName ]; then
echo "Unpacking..."
tar -xf $ArName
fi
echo "Creating /Users/StaticQt (needs root)..."
if [ ! -d /Users/StaticQt ]; then
MyUsername=$(whoami)
sudo mkdir -p /Users/StaticQt
sudo chmod -R $MyUsername /Users/StaticQt
fi
cd $DirName
./configure -static -release -silent \
-prefix /Users/StaticQt/$QtVer \
-opensource -confirm-license -opengl \
-nomake examples \
-skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech \
-qt-libpng -no-libjpeg -qt-zlib -qt-pcre -qt-harfbuzz -qt-freetype
make -j 4
make install
cd /Users/StaticQt/
tar -cjf qt-${QtArVer}-static-macosx-${MacArVer}.tar.bz2 ${QtVer}
cd $OldDir
echo "Everything has been completed!"
Qt 5.10.0
#!/bin/bash
QtVer=5.10.1
OldDir=$PWD
ArName=qt-everywhere-src-5.10.1.tar.xz
DirName=qt-everywhere-src-5.10.1
if [ ! -f $ArName ]; then
echo "Downloading..."
wget http://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz
fi
if [ ! -d $DirName ]; then
echo "Unpacking..."
tar -xf $ArName
fi
echo "Creating /Users/StaticQt (needs root)..."
if [ ! -d /Users/StaticQt ]; then
MyUsername=$(whoami)
sudo mkdir -p /Users/StaticQt
sudo chmod -R $MyUsername /Users/StaticQt
fi
cd $DirName
./configure -static -release -silent \
-prefix /Users/StaticQt/$QtVer \
-opensource -confirm-license -opengl \
-nomake examples \
-skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech \
-qt-libpng -no-libjpeg -qt-zlib -qt-pcre -qt-harfbuzz -qt-freetype
make -j 4
make install
cd /Users/StaticQt/
tar -cjf qt-$QtVer-static-macosx-10-12-6.tar.bz2 $QtVer
cd $OldDir
echo "Everything has been completed!"
Qt 5.9
#!/bin/bash
QtVer=5.9.0
OldDir=$PWD
ArName=qt-everywhere-opensource-src-5.9.0.tar.xz
DirName=qt-everywhere-opensource-src-5.9.0
if [ ! -f $ArName ]; then
echo "Downloading..."
wget http://download.qt.io/official_releases/qt/5.9/5.9.0/single/qt-everywhere-opensource-src-5.9.0.tar.xz
fi
if [ ! -d $DirName ]; then
echo "Unpacking..."
tar -xf $ArName
fi
echo "Creating /Users/StaticQt (needs root)..."
if [ ! -d /Users/StaticQt ]; then
MyUsername=$(whoami)
sudo mkdir -p /Users/StaticQt
sudo chmod -R $MyUsername /Users/StaticQt
fi
cd $DirName
./configure -static -release -silent \
-prefix /Users/StaticQt/$QtVer \
-opensource -confirm-license -opengl \
-nomake examples \
-skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech \
-qt-libpng -no-libjpeg -qt-zlib -qt-pcre -qt-harfbuzz -qt-freetype
make -j 4
make install
cd /Users/StaticQt/
tar -cjf qt-$QtVer-static-macosx-10-12-5.tar.bz2 $QtVer
cd $OldDir
echo "Everything has been completed!"