diff --git a/.gitignore b/.gitignore index 6afa968..4d0d9d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,12 @@ -cmake-build-debug +# Builds dirs +cmake-build-* build -taglib-build + + +# IDE .clickable .idea -local +*.project + +# Third parties ouput dir +third/local diff --git a/CMakeLists.txt b/CMakeLists.txt index 61af248..babc50e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,5 @@ project(UTPass C CXX) cmake_minimum_required(VERSION 3.5.1) -include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") @@ -45,9 +44,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INST install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR}) install(DIRECTORY qml DESTINATION ${DATA_DIR}) install(DIRECTORY assets DESTINATION ${DATA_DIR}) -install(DIRECTORY local/bin DESTINATION ${DATA_DIR}) file(GLOB_RECURSE BIN_FILES - "local/bin/*") + "third/local/bin/${ARCH_TRIPLET}/*") install( FILES ${BIN_FILES} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE @@ -75,23 +73,7 @@ add_custom_target(${DESKTOP_FILE_NAME} ALL install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE_NAME} DESTINATION ${DATA_DIR}) -add_subdirectory(third) add_subdirectory(po) add_subdirectory(plugins) -add_dependencies(${PROJECT_NAME} Gnupg) - -# Make source files visible in qtcreator -# We don't need to add plugin sources here as they get exposed -# via the library target. -file(GLOB_RECURSE PROJECT_SRC_FILES - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - qml/*.qml - qml/*.js - *.json - *.json.in - *.apparmor - *.desktop.in - ) - add_custom_target(${PROJECT_NAME}_FILES ALL SOURCES ${PROJECT_SRC_FILES}) diff --git a/README.md b/README.md index 7bd25b1..6098622 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,17 @@ A password management app for Ubuntu Touch aiming to be compatible with [ZX2C4 * Install [clickable](https://github.com/bhdouglass/clickable). * Clone this repo : ```git clone --recursive https://github.com/qrouland/UTPass``` -* Build the app : ```cd UTPass && clickable``` +* Move to app directory: ```cd UTPass``` +* Build third parties : ```clickable third_build``` +* Build the app : ```clickable``` For more options/details see the [clickable documentation](http://clickable.bhdouglass.com/en/latest/index.html) ## Custom clickable command -* ```clickable test ``` : build and run test for all plugins -* ```clickable test_gpg ``` : build and run test for gpg plugin -* ```clickable test_pass``` : build and run test for pass plugin -* ```clickable style ``` : reformat the code (Required : [astyle](astyle.sourceforge.ne) & [qmlfmt](https://github.com/jesperhh/qmlfmt)) +* ```clickable third_build ``` : build third dependencies for arm architecture +* ```clickable third_build_d ``` : build third dependencies for amd64 architecture +* ```clickable third_clean ``` : clean third parties +* ```clickable style ``` : reformat the code (Required [astyle](astyle.sourceforge.ne) & [qmlfmt](https://github.com/jesperhh/qmlfmt) installed) # Contributing diff --git a/clickable.json b/clickable.json index 9b9a38c..c4eceeb 100644 --- a/clickable.json +++ b/clickable.json @@ -2,11 +2,10 @@ "template": "cmake", "kill": "UTPass", "scripts": { - "clean": "third/clean.sh && rm -rf build", - "style": "astyle --options=.astylerc \"plugins/*.cpp,*.h\" && astyle --options=.astylerc \"tests/*.cpp,*.h\" && qmlfmt -w qml", - "test": "clickable build --arch amd64 && clickable run \"cd build && make test\"", - "test_gpg": "clickable build --arch amd64 && clickable run \"cd build && ./TestGpg\"", - "test_pass": "clickable build --arch amd64 && clickable run \"cd build && ./TestPass\"" + "third_build": "clickable run 'cd third && ./clean.sh && mkdir build && cd build && cmake .. && make'", + "third_build_d": "clickable run 'cd third && ./clean.sh && mkdir build && cd build && cmake .. && make' --arch amd64 ", + "third_clean": "cd third && ./clean.sh", + "style": "astyle --options=.astylerc \"plugins/*.cpp,*.h\" && qmlfmt -w tests && qmlfmt -w qml" }, "dependencies_build": [ "texinfo", diff --git a/plugins/Gpg/CMakeLists.txt b/plugins/Gpg/CMakeLists.txt index 1509485..18895bc 100644 --- a/plugins/Gpg/CMakeLists.txt +++ b/plugins/Gpg/CMakeLists.txt @@ -13,11 +13,10 @@ 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}/local") +set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/third/local/${ARCH_TRIPLET}") set(THIRD_PATH "${CMAKE_CURRENT_SOURCE_DIR}") INCLUDE_DIRECTORIES(${EXTERNAL_LIBS}/include) -add_dependencies(${PLUGIN} LibGpgme) add_library(GpgError STATIC IMPORTED) set_property(TARGET GpgError PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpg-error.a") diff --git a/po/utpass.qrouland.pot b/po/utpass.qrouland.pot index 62e2ffc..6576440 100644 --- a/po/utpass.qrouland.pot +++ b/po/utpass.qrouland.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: utpass.qrouland\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-21 21:15+0000\n" +"POT-Creation-Date: 2019-03-22 15:10+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,10 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#: ../qml/pages/Settings.qml:8 ../qml/pages/headers/MainHeader.qml:49 +msgid "Settings" +msgstr "" + #: ../qml/pages/PasswordList.qml:16 msgid "Back" msgstr "" @@ -25,24 +29,20 @@ msgstr "" msgid "No password found in the current folder" msgstr "" -#: ../qml/pages/Settings.qml:8 ../qml/pages/headers/MainHeader.qml:49 -msgid "Settings" +#: ../qml/pages/Info.qml:9 ../qml/pages/headers/MainHeader.qml:56 +msgid "Info" msgstr "" -#: ../qml/pages/headers/MainHeader.qml:8 ../qml/pages/headers/StackHeader.qml:8 -#: ../qml/pages/Info.qml:43 UTPass.desktop.in.h:1 +#: ../qml/pages/Info.qml:43 ../qml/pages/headers/MainHeader.qml:8 +#: ../qml/pages/headers/StackHeader.qml:8 UTPass.desktop.in.h:1 msgid "UTPass" msgstr "" +#: ../qml/pages/Info.qml:53 +msgid "Suggest improvement(s) or report a bug(s)" +msgstr "" + #: ../qml/pages/headers/MainHeader.qml:23 #: ../qml/pages/headers/MainHeader.qml:38 msgid "Search" msgstr "" - -#: ../qml/pages/headers/MainHeader.qml:56 ../qml/pages/Info.qml:9 -msgid "Info" -msgstr "" - -#: ../qml/pages/Info.qml:53 -msgid "Suggest improvement(s) or report a bug(s)" -msgstr "" diff --git a/third/CMakeLists.txt b/third/CMakeLists.txt index 24392aa..688d16f 100644 --- a/third/CMakeLists.txt +++ b/third/CMakeLists.txt @@ -1,4 +1,6 @@ +cmake_minimum_required(VERSION 3.5.1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) execute_process( COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH @@ -7,7 +9,7 @@ execute_process( ) -set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/local") +set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/local/${ARCH_TRIPLET}") set(THIRD_PATH "${CMAKE_CURRENT_SOURCE_DIR}") set(LIBGPGERROR_PATH "${THIRD_PATH}/libgpg-error") set(LIBASSUAN_PATH "${THIRD_PATH}/libassuan") diff --git a/third/clean.sh b/third/clean.sh index 8f90b10..27f0859 100755 --- a/third/clean.sh +++ b/third/clean.sh @@ -1,7 +1,9 @@ #!/bin/sh - SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +cd $SCRIPTPATH && rm -rf build +git submodule update --init --recursive + for LIB in "gnupg" "gpgme" "libassuan" "libgpg-error" do echo $LIB