This fixes startup from the source tree.
export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/Users/c.hetherington/osx-environment/64/lib
export DCPOMATIC_GRAPHICS=$DIR/../graphics
+export DCPOMATIC_SHARE_PREFIX=.
binary=$build/src/tools/dcpomatic2
if [ "$1" == "--debug" ]; then
shift
boost::filesystem::path
resources_path ()
{
+ char* prefix = getenv ("DCPOMATIC_SHARE_PREFIX");
+ if (prefix) {
+ return boost::filesystem::path(prefix) / "dcpomatic2";
+ }
+
return directory_containing_executable().parent_path() / "share" / "dcpomatic2";
}
boost::filesystem::path
xsd_path ()
{
- return directory_containing_executable().parent_path() / "share" / "libdcp" / "xsd";
+ return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "xsd";
}
boost::filesystem::path
tags_path ()
{
- return directory_containing_executable().parent_path() / "share" / "libdcp" / "tags";
+ return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "tags";
}
if conf.env.TARGET_LINUX:
conf.env.append_value('CXXFLAGS', '-mfpmath=sse')
conf.env.append_value('CXXFLAGS', '-DLINUX_LOCALE_PREFIX="%s/share/locale"' % conf.env['INSTALL_PREFIX'])
+ conf.env.append_value('CXXFLAGS', '-DLINUX_SHARE_PREFIX="%s/share"' % conf.env['INSTALL_PREFIX'])
conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX')
conf.env.append_value('CXXFLAGS', ['-Wlogical-op', '-Wcast-align'])
conf.check(lib='dl', uselib_store='DL', msg='Checking for library dl')