diff --git a/.github/workflows/all-builds.yml b/.github/workflows/all-builds.yml index 5b128d7..01ff4ef 100644 --- a/.github/workflows/all-builds.yml +++ b/.github/workflows/all-builds.yml @@ -32,31 +32,13 @@ jobs: if: matrix.os == 'windows-latest' uses: crazy-max/ghaction-chocolatey@v2 with: - args: install pkgconfiglite + args: install pkgconfiglite --checksum e87b5ea3c9142256af60f2d5b917aa63b571e6a0 --checksum-type sha1 - name: Build Qtk shell: bash run: | cmake -B build/ ${{ matrix.cmake }} -DQTK_UPDATE_SUBMODULES=ON - cmake --build build/ - - - name: Package Qtk - shell: bash - run: | - cmake --build build/ --target package - - - name: Package Qtk Sources - if: matrix.os != 'macos-latest' - shell: bash - run: | - cmake --build build/ --target package_source - - - uses: actions/upload-artifact@v3 - with: - name: qtk-packages-${{ matrix.os }} - path: | - build/packages/ - !build/packages/_CPack_Packages/* + cmake --build build/ -- -j $(nproc) - name: Install Qtk shell: bash @@ -64,10 +46,31 @@ jobs: cmake --install build/ - uses: actions/upload-artifact@v3 + if: always() with: name: qtk-${{ matrix.os }} path: install/* + - name: Package Qtk + shell: bash + run: | + cd build/ + cmake --build . --target package -- -j $(nproc) + +# - name: Package Qtk Sources +# if: matrix.os != 'macos-latest' +# shell: bash +# run: | +# cmake --build build/ --target package_source + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: qtk-packages-${{ matrix.os }} + path: | + build/packages/ + !build/packages/_CPack_Packages/* + Build-Qtk-Assimp-Targets: strategy: fail-fast: false @@ -103,49 +106,12 @@ jobs: - name: Build Qtk shell: bash run: | - cmake -B build/ ${{ matrix.cmake }} && cmake --build build/ --target qtk-main + cmake -B build/ ${{ matrix.cmake }} && cmake --build build/ -- -j $(nproc) # TODO: Enable with tag only when done testing # Release-Qtk: # needs: Build-Qtk -# if: "always()" # strategy: # fail-fast: false # matrix: # os: [ubuntu-latest, windows-latest, macos-latest] -# include: -# - os: ubuntu-latest -# cqt: CQtDeployer.deb -# url: https://github.com/QuasarApp/CQtDeployer/releases/download/v1.6.2277/CQtDeployer_1.6.2277.ecc6eed_Linux_x86_64.deb -# qmake: /home/runner/work/qtk/Qt/6.5.0/gcc_64/bin/qmake -# - os: windows-latest -# cqt: CQtDeployer.exe -# url: https://github.com/QuasarApp/CQtDeployer/releases/download/v1.6.2277/CQtDeployer_1.6.2277.ecc6eed_Windows_AMD64.exe -# qmake: D:/a/qtk/qtk/Qt/6.5.0/mingw81_64/bin/qmake -# - os: macos-latest -# cqt: CQtDeployer.run -# url: https://github.com/QuasarApp/CQtDeployer/releases/download/v1.6.2277/CQtDeployer_1.6.2277.ecc6eed_Linux_x86_64.run -# qmake: /home/runner/work/qtk/Qt/6.5.0/gcc_64/bin/qmake -# runs-on: ${{ matrix.os }} -# -# steps: -# - uses: actions/download-artifact@v3 -# with: -# name: qtk-${{ matrix.os }} -# -# - name: Install Qt -# uses: jurplel/install-qt-action@v2 -# with: -# version: '6.5.0' -# -# - name: Package Qtk -# shell: bash -# run: | -# wget -O ${{ matrix.cqt }} ${{ matrix.url }} -# apt install -y ./${{ matrix.cqt }} -# cqtdeployer -bin qtk-main -qmake ${{ matrix.qmake }} -# -# - uses: actions/upload-artifact@v3 -# with: -# name: qtk-installer-${{ matrix.os }} -# path: DistributionKit/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c90189..ed50387 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,13 @@ set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +#set(CMAKE_MACOSX_BUNDLE ON) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) if(MSVC) - add_compile_options(/WX:NO /wd4131 /wd4127) + set(CMAKE_COMPILE_WARNING_AS_ERROR OFF) + add_compile_options(-warnnotaserror) + add_compile_options(/wd4131 /wd4127) endif() ################################################################################ @@ -84,6 +87,7 @@ if (QTK_PREFIX_QTCREATOR) endif() message(STATUS "[Qtk] CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") set(QTK_RESOURCES "${CMAKE_SOURCE_DIR}/resources") +set(QTK_OSX_ICONS ${CMAKE_SOURCE_DIR}/resources/icons/osx/kilroy.icns) # Print all QTK options and their values. get_cmake_property(VAR_NAMES VARIABLES) @@ -112,10 +116,9 @@ if(NOT Qt6_FOUND) endif() # Find Assimp +set(ASSIMP_BUILD_TESTS OFF) if(QTK_UPDATE_SUBMODULES) message(STATUS "[Qtk] Updating submodules...") - set(ASSIMP_BUILD_TESTS OFF) - set(ASSIMP_INSTALL OFF) submodule_update("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/") else() diff --git a/resources/icons/osx/README.md b/resources/icons/osx/README.md new file mode 100644 index 0000000..7309721 --- /dev/null +++ b/resources/icons/osx/README.md @@ -0,0 +1,13 @@ + +```bash +sudo apt install icnsutils +``` + +```bash +convert icon.png -resize 32x32 kilroy_32.png +convert icon.png -resize 16x16 kilroy_16.png +convert icon.png -resize 48x48 kilroy_48.png +convert icon.png -resize 128x128 kilroy_128.png +convert icon.png -resize 256x256 kilroy_256.png +png2icns png2icns kilroy.icns kilroy_*.png +``` diff --git a/resources/icons/osx/kilroy.icns b/resources/icons/osx/kilroy.icns new file mode 100644 index 0000000..55d8cd4 Binary files /dev/null and b/resources/icons/osx/kilroy.icns differ diff --git a/resources/icons/osx/kilroy_128.png b/resources/icons/osx/kilroy_128.png new file mode 100644 index 0000000..cdb2fbf Binary files /dev/null and b/resources/icons/osx/kilroy_128.png differ diff --git a/resources/icons/osx/kilroy_16.png b/resources/icons/osx/kilroy_16.png new file mode 100644 index 0000000..8427cf0 Binary files /dev/null and b/resources/icons/osx/kilroy_16.png differ diff --git a/resources/icons/osx/kilroy_256.png b/resources/icons/osx/kilroy_256.png new file mode 100644 index 0000000..a189b32 Binary files /dev/null and b/resources/icons/osx/kilroy_256.png differ diff --git a/resources/icons/osx/kilroy_32.png b/resources/icons/osx/kilroy_32.png new file mode 100644 index 0000000..d074fe6 Binary files /dev/null and b/resources/icons/osx/kilroy_32.png differ diff --git a/resources/icons/osx/kilroy_48.png b/resources/icons/osx/kilroy_48.png new file mode 100644 index 0000000..17e6312 Binary files /dev/null and b/resources/icons/osx/kilroy_48.png differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2cc3a18..a1f4b93 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,11 +43,14 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Qt OpenGL 3D graphics library.") set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/shaunrd0/qtk") set(CPACK_SOURCE_IGNORE_FILES build;install;\.git;\.github;\.idea) set(CPACK_PACKAGE_DIRECTORY packages/) +set(CPACK_PACKAGE_CONTACT "shaunreed.com") +# TODO: This works for debian packages but the script installs to the wrong dir. +set(CPACK_INSTALL_SCRIPTS ${QTK_DEPLOY_SCRIPT}) # OSX set(CPACK_BUNDLE_NAME Qtk) -#set(CPACK_BUNDLE_PLIST ) -#set(CPACK_BUNDLE_ICON ) +set(CPACK_BUNDLE_PLIST ${CMAKE_BINARY_DIR}/bin/qtk_main.app/Contents/Info.plist) +set(CPACK_BUNDLE_ICON ${QTK_OSX_ICONS}) if(WIN32) set(CPACK_SOURCE_GENERATOR ZIP) else() diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 369c31e..82661d5 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -91,6 +91,11 @@ set_target_properties( qtk_main PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_BUNDLE_NAME Qtk + MACOSX_BUNDLE_ICON_FILE ${QTK_OSX_ICONS} + MACOSX_BUNDLE_GUI_IDENTIFIER ${CMAKE_PROJECT_NAME} + MACOSX_BUNDLE_INFO_STRING ${CMAKE_PROJECT_DESCRIPTION} + MACOSX_BUNDLE_COPYRIGHT "All Content (c) 2023 Shaun Reed, all rights reserved" MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} )