mirror of
https://github.com/QRouland/UTPass.git
synced 2025-01-24 15:46:40 +00:00
Setup git libs for Pass plugin
This commit is contained in:
parent
7418894456
commit
d33932be6d
@ -28,7 +28,7 @@ set(PROJECT_NAME "UTPass")
|
|||||||
set(FULL_PROJECT_NAME "utpass.qrouland")
|
set(FULL_PROJECT_NAME "utpass.qrouland")
|
||||||
set(CMAKE_INSTALL_PREFIX /)
|
set(CMAKE_INSTALL_PREFIX /)
|
||||||
set(DATA_DIR /)
|
set(DATA_DIR /)
|
||||||
# set(BIN_DIR ${DATA_DIR}lib/bin)
|
|
||||||
set(DESKTOP_FILE_NAME ${PROJECT_NAME}.desktop)
|
set(DESKTOP_FILE_NAME ${PROJECT_NAME}.desktop)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} main.cpp)
|
add_executable(${PROJECT_NAME} main.cpp)
|
||||||
@ -41,7 +41,6 @@ configure_file(${CMAKE_CURRENT_BINARY_DIR}/manifest.json ${CMAKE_CURRENT_BINARY_
|
|||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest_.json DESTINATION ${DATA_DIR})
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest_.json DESTINATION ${DATA_DIR})
|
||||||
|
|
||||||
#install(DIRECTORY desktop DESTINATION ${DATA_DIR})
|
|
||||||
|
|
||||||
install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR})
|
install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR})
|
||||||
install(FILES ${PROJECT_NAME}.contenthub DESTINATION ${DATA_DIR})
|
install(FILES ${PROJECT_NAME}.contenthub DESTINATION ${DATA_DIR})
|
||||||
@ -49,14 +48,6 @@ install(FILES LICENSE DESTINATION ${DATA_DIR})
|
|||||||
install(DIRECTORY qml DESTINATION ${DATA_DIR})
|
install(DIRECTORY qml DESTINATION ${DATA_DIR})
|
||||||
install(DIRECTORY assets DESTINATION ${DATA_DIR})
|
install(DIRECTORY assets DESTINATION ${DATA_DIR})
|
||||||
|
|
||||||
# file(GLOB_RECURSE BIN_FILES
|
|
||||||
# "/usr/bin/gpg*"
|
|
||||||
# )
|
|
||||||
# install(
|
|
||||||
# FILES ${BIN_FILES}
|
|
||||||
# PERMISSIONS OWNER_EXECUTE OWNER_READ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
|
||||||
# DESTINATION ${BIN_DIR}
|
|
||||||
# )
|
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
file(GLOB_RECURSE I18N_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po qml/*.qml qml/*.js)
|
file(GLOB_RECURSE I18N_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po qml/*.qml qml/*.js)
|
||||||
|
@ -17,12 +17,17 @@ dependencies_target:
|
|||||||
|
|
||||||
install_lib:
|
install_lib:
|
||||||
- "libgpg-error.so.0.28.0"
|
- "libgpg-error.so.0.28.0"
|
||||||
- "libassuan.so"
|
- "libassuan.so*"
|
||||||
- "libgpgme.so"
|
- "libgpgme.so*"
|
||||||
- "libgpgmepp.so"
|
- "libgpgmepp.so*"
|
||||||
- "libqgpgme.so.7"
|
- "libqgpgme.so*"
|
||||||
- "libgit2.so"
|
- "libgit2.so*"
|
||||||
- "libquazip5.so"
|
- "libquazip5.so*"
|
||||||
|
- "libmbedtls.so*"
|
||||||
|
- "libmbedx509.so*"
|
||||||
|
- "libmbedcrypto.so*"
|
||||||
|
- "libhttp_parser.so*"
|
||||||
|
- "libssh2.so*"
|
||||||
|
|
||||||
install_bin:
|
install_bin:
|
||||||
- "gpg"
|
- "gpg"
|
||||||
|
@ -20,7 +20,13 @@ Git::~Git() {
|
|||||||
git_libgit2_shutdown();
|
git_libgit2_shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Git::clone(QString url)
|
bool Git::clone(QString url, QString path) {
|
||||||
{
|
git_repository *repo = NULL;
|
||||||
return false;
|
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
|
||||||
|
|
||||||
|
int ret = git_clone(&repo, url.toLocal8Bit().data(), path.toLocal8Bit().data(), &opts);
|
||||||
|
if (repo) {
|
||||||
|
git_repository_free(repo);
|
||||||
|
}
|
||||||
|
return ret == 0; // TODO better error handling to return specifics errors for the ui
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
Git(Git const &) = delete;
|
Git(Git const &) = delete;
|
||||||
void operator=(Git const &) = delete;
|
void operator=(Git const &) = delete;
|
||||||
|
|
||||||
bool clone(QString url);
|
bool clone(QString url, QString path);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -70,5 +70,5 @@ QString Pass::getPasswordStore()
|
|||||||
bool Pass::gitClone(QString url)
|
bool Pass::gitClone(QString url)
|
||||||
{
|
{
|
||||||
qInfo() << "Cloning . password_store from " << url;
|
qInfo() << "Cloning . password_store from " << url;
|
||||||
return Git::instance()->clone(url);
|
return Git::instance()->clone(url, m_password_store);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QSemaphore>
|
#include <QSemaphore>
|
||||||
#include <gpgme++/interfaces/passphraseprovider.h>
|
#include <gpgme++/interfaces/passphraseprovider.h>
|
||||||
#include "passphraseprovider.h"
|
|
||||||
#include "gpg.h"
|
#include "gpg.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@ add_library(${PLUGIN} MODULE ${SRC})
|
|||||||
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||||
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||||
|
|
||||||
|
add_library(libquazip5 SHARED IMPORTED)
|
||||||
|
set_property(TARGET libquazip5 PROPERTY IMPORTED_LOCATION "/usr/lib/${ARCH_TRIPLET}/libquazip5.so")
|
||||||
|
|
||||||
|
target_link_libraries(${PLUGIN} libquazip5)
|
||||||
|
|
||||||
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user