diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 24da3d1..f04c439 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -111,10 +111,14 @@ jobs: working-directory: build continue-on-error: true + - name: Package with CPack + run: | + cd build && cpack + - name: Upload build artifacts if: always() uses: actions/upload-artifact@v7 with: - name: build-${{ matrix.os }}-${{ matrix.triplet }} - path: build/ + path: ./build/Harbour-Ports-*.zip + archive: false retention-days: 30 \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index cab244d..2c8a803 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Root CMakeLists.txt -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.21) -project(Harbour VERSION 0.3.0 LANGUAGES CXX) +project(Harbour VERSION 0.5.0 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -49,3 +49,5 @@ add_custom_command( ${CMAKE_CURRENT_SOURCE_DIR}/assets $/assets ) + +include("${CMAKE_SOURCE_DIR}/CPackConfig.cmake") diff --git a/CPackConfig.cmake b/CPackConfig.cmake new file mode 100644 index 0000000..207b35e --- /dev/null +++ b/CPackConfig.cmake @@ -0,0 +1,32 @@ +set(CPACK_PACKAGE_NAME "Harbour-Ports") +set(CPACK_PACKAGE_VENDOR "Harbour Ports Team") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A cross-platform launcher and updater for console game PC ports") +set(CPACK_PACKAGE_VERSION "v0.5.0") + +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") +set(CPACK_PACKAGE_EXECUTABLES "Harbour" "Harbour Ports") + +install(TARGETS Harbour + RUNTIME_DEPENDENCY_SET HarbourDeps + RUNTIME DESTINATION . + BUNDLE DESTINATION . +) + +if(EXISTS "${CMAKE_SOURCE_DIR}/assets") + install(DIRECTORY "${CMAKE_SOURCE_DIR}/assets/" DESTINATION "assets") +endif() + +if(WIN32) + install(RUNTIME_DEPENDENCY_SET HarbourDeps + DESTINATION . + DIRECTORIES "${CMAKE_BINARY_DIR}/" + + PRE_EXCLUDE_REGEXES "api-ms-" "ext-ms-" + POST_EXCLUDE_REGEXES ".*system32/.*\\.dll" + ) + set(CPACK_GENERATOR "ZIP") +else() + set(CPACK_GENERATOR "ZIP") +endif() + +include(CPack) diff --git a/vcpkg-configuation.json b/vcpkg-configuation.json deleted file mode 100644 index 9f27bee..0000000 --- a/vcpkg-configuation.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "default-registry": { - "kind": "builtin", - "baseline": "9fbeedd5a58b94bcde42eb5be12652c2f27e08cf" - } -} - diff --git a/vcpkg.json b/vcpkg.json index 850e970..88e7a0e 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "harbour", - "version-string": "0.2.0", + "version-string": "0.5.0", "dependencies": [ "sdl3", "freetype",