mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-02 23:24:12 +00:00
Automatically set the correct path to the Flameshot executable (#1775)
* Automatically set the correct path to the Flameshot executable. Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org> * Export CMake project settings. Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org> * Fixed AppImage and Snap builds.
This commit is contained in:
3
.github/workflows/Linux-pack.yml
vendored
3
.github/workflows/Linux-pack.yml
vendored
@@ -483,12 +483,11 @@ jobs:
|
|||||||
APPIMAGETOOL_ARCH: x86_64
|
APPIMAGETOOL_ARCH: x86_64
|
||||||
- name: Packaging appimage
|
- name: Packaging appimage
|
||||||
run: |
|
run: |
|
||||||
sed -i 's|Exec=/usr/bin/flameshot|Exec=flameshot|g' data/desktopEntry/package/org.flameshot.Flameshot.desktop
|
|
||||||
APPIMAGE_DST_PATH=$GITHUB_WORKSPACE/${PRODUCT}.AppDir
|
APPIMAGE_DST_PATH=$GITHUB_WORKSPACE/${PRODUCT}.AppDir
|
||||||
mkdir -p ${APPIMAGE_DST_PATH}
|
mkdir -p ${APPIMAGE_DST_PATH}
|
||||||
|
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
|
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DUSE_LAUNCHER_ABSOLUTE_PATH:BOOL=OFF
|
||||||
make -j$(nproc) DESTDIR=${APPIMAGE_DST_PATH} install
|
make -j$(nproc) DESTDIR=${APPIMAGE_DST_PATH} install
|
||||||
|
|
||||||
$GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/org.flameshot.Flameshot.desktop
|
$GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/org.flameshot.Flameshot.desktop
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ set(RUN_IN_PLACE
|
|||||||
CACHE BOOL "Run directly in source directory structure")
|
CACHE BOOL "Run directly in source directory structure")
|
||||||
|
|
||||||
option(GENERATE_TS "Regenerate translation source files" OFF)
|
option(GENERATE_TS "Regenerate translation source files" OFF)
|
||||||
|
option(USE_EXTERNAL_SINGLEAPPLICATION "Use external QtSingleApplication library" OFF)
|
||||||
|
option(USE_EXTERNAL_SPDLOG "Use external spdlog library" OFF)
|
||||||
|
option(USE_LAUNCHER_ABSOLUTE_PATH "Use absolute path for the desktop launcher" ON)
|
||||||
|
|
||||||
include(cmake/StandardProjectSettings.cmake)
|
include(cmake/StandardProjectSettings.cmake)
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Keywords[nl_NL]=flameshot;schermfoto;screenshot;schermafdruk;vastleggen;schermop
|
|||||||
Keywords[es]=flameshot;screenshot;capture;shutter;captura;
|
Keywords[es]=flameshot;screenshot;capture;shutter;captura;
|
||||||
Keywords[de]=flameshot;screenshot;Bildschirmfoto;Aufnahme;
|
Keywords[de]=flameshot;screenshot;Bildschirmfoto;Aufnahme;
|
||||||
Keywords[pt_BR]=flameshot;screenshot;captura de tela;captura;shutter;
|
Keywords[pt_BR]=flameshot;screenshot;captura de tela;captura;shutter;
|
||||||
Exec=/usr/bin/flameshot
|
Exec=@LAUNCHER_EXECUTABLE@
|
||||||
Icon=org.flameshot.Flameshot
|
Icon=org.flameshot.Flameshot
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ parts:
|
|||||||
configflags:
|
configflags:
|
||||||
- '-DCMAKE_BUILD_TYPE=RelWithDebInfo'
|
- '-DCMAKE_BUILD_TYPE=RelWithDebInfo'
|
||||||
- '-DCMAKE_INSTALL_PREFIX=/usr'
|
- '-DCMAKE_INSTALL_PREFIX=/usr'
|
||||||
|
- '-DUSE_LAUNCHER_ABSOLUTE_PATH:BOOL=OFF'
|
||||||
source: https://github.com/flameshot-org/flameshot.git
|
source: https://github.com/flameshot-org/flameshot.git
|
||||||
source-type: git
|
source-type: git
|
||||||
override-pull: |
|
override-pull: |
|
||||||
|
|||||||
@@ -237,6 +237,12 @@ endforeach ()
|
|||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Flameshot)
|
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Flameshot)
|
||||||
|
|
||||||
|
if(USE_LAUNCHER_ABSOLUTE_PATH)
|
||||||
|
set(LAUNCHER_EXECUTABLE "${CMAKE_INSTALL_FULL_BINDIR}/flameshot")
|
||||||
|
else()
|
||||||
|
set(LAUNCHER_EXECUTABLE "flameshot")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Install binary
|
# Install binary
|
||||||
install(TARGETS flameshot
|
install(TARGETS flameshot
|
||||||
EXPORT flameshot-targets
|
EXPORT flameshot-targets
|
||||||
@@ -245,7 +251,7 @@ install(TARGETS flameshot
|
|||||||
|
|
||||||
# Install desktop files, completion and dbus files
|
# Install desktop files, completion and dbus files
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/data/desktopEntry/package/org.flameshot.Flameshot.desktop
|
configure_file(${CMAKE_SOURCE_DIR}/data/desktopEntry/package/org.flameshot.Flameshot.desktop
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/share/applications/org.flameshot.Flameshot.desktop COPYONLY)
|
${CMAKE_CURRENT_BINARY_DIR}/share/applications/org.flameshot.Flameshot.desktop @ONLY)
|
||||||
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/data/appdata/org.flameshot.Flameshot.metainfo.xml
|
configure_file(${CMAKE_SOURCE_DIR}/data/appdata/org.flameshot.Flameshot.metainfo.xml
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/share/metainfo/org.flameshot.Flameshot.metainfo.xml COPYONLY)
|
${CMAKE_CURRENT_BINARY_DIR}/share/metainfo/org.flameshot.Flameshot.metainfo.xml COPYONLY)
|
||||||
|
|||||||
Reference in New Issue
Block a user