Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 20, 2009, 5:32:04 PM (15 years ago)
Author:
rgrieder
Message:

Fixed install target:

  • log and config file go a to separate folder each
  • The SignalHandler crash log is now "orxonox_crash.log" to avoid opening the file twice which might result in problems
  • moved tcl scripts to media/tcl8.#/ as a temporary solution. I've also created a ticket to fix this.
  • UPDATE YOUR MEDIA REPOSITORY
  • orxonox.log pre-main gets written to either %TEMP% (windows) or /tmp (Unix) and when the path was set, the content is copied.
  • removed Settings class and moved media path to Core
  • media, log and config path are now all in Core where only the media path can be configured via ini file or command line
  • Core::isDevBuild() tells whether we are running in the build or the installation directory (determined by the presence of "orxonox_dev_build.kepp_me" in the binary dir)
  • renamed Settings::getDataPath to Core::getMediaPath
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem3/src/core/Language.cc

    r2662 r2685  
    3535
    3636#include <fstream>
     37#include <boost/filesystem.hpp>
    3738
    3839#include "Core.h"
     
    205206        COUT(4) << "Read default language file." << std::endl;
    206207
     208        boost::filesystem::path folder(Core::getConfigPath());
     209        boost::filesystem::path filepath(folder/getFilename(this->defaultLanguage_));
     210
    207211        // This creates the file if it's not existing
    208212        std::ofstream createFile;
    209         createFile.open(getFilename(this->defaultLanguage_).c_str(), std::fstream::app);
     213        createFile.open(filepath.native_file_string().c_str(), std::fstream::app);
    210214        createFile.close();
    211215
    212216        // Open the file
    213217        std::ifstream file;
    214         file.open(getFilename(this->defaultLanguage_).c_str(), std::fstream::in);
     218        file.open(filepath.native_file_string().c_str(), std::fstream::in);
    215219
    216220        if (!file.is_open())
     
    254258        COUT(4) << "Read translated language file (" << Core::getLanguage() << ")." << std::endl;
    255259
     260        boost::filesystem::path folder(Core::getConfigPath());
     261        boost::filesystem::path filepath(folder/getFilename(Core::getLanguage()));
     262
    256263        // Open the file
    257264        std::ifstream file;
    258         file.open(getFilename(Core::getLanguage()).c_str(), std::fstream::in);
     265        file.open(filepath.native_file_string().c_str(), std::fstream::in);
    259266
    260267        if (!file.is_open())
     
    308315        COUT(4) << "Language: Write default language file." << std::endl;
    309316
     317        boost::filesystem::path folder(Core::getConfigPath());
     318        boost::filesystem::path filepath(folder/getFilename(this->defaultLanguage_));
     319
    310320        // Open the file
    311321        std::ofstream file;
    312         file.open(getFilename(this->defaultLanguage_).c_str(), std::fstream::out);
     322        file.open(filepath.native_file_string().c_str(), std::fstream::out);
    313323
    314324        if (!file.is_open())
Note: See TracChangeset for help on using the changeset viewer.