diff --git a/.github/workflows/scripts/linux/build-gammaray.sh b/.github/workflows/scripts/linux/build-gammaray.sh new file mode 100755 index 0000000000..7bbca4d23b --- /dev/null +++ b/.github/workflows/scripts/linux/build-gammaray.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +set -e + +if [ "$#" -ne 2 ]; then + echo "Syntax: $0 " + exit 1 +fi + +DEPSDIR=$(realpath "$1") +INSTALLDIR=$(realpath "$2") + +if [ ! -d "$DEPSDIR/include/QtCore" ]; then + echo "Error: The build-dependencies-qt.sh script must be run on the deps directory first." + exit 1 +fi + +GAMMARAY=master + +mkdir -p gammaray-build +cd gammaray-build + +echo "Downloading..." +curl -L -o "GammaRay-$GAMMARAY.tar.gz" https://github.com/KDAB/GammaRay/archive/$GAMMARAY.tar.gz + +rm -fr "GammaRay-$GAMMARAY" + +echo "Extracting..." +tar xf "GammaRay-$GAMMARAY.tar.gz" + +cd "GammaRay-$GAMMARAY" +mkdir build +cd build + +echo "Configuring..." +cmake -DCMAKE_PREFIX_PATH="$DEPSDIR" -G Ninja -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DGAMMARAY_BUILD_DOCS=false .. + +echo "Building..." +cmake --build . --parallel + +echo "Installing..." +cmake --build . --target install + +cd ../.. + +echo "Cleaning up..." +cd .. +rm -r gammaray-build diff --git a/.github/workflows/scripts/windows/build-gammaray.bat b/.github/workflows/scripts/windows/build-gammaray.bat new file mode 100644 index 0000000000..b9ca312f29 --- /dev/null +++ b/.github/workflows/scripts/windows/build-gammaray.bat @@ -0,0 +1,68 @@ +@echo off +setlocal enabledelayedexpansion + +echo Setting environment... +if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" ( + call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" +) else if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" ( + call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" +) else ( + echo Visual Studio 2022 not found. + goto error +) + +pushd %~dp0 + +cd ..\..\..\.. +cd deps || goto error +set "DEPSDIR=%CD%" +cd .. +mkdir gammaray +cd gammaray || goto error +set "INSTALLDIR=%CD%" +cd .. +mkdir gammaray-build +cd gammaray-build || goto error +set "BUILDDIR=%CD%" + +echo DEPSDIR=%DEPSDIR% +echo BUILDDIR=%BUILDDIR% +echo INSTALLDIR=%INSTALLDIR% + +set GAMMARAY="master" + +echo Downloading... +curl -L -o "GammaRay-%GAMMARAY%.tar.gz" "https://github.com/KDAB/GammaRay/archive/%GAMMARAY%.tar.gz" || goto error + +rmdir /s /q "GammaRay-%GAMMARAY%" + +echo Extracting... +tar -xf "GammaRay-%GAMMARAY%.tar.gz" || goto error + +echo Configuring... +cmake "GammaRay-%GAMMARAY%" -B build -DCMAKE_PREFIX_PATH="%DEPSDIR%" -G Ninja -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DGAMMARAY_BUILD_DOCS=false || goto error + +echo Building... +cmake --build build --parallel || goto error + +echo Installing... +cmake --build build --target install || goto errorlevel + +echo Copying DLLs... +xcopy /y "%DEPSDIR%\bin\*.dll" "%INSTALLDIR%\bin\" +xcopy /y /e /s "%DEPSDIR%\plugins" "%INSTALLDIR%\bin\" + +echo Cleaning up... +cd .. +rd /s /q gammaray-build + +echo Exiting with success. +popd +pause +exit 0 + +:error +echo Failed with error #%errorlevel%. +popd +pause +exit %errorlevel% diff --git a/.gitignore b/.gitignore index b59e873da7..9305218258 100644 --- a/.gitignore +++ b/.gitignore @@ -109,6 +109,8 @@ oprofile_data/ /deps-build /deps /deps-arm64 +/gammaray-build +/gammaray /ipch !/3rdparty/libjpeg/change.log