Skip to content

Commit

Permalink
Remove Qt from the C++ packages on Windows and macOS
Browse files Browse the repository at this point in the history
Commit 79b7078 was supposed to do this.

- Remove now unused Qt license file bunding from prepare_binary_package.sh
- Remove CMake Qt bundling option
  • Loading branch information
tronical committed Dec 1, 2023
1 parent 768084b commit 4b4a7d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 57 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/cpp_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
- uses: ./.github/actions/install-linux-dependencies
with:
old-ubuntu: true
- name: Install Qt (Ubuntu)
uses: jurplel/install-qt-action@v3
if: matrix.os == 'ubuntu-20.04'
with:
version: 5.15.2
cache: true
- name: Install Qt (cached)
if: matrix.os != 'ubuntu-20.04'
uses: jurplel/install-qt-action@v3
Expand All @@ -41,12 +35,7 @@ jobs:
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-about
- name: Prepare licenses (with Qt)
if: matrix.os == 'windows-2022' || matrix.os == 'macOS-11'
run: bash -x ../../scripts/prepare_binary_package.sh ../.. --with-qt
working-directory: api/cpp/
- name: Prepare licenses (without Qt)
if: matrix.os != 'windows-2022' && matrix.os != 'macOS-11'
- name: Prepare licenses
run: bash -x ../../scripts/prepare_binary_package.sh ../..
working-directory: api/cpp/
- uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -60,7 +49,7 @@ jobs:
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: CMakeLists.txt
cmakeAppendedArgs: '-DCMAKE_BUILD_TYPE=RelWithDebInfo -DSLINT_PACKAGE_BUNDLE_QT=ON'
cmakeAppendedArgs: '-DCMAKE_BUILD_TYPE=RelWithDebInfo'
buildDirectory: ${{ runner.workspace }}/cppbuild
buildWithCMakeArgs: '--config Release'
- name: cpack
Expand Down
31 changes: 0 additions & 31 deletions api/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -418,37 +418,6 @@ if(SLINT_BUILD_RUNTIME)
DESTINATION lib/cmake/Slint
)

option(SLINT_PACKAGE_BUNDLE_QT "Internal setting to install Qt binary in the packages" OFF)

if(SLINT_PACKAGE_BUNDLE_QT)
if(WIN32)
find_package(Qt6 6.0 COMPONENTS Core Gui Widgets Svg)
install(
FILES
$<TARGET_FILE:Qt6::Core>
$<TARGET_FILE:Qt6::Gui>
$<TARGET_FILE:Qt6::Widgets>
$<TARGET_FILE:Qt6::Svg>
TYPE LIB)

install(
FILES ${Qt6_DIR}/../../../plugins/platforms/qwindows.dll
DESTINATION plugins/platforms)
install(
FILES ${Qt6_DIR}/../../../plugins/styles/qwindowsvistastyle.dll
DESTINATION plugins/styles)
install(
FILES ${Qt6_DIR}/../../../plugins/imageformats/qsvg.dll
DESTINATION plugins/imageformats)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../licenses/ DESTINATION LICENSES)

set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} TYPE LIB)
endif()
endif(SLINT_PACKAGE_BUNDLE_QT)

endif(SLINT_BUILD_RUNTIME)

set(CPACK_PACKAGE_NAME "Slint-cpp")
Expand Down
14 changes: 1 addition & 13 deletions scripts/prepare_binary_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial

if [ $# -lt 1 ]; then
echo "usage: $0 path/to/target/binary_package --with-qt"
echo "usage: $0 path/to/target/binary_package"
echo
echo "This prepares the specified binary_package folder for distribution"
echo "by adding the legal copyright and license notices."
echo
echo "All files will be copied/created under the licenses folder"
echo "along with an index.html"
echo
echo "If the --with-qt option is specified, it is assumed that Qt is bundled"
echo "with the binary package and license attribution is also copied into the"
echo "target path"
exit 1
fi

Expand Down Expand Up @@ -70,11 +67,6 @@ cat > about.hbs <<EOT
</li>
{{/each}}
</ul>
<h2>Qt License attribution</h2>
<p>This program also uses the Qt library, which is licensed under the
<a href="LICENSE.QT">LGPL v3</a></p>.
<p>Qt may include additional third-party components: <a href="QtThirdPartySoftware_Listing.txt">QtThirdPartySoftware_Listing.txt</a></p>
<main></body></html>
EOT

Expand Down Expand Up @@ -105,7 +97,3 @@ filter-noassertion = true
EOT

cargo about generate about.hbs -o $target_path/index.html

if [ "$2x" == "--with-qtx" ]; then
cp `dirname $0`/../internal/backends/qt/LICENSE.QT `dirname $0`/../internal/backends/qt/QtThirdPartySoftware_Listing.txt $target_path/
fi

0 comments on commit 4b4a7d6

Please sign in to comment.