Sourcetrail is a free and open-source cross-platform source explorer that helps you get productive on unfamiliar source code.
Links
Sourcetrail is:
- free
- working offline
- operating on Windows,
macOSand Linux - supporting C/C++
offering an SDK (SourcetrailDB) to write custom language extensions
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:
Use the Chocolatey package withchoco install sourcetrail
After your installation is complete, follow our Quick Start Guide to get to know Sourcetrail.
You can post all your feature requests and bug reports on our issue tracker.
Use the following template:
- platform version:
- Sourcetrail version:
- description of the problem:
- steps to reproduce the problem:
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
- Please read and follow the steps in CONTRIBUTING.md file.
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.
-
CMake v3.20 (required for Windows, Linux and MacOS)
- Reason: Used to generate a build configuration for your build system
- Download: https://cmake.org/download
-
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 yourPATH
environment variable before running CMake
-
Visual Studio (required for Windows)
- Reason: Used for building Sourcetrail
- Download: https://visualstudio.microsoft.com/downloads/
-
ccache (optional for Linux and MacOS)
- Reason: Used to speed up rebuilds if found in
PATH
- Download: https://ccache.dev/download.html
- Reason: Used to speed up rebuilds if found in
-
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
- Reason: Used for rendering the GUI and for starting additional (indexer) processes.
- Prebuilt Download: http://download.qt.io/official_releases/qt/
- 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
- 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
- Run Sourcetrail from within the build directory. During execution Sourcetrail needs resources from
bin/app/data
andbin/app/user
. CMake creates symlinks within the build directory that make these directories accessible.
- 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
.
- 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.
The automated test suite of Sourcetrail is powered by GTest. To run the tests, simply execute the ctest
.
A special thanks for jetbrain for providing a license for clion.
Sourcetrail is licensed under the GNU General Public License Version 3.
The "Sourcetrail" name is a trademark owned by Coati Software and is not included within the assets licensed under the GNU GPLv3.