Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
adde49fbb3 | |||
f5adcba3fb | |||
e1664d43d4 |
18
.gitmodules
vendored
18
.gitmodules
vendored
@ -1,18 +1,3 @@
|
||||
[submodule "third/gpgme"]
|
||||
path = libs/gpg/gpgme
|
||||
url = https://github.com/gpg/gpgme
|
||||
[submodule "third/libassuan"]
|
||||
path = libs/gpg/libassuan
|
||||
url = https://github.com/gpg/libassuan
|
||||
[submodule "third/libgpg-error"]
|
||||
path = libs/gpg/libgpg-error
|
||||
url = https://github.com/gpg/libgpg-error
|
||||
[submodule "third/gnupg"]
|
||||
path = libs/gpg/gnupg
|
||||
url = https://github.com/gpg/gnupg
|
||||
[submodule "libs/utils/quazip"]
|
||||
path = libs/quazip
|
||||
url = https://github.com/stachenov/quazip
|
||||
[submodule "libs/gpg/gpgme"]
|
||||
path = libs/gpg/gpgme
|
||||
url = https://github.com/gpg/gpgme
|
||||
@ -28,3 +13,6 @@
|
||||
[submodule "libs/quazip"]
|
||||
path = libs/quazip
|
||||
url = https://github.com/stachenov/quazip
|
||||
[submodule "libs/libgit2"]
|
||||
path = libs/libgit2
|
||||
url = https://github.com/libgit2/libgit2
|
||||
|
@ -17,6 +17,11 @@
|
||||
"quazip": {
|
||||
"template": "cmake",
|
||||
"make_jobs": 4
|
||||
},
|
||||
"libgit2": {
|
||||
"template": "cmake",
|
||||
"make_jobs": 4,
|
||||
"build_args": "-DBUILD_SHARED_LIBS=OFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
libs/libgit2
Submodule
1
libs/libgit2
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3828d7afdd08b595584048e8e4dab6ddd4506ed1
|
@ -10,7 +10,7 @@
|
||||
"content-hub": "UTPass.contenthub"
|
||||
}
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2-dev",
|
||||
"maintainer": "Quentin Rouland <quentin@qrouland.com>",
|
||||
"framework" : "ubuntu-sdk-16.04"
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
add_subdirectory(Git)
|
||||
add_subdirectory(Pass)
|
||||
add_subdirectory(Utils)
|
||||
|
39
plugins/Git/CMakeLists.txt
Normal file
39
plugins/Git/CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(PLUGIN "Git")
|
||||
|
||||
set(
|
||||
SRC
|
||||
plugin.cpp
|
||||
git.cpp
|
||||
)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
execute_process(
|
||||
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
|
||||
OUTPUT_VARIABLE ARCH_TRIPLET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(ARCH_TRIPLET STREQUAL "")
|
||||
set(ARCH_TRIPLET x86_64-linux-gnu)
|
||||
endif()
|
||||
|
||||
add_library(${PLUGIN} MODULE ${SRC})
|
||||
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||
|
||||
set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/build/${ARCH_TRIPLET}/libgit2/install/")
|
||||
|
||||
INCLUDE_DIRECTORIES(${EXTERNAL_LIBS}/include)
|
||||
|
||||
add_library(libgit2 STATIC IMPORTED)
|
||||
set_property(TARGET libgit2 PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgit2.a")
|
||||
|
||||
target_link_libraries(${PLUGIN} libgit2)
|
||||
|
||||
|
||||
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
||||
|
||||
install(TARGETS ${PLUGIN} DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
||||
install(FILES qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN}/)
|
10
plugins/Git/git.cpp
Normal file
10
plugins/Git/git.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <QDebug>
|
||||
#include <QUrl>
|
||||
#include <git2.h>
|
||||
|
||||
#include "git.h"
|
||||
|
||||
|
||||
|
||||
Git::Git() {};
|
||||
|
17
plugins/Git/git.h
Normal file
17
plugins/Git/git.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef GIT_H
|
||||
#define GIT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
|
||||
class Git : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Git();
|
||||
~Git() override = default;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
10
plugins/Git/plugin.cpp
Normal file
10
plugins/Git/plugin.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <QtQml>
|
||||
|
||||
#include "plugin.h"
|
||||
#include "git.h"
|
||||
|
||||
void GitPlugin::registerTypes(const char *uri)
|
||||
{
|
||||
//@uri Utils
|
||||
qmlRegisterSingletonType<Git>(uri, 1, 0, "Git", [](QQmlEngine *, QJSEngine *) -> QObject * { return new Git; });
|
||||
}
|
16
plugins/Git/plugin.h
Normal file
16
plugins/Git/plugin.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef GITPLUGIN_H
|
||||
#define GITPLUGIN_H
|
||||
|
||||
#include <QQmlExtensionPlugin>
|
||||
|
||||
class GitPlugin : public QQmlExtensionPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID
|
||||
"org.qt-project.Qt.QQmlExtensionInterface")
|
||||
|
||||
public:
|
||||
void registerTypes(const char *uri) override;
|
||||
};
|
||||
|
||||
#endif
|
2
plugins/Git/qmldir
Normal file
2
plugins/Git/qmldir
Normal file
@ -0,0 +1,2 @@
|
||||
module Git
|
||||
plugin Git
|
@ -4,7 +4,6 @@
|
||||
#include <QDir>
|
||||
#include <QtCore/QStandardPaths>
|
||||
|
||||
|
||||
#include <gpgme.h>
|
||||
#include <gpgme++/data.h>
|
||||
#include <gpgme++/global.h>
|
||||
|
Reference in New Issue
Block a user