Patches are welcome in whatever form. However, you must agree that your code will be provided by MIT License.
You can contribute to the homepage by sending pull-request to the gh-pages
branch if there is an error or a better way to describe the content. Jekyll is used as the framework, and can be written in markdown format. We also use Just the Docs as a theme, which allows extended expressions.
You can contribute to development by sending pull requests to the master
branch to fix or add features, add test cases, modify typos and expressions, improve security. When adding new code, please consider adding test cases in the test directory to satisfy branch coverage. Codacy and Travis and Actions run by pushing, and Coverity checks programmatic resources at releasing as Continuous Integration. If you want to discuss development, please create a thread in Discussion with #Development category.
If you have already installed MinGW-w64 or Visual Studio 2019, all you need is the next steps.
$ ./tools/setup_libs.bat [-mingw/-msvc] [32/64] [-update (optional)]
$ ./build.bat [-debug/-release] [-mingw/-msvc] [32/64]
$ ./debug/win-vind.exe
$ cmake -B build -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" -A x64 -DBIT_TYPE=64 .
$ cmake --build build --config Debug
$ ./debug/Debug/win-vind.exe
$ cmake -B debug -DCMAKE_BUILD_TYPE=Debug -G "MinGW Makefiles" -DBIT_TYPE=64 .
$ cmake --build debug --config Debug
$ ./debug/win-vind.exe
$ ./build.bat -test
$ cmake -B test/build -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" test
$ cmake --build test/build
$ cd test/build ; ctest -C Debug ; cd ../..
$ cmake -B test/build -DCMAKE_BUILD_TYPE=Debug -G "MinGW Makefiles" test
$ cmake --build test/build
$ cd test/build ; ctest -C Debug ; cd ../..
You can refer to ToDo at Projects/win-vind and its architecture at devdocs.
I recommend to install follow softwares or libraries.
Name | Recommended Version | Download Link |
---|---|---|
MinGW-w64 | GCC-8.1.0-x86_64-posix-seh | MinGW-w64 SourceForge.net |
CMake | 3.14.4 | Download - CMake |
wxWidgets | 3.1.5 | Downloads - wxWidgets |
NSIS | 3.06.1 | Download - NSIS |
Windows10 SDK | 10.0.19041.0 | Microsoft Windows10 SDK - Windows app development |
This project use <mutex>, so some MinGW without it will fail a build. In this case, you will need to install other MinGW with . (select posix at item called Thread in MinGW-Installer.)
Name | What is | Purpose | License |
---|---|---|---|
wxWidgets | GUI framework | Create GUI for the system tray or popups. | modified LGPL |
nlohmann-json | JSON parser | Parse json style settings | MIT License |
maddy | Markdown to HTML parser | Display the release note via Check Update | MIT License |
doctest | Unit test framework | For basic unit test | MIT License |
fff | Macro-based fake function framework | To mock Windows API | MIT License |
Please read its architecture at devdocs.
All binded functions of win-vind derive from BindedFunc. However, these are based on polymorphism, so recommends to derive from BindedFuncCreator to have a factory function.
- Make a source file and a header file into core/include/bind/dev/ and core/src/bind/dev/.
- Add a path of source file into core/CMakeLists.txt.
- Define a new derived class (e.g. MyBinding).
mybinding.hpp
#ifndef MY_BINDING_HPP
#define MY_BINDING_HPP
#include "bind/base/binded_func_creator.hpp"
namespace vind
{
struct MyBinding : public BindedFuncCreator<MyBinding> {
explicit MyBinding() ;
static void sprocess() ;
static void sprocess(NTypeLogger& parent_lgr) ;
static void sprocess(const CharLogger& parent_lgr) ;
} ;
}
#endif
mybinding.cpp
#include "bind/dev/mybindings.hpp"
#include "bind/base/ntype_logger.hpp"
#include "io/keybrd.hpp"
#include "io/mouse.hpp"
#include "opt/virtual_cmd_line.hpp"
#include "util/def.hpp"
namespace vind
{
MyBinding::MyBinding()
: BindedFuncCreator("my_binding") //Give the unique identifier.
{}
// A one-shot function to call inside win-vind
void MyBinding::sprocess() {
mouse::click(KEYCODE_MOUSE_LEFT) ; //left click
keybrd::pushup(KEYCODE_LWIN, KEYCODE_D) ; //minimize all window
VirtualCmdLine::msgout("Hello World !") ;
}
// A function called by sequence commands such as `23gg`
void MyBinding::sprocess(NTypeLogger& parent_lgr) {
if(!parent_lgr.is_long_pressing()) {
sprocess() ;
}
}
// A function called by the command line style commands like `:sample`
void MyBinding::sprocess(const CharLogger& UNUSED(parent_lgr)) {
sprocess() ;
}
}
- Please register the class into core/src/bindings_lists.cpp.
MyBinding::create(),
- Assign commands to MyBinding in default_config/bindings.json.
{
"name": "my_binding",
"cdef": ["sample"],
"endef": [],
"evdef": [],
"gndef": [],
"gvdef": [],
"idef": [],
"rdef": [],
"en": "Sample",
"ja": "Sample"
},