Commit fe7d6a51 authored by azubieta's avatar azubieta
Browse files

Merge branch 'development' into 'master'

Development

See merge request !31
parents 000e575d d62cd692
Pipeline #1395 canceled with stages
......@@ -32,7 +32,7 @@ build:AppImage:
artifacts:
expire_in: 1 year
paths:
- appimage-cli-tool*.AppImage*
- appimage-installer*.AppImage*
cache:
key: conan_cache
paths:
......@@ -47,7 +47,7 @@ test:AppImage:
script:
- sudo apt-get -y -qq update && sudo apt-get -y -qq install libglib2.0-0 librsvg2-dev
- ./appimage-cli-tool*.AppImage --appimage-extract
- ./appimage-installer*.AppImage --appimage-extract
- squashfs-root/AppRun --help
build:debian_buster_pkg:
......@@ -56,10 +56,10 @@ build:debian_buster_pkg:
script:
- cmake -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- make -j`nproc`
- cpack -G DEB -G DEB -R 0.1.6-debian-buster
- cpack -G DEB -G DEB -R 1.0.0-debian-buster
artifacts:
paths:
- appimage-cli-tool*.deb
- appimage-installer*.deb
expire_in: 1 year
test:debian_buster_pkg:
......@@ -69,7 +69,7 @@ test:debian_buster_pkg:
- build:debian_buster_pkg
script:
- apt -y -qq update && apt -y -qq install ./appimage-cli-tool*
- apt -y -qq update && apt -y -qq install ./appimage-installer*
- app --help
## Ubuntu Bionic Package
......@@ -79,11 +79,11 @@ build:ubuntu_bionic_pkg:
script:
- cmake -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- make -j`nproc`
- cpack -G DEB -G DEB -R 0.1.6-ubuntu-bionic
- cpack -G DEB -G DEB -R 1.0.0-ubuntu-bionic
artifacts:
expire_in: 1 year
paths:
- appimage-cli-tool*.deb
- appimage-installer*.deb
test:ubuntu_bionic_pkg:
image: ubuntu:bionic
......@@ -92,7 +92,7 @@ test:ubuntu_bionic_pkg:
- build:ubuntu_bionic_pkg
script:
- apt -y -qq update && apt -y -qq install ./appimage-cli-tool*
- apt -y -qq update && apt -y -qq install ./appimage-installer*
- app --help
## Centos 7 Package
......@@ -100,13 +100,13 @@ build:centos_7_pkg:
image: azubieta90/appimage-user-tool-build:centos-7
stage: build
script:
- cmake3 . -DCPACK_RPM_PACKAGE_PROVIDES='libappimage.so.1.0()(64bit), libKF5Attica.so.5()(64bit)' -DCPACK_RPM_PACKAGE_REQUIRES='boost-filesystem, libarchive, cairo, librsvg2' -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE_CLI_TOOL_V_SUFFIX='-centos-7'
- cmake3 . -DCPACK_RPM_PACKAGE_PROVIDES='libappimage.so.1.0()(64bit), libKF5Attica.so.5()(64bit)' -DCPACK_RPM_PACKAGE_REQUIRES='boost-filesystem, libarchive, cairo, librsvg2' -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE_INSTALLER_V_SUFFIX='-centos-7'
- make -j`nproc`
- cpack3 -G DEB -G RPM
artifacts:
expire_in: 1 year
paths:
- appimage-cli-tool*.rpm
- appimage-installer*.rpm
test:centos_7_pkg:
image: centos:7
......@@ -115,7 +115,7 @@ test:centos_7_pkg:
- build:centos_7_pkg
script:
- yum -y update && yum install -y ./appimage-cli-tool*.rpm
- yum -y update && yum install -y ./appimage-installer*.rpm
- app --help
## OpenSuse Leap Package
......@@ -123,13 +123,13 @@ build:opensue_leap_pkg:
image: azubieta90/appimage-user-tool-build:opensuse-leap
stage: build
script:
- cmake . -DCPACK_RPM_PACKAGE_PROVIDES='libappimage.so.1.0()(64bit), libKF5Attica.so.5()(64bit)' -DCPACK_RPM_PACKAGE_REQUIRES='libboost_filesystem1_66_0, libarchive13, cairo, librsvg2' -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE_CLI_TOOL_V_SUFFIX='-opensue-leap'
- cmake . -DCPACK_RPM_PACKAGE_PROVIDES='libappimage.so.1.0()(64bit), libKF5Attica.so.5()(64bit)' -DCPACK_RPM_PACKAGE_REQUIRES='libboost_filesystem1_66_0, libarchive13, cairo, librsvg2' -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE_INSTALLER_V_SUFFIX='-opensue-leap'
- make -j`nproc`
- cpack -G DEB -G RPM
artifacts:
expire_in: 1 year
paths:
- appimage-cli-tool*.rpm
- appimage-installer*.rpm
test:opensue_leap_pkg:
image: opensuse/leap:15
......@@ -142,7 +142,7 @@ test:opensue_leap_pkg:
- zypper addrepo https://download.opensuse.org/repositories/KDE:/Qt5/openSUSE_Leap_15.0/KDE:Qt5.repo
- zypper addrepo https://download.opensuse.org/repositories/KDE:/Frameworks5/openSUSE_Leap_15.0/KDE:Frameworks5.repo
- zypper --non-interactive --no-gpg-checks refresh
- zypper --non-interactive --no-gpg-checks install ./appimage-cli-tool*.rpm
- zypper --non-interactive --no-gpg-checks install ./appimage-installer*.rpm
- app --help
# Arch package
......@@ -156,7 +156,7 @@ build:arch_pkg:
artifacts:
expire_in: 1 year
paths:
- build/appimage-cli-tool*.pkg.*
- build/appimage-installer*.pkg.*
test:arch_pkg:
......@@ -164,7 +164,7 @@ test:arch_pkg:
stage: test
script:
- pacman -Sy
- pacman -U --noconfirm build/appimage-cli-tool*.pkg.*
- pacman -U --noconfirm build/appimage-installer*.pkg.*
- app --help
dependencies:
- build:arch_pkg
\ No newline at end of file
......@@ -49,7 +49,7 @@ matrix:
- /opt/qt510/bin/qt510-env.sh
- export SOURCES_DIR=${PWD}
- mkdir -p ${PROJECT_BUILD_DIR}
- cd ${PROJECT_BUILD_DIR}; ${SOURCES_DIR}/.travis/build_appimage-cli-tool.sh
- cd ${PROJECT_BUILD_DIR}; ${SOURCES_DIR}/.travis/build_appimage-installer.sh
- cd ${PROJECT_BUILD_DIR}; ${SOURCES_DIR}/.travis/build_appimage.sh
## Build Debian buster package
......@@ -83,7 +83,7 @@ after_success:
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
- if [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- bash upload.sh appimage-cli-tool*.AppImage*
- bash upload.sh docker-build-release/appimage-cli-tool*.rpm
- bash upload.sh docker-build-release/appimage-cli-tool*.deb
- bash upload.sh docker-build-release/appimage-cli-tool*.pkg.tar.xz
- bash upload.sh appimage-installer*.AppImage*
- bash upload.sh docker-build-release/appimage-installer*.rpm
- bash upload.sh docker-build-release/appimage-installer*.deb
- bash upload.sh docker-build-release/appimage-installer*.pkg.tar.xz
# Maintainer: Alexis Lopez Zubieta <contact@azubieta.net>
projectname=appimage-cli-tool
projectname=appimage-installer
pkgname=appimage-cli-tool
pkgver=0.1.6
pkgname=appimage-installer
pkgver=1.0.0
pkgrel=1
epoch=
pkgdesc="AppImageHub CLI client"
pkgdesc="AppImageHub Installer"
arch=('x86_64')
url="https://github.com/azubieta/$projectname"
url="https://www.opencode.net/azubieta/$projectname"
license=('MIT')
groups=('appimage')
depends=('qt5-base' 'qt5-xmlpatterns' 'attica' 'libappimage' 'librsvg')
......@@ -21,7 +21,7 @@ backup=()
options=()
install=
changelog=
source=("git://github.com/azubieta/$projectname#tag=continuous")
source=("git@www.opencode.net:azubieta/$projectname#tag=continuous")
sha256sums=('SKIP')
noextract=()
validpgpkeys=()
......
......@@ -24,7 +24,7 @@ sudo docker run -v ${PWD}:/source -v ${PWD}/docker-build-release:/build ${DOCKER
-DINSTALL_ATTICA=On\
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DAPPIMAGE_CLI_TOOL_V_SUFFIX=\"-centos-7\" \
-DAPPIMAGE_INSTALLER_V_SUFFIX=\"-centos-7\" \
-DCPACK_RPM_PACKAGE_REQUIRES='${CENTOS7_PACKAGE_REQUIRES}' \
-DCPACK_RPM_PACKAGE_PROVIDES='${CENTOS7_PACKAGE_PROVIDES}' &&\
make -j`nproc` &&\
......
......@@ -15,4 +15,4 @@ fi
mkdir docker-build-release
sudo docker run -v ${PWD}:/source -v ${PWD}/docker-build-release:/build ${DOCKER_IMAGE} \
/bin/bash -c "cmake -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release /source && make -j`nproc` && cpack -G DEB -G DEB -R 0.1.6-debian-buster"
/bin/bash -c "cmake -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release /source && make -j`nproc` && cpack -G DEB -G DEB -R 1.0.0-debian-buster"
......@@ -25,7 +25,7 @@ sudo docker run -v ${PWD}:/source -v ${PWD}/docker-build-release:/build ${DOCKER
-DINSTALL_ATTICA=On\
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DAPPIMAGE_CLI_TOOL_V_SUFFIX=\"-opensuse-leap\" \
-DAPPIMAGE_INSTALLER_V_SUFFIX=\"-opensuse-leap\" \
-DCPACK_RPM_PACKAGE_REQUIRES='${OPENSUSE_PACKAGE_REQUIRES}' \
-DCPACK_RPM_PACKAGE_PROVIDES='${OPENSUSE_PACKAGE_PROVIDES}' &&\
make -j`nproc` &&\
......
......@@ -15,4 +15,4 @@ fi
mkdir docker-build-release
sudo docker run -v ${PWD}:/source -v ${PWD}/docker-build-release:/build ${DOCKER_IMAGE} \
/bin/bash -c "cmake -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release /source && make -j`nproc` && cpack -G DEB -R 0.1.6-ubuntu-bionic"
/bin/bash -c "cmake -DINSTALL_LIBAPPIMAGE=On -DINSTALL_ATTICA=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release /source && make -j`nproc` && cpack -G DEB -R 1.0.0-ubuntu-bionic"
cmake_minimum_required(VERSION 3.8)
project(appimage-cli-tool)
project(appimage-installer VERSION 1.0.0)
set(CMAKE_CXX_STANDARD 11)
......@@ -13,20 +13,19 @@ include(GNUInstallDirs)
## Config
option(USE_CONAN "Use conan as source of dependencies" OFF)
option(BUILD_SETTINGS_DIALOG "Build the settings dialog componetns" ON)
option(INSTALL_LIBAPPIMAGE "Install libAppImage as part of this project" OFF)
option(INSTALL_ATTICA "Install KF5 Attica as part of this project" OFF)
# Dependencies
if(USE_CONAN)
if (USE_CONAN)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(NO_OUTPUT_DIRS)
endif()
endif ()
# avoid collissions with existing libappimage target when used from other projects
if(NOT TARGET libappimage)
if (NOT TARGET libappimage)
find_package(libappimage REQUIRED)
endif()
endif ()
find_package(Qt5 COMPONENTS Core Widgets Network Gui REQUIRED)
find_package(XdgUtils COMPONENTS DesktopEntry REQUIRED)
......@@ -40,9 +39,9 @@ add_subdirectory(res)
# Packaging
# only necessary when not being used from other projects
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
include(cmake/cpack_general.cmake)
include(cmake/cpack_deb.cmake)
include(cmake/cpack_rpm.cmake)
include(CPack)
endif()
endif ()
# appimage-cli-tool
# appimage-installer
High level commandline interface for applications management based on the AppImage packaging
format. It uses [AppImageHub](http://www.appimagehub.com) as main source and allows to search, install and
remove applications.
format. It uses [AppImageHub](http://www.appimagehub.com) as main source and allows to search, install, remove and
update applications.
## Usage
```bash
......
......@@ -22,15 +22,14 @@ set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_COMPRESSION_TYPE xz)
# use git hash as package release
set(CPACK_DEBIAN_PACKAGE_RELEASE "git${APPIMAGE_CLI_TOOL_GIT_COMMIT_DATE_SHORT}.${APPIMAGE_CLI_TOOL_GIT_COMMIT}")
set(CPACK_DEBIAN_PACKAGE_RELEASE "git${APPIMAGE_INSTALLER_GIT_COMMIT_DATE_SHORT}.${APPIMAGE_INSTALLER_GIT_COMMIT}")
if(CPACK_DEBIAN_COMPATIBILITY_LEVEL)
set(CPACK_DEBIAN_PACKAGE_RELEASE "${CPACK_DEBIAN_PACKAGE_RELEASE}+${CPACK_DEBIAN_COMPATIBILITY_LEVEL}")
endif()
# Custom package names
set(CPACK_DEBIAN_APPIMAGE_CLI_TOOL_PACKAGE_NAME appimage-cli-tool)
set(CPACK_DEBIAN_APPIMAGE_CLI_TOOL_SETTINGS_PACKAGE_NAME appimage-cli-tool-settings)
set(CPACK_DEBIAN_APPIMAGE_INSTALLER_PACKAGE_NAME appimage-installer)
# Dependencies
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# general CPack options
set(PROJECT_VERSION ${APPIMAGE_CLI_TOOL_VERSION})
set(PROJECT_VERSION ${APPIMAGE_INSTALLER_VERSION})
# make sure to only package APPIMAGE_CLI_TOOL component
set(CPACK_COMPONENTS_ALL APPIMAGE_CLI_TOOL APPIMAGE_CLI_TOOL_SETTINGS)
# make sure to only package APPIMAGE_INSTALLER component
set(CPACK_COMPONENTS_ALL APPIMAGE_INSTALLER)
# global options
set(CPACK_PACKAGE_CONTACT "Alexis Lopez Zubieta")
set(CPACK_PACKAGE_HOMEPAGE "https://github.com/azubieta/appimage-cli-tool")
set(CPACK_PACKAGE_HOMEPAGE "https://github.com/azubieta/appimage-installer")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
# versioning
# it appears setting CPACK_DEBIAN_PACKAGE_VERSION doesn't work, hence setting CPACK_PACKAGE_VERSION
set(CPACK_PACKAGE_VERSION ${APPIMAGE_CLI_TOOL_VERSION})
set(CPACK_PACKAGE_VERSION ${APPIMAGE_INSTALLER_VERSION})
# TODO: insert some useful description
set(CPACK_COMPONENT_APPIMAGE_CLI_TOOL_PACKAGE_DESCRIPTION "AppImage User Tools")
set(CPACK_COMPONENT_APPIMAGE_INSTALLER_PACKAGE_DESCRIPTION "AppImage installer tool")
# find more suitable section for package
set(CPACK_COMPONENT_APPIMAGE_CLI_TOOL_PACKAGE_SECTION misc)
set(CPACK_COMPONENT_APPIMAGE_INSTALLER_PACKAGE_SECTION misc)
......@@ -5,8 +5,6 @@ set(CPACK_RPM_PACKAGE_AUTOPROV 1)
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_RPM_APPIMAGE_CLI_TOOL_PACKAGE_NAME appimage-cli-tool)
set(CPACK_RPM_APPIMAGE_CLI_TOOL_SETTINGS_PACKAGE_NAME appimage-cli-tool-settings)
set(CPACK_RPM_APPIMAGE_INSTALLER_PACKAGE_NAME appimage-installer)
set(CPACK_RPM_APPIMAGE_CLI_TOOL_FILE_NAME RPM-DEFAULT)
set(CPACK_RPM_APPIMAGE_CLI_TOOL_SETTINGS_FILE_NAME RPM-DEFAULT)
set(CPACK_RPM_APPIMAGE_INSTALLER_FILE_NAME RPM-DEFAULT)
......@@ -2,11 +2,11 @@
# borrowed from AppImageLauncher #
##################################
set(APPIMAGE_CLI_TOOL_V_MAJOR 0)
set(APPIMAGE_CLI_TOOL_V_MINOR 1)
set(APPIMAGE_CLI_TOOL_V_PATCH 4)
set(APPIMAGE_INSTALLER_V_MAJOR 1)
set(APPIMAGE_INSTALLER_V_MINOR 0)
set(APPIMAGE_INSTALLER_V_PATCH 0)
set(APPIMAGE_CLI_TOOL_VERSION ${APPIMAGE_CLI_TOOL_V_MAJOR}.${APPIMAGE_CLI_TOOL_V_MINOR}.${APPIMAGE_CLI_TOOL_V_PATCH}${APPIMAGE_CLI_TOOL_V_SUFFIX})
set(APPIMAGE_INSTALLER_VERSION ${APPIMAGE_INSTALLER_V_MAJOR}.${APPIMAGE_INSTALLER_V_MINOR}.${APPIMAGE_INSTALLER_V_PATCH}${APPIMAGE_INSTALLER_V_SUFFIX})
# check whether git is available
find_program(GIT git)
......@@ -20,7 +20,7 @@ if(NOT GIT STREQUAL "GIT-NOTFOUND")
execute_process(
COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE APPIMAGE_CLI_TOOL_GIT_COMMIT
OUTPUT_VARIABLE APPIMAGE_INSTALLER_GIT_COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE GIT_RESULT
......@@ -28,7 +28,7 @@ if(NOT GIT STREQUAL "GIT-NOTFOUND")
if(GIT_RESULT EQUAL 0)
message(STATUS "Storing git commit ID in cache file")
file(WRITE "${GIT_COMMIT_CACHE_FILE}" "${APPIMAGE_CLI_TOOL_GIT_COMMIT}")
file(WRITE "${GIT_COMMIT_CACHE_FILE}" "${APPIMAGE_INSTALLER_GIT_COMMIT}")
endif()
endif()
......@@ -39,51 +39,51 @@ if(NOT GIT_RESULT EQUAL 0)
message(WARNING "Failed to gather commit ID via git command, trying to read cache file")
if(EXISTS "${GIT_COMMIT_CACHE_FILE}")
file(READ "${GIT_COMMIT_CACHE_FILE}" APPIMAGE_CLI_TOOL_CACHED_GIT_COMMIT)
mark_as_advanced(FORCE APPIMAGE_CLI_TOOL_CACHED_GIT_COMMIT)
string(REPLACE "\n" "" APPIMAGE_CLI_TOOL_GIT_COMMIT "${APPIMAGE_CLI_TOOL_CACHED_GIT_COMMIT}")
file(READ "${GIT_COMMIT_CACHE_FILE}" APPIMAGE_INSTALLER_CACHED_GIT_COMMIT)
mark_as_advanced(FORCE APPIMAGE_INSTALLER_CACHED_GIT_COMMIT)
string(REPLACE "\n" "" APPIMAGE_INSTALLER_GIT_COMMIT "${APPIMAGE_INSTALLER_CACHED_GIT_COMMIT}")
else()
message(FATAL_ERROR "Could not find git commit cache file, git commit ID not available for versioning")
endif()
endif()
if("${APPIMAGE_CLI_TOOL_GIT_COMMIT}" STREQUAL "")
message(FATAL_ERROR "Invalid git commit ID: ${APPIMAGE_CLI_TOOL_GIT_COMMIT}")
if("${APPIMAGE_INSTALLER_GIT_COMMIT}" STREQUAL "")
message(FATAL_ERROR "Invalid git commit ID: ${APPIMAGE_INSTALLER_GIT_COMMIT}")
endif()
message(STATUS "Git commit: ${APPIMAGE_CLI_TOOL_GIT_COMMIT}")
mark_as_advanced(FORCE APPIMAGE_CLI_TOOL_GIT_COMMIT)
message(STATUS "Git commit: ${APPIMAGE_INSTALLER_GIT_COMMIT}")
mark_as_advanced(FORCE APPIMAGE_INSTALLER_GIT_COMMIT)
# add build number based on Travis build number if possible
if("$ENV{TRAVIS_BUILD_NUMBER}" STREQUAL "")
set(APPIMAGE_CLI_TOOL_BUILD_NUMBER "<local dev build>")
set(APPIMAGE_INSTALLER_BUILD_NUMBER "<local dev build>")
else()
set(APPIMAGE_CLI_TOOL_BUILD_NUMBER "$ENV{TRAVIS_BUILD_NUMBER}")
set(APPIMAGE_INSTALLER_BUILD_NUMBER "$ENV{TRAVIS_BUILD_NUMBER}")
endif()
# get current date
execute_process(
COMMAND env LC_ALL=C date -u "+%Y-%m-%d %H:%M:%S %Z"
OUTPUT_VARIABLE APPIMAGE_CLI_TOOL_BUILD_DATE
OUTPUT_VARIABLE APPIMAGE_INSTALLER_BUILD_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# get current date, short form
execute_process(
COMMAND env LC_ALL=C git show -s --format=%ci ${APPIMAGE_CLI_TOOL_GIT_COMMIT}
OUTPUT_VARIABLE APPIMAGE_CLI_TOOL_GIT_COMMIT_DATE
COMMAND env LC_ALL=C git show -s --format=%ci ${APPIMAGE_INSTALLER_GIT_COMMIT}
OUTPUT_VARIABLE APPIMAGE_INSTALLER_GIT_COMMIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
execute_process(
COMMAND env LC_ALL=C date -u "+%Y%m%d" -d ${APPIMAGE_CLI_TOOL_GIT_COMMIT_DATE}
OUTPUT_VARIABLE APPIMAGE_CLI_TOOL_GIT_COMMIT_DATE_SHORT
COMMAND env LC_ALL=C date -u "+%Y%m%d" -d ${APPIMAGE_INSTALLER_GIT_COMMIT_DATE}
OUTPUT_VARIABLE APPIMAGE_INSTALLER_GIT_COMMIT_DATE_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
add_definitions(-DAPPIMAGE_CLI_TOOL_VERSION="${APPIMAGE_CLI_TOOL_VERSION}")
add_definitions(-DAPPIMAGE_CLI_TOOL_GIT_COMMIT="${APPIMAGE_CLI_TOOL_GIT_COMMIT}")
add_definitions(-DAPPIMAGE_CLI_TOOL_BUILD_NUMBER="${APPIMAGE_CLI_TOOL_BUILD_NUMBER}")
add_definitions(-DAPPIMAGE_CLI_TOOL_BUILD_DATE="${APPIMAGE_CLI_TOOL_BUILD_DATE}")
add_definitions(-DAPPIMAGE_INSTALLER_VERSION="${APPIMAGE_INSTALLER_VERSION}")
add_definitions(-DAPPIMAGE_INSTALLER_GIT_COMMIT="${APPIMAGE_INSTALLER_GIT_COMMIT}")
add_definitions(-DAPPIMAGE_INSTALLER_BUILD_NUMBER="${APPIMAGE_INSTALLER_BUILD_NUMBER}")
add_definitions(-DAPPIMAGE_INSTALLER_BUILD_DATE="${APPIMAGE_INSTALLER_BUILD_DATE}")
install(FILES appimage_logo.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps COMPONENT APPIMAGE_CLI_TOOL)
install(FILES org.appimage.user-tool.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications COMPONENT APPIMAGE_CLI_TOOL)
install(FILES org.appimage.user-tool-settings.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications COMPONENT APPIMAGE_CLI_TOOL_SETTINGS)
install(FILES appimage_logo.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps COMPONENT APPIMAGE_INSTALLER)
install(FILES org.appimage.user-tool.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications COMPONENT APPIMAGE_INSTALLER)
install(FILES org.appimage.user-tool-settings.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications COMPONENT APPIMAGE_INSTALLER)
# Sources settings
install(FILES appimage-providers.yaml DESTINATION /etc COMPONENT APPIMAGE_CLI_TOOL)
install(FILES appimage-providers.yaml DESTINATION /etc COMPONENT APPIMAGE_INSTALLER)
configure_file("appimage-providers.yaml" "${PROJECT_BINARY_DIR}/appimage-providers.yaml" COPYONLY)
[Desktop Entry]
Version=1.0
Type=Application
Name=appimage-cli-tool-settings
Name=appimage-installer-settings
Comment=Configure AppImage providers
TryExec=appimage-cli-tool-settings
Exec=appimage-cli-tool-settings %F
TryExec=appimage-installer-settings
Exec=appimage-installer-settings %F
Icon=appimage_logo
Categories=Utility;
[Desktop Entry]
Version=1.0
Type=Application
Name=appimage-cli-tool
Name=appimage-installer
Comment=Manage AppImages on your system and uses appimagehub.com as source
TryExec=app
Exec=app %F
......
......@@ -21,7 +21,7 @@ if(INSTALL_LIBAPPIMAGE)
FILES
$<TARGET_SONAME_FILE:libappimage>
$<TARGET_LINKER_FILE:libappimage>
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT APPIMAGE_CLI_TOOL
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT APPIMAGE_INSTALLER
)
endif()
......@@ -30,6 +30,6 @@ if(INSTALL_ATTICA)
FILES
$<TARGET_SONAME_FILE:KF5::Attica>
$<TARGET_LINKER_FILE:KF5::Attica>
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT APPIMAGE_CLI_TOOL
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT APPIMAGE_INSTALLER
)
endif()
......@@ -32,5 +32,5 @@ add_dependencies(app core settings-common)
# Install
install(
TARGETS app
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT APPIMAGE_CLI_TOOL
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT APPIMAGE_INSTALLER
)
......@@ -4,25 +4,25 @@ add_library(settings-common OBJECT Settings.cpp Settings.h)
configure_module(settings-common)
target_include_directories(settings-common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if(BUILD_SETTINGS_DIALOG)
add_executable(
appimage-cli-tool-settings
main.cpp
SettingsDialog.h
SettingsDialog.cpp
SettingsDialog.ui
$<TARGET_OBJECTS:settings-common>
)
configure_module(appimage-cli-tool-settings)
target_link_libraries(appimage-cli-tool-settings PRIVATE Qt5::Core Qt5::Widgets yaml-cpp)
add_dependencies(appimage-cli-tool-settings settings-common)
# Install
install(
TARGETS appimage-cli-tool-settings
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT APPIMAGE_CLI_TOOL_SETTINGS
)
endif()
add_executable(
appimage-installer-settings
main.cpp
SettingsDialog.h
SettingsDialog.cpp
SettingsDialog.ui
$<TARGET_OBJECTS:settings-common>
)
configure_module(appimage-installer-settings)
target_link_libraries(appimage-installer-settings PRIVATE Qt5::Core Qt5::Widgets yaml-cpp)
add_dependencies(appimage-installer-settings settings-common)
# Install
install(
TARGETS appimage-installer-settings
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT APPIMAGE_INSTALLER
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment