yorange1 / Sourcetrail

Sourcetrail - free and open-source interactive source explorer

Home Page:https://opensourcesourcetrail.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sourcetrail

Sourcetrail is a free and open-source cross-platform source explorer that helps you get productive on unfamiliar source code.

Build

Links

"Sourcetrail User Interface"

Sourcetrail is:

  • free
  • working offline
  • operating on Windows, macOS and Linux
  • supporting C/C++
  • offering an SDK (SourcetrailDB) to write custom language extensions

Using Sourcetrail

To setup Sourcetrail on your machine, you can either download the respective build for your operating system from our list of Releases and install it on your machine, or use one of the following package managers:

After your installation is complete, follow our Quick Start Guide to get to know Sourcetrail.

How to Report Issues

You can post all your feature requests and bug reports on our issue tracker.

Reporting

Use the following template:

  • platform version:
  • Sourcetrail version:
  • description of the problem:
  • steps to reproduce the problem:

Supporting

If you want to support a certain feature request or you have the same bug that another user already reported, please let us know:

  • post a comment with "+1" to the issue

How to Contribute

How to Build

Building Sourcetrail requires several dependencies to be in place on your machine. However, our CMake based setup allows to disable indexing support for specific languages which reduces the number of dependencies to a minimum.

Building the Base Application

Required Tools

  • CMake v3.20 (required for Windows, Linux and MacOS)

  • Git (required for Windows, Linux and MacOS)

    • Reason: Used for version control and to automatically generate the Sourcetrail version number from commits and tags
    • Download: https://git-scm.com/download
    • Remarks: Make sure git is added to your PATH environment variable before running CMake
  • Visual Studio (required for Windows)

  • ccache (optional for Linux and MacOS)

Required dependencies

  • Boost 1.74

    • Reason: Used for file system access and interprocess communication
    • Prebuilt Download for Windows: https://sourceforge.net/projects/boost/files/boost-binaries/
    • Building for Unix:
      $ ./bootstrap.sh --with-libraries=filesystem,program_options,system,date_time
      $ ./b2 --link=static --variant=release --threading=multi --runtime-link=static --cxxflags=-fPIC
      
  • Qt 5.15

Building

On Windows Faced some problems with Conan2 and Windows

  • To set up your build environment run:
    $ pip install conan
    $ git clone --recurse-submodules https://github.com/OpenSourceSourceTrail/Sourcetrail.git
    $ cd Sourcetrail
    $ conan install . -s build_type=Release -of .conan/vc/ -b missing
    $ cmake --preset=vc_release
    $ cd ../build/Release/
    $ ninja
    

On Unix

  • To set up your build environment run:
    $ pip install conan
    $ git clone  --recurse-submodules https://github.com/OpenSourceSourceTrail/Sourcetrail.git
    $ cd Sourcetrail
    $ conan install . -s build_type=Release -of .conan/gcc/ -b missing -pr:a .conan/gcc/profile
    $ cmake --preset=gnu_release
    $ cd ../build/Release/GNU
    $ ninja
    

Running

  • Run Sourcetrail from within the build directory. During execution Sourcetrail needs resources from bin/app/data and bin/app/user. CMake creates symlinks within the build directory that make these directories accessible.

Enable C/C++ Language Support

Required dependencies

  • LLVM/Clang 15.0.7
    • Reason: Used for running the preprocessor on the indexed source code, building and traversing an Abstract Syntax Tree and generating error messages.
    • Building: Make sure to check out the correct tag: git checkout llvmorg-15.0.7
    • Building for Windows: Follow these steps to build the project. Run the cmake command exactly as described. Make sure to build with -DLLVM_ENABLE_PROJECTS:STRING=clang -DLLVM_ENABLE_RTTI:BOOL=ON -DLLVM_TARGETS_TO_BUILD=host.
    • Building for Unix: Follow this installation guide to build the project. Make sure to build with -DLLVM_ENABLE_PROJECTS:STRING=clang -DLLVM_ENABLE_RTTI:BOOL=ON -DCLANG_LINK_CLANG_DYLIB:BOOL=ON -DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DLLVM_TARGETS_TO_BUILD=host.

Building

  • Run CMake with these additional options:
    -DClang_DIR=<path/to/llvm_build>/lib/cmake/clang
    -DBUILD_CXX_LANGUAGE_PACKAGE=ON
    
  • Build Sourcetrail as described above.

How to Run the Tests

The automated test suite of Sourcetrail is powered by GTest. To run the tests, simply execute the ctest.

Special thanks

A special thanks for jetbrain for providing a license for clion.

Jetbrains

License

Sourcetrail is licensed under the GNU General Public License Version 3.

Trademark

The "Sourcetrail" name is a trademark owned by Coati Software and is not included within the assets licensed under the GNU GPLv3.

About

Sourcetrail - free and open-source interactive source explorer

https://opensourcesourcetrail.github.io

License:GNU General Public License v3.0


Languages

Language:C++ 97.2%Language:CMake 2.5%Language:C 0.2%Language:Shell 0.1%Language:Dockerfile 0.0%Language:Python 0.0%