A couple of patches to configure the private bin directory

José Fonseca jose.r.fonseca at gmail.com
Tue Nov 1 01:45:25 PDT 2011


On Mon, Oct 31, 2011 at 7:10 PM, Carl Worth <cworth at cworth.org> wrote:
> I've just pushed a "config" branch to my repository with a couple of
> patches to install private binaries (such as glxtrace.so) to
> <prefix>/lib/apitrace and to make that directory available to the code
> via the APITRACE_PRIVATE_BIN_DIR variable set in a new apitrace-config.h
> file.
>
> You've seen similar patches from me before. The change this time is that
> I actually updated the GUI code so that it hopefully doesn't break based
> on the new location of glxtrace.so. And, for the first time, the GUI
> should actually work when installed to some prefix other than /usr/local
> or /usr.
>
> Let me know what you think. An updated "apitrace trace" patch should be
> just behind these.

Carl,

I've pushed the doc patch with just a tweak to leave it unchanged on
windows (as it doesn't quite fit common practice there).


Generated config.h are an obstacle to my workflow -- config.h vary per
platform and my common setup is to build Linux 64bits (my main
deve/test platform) on top of the source, and other platforms (Linux
32bits, MinGW 32, Mingw64, MSVC) out of tree, but all sharing the same
source. And a generated config.h makes this impossible.

So instead of a config.h I just passed the defines on command line.
(Sure, command line will get long, but nobody really sees them
nowadays, unless debugging build issues.)


I've also picked up a per-architecture wrapper directory (e.g.,
lib/apitrace/x86_64/glxtrace.so) to allow multiple architectures
installed along side each other. It would  be good if "apitrace trace"
option to override the architecture. Auto detect from the app would be
nice, but it's impossible with scripts, and difficult to do it in a
portable way.

I'm not sure if per architecture directories make sense for other
private programs (e.g., glretrace).


BTW, for the "apitrace trace" implementation, please abstract
functionality that can be shared with the gui into a source file in
common (e.g., common/trace_trace.cpp, or something like that).  I'll
eventually split "common" into two libraries -- one that is meant to
be shared by wrapper DLLs, other by everything else, but I'll do that
another time.


Jose


More information about the apitrace mailing list