From 6c7c5443d4e13d6155497cc6290148d1a3ffcc57 Mon Sep 17 00:00:00 2001 From: TheZ3ro Date: Wed, 26 Oct 2016 14:19:28 +0200 Subject: [PATCH] Updated Pull Request Template and Contribute documents * :memo: Update Installation instruction from the Wiki * :memo: Update PR template with emojis :tada: * :memo: Update CONTRIBUTING.md with CodeStyle --- .github/CONTRIBUTING.md | 54 +++++++++++++++- .github/PULL_REQUEST_TEMPLATE.md | 26 ++++---- INSTALL | 105 ++++++++++++++++++++++++++----- README.md | 48 +++----------- 4 files changed, 166 insertions(+), 67 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e48474b823..f47f0141a5 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -108,7 +108,59 @@ Please join an existing language team or request a new one if there is none. This project follows the [Qt Coding Style](https://wiki.qt.io/Qt_Coding_Style). All submissions are expected to follow this style. -Addendum- Class member variables must start with ```m_``` +In particular Code must follow the following specific rules: + +#### Naming Convention +`lowerCamelCase` + +For names made of only one word, the fist letter is lowercase. +For names made of multiple concatenated words, the first letter is lowercase and each subsequent concatenated word is capitalized. + +#### Indention +For C++ files (.cpp .h): 4 spaces +For Qt-UI files (.ui): 2 spaces + +#### Pointers +```c +int* count; +``` + +#### Braces +```c +if (condition) { + doSomething(); +} + +void ExampleClass::exampleFunction() +{ + doSomething(); +} +``` + +#### Switch statement +```c +switch (a) { +case 1: + doSomething(); + break; + +default: + doSomethingElse(); + break; +} +``` + +#### Member variables +Use prefix: `m_*` + +Example: `m_variable` + +#### GUI Widget names +Widget names must be related to the desired program behaviour. +Preferably end the name with the Widget Classname + +Example: `` + [beginner]:https://github.com/keepassxreboot/keepassx/issues?q=is%3Aopen+is%3Aissue+label%3Abeginner+label%3A%22help+wanted%22+sort%3Acomments-desc diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4f9ceac420..51436aada3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,17 +15,21 @@ ## Screenshots (if appropriate): ## Types of changes - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change) + + + +- :negative_squared_cross_mark: Bug fix (non-breaking change which fixes an issue) +- :negative_squared_cross_mark: New feature (non-breaking change which adds functionality) +- :negative_squared_cross_mark: Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: - + + -- [ ] My code follows the code style of this project. -- [ ] My change requires a change to the documentation. -- [ ] I have updated the documentation accordingly. -- [ ] I have read the **CONTRIBUTING** document. -- [ ] I have added tests to cover my changes. -- [ ] All new and existing tests passed. + +- :negative_squared_cross_mark: I have read the **CONTRIBUTING** document. [REQUIRED] +- :negative_squared_cross_mark: My code follows the code style of this project. [REQUIRED] +- :negative_squared_cross_mark: All new and existing tests passed. [REQUIRED] +- :negative_squared_cross_mark: My change requires a change to the documentation. +- :negative_squared_cross_mark: I have updated the documentation accordingly. +- :negative_squared_cross_mark: I have added tests to cover my changes. diff --git a/INSTALL b/INSTALL index bde991bbd8..eca9cb47f3 100644 --- a/INSTALL +++ b/INSTALL @@ -1,28 +1,101 @@ -Building: -========= +Install KeePassXR +================= + +This document will guide you across the steps to install KeePassXR. +You can visit the online version of this document a the following link + +https://github.com/keepassxreboot/keepassx/wiki/Install-Instruction-from-Source + + +Build Dependencies +================== + +The following tools must exist within your PATH: + +* make +* cmake (>= 2.8.12) +* g++ (>= 4.7) or clang++ (>= 3.0) + +The following libraries are required: + +* Qt 5 (>= 5.2): qtbase and qttools5 +* libgcrypt (>= 1.6) +* zlib +* libmicrohttpd +* libxi, libxtst, qtx11extras (optional for auto-type on X11) + + +Prepare the Building Environment +================================ + +Building Environment on Linux ==> https://github.com/keepassxreboot/keepassx/wiki/Building-Environment-on-Linux +Building Environment on Windows ==> https://github.com/keepassxreboot/keepassx/wiki/Building-Environment-on-Windows +Building Environment on MacOS ==> https://github.com/keepassxreboot/keepassx/wiki/Building-Environment-on-MacOS + + +Build Steps +=========== + +To compile from source, open a **Terminal (on Linux/MacOS)** or a **MSYS2-MinGW shell (on Windows)**
+**Note:** on Windows make sure you are using a **MINGW shell** by checking the label before the current path + +Navigate to the path you have downloaded KeePassXR and type these commands: + +``` mkdir build cd build -cmake [CMAKE PARAMETERS] .. -make [-jX] +cmake -DWITH_TESTS=OFF +make +``` + +**Note:** If you are on MacOS you must add this parameter to **Cmake**, with the Qt version you have installed
`-DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.6.2/lib/cmake/` -Common cmake parameters: -======================== +You will have the compiled KeePassXR binary inside the `./build/src/` directory. + +Common cmake parameters +``` -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE= -DWITH_GUI_TESTS=ON +``` -Installing: -=========== -make install [DESTDIR=X] -Create a bundle on Mac: +Installation +============ + +To install this binary execute the following: + +```bash +sudo make install +``` + +You can specify the destination dir with +``` +DESTDIR=X +``` + + +Packaging +========= + +You can create a package to redistribute KeePassXR (zip, deb, rpm, dmg, etc..) +``` make package +``` + + +Testing +======= -Run tests: -========== -make test [CTEST_OUTPUT_ON_FAILURE=1] [ARGS+=-jX] [ARGS+="-E testgui"] +You can perform test on the executable +``` +make test +``` -OS specific instructions: -========================= -https://www.keepassx.org/dev/projects/keepassx/wiki/Install_instructions +Common parameters: +``` +CTEST_OUTPUT_ON_FAILURE=1 +ARGS+=-jX +ARGS+="-E testgui" +``` diff --git a/README.md b/README.md index eeda655efe..fee85865ac 100644 --- a/README.md +++ b/README.md @@ -15,54 +15,24 @@ KeePassHttp implementation has been forked from jdachtera's repository, which in This is a rebuild from [denk-mal's keepasshttp](https://github.com/denk-mal/keepassx.git) that brings it forward to Qt5 and KeePassX v2.x. -#### Build Dependencies +### Installation -The following tools must exist within your PATH: +Right now KeePassXR does not have a precompiled executable or an installation package.
+So you must install it from its source code. -* make -* cmake (>= 2.8.12) -* g++ (>= 4.7) or clang++ (>= 3.0) +**More detailed instructions are available in the INSTALL file or at the [Wiki page](https://github.com/keepassxreboot/keepassx/wiki/Install-Instruction-from-Source).** -The following libraries are required: +First you must download the KeePassXR source code as ZIP file or with Git. -* Qt 5 (>= 5.2): qtbase and qttools5 -* libgcrypt (>= 1.6) -* zlib -* libmicrohttpd -* libxi, libxtst, qtx11extras (optional for auto-type on X11) - -On Debian/Ubuntu you can install them with: - -```bash -sudo apt-get install build-essential cmake libmicrohttpd-dev libxi-dev libxtst-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev +Generally you can build and install KeePassXR with the following commands from a Terminal in the KeePassXR folder ``` - -On Fedora/RHEL/CentOS you can install them with: - -```bash -sudo dnf install make automake gcc gcc-c++ cmake libmicrohttpd-devel libXi-devel libXtst-devel qt5-qtbase-devel qt5-qtx11extras qt5-qttools libgcrypt-devel zlib-devel -``` - -#### Build Steps - -To compile from source: - -```bash mkdir build cd build -cmake -DWITH_TESTS=OFF .. -make [-jX] -``` - -You will have the compiled KeePassX binary inside the `./build/src/` directory. - -To install this binary execute the following: - -```bash +cmake -DWITH_TESTS=OFF +make sudo make install ``` -More detailed instructions available in the INSTALL file. ### Clone Repository @@ -80,10 +50,10 @@ To update the project from within the project's folder you can run the following git pull ``` + ### Contributing We're always looking for suggestions to improve our application. If you have a suggestion for improving an existing feature, or would like to suggest a completely new feature for KeePassX Reboot, please use the [Issues](https://github.com/keepassxreboot/keepassx/issues) section or our [Google Groups](https://groups.google.com/forum/#!forum/keepassx-reboot) forum. Please review the [CONTRIBUTING](.github/CONTRIBUTING.md) document for further information. -