Commit f0174c53 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[CHANGE] Reduced code duplication.

parent c03ab703
......@@ -78,18 +78,13 @@ void WPathHelper::setBasePaths( boost::filesystem::path appPath, boost::filesyst
void WPathHelper::setBasePathsOSXBundle( boost::filesystem::path appPath, boost::filesystem::path homePath )
{
//W_ASSERT( appPath.substr( size()-sizeof( "MacOS" ), sizeof( "MacOS" ) ) == "MacOS" );
m_appPath = appPath;
m_homePath = homePath;
setBasePaths( appPath, homePath ); // set all to ordinary paths, but the following are different:
m_sharePath = m_appPath / "../Resources/openwalnut";
m_docPath = m_appPath / "../Resources/doc";
m_configPath = m_appPath / "../Resources/openwalnut";
m_libPath = m_appPath / ".." / W_LIB_DIR_RELATIVE; // NOTE: this variable is set by CMake.
// This is the default search path. Use getAllModulePaths for finding all modules, including those whose
// directories where defined by the user.
m_modulePath = m_appPath / "../Resources/modules";
// this is the relative path for module resources. It is relative to the path of the lib containing the module.
// The MacOSX bundle stores the modules in Resources/modules. We want the additional resources to be stored in the module's directory.
m_moduleResourcePathRelative = boost::filesystem::path( "." );
}
......
......@@ -158,7 +158,7 @@ int WQtGui::run()
WApplication appl( m_argc, m_argv, true );
// the call path of the application, this uses QApplication which needs to be instantiated.
boost::filesystem::path walnutBin = boost::filesystem::path( QApplication::applicationDirPath().toStdString() );
boost::filesystem::path walnutBin( QApplication::applicationDirPath().toStdString() );
// setup path helper which provides several paths to others
#ifdef Q_OS_OSX
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment