From 50fc235ea676afb74e4e379dd6ece12e80a3cea6 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Tue, 13 Dec 2022 21:28:38 -0600 Subject: [PATCH] Flatpak almost working. No desktop integration yet. --- .gitignore | 1 + CMakeLists.txt | 6 ++-- buildFlatpak.sh | 7 +++-- com.kangaroopunch.JoeyDev.desktop | 9 ++++++ com.kangaroopunch.JoeyDev.yaml | 50 +++++++++++++++++++++++++++++++ flatpak.yaml | 31 ------------------- icon.png | 3 ++ 7 files changed, 70 insertions(+), 37 deletions(-) mode change 100644 => 100755 buildFlatpak.sh create mode 100644 com.kangaroopunch.JoeyDev.desktop create mode 100644 com.kangaroopunch.JoeyDev.yaml delete mode 100644 flatpak.yaml create mode 100644 icon.png diff --git a/.gitignore b/.gitignore index be6c140..2fb0d2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea/ +.flatpak-builder/ crapForLater/ thirdparty/scintilla/ thirdparty/lexilla/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bc845e..0c48993 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,9 +78,6 @@ add_definitions( ${GTK3_CFLAGS} ) -#set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES LINK_SEARCH_START_STATIC ON) -#set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES LINK_SEARCH_END_STATIC ON) -#target_link_options(${CMAKE_PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ -static) target_link_libraries(${CMAKE_PROJECT_NAME} -rdynamic @@ -91,4 +88,5 @@ target_link_libraries(${CMAKE_PROJECT_NAME} -lstdc++ ) -#target_link_options(${CMAKE_PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++) + +install(TARGETS ${CMAKE_PROJECT_NAME}) diff --git a/buildFlatpak.sh b/buildFlatpak.sh old mode 100644 new mode 100755 index 631ce71..f90e5c2 --- a/buildFlatpak.sh +++ b/buildFlatpak.sh @@ -1,5 +1,8 @@ #!/bin/bash -flatpak install --user flathub org.gnome.Platform//3.26 org.gnome.Sdk//3.26 +flatpak install flathub org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08 -flatpak-builder flatpak-build flatpak.yaml +[[ -d .flatpak-builder ]] && rm -rf .flatpak-builder +[[ -d flatpak-build ]] && rm -rf flatpak-build + +flatpak-builder -v --user --install flatpak-build com.kangaroopunch.JoeyDev.yaml diff --git a/com.kangaroopunch.JoeyDev.desktop b/com.kangaroopunch.JoeyDev.desktop new file mode 100644 index 0000000..18a8854 --- /dev/null +++ b/com.kangaroopunch.JoeyDev.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=0.1 +Type=Application +Name=JoeyDev +Comment=A Development Tool for JoeyLib +Categories=Programming; +Exec=joeydev +Terminal=false +Icon=com.kangaroopunch.JoeyDev diff --git a/com.kangaroopunch.JoeyDev.yaml b/com.kangaroopunch.JoeyDev.yaml new file mode 100644 index 0000000..df1897e --- /dev/null +++ b/com.kangaroopunch.JoeyDev.yaml @@ -0,0 +1,50 @@ +app-id: com.kangaroopunch.JoeyDev + +runtime: org.freedesktop.Platform +runtime-version: '22.08' +sdk: org.freedesktop.Sdk + +command: joeydev + +modules: + - name: joeydev + buildsystem: cmake-ninja + sources: + - type: dir + path: include + dest: include + - type: dir + path: src + dest: src + - type: dir + path: thirdparty + dest: thirdparty + - type: dir + path: ui + dest: ui + - type: dir + path: tools + dest: tools + - type: file + path: buildDeps.sh + - type: file + path: CMakeLists.txt + + - name: desktop + buildsystem: simple + build-commands: + - install -Dm755 com.kangaroopunch.JoeyDev.desktop -t /app/share/applications + - install -Dm644 icon.png /app/share/icons/hicolor/128x128/com.kangaroopunch.JoeyDev.png + sources: + - type: file + path: com.kangaroopunch.JoeyDev.desktop + - type: file + path: icon.png + +finish-args: + - --share=ipc + - --socket=fallback-x11 + - --socket=wayland + - --filesystem=host + - --share=network + - --device=dri diff --git a/flatpak.yaml b/flatpak.yaml deleted file mode 100644 index 4852401..0000000 --- a/flatpak.yaml +++ /dev/null @@ -1,31 +0,0 @@ -app-id: com.kangaroopunch.JoeyDev -runtime: org.gnome.Platform -runtime-version: '3.26' -sdk: org.gnome.Sdk -command: joeydev -modules: - - name: joeydev - buildsystem: cmake-ninja - #config-opts: - sources: - - type: dir - path: include - - type: dir - path: src - - type: dir - path: thirdparty - - type: dir - path: ui - - type: dir - path: tools - - type: file - path: buildDeps.sh - - type: file - path: CMakeLists.txt -finish-args: - - --share=ipc - - --socket=fallback-x11 - - --socket=wayland - - --filesystem=host - - --share=network - - --device=dri diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..0ee7bbe --- /dev/null +++ b/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b233e47f68952ec9d914a9dcff2258ab059e985cf7e21db9e3679fc830bdad95 +size 28273