From 9994ef8f8a4eb09c8f987994af9f215ad594da9d Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 17 Mar 2017 08:51:40 +0300 Subject: [PATCH 01/17] vogleditor: fix a -Wformat-security violation --- src/vogleditor/vogleditor_qapicalltreemodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vogleditor/vogleditor_qapicalltreemodel.cpp b/src/vogleditor/vogleditor_qapicalltreemodel.cpp index 41bfdfa2..1177e850 100644 --- a/src/vogleditor/vogleditor_qapicalltreemodel.cpp +++ b/src/vogleditor/vogleditor_qapicalltreemodel.cpp @@ -348,7 +348,7 @@ bool vogleditor_QApiCallTreeModel::init(vogl_trace_file_reader *pTrace_reader) { QString msg(QString("*** Information: unpaired \"") + QString(g_vogl_entrypoint_descs[entrypoint_id].m_pName) + QString("\".")); vogleditor_output_message(msg.toStdString().c_str()); - vogl_printf(msg.toStdString().c_str()); + vogl_printf("%s", msg.toStdString().c_str()); vogl_printf("\n"); } } @@ -387,7 +387,7 @@ bool vogleditor_QApiCallTreeModel::init(vogl_trace_file_reader *pTrace_reader) { QString msg(QString("*** Information: unpaired \"") + QString(g_vogl_entrypoint_descs[entrypoint_id].m_pName) + QString("\".")); vogleditor_output_message(msg.toStdString().c_str()); - vogl_printf(msg.toStdString().c_str()); + vogl_printf("%s", msg.toStdString().c_str()); vogl_printf("\n"); } } From 75e21b40700a2b51f8c458f19360f5ef6404aea2 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 17 Mar 2017 09:02:20 +0300 Subject: [PATCH 02/17] git: a slightly better ignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 79aae119..f11d312c 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,9 @@ vogl_build/* voglinc/ *~ *.swp +\#* +.\#* +*.a +*.bin _out*/ From 1ce6c33ec1c7e76b0253422443abec729b4f6167 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 17 Mar 2017 21:44:18 +0300 Subject: [PATCH 03/17] cmake: add an install spec --- CMakeLists.txt | 1 - src/voglbench/CMakeLists.txt | 7 +++++++ src/voglcmd/CMakeLists.txt | 6 ++++++ src/vogleditor/CMakeLists.txt | 7 +++++++ src/voglgen/CMakeLists.txt | 6 ++++++ src/voglreplay/CMakeLists.txt | 6 ++++++ src/voglserver/CMakeLists.txt | 6 ++++++ src/vogltest/CMakeLists.txt | 6 ++++++ src/vogltrace/CMakeLists.txt | 6 ++++++ 9 files changed, 50 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db87754e..b6433518 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,4 +52,3 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") add_subdirectory(src/libbacktrace) # 10 add_subdirectory(src/libbacktrace_test) # 11 endif() - diff --git a/src/voglbench/CMakeLists.txt b/src/voglbench/CMakeLists.txt index e7d98a9e..80199d7f 100644 --- a/src/voglbench/CMakeLists.txt +++ b/src/voglbench/CMakeLists.txt @@ -41,3 +41,10 @@ target_link_libraries(${PROJECT_NAME} ) build_options_finalize() + +# +# Installation +# +install(TARGETS voglbench + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/voglcmd/CMakeLists.txt b/src/voglcmd/CMakeLists.txt index c612b05e..1544fbf2 100644 --- a/src/voglcmd/CMakeLists.txt +++ b/src/voglcmd/CMakeLists.txt @@ -38,3 +38,9 @@ target_link_libraries(${PROJECT_NAME} build_options_finalize() +# +# Installation +# +install(TARGETS voglcmd + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/vogleditor/CMakeLists.txt b/src/vogleditor/CMakeLists.txt index 60bf484f..282ba5fa 100644 --- a/src/vogleditor/CMakeLists.txt +++ b/src/vogleditor/CMakeLists.txt @@ -229,3 +229,10 @@ if (MSVC) endif() build_options_finalize() + +# +# Installation +# +install(TARGETS vogleditor + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/voglgen/CMakeLists.txt b/src/voglgen/CMakeLists.txt index e57d566f..00aa39c5 100644 --- a/src/voglgen/CMakeLists.txt +++ b/src/voglgen/CMakeLists.txt @@ -170,3 +170,9 @@ endif() build_options_finalize() +# +# Installation +# +install(TARGETS voglgen + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/voglreplay/CMakeLists.txt b/src/voglreplay/CMakeLists.txt index a42d1dc3..d2421935 100644 --- a/src/voglreplay/CMakeLists.txt +++ b/src/voglreplay/CMakeLists.txt @@ -54,3 +54,9 @@ target_link_libraries(${PROJECT_NAME} build_options_finalize() +# +# Installation +# +install(TARGETS vogl + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/voglserver/CMakeLists.txt b/src/voglserver/CMakeLists.txt index aeed3794..3ded3164 100644 --- a/src/voglserver/CMakeLists.txt +++ b/src/voglserver/CMakeLists.txt @@ -34,3 +34,9 @@ target_link_libraries(${PROJECT_NAME} build_options_finalize() +# +# Installation +# +install(TARGETS voglserver + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/vogltest/CMakeLists.txt b/src/vogltest/CMakeLists.txt index e71deed7..6b1fbdf3 100644 --- a/src/vogltest/CMakeLists.txt +++ b/src/vogltest/CMakeLists.txt @@ -62,3 +62,9 @@ target_link_libraries(${PROJECT_NAME} build_options_finalize() +# +# Installation +# +install(TARGETS vogltest + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/vogltrace/CMakeLists.txt b/src/vogltrace/CMakeLists.txt index d1cb5e01..f5473b11 100644 --- a/src/vogltrace/CMakeLists.txt +++ b/src/vogltrace/CMakeLists.txt @@ -116,3 +116,9 @@ endif() build_options_finalize() +# +# Installation +# +install(TARGETS vogltrace + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) From 3bd5868c4e94a900353c73f6e7bb3d3c875db289 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Sat, 18 Mar 2017 00:18:03 +0300 Subject: [PATCH 04/17] cmake defs: more uniformity and completeness --- src/glxspheres/CMakeLists.txt | 6 ++++++ src/ktxtool/CMakeLists.txt | 6 ++++++ src/voglbench/CMakeLists.txt | 2 +- src/voglcmd/CMakeLists.txt | 2 +- src/vogleditor/CMakeLists.txt | 2 +- src/voglgen/CMakeLists.txt | 2 +- src/voglreplay/CMakeLists.txt | 2 +- src/voglserver/CMakeLists.txt | 2 +- src/vogltest/CMakeLists.txt | 2 +- src/vogltrace/CMakeLists.txt | 2 +- 10 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/glxspheres/CMakeLists.txt b/src/glxspheres/CMakeLists.txt index 03c07893..1e078c17 100644 --- a/src/glxspheres/CMakeLists.txt +++ b/src/glxspheres/CMakeLists.txt @@ -41,3 +41,9 @@ target_link_libraries(${PROJECT_NAME} build_options_finalize() +# +# Installation +# +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/ktxtool/CMakeLists.txt b/src/ktxtool/CMakeLists.txt index 38e148e0..682a4df2 100644 --- a/src/ktxtool/CMakeLists.txt +++ b/src/ktxtool/CMakeLists.txt @@ -36,3 +36,9 @@ target_link_libraries(${PROJECT_NAME} build_options_finalize() +# +# Installation +# +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) diff --git a/src/voglbench/CMakeLists.txt b/src/voglbench/CMakeLists.txt index 80199d7f..fe6c58fd 100644 --- a/src/voglbench/CMakeLists.txt +++ b/src/voglbench/CMakeLists.txt @@ -45,6 +45,6 @@ build_options_finalize() # # Installation # -install(TARGETS voglbench +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/voglcmd/CMakeLists.txt b/src/voglcmd/CMakeLists.txt index 1544fbf2..feb63f77 100644 --- a/src/voglcmd/CMakeLists.txt +++ b/src/voglcmd/CMakeLists.txt @@ -41,6 +41,6 @@ build_options_finalize() # # Installation # -install(TARGETS voglcmd +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/vogleditor/CMakeLists.txt b/src/vogleditor/CMakeLists.txt index 282ba5fa..df84d880 100644 --- a/src/vogleditor/CMakeLists.txt +++ b/src/vogleditor/CMakeLists.txt @@ -233,6 +233,6 @@ build_options_finalize() # # Installation # -install(TARGETS vogleditor +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/voglgen/CMakeLists.txt b/src/voglgen/CMakeLists.txt index 00aa39c5..9c83c60f 100644 --- a/src/voglgen/CMakeLists.txt +++ b/src/voglgen/CMakeLists.txt @@ -173,6 +173,6 @@ build_options_finalize() # # Installation # -install(TARGETS voglgen +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/voglreplay/CMakeLists.txt b/src/voglreplay/CMakeLists.txt index d2421935..a6aceb60 100644 --- a/src/voglreplay/CMakeLists.txt +++ b/src/voglreplay/CMakeLists.txt @@ -57,6 +57,6 @@ build_options_finalize() # # Installation # -install(TARGETS vogl +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/voglserver/CMakeLists.txt b/src/voglserver/CMakeLists.txt index 3ded3164..276644f5 100644 --- a/src/voglserver/CMakeLists.txt +++ b/src/voglserver/CMakeLists.txt @@ -37,6 +37,6 @@ build_options_finalize() # # Installation # -install(TARGETS voglserver +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/vogltest/CMakeLists.txt b/src/vogltest/CMakeLists.txt index 6b1fbdf3..66ab80a0 100644 --- a/src/vogltest/CMakeLists.txt +++ b/src/vogltest/CMakeLists.txt @@ -65,6 +65,6 @@ build_options_finalize() # # Installation # -install(TARGETS vogltest +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/vogltrace/CMakeLists.txt b/src/vogltrace/CMakeLists.txt index f5473b11..796e9630 100644 --- a/src/vogltrace/CMakeLists.txt +++ b/src/vogltrace/CMakeLists.txt @@ -119,6 +119,6 @@ build_options_finalize() # # Installation # -install(TARGETS vogltrace +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) From ee05faeb47714f75e84cdd004b6293449a74dca2 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Sat, 18 Mar 2017 00:27:46 +0300 Subject: [PATCH 05/17] vogltrace: put in the ${out}/bin: it's the scenario intended by upstream --- src/vogltrace/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vogltrace/CMakeLists.txt b/src/vogltrace/CMakeLists.txt index 796e9630..c65f6180 100644 --- a/src/vogltrace/CMakeLists.txt +++ b/src/vogltrace/CMakeLists.txt @@ -119,6 +119,5 @@ build_options_finalize() # # Installation # -install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib) +install(TARGETS vogltrace + LIBRARY DESTINATION bin) From 5e200a57e7913b00fd8d24300b4ba965f332a63c Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Sat, 18 Mar 2017 02:20:46 +0300 Subject: [PATCH 06/17] qlaunchtracerdialog: only LD_PRELOAD binary of matching pointer size ..not that the wrong one exists for a given build, but.. --- src/vogleditor/vogleditor.cpp | 2 +- src/vogleditor/vogleditor_qlaunchtracerdialog.cpp | 6 ++---- src/vogleditor/vogleditor_qlaunchtracerdialog.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vogleditor/vogleditor.cpp b/src/vogleditor/vogleditor.cpp index e67f4b93..7a02358e 100644 --- a/src/vogleditor/vogleditor.cpp +++ b/src/vogleditor/vogleditor.cpp @@ -471,7 +471,7 @@ VoglEditor::Prompt_Result VoglEditor::prompt_generate_trace() #endif QString cmdLine = m_pLaunchTracerDialog->get_command_line(); - QProcessEnvironment env = m_pLaunchTracerDialog->get_process_environment(); + QProcessEnvironment env = m_pLaunchTracerDialog->get_process_environment (sizeof (void *) < 8); bool bSuccess = launch_application_to_generate_trace(cmdLine, env); QFileInfo fileInfo(m_pLaunchTracerDialog->get_trace_file_path()); if (bSuccess && fileInfo.exists()) diff --git a/src/vogleditor/vogleditor_qlaunchtracerdialog.cpp b/src/vogleditor/vogleditor_qlaunchtracerdialog.cpp index b6381b1f..356818bb 100644 --- a/src/vogleditor/vogleditor_qlaunchtracerdialog.cpp +++ b/src/vogleditor/vogleditor_qlaunchtracerdialog.cpp @@ -85,7 +85,7 @@ QString vogleditor_QLaunchTracerDialog::get_command_line() return cmdline; } -QProcessEnvironment vogleditor_QLaunchTracerDialog::get_process_environment() +QProcessEnvironment vogleditor_QLaunchTracerDialog::get_process_environment(bool just32bits) { QDir appDirectory(QCoreApplication::applicationDirPath()); @@ -119,9 +119,7 @@ QProcessEnvironment vogleditor_QLaunchTracerDialog::get_process_environment() m_process_environment.insert("VOGL_CMD_LINE", VOGL_CMD_LINE); } - QString libvogltrace32 = appDirectory.absoluteFilePath("./libvogltrace32.so"); - QString libvogltrace64 = appDirectory.absoluteFilePath("./libvogltrace64.so"); - QString LD_PRELOAD = libvogltrace32 + ":" + libvogltrace64; + QString LD_PRELOAD = appDirectory.absoluteFilePath(just32bits ? "./libvogltrace32.so" : "./libvogltrace64.so"); if (getenv("LD_PRELOAD")) { diff --git a/src/vogleditor/vogleditor_qlaunchtracerdialog.h b/src/vogleditor/vogleditor_qlaunchtracerdialog.h index e147e992..9afd9437 100644 --- a/src/vogleditor/vogleditor_qlaunchtracerdialog.h +++ b/src/vogleditor/vogleditor_qlaunchtracerdialog.h @@ -19,7 +19,7 @@ class vogleditor_QLaunchTracerDialog : public QDialog QString get_application_to_launch(); QString get_command_line(); - QProcessEnvironment get_process_environment(); + QProcessEnvironment get_process_environment(bool just32bits); QString get_trace_file_path(); private From cbc5f1853e294b363f16c4e00b3e0c49dbf74559 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Sat, 18 Mar 2017 22:39:35 +0300 Subject: [PATCH 07/17] voglreplay: only LD_PRELOAD binary of matching pointer size --- src/voglreplay/replay_tool_trace.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/voglreplay/replay_tool_trace.cpp b/src/voglreplay/replay_tool_trace.cpp index ccc70504..7071419d 100644 --- a/src/voglreplay/replay_tool_trace.cpp +++ b/src/voglreplay/replay_tool_trace.cpp @@ -289,12 +289,11 @@ tool_trace_mode(vogl::vector *desc) vogl_message_printf("Logfile: %s", args.vogl_logfile.c_str()); vogl_printf(" (will have PID appended)\n"); - dynamic_string vogltracepath32 = getfullpath("libvogltrace32.so"); - dynamic_string vogltracepath64 = getfullpath("libvogltrace64.so"); + dynamic_string vogltracepath = getfullpath((sizeof(void *) < 8) ? "libvogltrace32.so" : "libvogltrace64.so"); // set up LD_PRELOAD string dynamic_string LD_PRELOAD = "LD_PRELOAD=\""; - LD_PRELOAD += vogltracepath32 + ":" + vogltracepath64; + LD_PRELOAD += vogltracepath; if (is_steam_file || getenv("LD_PRELOAD")) LD_PRELOAD += ":$LD_PRELOAD"; From 2a466380595f23aceff48f7bae6728e58e1fc8ef Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Fri, 17 Mar 2017 08:51:53 +0300 Subject: [PATCH 08/17] nix: package --- .gitignore | 2 ++ default.nix | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ shell.nix | 5 +++++ 3 files changed, 59 insertions(+) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore index f11d312c..fccc58be 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ voglinc/ *.bin _out*/ +__nix_qt5__ +/result diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..bd8ae204 --- /dev/null +++ b/default.nix @@ -0,0 +1,52 @@ +# -*- indent-tabs-mode: nil -*- +{ fetchgit, stdenv +, cmake, git, pkgconfig, wget, zip +, makeQtWrapper, qtbase, qtx11extras +, libdwarf, libjpeg_turbo, libunwind, lzma, tinyxml, libX11 +, SDL2, SDL2_gfx, SDL2_image, SDL2_ttf +, freeglut, mesa, mesa_glu +## +, localSource ? false +}: +let + ver = "2016-05-13"; +in +stdenv.mkDerivation { + name = "vogl-${ver}"; + version = "${ver}"; + + src = fetchgit { + url = if localSource == false then "https://github.com/deepfire/vogl.git" else ("file://" + localSource); + rev = "cbc5f1853e294b363f16c4e00b3e0c49dbf74559"; + sha256 = "17gwd73x3lnqv6ccqs48pzqwbzjhbn41c0x0l5zzirhiirb3yh0n"; + }; + + nativeBuildInputs = [ + makeQtWrapper pkgconfig + ]; + + buildInputs = [ + cmake git pkgconfig wget zip + qtbase qtx11extras + libdwarf libjpeg_turbo libunwind lzma tinyxml libX11 + SDL2 SDL2_gfx SDL2_image SDL2_ttf + freeglut mesa mesa_glu + ]; + + enableParallelBuilding = true; + + dontUseCmakeBuildDir = true; + preConfigure = '' + cmakeDir=$PWD + mkdir -p vogl/vogl_build/release64 && cd $_ + ''; + cmakeFlags = '' -DCMAKE_VERBOSE=On -DCMAKE_BUILD_TYPE=Release -DBUILD_X64=On''; + + meta = with stdenv.lib; { + description = "OpenGL capture / playback debugger."; + homepage = https://github.com/ValveSoftware/vogl; + license = licenses.bsd3; + maintainers = with maintainers; [ deepfire ]; + platforms = platforms.all; + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..7a063990 --- /dev/null +++ b/shell.nix @@ -0,0 +1,5 @@ +{ nixpkgs ? import {} }: + +nixpkgs.pkgs.qt57.callPackage + (import ./.) + { } From 664e55ba6cbd6496dff21c1d1370596d01d6e0af Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Tue, 21 Mar 2017 17:06:11 +0300 Subject: [PATCH 09/17] travis: add .travis.yml --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..5e1d69c2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: nix +script: nix-build shell.nix +sudo: false +cache: + directories: + - /nix From 44d352b455cd3854802a36448f4829cbde6e63b5 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Tue, 21 Mar 2017 17:08:22 +0300 Subject: [PATCH 10/17] readme: add a status image --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f2e739f0..bdb11f6f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ vogl ============= +[![Build Status](https://travis-ci.org/deepfire/vogl.svg?branch=master)](https://travis-ci.org/deepfire/vogl) #### NOTE #### From 8b99e224f96bd13ce60c251d5c1a145be308625f Mon Sep 17 00:00:00 2001 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Date: Wed, 22 Mar 2017 03:42:29 +0300 Subject: [PATCH 11/17] readme: update --- README.md | 66 +++++++++++++++++++++++++++++++++++++++-------------- default.nix | 4 ++-- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index bdb11f6f..c0d9c9fb 100644 --- a/README.md +++ b/README.md @@ -2,25 +2,13 @@ vogl ============= [![Build Status](https://travis-ci.org/deepfire/vogl.svg?branch=master)](https://travis-ci.org/deepfire/vogl) -#### NOTE #### - -April 16, 2014: Vogl history has been completely and utterly trounced. The original repository had an entire chroot build system that most folks weren't interested in. A few contributors (thanks Carl & Sir Anthony) took the time to build a much smaller source only vogl repository which we've replaced the original one with. - -A separate chroot repository (which will build this source repository) is now here: - -https://bitbucket.org/raddebugger/vogl_chroot - ## Warning ## This project is alpha^2. If you are up for suffering through a bit of pain with early releases, please jump in - we'd love to have your help... ## Dependencies ## -The chroot configuration script should be a good reference for vogl dependencies. It is located here: - -https://bitbucket.org/raddebugger/vogl_chroot/src/master/bin/chroot_configure.sh?at=master - -The build dependencies for ubuntu (14.04) can be installed using the following: +The build dependencies for ubuntu (14.04) can be installed either using APT: ``` sudo apt-get install build-essential pkg-config cmake libx11-dev \ zip wget libtinyxml-dev liblzma-dev libunwind8-dev \ @@ -28,10 +16,54 @@ sudo apt-get install build-essential pkg-config cmake libx11-dev \ freeglut3-dev qt5-default libqt5x11extras5-dev git \ libsdl2-gfx-dev libsdl2-image-dev libsdl2-ttf-dev libjpeg-turbo8-dev ``` +.. or using Nix, for which keep reading. + +### Get Source and Build ### + +There are two build methods, due to development environment setup mechanisms: Nix and chroot. + +1. The Nix-based method: + + - distribution-agnostic, but requires the Nix package manager to be installed + - fire-and-forget + - integrated with Travis CI + - allows fine dependency specification + - 100% declarative -- you get what you ask for (nothing is implied by any kind of "state") + - currently suffers from https://github.com/NixOS/nixpkgs/issues/9415 + - ..but there is a remedy (nVidia-only at the moment): https://github.com/deepfire/nix-install-vendor-gl + +2. The old, chroot-based method. + +#### Nix-based #### + +##### Linux #### + +There are two options: + +1. Building and installing the package into the current user environment: + +``` +desktop@steamos:~/src/vogl$ nix-build --cores 8 shell.nix +these derivations will be built: + /nix/store/zvdz4dhprf6kbnjf5sjcc8731rnbmd1z-vogl-2016-05-13.drv +building path(s) ‘/nix/store/b88a5flgwjghw204wg5j8ahqs50l2qba-vogl-2016-05-13’ +_makeQtWrapperSetup +unpacking sources +unpacking source archive /nix/store/qm11psc7pp4nk2273msgln3x519iv1pb-vogl-cbc5f18 +... + +... +``` + +2. Entering the fully-dependency endowed build environment: +``` +nix-shell +``` + -## Get Source and Build ## +#### Chroot-based #### -#### Linux #### +##### Linux #### ``` git clone https://github.com/ValveSoftware/vogl.git @@ -45,7 +77,7 @@ The binaries are placed in the vogl/vogl_build directory. For debug builds, use "-DCMAKE_BUILD_TYPE=Debug" For 32-bit builds, use "-DBUILD_X64=Off" -#### Windows #### +##### Windows #### ``` git clone https://github.com/ValveSoftware/vogl.git @@ -61,7 +93,7 @@ cmake -DQt5_DIR="C:\Qt\5.3\msvc2013_opengl\lib\cmake\Qt5" -G "Visual Studio 12 2 Note: The path to Qt5 might need to be adjusted depending on your install location. After compiling with Visual Studio, the binaries are placed in the vogl\vogl_build\Release (or Debug) directory. -### Mac OS X ### +##### Mac OS X ### Install the required build dependencies using Homebrew: diff --git a/default.nix b/default.nix index bd8ae204..492cbf64 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,11 @@ # -*- indent-tabs-mode: nil -*- -{ fetchgit, stdenv -, cmake, git, pkgconfig, wget, zip +{ cmake, git, pkgconfig, wget, zip , makeQtWrapper, qtbase, qtx11extras , libdwarf, libjpeg_turbo, libunwind, lzma, tinyxml, libX11 , SDL2, SDL2_gfx, SDL2_image, SDL2_ttf , freeglut, mesa, mesa_glu ## +, fetchgit, stdenv , localSource ? false }: let From 9eb7ab11d9dc9a81b3110ef1419e464ae71a3a55 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Date: Mon, 27 Mar 2017 03:51:19 +0300 Subject: [PATCH 12/17] travis: switch to 8G VMs --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5e1d69c2..c8caec68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: nix script: nix-build shell.nix -sudo: false +sudo: true +# Sudo containers start slower, but are isolated in a VM and get 8G of RAM, instead of 4G. + cache: directories: - /nix From 127e0dea3645b24697f1041218b8a6e12e6d70c1 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Date: Fri, 31 Mar 2017 14:48:14 +0300 Subject: [PATCH 13/17] readme | vogleditor: clarify the 32/64 bit preloading controversy --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c0d9c9fb..9a19fabb 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,12 @@ https://bitbucket.org/raddebugger/vogl_chroot/src/master/bin/src/sl.cpp?at=maste We are currently working on making it much easier to launch and profile Steam apps. +Note, that `vogleditor` used to attempt to launch the target application while +preloading both 32-bit and 64-bit versions of the capture libraries, but this was +error-prone -- in certain systems that would prevent the editor-based capturing at +all. So this was disabled, and now `vogleditor` only preloads captures of a +single architecture -- one matching the particular `vogl` build, 32 or 64-bit. + ## Replay ## ``` From 2d8bb923fedb67d352c31be71ba2cc1f01a36a7a Mon Sep 17 00:00:00 2001 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Date: Fri, 31 Mar 2017 14:59:49 +0300 Subject: [PATCH 14/17] readme: clarify that Mac OS X isn't out of question for Nix-based builds --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a19fabb..505c9850 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ There are two build methods, due to development environment setup mechanisms: Ni #### Nix-based #### -##### Linux #### +##### Linux (Mac OS X untested, but not impossible) #### There are two options: From 90ac7e67acabac0f1dcef653372b3be37c25d2d6 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Date: Fri, 31 Mar 2017 15:16:21 +0300 Subject: [PATCH 15/17] nix: update to the recent nixpkgs changes --- shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index 7a063990..fbbfab4a 100644 --- a/shell.nix +++ b/shell.nix @@ -1,5 +1,5 @@ { nixpkgs ? import {} }: -nixpkgs.pkgs.qt57.callPackage +nixpkgs.pkgs.libsForQt56.callPackage (import ./.) { } From db85683a900d77738692e1f9cb676599ed11d555 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Date: Fri, 31 Mar 2017 22:24:35 +0300 Subject: [PATCH 16/17] readme: fix instructions to describe actual installation, not a mere build --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 505c9850..bf35cc34 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ sudo apt-get install build-essential pkg-config cmake libx11-dev \ freeglut3-dev qt5-default libqt5x11extras5-dev git \ libsdl2-gfx-dev libsdl2-image-dev libsdl2-ttf-dev libjpeg-turbo8-dev ``` -.. or using Nix, for which keep reading. +> .. or using Nix, for which keep reading. ### Get Source and Build ### @@ -38,12 +38,28 @@ There are two build methods, due to development environment setup mechanisms: Ni ##### Linux (Mac OS X untested, but not impossible) #### -There are two options: +First, you need to have Nix installed (citing http://nixos.org/nix/manual/#ch-installing-binary): + +``` +desktop@steamos:~/src/vogl$ bash <(curl https://nixos.org/nix/install) +... + +## At the end, this will instruct you to either re-login, +## or source the Nix environment setup script. Do that. +## Validation: + +desktop@steamos:~/src/vogl$ nix-env --query --installed # ..which should list just `nix`, initially. +``` +> NOTE: If security implications of this particular step worry you, please read +> the following piece by Domen Kožar: +> https://www.domenkozar.com/2015/09/27/friends-sometimes-let-friends-curl-to-shell/) + +Once that's behind us, the following two options become available: 1. Building and installing the package into the current user environment: ``` -desktop@steamos:~/src/vogl$ nix-build --cores 8 shell.nix +desktop@steamos:~/src/vogl$ nix-env --no-build-output --cores 0 -iE 'f: (import ./shell.nix {})' these derivations will be built: /nix/store/zvdz4dhprf6kbnjf5sjcc8731rnbmd1z-vogl-2016-05-13.drv building path(s) ‘/nix/store/b88a5flgwjghw204wg5j8ahqs50l2qba-vogl-2016-05-13’ From 92b3410280c722b4469a6e94f18226a95e75ca28 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge <_deepfire@feelingofgreen.ru> Date: Wed, 17 May 2017 10:57:09 +0300 Subject: [PATCH 17/17] qapicalltreemodel: review suggestions --- src/vogleditor/vogleditor_qapicalltreemodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vogleditor/vogleditor_qapicalltreemodel.cpp b/src/vogleditor/vogleditor_qapicalltreemodel.cpp index 1177e850..71211452 100644 --- a/src/vogleditor/vogleditor_qapicalltreemodel.cpp +++ b/src/vogleditor/vogleditor_qapicalltreemodel.cpp @@ -348,8 +348,7 @@ bool vogleditor_QApiCallTreeModel::init(vogl_trace_file_reader *pTrace_reader) { QString msg(QString("*** Information: unpaired \"") + QString(g_vogl_entrypoint_descs[entrypoint_id].m_pName) + QString("\".")); vogleditor_output_message(msg.toStdString().c_str()); - vogl_printf("%s", msg.toStdString().c_str()); - vogl_printf("\n"); + vogl_printf("%s\n", msg.toStdString().c_str()); } } else if (isMarkerPushEntrypoint(entrypoint_id))