passwordmanager/README.md

112 lines
5.1 KiB
Markdown
Raw Permalink Normal View History

2016-09-14 20:05:16 +02:00
# Password Manager
A simple password manager with Qt 5 GUI using AES-256-CBC encryption via OpenSSL.
## Download / binary repository
I currently provide packages for Arch Linux and Windows. Sources for those packages can be found in a
separate [repository](https://github.com/Martchus/PKGBUILDs). For binaries checkout the release section
on GitHub or my [website](http://martchus.no-ip.biz/website/page.php?name=programming).
2015-05-19 23:04:29 +02:00
## Build instructions
The Password Manager depends on c++utilities and passwordfile. Checkout the README of c++utilities for more details. Note that this project is not built differently than any other CMake project.
2015-05-19 23:04:29 +02:00
2018-07-21 22:24:53 +02:00
### Optional dependencies
* When building any Qt GUI, the library qtutilities is required.
* When building with Qt Widgets GUI support, the following Qt modules are required: core gui widgets
* When building with support for the experimental Qt Quick GUI, the following Qt/KDE modules are required: core gui qml quick quickcontrols2 kirigami
2018-07-21 22:24:53 +02:00
### Building this straight
1. Install (preferably the latest version of) g++ or clang, the required Qt 5 modules and CMake. OpenSSL, iconv and
zlib are required as well but likely already installed.
2. Get the sources of additional dependencies and the password manager itself. For the lastest version from Git clone the following repositories:
```
cd $SOURCES
git clone https://github.com/Martchus/cpp-utilities.git c++utilities
git clone https://github.com/Martchus/passwordfile.git
git clone https://github.com/Martchus/qtutilities.git # only required for Qt GUI
git clone https://github.com/Martchus/passwordmanager.git
git clone https://github.com/Martchus/subdirs.git
```
3. Build and install everything in one step:
```
cd $BUILD_DIR
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/install/prefix" \
$SOURCES/subdirs/passwordmanager
make install -j$(nproc)
```
#### Concrete example of 3. for building an Android APK under Arch Linux
Build c++utilities, passwordfile, qtutilities and passwordmanager in one step to create an Android APK for arm64-v8a:
```
2018-08-31 22:29:01 +02:00
# specify Android platform
2018-07-21 22:24:53 +02:00
_android_arch=arm64-v8a
_android_toolchain=aarch64-linux-android
_android_api_level=21
2018-08-31 22:29:01 +02:00
# set project name
_reponame=passwordmanager
_pkgname=passwordmanager
2018-08-31 22:29:01 +02:00
# locate SDK, NDK and further libraries
2018-07-21 22:24:53 +02:00
android_sdk_root=${ANDROID_SDK_ROOT:-/opt/android-sdk}
android_ndk_root=${ANDROID_NDK_ROOT:-/opt/android-ndk}
qt_version=$(pacman -Q "android-qt5-$_android_arch" | sed 's/.* \(.*\)-.*/\1/')
build_tools_version=$(pacman -Q android-sdk-build-tools | sed 's/.* r\(.*\)-.*/\1/')
qt_root=/opt/android-qt5/$qt_version/$_android_arch
other_libs_root=/opt/android-libs/$_android_arch
root="$android_ndk_root/sysroot;$other_libs_root;$qt_root"
2018-08-31 22:29:01 +02:00
# use Breeze icons from 'breeze-icons' package
ln -s /usr/share/icons/breeze icons
2018-07-21 22:24:53 +02:00
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=$_android_api_level \
-DCMAKE_ANDROID_ARCH_ABI=$_android_arch \
-DCMAKE_ANDROID_NDK="$android_ndk_root" \
-DCMAKE_ANDROID_SDK="$android_sdk_root" \
-DCMAKE_ANDROID_STL_TYPE=gnustl_shared \
-DCMAKE_INSTALL_PREFIX=$other_libs_root \
-DCMAKE_PREFIX_PATH="$root" \
-DCMAKE_FIND_ROOT_PATH="$root" \
-DANDROID_API_LEVEL=$_android_api_level \
-DANDROID_ABI=$_android_arch \
-DANDROID_ARCHITECTURE=${_android_arch%-*} \
-DANDROID_SDK_ROOT="$android_sdk_root" \
-DANDROID_APK_DIR=$SOURCES/$_reponame/android \
2018-07-21 22:24:53 +02:00
-DANDROID_TOOLCHAIN=$_android_toolchain \
-DANDROID_COMPILER_PREFIX=$_android_toolchain \
-DANDROID_SDK_BUILD_TOOLS_REVISION="$build_tools_version" \
-DQTANDROID_EXPORTED_TARGET=$_pkgname \
2018-07-21 22:24:53 +02:00
-Diconv_DYNAMIC_INCLUDE_DIR="$other_libs_root/include" \
-Diconv_STATIC_INCLUDE_DIR="$other_libs_root/include" \
-Dcrypto_DYNAMIC_INCLUDE_DIR="$other_libs_root/include" \
-Dcrypto_STATIC_INCLUDE_DIR="$other_libs_root/include" \
-Dcrypto_DYNAMIC_LIB="$other_libs_root/lib/libcrypto.so" \
-Dcrypto_STATIC_LIB="$other_libs_root/lib/libcrypto.a" \
2018-07-21 22:24:53 +02:00
-DQt5Core_DIR="$qt_root/lib/cmake/Qt5Core" \
-DECM_ADDITIONAL_FIND_ROOT_PATH="$PWD/c++utilities;$PWD/passwordfile;$PWD/qtutilities;$root;$other_libs_root/lib;$other_libs_root/lib" \
-DANDROID_EXTRA_LIBS="$other_libs_root/lib/libcrypto.so;$other_libs_root/lib/libssl.so;$other_libs_root/lib/libiconv.so;$other_libs_root/lib/libKF5Kirigami2.so" \
-DNO_DOXYGEN=ON \
-DWIDGETS_GUI=OFF \
-DQUICK_GUI=ON \
2018-08-31 22:29:01 +02:00
-DBUILTIN_ICON_THEMES=breeze \
-DBREEZEICONS_DIR="$PWD" \
$SOURCES/subdirs/$_reponame
2018-07-21 22:24:53 +02:00
make create-apk -j$(nproc)
```
##### Notes
* The Android packages for the dependencies Qt 5, iconv and OpenSSL are provided in my PKGBUILDs repo.
* The lastest Java I was able to use was version 8 (`jdk8-openjdk` package).
### Deployment of Android APK file
1. Find device ID: `adb devices`
2. Install App on phone: `adb -s <DEVICE_ID> install -r $BUILD_DIR/passwordmanager_build_apk/build/outputs/apk/passwordmanager_build_apk-debug.apk`
3. View log: `adb -s <DEVICE_ID> logcat`