Skip to content

Commit ad0a5de

Browse files
authored
DebugGUI: add support for tracy (#2344)
1 parent 9188f16 commit ad0a5de

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

capstone.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package: capstone
2+
version: "4.0.2"
3+
requires:
4+
- "GCC-Toolchain:(?!osx)"
5+
build_requires:
6+
- CMake
7+
- alibuild-recipe-tools
8+
source: https://github.com/aquynh/capstone
9+
---
10+
cmake $SOURCEDIR \
11+
-DCAPSTONE_ARCHITECUTRE_DEFAULT=OFF \
12+
-DCAPSTONE_BUILD_SHARED=OFF \
13+
-DCMAKE_INSTALL_LIBDIR=lib \
14+
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT
15+
16+
cmake --build . -- ${JOBS+-j $JOBS} install
17+
18+
#ModuleFile
19+
mkdir -p etc/modulefiles
20+
alibuild-generate-module > etc/modulefiles/$PKGNAME
21+
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles

debuggui.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
package: DebugGUI
2-
version: "v0.1.0-%(short_hash)s"
3-
tag: 34bc77ae9c3ba58a1b6dc684e80fc9187782fd2b
2+
version: "v0.2.0"
3+
tag: f3d259727ffbe7426031dd99fd4742003eb3e6b5
44
requires:
55
- "GCC-Toolchain:(?!osx)"
66
- GLFW
7+
- FreeType
78
- libuv
89
build_requires:
10+
- capstone
911
- CMake
1012
- alibuild-recipe-tools
1113
source: https://github.com/AliceO2Group/DebugGUI
1214
---
15+
1316
case $ARCHITECTURE in
1417
osx*)
1518
[[ ! $GLFW_ROOT ]] && GLFW_ROOT=`brew --prefix glfw`
1619
[[ ! $LIBUV_ROOT ]] && LIBUV_ROOT=`brew --prefix libuv`
20+
[[ ! $FREETYPE_ROOT ]] && FREETYPE_ROOT=`brew --prefix freetype`
21+
EXTRA_LIBS="-framework CoreFoundation -framework AppKit"
22+
;;
23+
*)
24+
DEFINES="-DTRACY_NO_FILESELECTOR"
25+
EXTRA_LIBS="-lGL"
1726
;;
1827
esac
1928

@@ -26,6 +35,19 @@ if [[ ! $CMAKE_GENERATOR && $DISABLE_NINJA != 1 && $DEVEL_SOURCES != $SOURCEDIR
2635
unset NINJA_BIN
2736
fi
2837

38+
# build the tracy profiler
39+
rsync -av $SOURCEDIR/tracy/ tracy/
40+
pushd tracy/profiler/build/unix
41+
make \
42+
LIBS="-L$CAPSTONE_ROOT/lib -L$GLFW_ROOT/lib -L$FREETYPE_ROOT/lib -lglfw -lfreetype -lcapstone -lpthread -ldl $EXTRA_LIBS" \
43+
DEFINES="$DEFINES" \
44+
INCLUDES="-I$CAPSTONE_ROOT/include -I$SOURCEDIR/tracy/imgui -I$SOURCEDIR/tracy -I$SOURCEDIR/tracy/profiler/libs/gl3w -I$FREETYPE_ROOT/include/freetype2 -I$GLFW_ROOT/include"
45+
popd
46+
mkdir -p $INSTALLROOT/{include/tracy,bin}
47+
cp tracy/profiler/build/unix/Tracy-debug $INSTALLROOT/bin/tracy-profiler
48+
cp tracy/*.{h,hpp,cpp} $INSTALLROOT/include/tracy
49+
cp -r tracy/{common,client,libbacktrace} $INSTALLROOT/include/tracy/
50+
2951
cmake $SOURCEDIR \
3052
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT \
3153
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON

0 commit comments

Comments
 (0)