Skip to content

Commit

Permalink
chore(qt)[sc-97670]: use our prebuilt Qt6.7 to fix linker errors insi…
Browse files Browse the repository at this point in the history
…de qtwebkit
  • Loading branch information
brstrutt committed Jul 10, 2024
1 parent 53838ed commit 80fa53d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
35 changes: 5 additions & 30 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ sudo apt install bash-completion
# Install tools/libraries required to build
sudo apt-get install -y \
gyp \
libdbus-1-dev \
libegl1-mesa-dev \
libglib2.0-dev \
libgstreamer1.0-dev \
Expand All @@ -20,38 +21,12 @@ sudo apt-get install -y \
libxslt1-dev \
libwebpdemux2 \
libwoff1 \

# Install Qt
sudo apt-get install -y \
libqt6core5compat6-dev \
libqt6sensors6-dev \
qt6-base-dev \
qt6-declarative-dev \
qt6-multimedia-dev \
qt6-positioning-dev \

# Qt executables go through "qtchooser" by default. It is broken. Just replace the "qtchooser" versions with a link to the executable we actually want to run
# If you see an error of "thng: could not find a Qt installation of ''" then that means that `thng` is another executable that needs the following treatment.
sudo rm /usr/bin/qmake
sudo ln -s /usr/lib/qt6/bin/qmake /usr/bin/qmake
sudo rm /usr/bin/moc
sudo ln -s /usr/lib/qt6/libexec/moc /usr/bin/moc
sudo rm /usr/bin/uic
sudo ln -s /usr/lib/qt6/libexec/uic /usr/bin/uic
libxkbcommon-dev \

# Alias python3 to python so the build script can find it
sudo ln -s /usr/bin/python3 /usr/bin/python

# Download our prebuilt version of Qt
curl -L https://github.com/constructpm/qt-build/releases/download/v6.7.1-1/qt-6.7.1-cpp17-ubuntu-22.04-x64.tar.gz | sudo tar xvJ -C /opt
# Download our prebuilt version of QtWebkit
curl -L https://github.com/constructpm/qtwebkit-build/releases/download/v6.212.0-1/qtwebkit-ee690e4-cpp17-ubuntu-22.04-x64.tar.gz | sudo tar xvJ -C /usr/include/x86_64-linux-gnu

# Move the files we downloaded so their locations match the locations used by the other Qt libraries we installed earlier
sudo mv /usr/include/x86_64-linux-gnu/qt6/include/* /usr/include/x86_64-linux-gnu/qt6/
sudo rmdir /usr/include/x86_64-linux-gnu/qt6/include/

sudo mv /usr/include/x86_64-linux-gnu/qt6/lib/cmake/* /usr/lib/x86_64-linux-gnu/cmake/
sudo rmdir /usr/include/x86_64-linux-gnu/qt6/lib/cmake/
sudo mv /usr/include/x86_64-linux-gnu/qt6/lib/pkgconfig/* /usr/lib/x86_64-linux-gnu/pkgconfig/
sudo rmdir /usr/include/x86_64-linux-gnu/qt6/lib/pkgconfig/
sudo mv /usr/include/x86_64-linux-gnu/qt6/lib/* /usr/lib/x86_64-linux-gnu/
sudo rmdir /usr/include/x86_64-linux-gnu/qt6/lib/
curl -L https://github.com/constructpm/qtwebkit-build/releases/download/v6.212.0-1/qtwebkit-ee690e4-cpp17-ubuntu-22.04-x64.tar.gz | sudo tar xvJ -C /opt
6 changes: 3 additions & 3 deletions wd.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
'WD_CONFIG_QUICK': '1',
'WD_CONFIG_PLAYER': '0',
'WD_CONFIG_ONE_KEYRELEASE': '0',
'QT_INC_PATH': '/usr/include/x86_64-linux-gnu/qt6',
'QT_BIN_PATH': '/usr/bin',
'QT_LIB_PATH': '/usr/lib/x86_64-linux-gnu'
'QT_INC_PATH': '/opt/qt6/include',
'QT_BIN_PATH': '/opt/qt6/libexec',
'QT_LIB_PATH': '/opt/qt6/lib'
},
}

0 comments on commit 80fa53d

Please sign in to comment.