Currently pre-built binaries for the following platforms are provided:
- Ubuntu 24.04 (64-bit)
- macOS 14.7
- Windows Server 2022 (x64)
GTK+3 needs to be installed for these binaries to work.
On Windows, the MSYS2 is the recommended way to install GTK+3. In MSYS2 MINGW64 shell:
pacman -S $MINGW_PACKAGE_PREFIX-gtk3
then you can run the threadscope binary from the shell.
Use git clone
or cabal get threadscope
to get the source and move into the threadscope directory.
The code for the Github Actions is a good guide for building from source.
GTK+3 is required to be installed. On Ubuntu-like systems:
sudo apt install libgtk-3-dev
Then you can build threadscope using cabal:
cabal v2-build # to only build the project, or
cabal v2-install # to build and install the binary
Or using stack:
stack build # to only build the project, or
stack install # to build and install the binary
GTK+ is required:
brew install cairo gtk+3 pkg-config
Then you can build threadscope using cabal:
cabal --project-file=cabal.project.osx v2-build # to only build the project, or
cabal --project-file=cabal.project.osx v2-install # to build and install the binary
Or using stack:
stack --stack-yaml=stack.osx.yaml build # to only build the project, or
stack --stack-yaml=stack.osx.yaml install # to install the binary
Caution
The Windows instructions may be out of date. Contributions to update them would be welcome.
Chocolatey can be used to install GHC and MSYS2 is the recommended way to install GTK+.
choco install ghc
refreshenv
set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%
pacman -Sy mingw-w64-x86_64-gtk3
then you can build threadscope using cabal:
cabal v2-build
Or you can use stack instead.
CAVEAT: gtk3 needs to be installed twice: one for stack's MSYS2 environment and another for local MSYS2 environment.
In command prompt:
stack setup
stack exec -- pacman --needed -Sy bash pacman pacman-mirrors msys2-runtime msys2-runtime-devel
stack exec -- pacman -Syu
stack exec -- pacman -Syuu
stack exec -- pacman -S base-devel mingw-w64-x86_64-pkg-config mingw-w64-x86_64-toolchain mingw-w64-x86_64-gtk3
stack install
Then in MSYS2 MINGW64 shell:
pacman -S $MINGW_PACKAGE_PREFIX-gtk3
echo 'export PATH=$APPDATA/local/bin:$PATH' >> .profile
source .profile
threadscope
Building using stack is not tested in CI. If you find any issues with building with stack, please update the instructions and send a PR.