Skip to content

Commit

Permalink
Include cargo-about info also in the non-windows packages
Browse files Browse the repository at this point in the history
... by calling prepare_binary_package.sh on all platforms, but only
include the Qt license attribution where we bundle it.
  • Loading branch information
tronical committed Nov 23, 2021
1 parent 6547979 commit f7f4797
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/cpp_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ jobs:
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/install@v0.1
if: matrix.os == 'windows-latest'
with:
crate: cargo-about
- name: Prepare licenses
if: matrix.os == 'windows-latest'
- name: Prepare licenses (with Qt)
if: matrix.os == 'windows-latest' || matrix.os == 'macOS-11'
run: bash -x ./scripts/prepare_binary_package.sh . --with-qt
- name: Prepare licenses (without Qt)
if: matrix.os != 'windows-latest' && matrix.os != 'macOS-11'
run: bash -x ./scripts/prepare_binary_package.sh .
- uses: ilammy/msvc-dev-cmd@v1
- name: Select MSVC (windows)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sixtyfps_tool_binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
cp ..\..\..\Qt\6.2.1\msvc2019_64\plugins\imageformats\qsvg.dll ./plugins/imageformats
cd ..
cd ..
bash -x ./scripts/prepare_binary_package.sh pkg\${{ github.event.inputs.program || inputs.program }}
bash -x ./scripts/prepare_binary_package.sh pkg\${{ github.event.inputs.program || inputs.program }} --with-qt
- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
cp -a ~/work/sixtyfps/Qt/6.2.1/macos/plugins/platforms/libqcocoa.dylib ./plugins/platforms
cp -a ~/work/sixtyfps/Qt/6.2.1/macos/plugins/imageformats/libqsvg.dylib ./plugins/imageformats
cd ..
./scripts/prepare_binary_package.sh ${{ github.event.inputs.program || inputs.program }}
./scripts/prepare_binary_package.sh ${{ github.event.inputs.program || inputs.program }} --with-qt
- name: Tar artifacts to preserve permissions
run: tar czvf ${{ github.event.inputs.program || inputs.program }}-macos.tar.gz ${{ github.event.inputs.program || inputs.program }}
- name: Upload artifact
Expand Down
12 changes: 9 additions & 3 deletions scripts/prepare_binary_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
# Please contact info@sixtyfps.io for more information.
# LICENSE END

if [ $# != 1 ]; then
echo "usage: $0 path/to/target/binary_package"
if [ $# -lt 1 ]; then
echo "usage: $0 path/to/target/binary_package --with-qt"
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 @@ -105,4 +109,6 @@ EOT

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

cp sixtyfps_runtime/rendering_backends/qt/LICENSE.QT sixtyfps_runtime/rendering_backends/qt/QtThirdPartySoftware_Listing.txt $target_path/
if [ "$2x" == "--with-qtx" ]; then
cp sixtyfps_runtime/rendering_backends/qt/LICENSE.QT sixtyfps_runtime/rendering_backends/qt/QtThirdPartySoftware_Listing.txt $target_path/
fi

0 comments on commit f7f4797

Please sign in to comment.