stofte / gitbumr

Git client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitbumr Build status

Qt based Git client using a rust backend. WIP.

Log view

Development

Following are requirements to build the repository locally.

The project has a QtCreator project, which doubles as a project file and a makefile for qmake.

Rust+Qt bindings

The project uses rust-qt-binding-generator to generate both a rust interface and a C++ interface for use by Qt. Since generating bindings happens only when the interface changes, it's a manual build step. Generated bindings are checked into sourcecontrol so the generator is not required when just building.

To use the generator check out the project and build a release executable cargo build --release, then add the executable to your path for convinience. Run rust_qt_binding_generator binding.json in the lib project folder to regenerate the binding code.

Windows requirements

Visual Studio 2017 and Native SDK (check it in the VS installer). Windows CLI build steps can be found in the appveyor.yml build spec.

Ubuntu requirements

Tested on Ubuntu 18.04.2 LTS from Windows, using PuTTY/VcXsrv

  • Get rust installed: curl https://sh.rustup.rs -sSf | sh and then set the path source $HOME/.cargo/env (or restarting the shell should also work)
  • Qt installer and/or Rust requires these packages installed libgl1-mesa-glx libx11-xcb1 libxkbcommon-x11-dev libfontconfig build-essential libxrender1 libssl-dev pkg-config libgl1-mesa-dev
  • Download Qt installer: wget http://mirrors.dotsrc.org/qtproject/archive/qt/5.12/5.12.1/qt-opensource-linux-x64-5.12.1.run
  • Mark installer as runnable chmod +x qt-opensource-linux-x64-5.12.1.run
  • Install ./qt-opensource-linux-x64-5.12.1.run
  • Ensure Tools > QtCreator and Qt > Desktop gcc 64-bit are selected

Be sure to run VcXsrv in the right configuration and remember to set/export LIBGL_ALWAYS_INDIRECT=1 in the shell. If using PuTTY, also remember to check "Enable X11 forwarding" under Connection > SSH > X11, and instead of setting the DISPLAY env variable in the shell, enter :0 in the "X display location" field.

Environment variables

Running the tests requires environment variables set.

  • TST_GIT_PATH path to a git repository used for tests.
  • QML2_IMPORT_PATH is used by Qt when looking for QML plugins. If the repository is checked out at C:\src\gitbumr and shadowbuild has been configured inside the repository, set the following path: QML2_IMPORT_PATH=C:\src\gitbumr\build-gitbumr-Desktop_Qt_5_12_1_MSVC2017_64bit-Release\lib\release

QtCreator must have QML2_IMPORT_PATH set to run the application, as the plugin cannot be loaded in the IDE environment otherwise. Set env variables via Projects > Build Environment.

Other notes

  • app/res/gitbumr.rc should be windows-1252 encoded
  • itemProperties in binding.json should be sorted alphabetically to avoid confusion since rust_qt_binding_generator sorts these when generating the user role index used to access the values in QML.

QtCreator has some gotchas:

  • After editing the project files, manually run qmake by right-clicking the top node in Projects pane
  • When adding qml components, Use Tools -> QML/JS -> Reset Code Model, to fix IDE errors
  • Qt+Win+OpenGL is host to a multitude of weird issues and crashes

About

Git client

License:MIT License


Languages

Language:C++ 38.6%Language:Rust 30.8%Language:QML 27.7%Language:QMake 1.7%Language:Python 0.8%Language:JavaScript 0.4%