Constructing default plugin and driver search paths

2 views
Skip to first unread message

Doug McCorkle

unread,
Apr 15, 2013, 10:27:27 AM4/15/13
to vrjuggl...@googlegroups.com
Hello,

On linux platforms the automatic path construction utilities are broken when the variable bit_suffix is used in files like:

./gadgeteer/gadget/Util/PathHelpers.cpp
./gadgeteer/gadget/gadgetmain.cpp
./jackal/common/jccl/jcclmain.cpp
./jackal/rtrc/jccl/RTRC/ConfigManager.cpp
./sonix/snx/snxmain.cpp
./tweek/tweek/tweekmain.cpp
./vapor/vpr/vprmain.cpp
./vrjuggler/vrj/Performance/PerformanceMediator.cpp
./vrjuggler/vrj/vrjmain.cpp

In each of these cases the code is:

#if defined(VPR_OS_IRIX) && defined(_ABIN32)
const std::string bit_suffix("32");
#elif defined(VPR_OS_IRIX) && defined(_ABI64) || \
defined(VPR_OS_Linux) && defined(__x86_64__)
const std::string bit_suffix("64");
#else
const std::string bit_suffix("");
#endif

but since this commit:

https://code.google.com/p/vrjuggler/source/detail?r=56b910c3952093981ef2df0720da1e3d46c8ddd0

the pure compile time platform logic to set the bit_suffix is no longer valid for linux platforms. It seems like we would need to pass in:

LIBDIR_NAME

as a c preprocessor define to correctly set the bit_suffix in the above files. It also seems like we could grab the correct path information from the *main.cpp files such that we can remove the bit_suffix code all together. What do other folks think?

Doug

Patrick Hartling

unread,
Apr 17, 2013, 9:43:59 AM4/17/13
to vrjuggl...@googlegroups.com
That sounds great to me.

-Patrick


--
Patrick L. Hartling
iOS Library Developer, Banno
http://www.banno.com/

Doug McCorkle

unread,
Apr 17, 2013, 5:26:51 PM4/17/13
to vrjuggl...@googlegroups.com
This is the least intrusive way I could come up to do things. I think the basic idea works and does not require drastic changes to any of the code and does not introduce any new environment variables. If we want to simplify the code we would need to add additional environment variables like:

GADGETEER_LIB_DIRECTORY
VRJUGGLER_LIB_DIRECTORY

or

GADGETEER_PLUGIN_DIRECTORY
GADGETEER_DRIVER_DIRECTORY

which would simplify the validation and subsequent construction of the various paths for plugins and drivers across the project but would change the way everything is done now. Unless there are some objections to the approach in this patch I will plan on implementing the approach in the other libraries.

Doug

libdir_name.patch

Doug McCorkle

unread,
Apr 17, 2013, 6:21:34 PM4/17/13
to vrjuggl...@googlegroups.com

On Apr 17, 2013, at 4:26 PM, Doug McCorkle <mc...@iastate.edu> wrote:

>

[snip]

> This is the least intrusive way I could come up to do things. I think the basic idea works and does not require drastic changes to any of the code and does not introduce any new environment variables. If we want to simplify the code we would need to add additional environment variables like:
>
> GADGETEER_LIB_DIRECTORY
> VRJUGGLER_LIB_DIRECTORY
>
> or
>
> GADGETEER_PLUGIN_DIRECTORY
> GADGETEER_DRIVER_DIRECTORY
>
> which would simplify the validation and subsequent construction of the various paths for plugins and drivers across the project but would change the way everything is done now. Unless there are some objections to the approach in this patch I will plan on implementing the approach in the other libraries.

This is the patch I would like to run with.

Doug

libdir_name.patch
Reply all
Reply to author
Forward
0 new messages