mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
Include cleanup Reworked buildsystem (Linux only) Removed dynamic libs, Linux now again uses static linking (like windows)
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
/** @file
|
|
*
|
|
* @par History
|
|
* - 2009/09/03 MuadDib: Relocation of multi related cpp/h
|
|
*/
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "../../clib/cfgfile.h"
|
|
#include "../../clib/fileutil.h"
|
|
#include "../../clib/refptr.h"
|
|
#include "../../plib/pkg.h"
|
|
#include "../../plib/systemstate.h"
|
|
#include "../cfgrepos.h"
|
|
|
|
namespace Pol
|
|
{
|
|
namespace Multi
|
|
{
|
|
void load_special_storedconfig( const std::string& cfgname )
|
|
{
|
|
std::string main_cfg = "config/" + cfgname + ".cfg";
|
|
|
|
Core::CreateEmptyStoredConfigFile( main_cfg );
|
|
ref_ptr<Core::StoredConfigFile> scfg = Core::FindConfigFile( main_cfg, "" );
|
|
if ( Clib::FileExists( main_cfg.c_str() ) )
|
|
{
|
|
Clib::ConfigFile cf_main( main_cfg.c_str() );
|
|
scfg->load( cf_main );
|
|
}
|
|
|
|
for ( Plib::Packages::iterator itr = Plib::systemstate.packages.begin();
|
|
itr != Plib::systemstate.packages.end(); ++itr )
|
|
{
|
|
Plib::Package* pkg = ( *itr );
|
|
// string filename = pkg->dir() + cfgname + ".cfg";
|
|
std::string filename = Plib::GetPackageCfgPath( pkg, cfgname + ".cfg" );
|
|
if ( Clib::FileExists( filename.c_str() ) )
|
|
{
|
|
Clib::ConfigFile cf( filename.c_str() );
|
|
scfg->load( cf );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|