Skip to content

Commit

Permalink
thinks for flatpak
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantum-mutnauQ authored Dec 30, 2024
1 parent ef95054 commit edad744
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ endfunction()
function(copy_icon)
if(FLATPAK_BUILD)
set(ASSETS_TARGET_DIR "/app/share/icons/hicolor/scalable/apps")
set(DESTINATION_ICON "${ASSETS_TARGET_DIR}/${FLATPAK_ID}.svg") # Setze den Zielnamen auf ${FLATPAK_ID}.svg
set(DESTINATION_ICON "${ASSETS_TARGET_DIR}/${FLATPAK_ID}.svg")
else()
set(ASSETS_TARGET_DIR "${CMAKE_BINARY_DIR}/assets")
set(DESTINATION_ICON "${ASSETS_TARGET_DIR}/fastreader.svg") # Behalte den ursprünglichen Namen für Nicht-Flatpak-Bauten
set(DESTINATION_ICON "${ASSETS_TARGET_DIR}/fastreader.svg")
endif()

file(MAKE_DIRECTORY ${ASSETS_TARGET_DIR})

set(SOURCE_ICON "${CMAKE_SOURCE_DIR}/src/assets/fastreader.svg")

file(COPY ${SOURCE_ICON} DESTINATION ${ASSETS_TARGET_DIR}) # Kopiere die Datei an den Zielort
file(RENAME "${ASSETS_TARGET_DIR}/fastreader.svg" "${DESTINATION_ICON}") # Benenne die Datei um, wenn FLATPAK_BUILD aktiv ist
add_custom_target(icon ALL DEPENDS ${DESTINATION_ICON}) # Abhängigkeit auf das umbenannte Icon setzen
install(FILES ${DESTINATION_ICON} DESTINATION ${ASSETS_TARGET_DIR}) # Installiere die umbenannte Datei
file(COPY ${SOURCE_ICON} DESTINATION ${ASSETS_TARGET_DIR})
file(RENAME "${ASSETS_TARGET_DIR}/fastreader.svg" "${DESTINATION_ICON}")
add_custom_target(icon ALL DEPENDS ${DESTINATION_ICON})
install(FILES ${DESTINATION_ICON} DESTINATION ${ASSETS_TARGET_DIR})
endfunction()


Expand Down
9 changes: 9 additions & 0 deletions src/assets/metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@


<releases>
<release version="6.2" date="2024-12-30">
<description>
Version 6.1
<p>Flatpak Support</p>
<ul>
<li>Did some things in cmake.</li>
</ul>
</description>
</release>
<release version="6.1" date="2024-12-29">
<description>
Version 6.1
Expand Down

0 comments on commit edad744

Please sign in to comment.