-
Notifications
You must be signed in to change notification settings - Fork 750
Installation on Linux
-
Install g++ >= 5 and some OpenGL dependencies
-
Debian/Ubuntu (apt-get)
sudo apt-get -y install build-essential libglu1-mesa-dev libpulse-dev libglib2.0-dev
-
Fedora/RHEL/CentOS (yum)
sudo yum -y groupinstall "C Development Tools and Libraries" sudo yum -y install mesa-libGLU-devel gstreamer-plugins-base pulseaudio-libs-devel glib2-devel
-
openSUSE (zypper)
sudo zypper -n install -t pattern devel_basis
-
Arch Linux (pacman)
sudo pacman -S base-devel
-
GO=go1.13.4.linux-amd64.tar.gz; echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.profile; source $HOME/.profile; curl -sL https://dl.google.com/go/$GO | sudo tar -xz -C /usr/local
export GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false
In Module (per project) mode (to work around the GFW you can use a proxy like this: GOPROXY=https://goproxy.io
)
export GO111MODULE=on; go get -v github.com/therecipe/qt && go install -v -tags=no_env github.com/therecipe/qt/cmd/... && go mod vendor && rm -rf vendor/github.com/therecipe/env_linux_amd64_513 && git clone https://github.com/therecipe/env_linux_amd64_513.git vendor/github.com/therecipe/env_linux_amd64_513 && $(go env GOPATH)/bin/qtsetup
(replace github.com/therecipe/examples/...
with the project you want to compile)
export GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtdeploy test desktop github.com/therecipe/examples/basic/widgets
In Module (per project) mode (to work around the GFW you can use a proxy like this: GOPROXY=https://goproxy.io
)
export GO111MODULE=on; git clone https://github.com/therecipe/examples.git && cd ./examples && go install -v -tags=no_env github.com/therecipe/qt/cmd/... && go mod vendor && git clone https://github.com/therecipe/env_linux_amd64_513.git vendor/github.com/therecipe/env_linux_amd64_513 && $(go env GOPATH)/bin/qtdeploy test desktop ./basic/widgets
-
Install Qt; you can also define a custom location with QT_DIR
-
optional: if you choose any other version than 5.13.0, then please export your version with QT_VERSION
-
online installer: https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
-
offline installer: https://download.qt.io/official_releases/qt/5.13/5.13.0/qt-opensource-linux-x64-5.13.0.run
-
optional: install the experimental webkit module: https://github.com/annulen/webkit/releases/download/qtwebkit-5.212.0-alpha2/qtwebkit-5.212.0_alpha2-qt59-linux-x64.tar.xz, extract it's content inside
$HOME\Qt\5.13.0\gcc_64
(or similar) and export QT_WEBKIT=true
-
-
Install Go: https://golang.org/doc/install?download=go1.13.4.linux-amd64.tar.gz
-
Clone the repo:
go get -v -tags=no_env github.com/therecipe/qt/cmd/...
-
Run the setup:
$(go env GOPATH)/bin/qtsetup
Your applications won't run on a different distro than the one you used to deploy your application, but this is currently the only option to make your application look native on your distro. More infos about this issue here: Why does my application don't look native on Linux?
-
Install the Qt5 dev packages through your systems package manager and export QT_PKG_CONFIG=true. (You will need to install the
html/doc
packages containing the*.index
files as well.)- Debian/Ubuntu (apt-get):
sudo apt-get --no-install-recommends install libqt*5-dev qt*5-dev qml-module-qtquick-* qt*5-doc-html
- Fedora/RHEL/CentOS (yum):
sudo yum install qt5-* qt5-*-doc
- openSUSE (zypper):
sudo zypper install --no-recommends libqt5-qt*-devel
- Arch Linux (pacman):
sudo pacman -S --needed qt5
- Debian/Ubuntu (apt-get):
-
Install Go: https://golang.org/doc/install?download=go1.13.4.linux-amd64.tar.gz
-
Clone the repo:
go get -v -tags=no_env github.com/therecipe/qt/cmd/...
-
Run the setup:
$(go env GOPATH)/bin/qtsetup
Now that you are done with the installation you can start reading the usage instructions and build the examples.