Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 20, 2009, 5:32:04 PM (16 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/ConfigFileManager.cc

    r2662 r2685  
    3030
    3131#include <cassert>
     32#include <boost/filesystem.hpp>
     33
    3234#include "util/Convert.h"
    3335#include "util/String.h"
    3436#include "ConsoleCommand.h"
    3537#include "ConfigValueContainer.h"
     38#include "Core.h"
    3639
    3740namespace orxonox
     
    223226        this->clear();
    224227
     228        boost::filesystem::path filepath(Core::getConfigPath() + "/" + this->filename_);
     229
    225230        // This creates the config file if it's not existing
    226231        std::ofstream createFile;
    227         createFile.open(this->filename_.c_str(), std::fstream::app);
     232        createFile.open(filepath.native_file_string().c_str(), std::fstream::app);
    228233        createFile.close();
    229234
    230235        // Open the file
    231236        std::ifstream file;
    232         file.open(this->filename_.c_str(), std::fstream::in);
     237        file.open(filepath.native_file_string().c_str(), std::fstream::in);
    233238
    234239        if (!file.is_open())
     
    337342    void ConfigFile::save() const
    338343    {
     344        boost::filesystem::path filepath(Core::getConfigPath() + "/" + this->filename_);
     345
    339346        std::ofstream file;
    340         file.open(this->filename_.c_str(), std::fstream::out);
     347        file.open(filepath.native_file_string().c_str(), std::fstream::out);
    341348        file.setf(std::ios::fixed, std::ios::floatfield);
    342349        file.precision(6);
Note: See TracChangeset for help on using the changeset viewer.