-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
394 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
language: cpp | ||
compiler: gcc | ||
dist: trusty | ||
|
||
|
||
notifications: | ||
email: false | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- realpath wget git realpath | ||
|
||
install: | ||
- sudo wget -c https://github.com/appimage-conan-community/conan-appimage/releases/download/continuous/conan-8e5c23a-x86_64.AppImage -O /usr/local/bin/conan | ||
- sudo chmod a+x /usr/local/bin/conan | ||
- conan user | ||
|
||
script: | ||
- # Original cmake binaries are faulty forcing re-build | ||
- conan install cmake_installer/3.14.3@conan/stable --build 'cmake_install*' | ||
- conan remote add appimage-conan-community https://api.bintray.com/conan/appimage-conan-community/public-conan --insert=0 | ||
- conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan --insert=1 | ||
- ci/create_appimage.sh | ||
|
||
after_success: | ||
- ls -lh | ||
# 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-services*.AppImage* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xe | ||
|
||
build_scripts_dir=`dirname $0` | ||
source_dir=`dirname $build_scripts_dir` | ||
|
||
echo $source_dir | ||
conan install $source_dir --build missing | ||
|
||
. activate_run.sh | ||
|
||
cmake $source_dir -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PROJECT_AppImageServices_INCLUDE=$PWD/conan_paths.cmake | ||
make install -j`nproc` DESTDIR=AppDir | ||
linuxdeploy --appdir=AppDir --plugin qt --output appimage --desktop-file=AppDir/usr/share/applications/org.appimage.services.desktop | ||
|
||
. deactivate_run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
[requires] | ||
qt/5.12.2@bincrafters/stable | ||
libpng/1.6.36@bincrafters/stable | ||
qt/5.12.3@appimage-conan-community/stable | ||
xdg-utils-cxx/0.1.1@appimage-conan-community/stable | ||
libappimage/1.0.0@appimage-conan-community/stable | ||
|
||
|
||
[build_requires] | ||
patchelf_installer/0.9@appimage-conan-community/stable | ||
gtest/1.8.1@bincrafters/stable | ||
glib/2.40.0@appimage-conan-community/stable | ||
cmake_installer/3.14.3@conan/stable | ||
linuxdeploy/continuous@appimage-conan-community/stable | ||
linuxdeploy-plugin-qt/continuous@appimage-conan-community/stable | ||
linuxdeploy-plugin-appimage/continuous@appimage-conan-community/stable | ||
|
||
[generators] | ||
cmake_paths | ||
qt | ||
virtualenv | ||
virtualrunenv | ||
|
||
[options] | ||
glib:shared=True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
install(FILES appimage_logo.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps COMPONENT APPIMAGE_SERVICES) | ||
install(FILES org.appimage.services.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications COMPONENT APPIMAGE_SERVICES) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Type=Application | ||
Name=appimage-services | ||
Comment=App | ||
TryExec=appimage-services | ||
Exec=appimage-services | ||
Icon=appimage_logo | ||
Categories=Utility; | ||
NoDisplay=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
add_subdirectory(dbus) | ||
add_subdirectory(launcher) | ||
|
||
find_package(Qt5 CONFIG REQUIRED Core) | ||
add_executable(appimage-services main.cpp) | ||
target_link_libraries(appimage-services PRIVATE AppImageServicesLauncher Qt5::Core) | ||
|
||
install( | ||
TARGETS appimage-services | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
COMPONENT AppImageServices | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// libraries | ||
#include <QDBusConnection> | ||
#include <QDebug> | ||
|
||
// local | ||
#include "DBusInterface.h" | ||
#include <LauncherService.h> | ||
|
||
// generated by `qt5_add_dbus_adaptor` cmake function | ||
#include "launcheradaptor.h" | ||
|
||
DBusInterface::DBusInterface(QObject* parent) : QObject(parent) { | ||
new LauncherAdaptor(this); | ||
QDBusConnection dbus = QDBusConnection::sessionBus(); | ||
bool operationSucceed; | ||
operationSucceed = dbus.registerObject(LAUNCHER_DBUS_OBJECT_PATH, this); | ||
if (!operationSucceed) | ||
qCritical() << "Unable to register d-bus object: " << LAUNCHER_DBUS_OBJECT_PATH; | ||
|
||
operationSucceed = dbus.registerService(LAUNCHER_DBUS_INTERFACE_NAME); | ||
if (!operationSucceed) | ||
qCritical() << "Unable to register d-bus service: " << LAUNCHER_DBUS_INTERFACE_NAME; | ||
|
||
} | ||
|
||
bool DBusInterface::registerApp(const QString& appImagePath) { | ||
qDebug() << __FUNCTION__ << " : " << appImagePath; | ||
if (appImagePath.startsWith("file://")) | ||
return launcherService.registerApp(appImagePath.mid(7).toStdString()); | ||
else | ||
return launcherService.registerApp(appImagePath.toStdString()); | ||
} | ||
|
||
bool DBusInterface::unregisterApp(const QString& appImagePath) { | ||
qDebug() << __FUNCTION__ << " : " << appImagePath; | ||
if (appImagePath.startsWith("file://")) | ||
return launcherService.unregisterApp(appImagePath.mid(7).toStdString()); | ||
else | ||
return launcherService.unregisterApp(appImagePath.toStdString()); | ||
} | ||
|
||
DBusInterface::~DBusInterface() = default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
|
||
#define LAUNCHER_DBUS_INTERFACE_NAME "org.appimage.Services.Launcher" | ||
#define LAUNCHER_DBUS_OBJECT_PATH "/org/appimage/Services/Launcher" | ||
#define LAUNCHER_DBUS_METHOD_REGISTER_APP "org.appimage.Services.Launcher.registerApp" | ||
#define LAUNCHER_DBUS_METHOD_UNREGISTER_APP "org.appimage.Services.Launcher.unregisterApp" | ||
|
||
|
Oops, something went wrong.