GithubHelp home page GithubHelp logo

stofte / gitbumr Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 445 KB

Git client

License: MIT License

Rust 30.79% C++ 38.58% QML 27.73% QMake 1.66% JavaScript 0.43% Python 0.81%
rust-lang git libgit2 qt5 qml cross-platform-desktop

gitbumr's Introduction

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

gitbumr's People

Contributors

stofte avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.