OSX packaging
This commit is contained in:
parent
cfefc49c53
commit
1fb87338b1
|
@ -40,34 +40,36 @@ jobs:
|
||||||
cmake -B build/ ${{ matrix.cmake }} -DQTK_UPDATE_SUBMODULES=ON
|
cmake -B build/ ${{ matrix.cmake }} -DQTK_UPDATE_SUBMODULES=ON
|
||||||
cmake --build build/
|
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/*
|
|
||||||
|
|
||||||
- name: Install Qtk
|
- name: Install Qtk
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake --install build/
|
cmake --install build/
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: qtk-${{ matrix.os }}
|
name: qtk-${{ matrix.os }}
|
||||||
path: install/*
|
path: install/*
|
||||||
|
|
||||||
|
- 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
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: qtk-packages-${{ matrix.os }}
|
||||||
|
path: |
|
||||||
|
build/packages/
|
||||||
|
!build/packages/_CPack_Packages/*
|
||||||
|
|
||||||
Build-Qtk-Assimp-Targets:
|
Build-Qtk-Assimp-Targets:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -103,7 +105,7 @@ jobs:
|
||||||
- name: Build Qtk
|
- name: Build Qtk
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -B build/ ${{ matrix.cmake }} && cmake --build build/ --target qtk-main
|
cmake -B build/ ${{ matrix.cmake }} && cmake --build build/
|
||||||
|
|
||||||
# TODO: Enable with tag only when done testing
|
# TODO: Enable with tag only when done testing
|
||||||
# Release-Qtk:
|
# Release-Qtk:
|
||||||
|
|
|
@ -22,10 +22,13 @@ set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
set(CMAKE_MACOSX_BUNDLE ON)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
if(MSVC)
|
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()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -84,6 +87,7 @@ if (QTK_PREFIX_QTCREATOR)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "[Qtk] CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "[Qtk] CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||||
set(QTK_RESOURCES "${CMAKE_SOURCE_DIR}/resources")
|
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.
|
# Print all QTK options and their values.
|
||||||
get_cmake_property(VAR_NAMES VARIABLES)
|
get_cmake_property(VAR_NAMES VARIABLES)
|
||||||
|
@ -112,9 +116,9 @@ if(NOT Qt6_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Find Assimp
|
# Find Assimp
|
||||||
|
set(ASSIMP_BUILD_TESTS OFF)
|
||||||
if(QTK_UPDATE_SUBMODULES)
|
if(QTK_UPDATE_SUBMODULES)
|
||||||
message(STATUS "[Qtk] Updating submodules...")
|
message(STATUS "[Qtk] Updating submodules...")
|
||||||
set(ASSIMP_BUILD_TESTS OFF)
|
|
||||||
set(ASSIMP_INSTALL OFF)
|
set(ASSIMP_INSTALL OFF)
|
||||||
submodule_update("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/")
|
submodule_update("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/")
|
||||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/")
|
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/")
|
||||||
|
|
|
@ -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
|
||||||
|
```
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 512 B |
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
After Width: | Height: | Size: 869 B |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -46,8 +46,8 @@ set(CPACK_PACKAGE_DIRECTORY packages/)
|
||||||
|
|
||||||
# OSX
|
# OSX
|
||||||
set(CPACK_BUNDLE_NAME Qtk)
|
set(CPACK_BUNDLE_NAME Qtk)
|
||||||
#set(CPACK_BUNDLE_PLIST )
|
set(CPACK_BUNDLE_PLIST ${CMAKE_BINARY_DIR}/qtk_main.app/Contents/Info.plist)
|
||||||
#set(CPACK_BUNDLE_ICON )
|
set(CPACK_BUNDLE_ICON ${QTK_OSX_ICONS})
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(CPACK_SOURCE_GENERATOR ZIP)
|
set(CPACK_SOURCE_GENERATOR ZIP)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -91,6 +91,11 @@ set_target_properties(
|
||||||
qtk_main PROPERTIES
|
qtk_main PROPERTIES
|
||||||
WIN32_EXECUTABLE TRUE
|
WIN32_EXECUTABLE TRUE
|
||||||
MACOSX_BUNDLE 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_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue