diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 055aac7c..13bc98d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,7 +86,9 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.BUILD_DIR }}/CMakeCache.txt - key: ${{ matrix.name }}-${{ hashFiles('**/CMakeLists.txt,**/*.cmake') }} + key: ${{ matrix.name }}-${{ hashFiles('**/CMakeLists.txt','**/*.cmake') }} + restore-keys: | + ${{ matrix.name }}- - name: Configure (CMake) run: | @@ -139,7 +141,9 @@ jobs: uses: actions/cache@v4 with: path: .flatpak-builder - key: ${{ matrix.arch }}-${{ hashFiles('packaging/linux/flatpak/isledecomp.manifest.json.in') }} + key: ${{ matrix.arch }}-${{ hashFiles('packaging/linux/flatpak/org.legoisland.Isle.json') }} + restore-keys: | + ${{ matrix.arch }}- - name: Build Flatpak uses: flatpak/flatpak-github-actions/flatpak-builder@v6 diff --git a/packaging/linux/CMakeLists.txt b/packaging/linux/CMakeLists.txt index 26f8f4ba..cd65adf0 100644 --- a/packaging/linux/CMakeLists.txt +++ b/packaging/linux/CMakeLists.txt @@ -1,4 +1,10 @@ if(DEFINED ENV{FLATPAK_DEST}) + set(FLATPAK TRUE) +else() + set(FLATPAK FALSE) +endif() + +if(FLATPAK) set(METADATA_ROOT "$ENV{FLATPAK_DEST}/share") else() set(METADATA_ROOT "/usr/share") @@ -8,6 +14,6 @@ endif() configure_file(isledecomp.desktop.in "${APP_ID}.desktop" @ONLY) configure_file(isledecomp.metainfo.xml.in "${APP_ID}.metainfo.xml" @ONLY) -install(FILES "../icons/isle.svg" RENAME "${APP_ID}.svg" DESTINATION "${METADATA_ROOT}/icons/hicolor/scalable/apps/") -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${APP_ID}.desktop" DESTINATION "${METADATA_ROOT}/applications/") -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${APP_ID}.metainfo.xml" DESTINATION "${METADATA_ROOT}/metainfo/") \ No newline at end of file +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../icons/isle.svg" RENAME "${APP_ID}.svg" DESTINATION "${METADATA_ROOT}/icons/hicolor/scalable/apps/") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${APP_ID}.desktop" DESTINATION "${METADATA_ROOT}/applications/") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${APP_ID}.metainfo.xml" DESTINATION "${METADATA_ROOT}/metainfo/") \ No newline at end of file