Skip to content

Instantly share code, notes, and snippets.

@dragly
Last active September 16, 2017 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dragly/d93169a75d213d648312857db4eb5ef9 to your computer and use it in GitHub Desktop.
Save dragly/d93169a75d213d648312857db4eb5ef9 to your computer and use it in GitHub Desktop.
Working on multiple versions of Qt from git without cloning every version
# This script assumes that you want to work on qt3d, qtquickcontrols (1 and 2), datavis3d and qtcharts.
# Replace the modules below if you need others.
# Clone dev version
mkdir dev
cd dev # ./dev
git clone git://code.qt.io/qt/qt5.git
cd qt5 # ./dev/qt5
git checkout dev
perl init-repository --codereview-username yourusername -branch dev --module-subset=default,qtcharts,qtdatavis3d,-qtwebkit,-qtwebkit-examples,-qtwebengine,-qtwebview
cd .. # ./dev
# Build debug and release versions
mkdir build-debug
cd build-debug # ./dev/build-debug
../qt5/configure -developer-build -opensource -nomake tests -nomake examples -confirm-license -debug
make module-qt3d module-qtquickcontrols module-qtquickcontrols2 module-qtdatavis3d module-qtcharts -j4
cd .. # ./dev/
mkdir build-release
cd build-release # ./dev/build-release
../qt5/configure -developer-build -opensource -nomake tests -nomake examples -confirm-license -release
make module-qt3d module-qtquickcontrols module-qtquickcontrols2 module-qtdatavis3d module-qtcharts -j4
cd .. # ./dev/
cd .. # ./
# Clone 5.9, but reuse repos from dev (using --alternates)
mkdir 5.9
cd 5.9 # ./5.9
git clone git://code.qt.io/qt/qt5.git
cd qt5 # ./5.9/qt5
git checkout 5.9
perl init-repository --codereview-username yourusername -branch 5.9 --module-subset=default,qtcharts,qtdatavis3d,-qtwebkit,-qtwebkit-examples,-qtwebengine,-qtwebview --alternates=../../dev/qt5
cd .. # ./5.9/
# like above: mkdir build-debug, mkdir build-release, configure, and make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment