-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import AppImageLauncherFS into this repo
- Loading branch information
1 parent
7fb27fb
commit f792a53
Showing
13 changed files
with
784 additions
and
9 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 |
---|---|---|
@@ -1,9 +1,6 @@ | ||
[submodule "lib/AppImageUpdate"] | ||
path = lib/AppImageUpdate | ||
url = https://github.com/AppImage/AppImageUpdate.git | ||
[submodule "lib/AppImageLauncherFS"] | ||
path = lib/AppImageLauncherFS | ||
url = https://github.com/TheAssassin/AppImageLauncherFS | ||
[submodule "lib/libappimage"] | ||
path = lib/libappimage | ||
url = https://github.com/AppImage/libappimage.git |
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,18 @@ | ||
find_path(FUSE_INCLUDE_DIR fuse.h | ||
/usr/include | ||
/usr/include/x86_64-linux-gnu | ||
/usr/include/i386-linux-gnu | ||
) | ||
|
||
find_library(FUSE_LIBRARY fuse) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args("FUSE" DEFAULT_MSG FUSE_INCLUDE_DIR FUSE_LIBRARY) | ||
|
||
mark_as_advanced(FUSE_INCLUDE_DIR FUSE_LIBRARY) | ||
|
||
message(STATUS "Found FUSE: ${FUSE_LIBRARY} (include dirs: ${FUSE_INCLUDE_DIR})") | ||
|
||
add_library(libfuse IMPORTED SHARED) | ||
set_property(TARGET libfuse PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${FUSE_INCLUDE_DIR}") | ||
set_property(TARGET libfuse PROPERTY IMPORTED_LOCATION "${FUSE_LIBRARY}") |
Submodule AppImageLauncherFS
deleted from
b92f2c
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,10 @@ | ||
[Unit] | ||
Description=AppImageLauncherFS daemon | ||
|
||
[Service] | ||
ExecStart=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/appimagelauncherfs | ||
Restart=always | ||
RestartSec=2 | ||
|
||
[Install] | ||
WantedBy=wm.target |
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,22 @@ | ||
# use latest FUSE API | ||
add_definitions(-DFUSE_USE_VERSION=26) | ||
# required by FUSE | ||
add_definitions(-D_FILE_OFFSET_BITS=64) | ||
|
||
if(NOT TARGET libfuse) | ||
find_package(FUSE REQUIRED) | ||
endif() | ||
|
||
set(Boost_USE_STATIC_LIBS ON) | ||
find_package(Boost REQUIRED COMPONENTS filesystem) | ||
|
||
add_executable(appimagelauncherfs main.cpp fs.cpp fs.h error.h) | ||
target_link_libraries(appimagelauncherfs PUBLIC libfuse Boost::filesystem) | ||
|
||
# ISO C++ spawns annoying warnings about string literals | ||
target_compile_options(appimagelauncherfs PRIVATE -Wno-write-strings) | ||
|
||
install( | ||
TARGETS appimagelauncherfs COMPONENT APPIMAGELAUNCHERFS | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) |
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,28 @@ | ||
#pragma once | ||
|
||
// system includes | ||
#include <stdexcept> | ||
|
||
// base class | ||
class AppImageLauncherFSError : public std::runtime_error { | ||
public: | ||
explicit AppImageLauncherFSError(const std::string& msg = "") : runtime_error(msg) {} | ||
}; | ||
|
||
class AlreadyRunningError : public AppImageLauncherFSError { using AppImageLauncherFSError::AppImageLauncherFSError; }; | ||
class CouldNotOpenFileError : public AppImageLauncherFSError { using AppImageLauncherFSError::AppImageLauncherFSError; }; | ||
class FileNotFoundError : public AppImageLauncherFSError { using AppImageLauncherFSError::AppImageLauncherFSError; }; | ||
class InvalidPathError : public AppImageLauncherFSError { using AppImageLauncherFSError::AppImageLauncherFSError; }; | ||
|
||
class AppImageAlreadyRegisteredError : public AppImageLauncherFSError { | ||
private: | ||
int _id; | ||
|
||
public: | ||
explicit AppImageAlreadyRegisteredError(int id) : _id(id) {}; | ||
|
||
public: | ||
int id() { | ||
return _id; | ||
} | ||
}; |
Oops, something went wrong.