Fixed stylesheet and configuration problems with the launcher and code cleanup

actorid
Pieter van der Kloet 13 years ago
parent b2b09320fc
commit 280babc719

@ -329,7 +329,7 @@ if(WIN32)
FILE(GLOB files "${OpenMW_BINARY_DIR}/Release/*.*") FILE(GLOB files "${OpenMW_BINARY_DIR}/Release/*.*")
INSTALL(FILES ${files} DESTINATION ".") INSTALL(FILES ${files} DESTINATION ".")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg") INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
INSTALL(FILES "${OpenMW_BINARY_DIR}/launcher.cfg" "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION ".") INSTALL(FILES "${OpenMW_BINARY_DIR}/launcher.qss" "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION ".")
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".") INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
SET(CPACK_GENERATOR "NSIS") SET(CPACK_GENERATOR "NSIS")

@ -26,7 +26,7 @@ bool rowSmallerThan(const QModelIndex &index1, const QModelIndex &index2)
return index1.row() <= index2.row(); return index1.row() <= index2.row();
} }
DataFilesPage::DataFilesPage(Files::ConfigurationManager& cfg, QWidget *parent) DataFilesPage::DataFilesPage(Files::ConfigurationManager &cfg, QWidget *parent)
: QWidget(parent) : QWidget(parent)
, mCfgMgr(cfg) , mCfgMgr(cfg)
{ {
@ -123,25 +123,89 @@ DataFilesPage::DataFilesPage(Files::ConfigurationManager& cfg, QWidget *parent)
setupConfig(); setupConfig();
setupDataFiles();
createActions(); createActions();
} }
void DataFilesPage::setupDataFiles(const QStringList &paths, bool strict) void DataFilesPage::setupConfig()
{ {
// Put the paths in a boost::filesystem vector to use with Files::Collections QString config = QString::fromStdString((mCfgMgr.getLocalPath() / "launcher.cfg").string());
Files::PathContainer dataDirs; QFile file(config);
if (!file.exists()) {
config = QString::fromStdString((mCfgMgr.getUserPath() / "launcher.cfg").string());
}
// Open our config file
mLauncherConfig = new QSettings(config, QSettings::IniFormat);
mLauncherConfig->sync();
// Make sure we have no groups open
while (!mLauncherConfig->group().isEmpty()) {
mLauncherConfig->endGroup();
}
mLauncherConfig->beginGroup("Profiles");
QStringList profiles = mLauncherConfig->childGroups();
if (profiles.isEmpty()) {
// Add a default profile
profiles.append("Default");
}
mProfilesComboBox->addItems(profiles);
QString currentProfile = mLauncherConfig->value("CurrentProfile").toString();
foreach (const QString &currentPath, paths) { if (currentProfile.isEmpty()) {
dataDirs.push_back(boost::filesystem::path(currentPath.toStdString())); // No current profile selected
currentProfile = "Default";
} }
mProfilesComboBox->setCurrentIndex(mProfilesComboBox->findText(currentProfile));
mLauncherConfig->endGroup();
// Now we connect the combobox to do something if the profile changes
// This prevents strange behaviour while reading and appending the profiles
connect(mProfilesComboBox, SIGNAL(textChanged(const QString&, const QString&)), this, SLOT(profileChanged(const QString&, const QString&)));
}
void DataFilesPage::setupDataFiles()
{
// We use the Configuration Manager to retrieve the configuration values
boost::program_options::variables_map variables;
boost::program_options::options_description desc;
desc.add_options()
("data", boost::program_options::value<Files::PathContainer>()->default_value(Files::PathContainer(), "data")->multitoken())
("data-local", boost::program_options::value<std::string>()->default_value(""))
("fs-strict", boost::program_options::value<bool>()->implicit_value(true)->default_value(false))
("encoding", boost::program_options::value<std::string>()->default_value("win1252"));
mCfgMgr.readConfiguration(variables, desc);
// Put the paths in a boost::filesystem vector to use with Files::Collections
Files::PathContainer dataDirs(variables["data"].as<Files::PathContainer>());
mCfgMgr.processPaths(dataDirs); mCfgMgr.processPaths(dataDirs);
std::string local(variables["data-local"].as<std::string>());
if (!local.empty())
{
dataDirs.push_back(Files::PathContainer::value_type(local));
}
if (dataDirs.empty())
{
dataDirs.push_back(mCfgMgr.getLocalPath());
}
// Create a file collection for the dataDirs // Create a file collection for the dataDirs
Files::Collections mFileCollections(dataDirs, strict); Files::Collections fileCollections(dataDirs, !variables["fs-strict"].as<bool>());
// First we add all the master files // First we add all the master files
const Files::MultiDirCollection &esm = mFileCollections.getCollection(".esm"); const Files::MultiDirCollection &esm = fileCollections.getCollection(".esm");
unsigned int i = 0; // Row number unsigned int i = 0; // Row number
for (Files::MultiDirCollection::TIter iter(esm.begin()); iter!=esm.end(); ++iter) for (Files::MultiDirCollection::TIter iter(esm.begin()); iter!=esm.end(); ++iter)
@ -161,14 +225,14 @@ void DataFilesPage::setupDataFiles(const QStringList &paths, bool strict)
} }
// Now on to the plugins // Now on to the plugins
const Files::MultiDirCollection &esp = mFileCollections.getCollection(".esp"); const Files::MultiDirCollection &esp = fileCollections.getCollection(".esp");
for (Files::MultiDirCollection::TIter iter(esp.begin()); iter!=esp.end(); ++iter) for (Files::MultiDirCollection::TIter iter(esp.begin()); iter!=esp.end(); ++iter)
{ {
ESMReader fileReader; ESMReader fileReader;
QStringList availableMasters; // Will contain all found masters QStringList availableMasters; // Will contain all found masters
fileReader.setEncoding("win1252"); // FIXME: This should be configurable! fileReader.setEncoding(variables["encoding"].as<std::string>());
fileReader.open(iter->second.string()); fileReader.open(iter->second.string());
// First we fill the availableMasters and the mMastersWidget // First we fill the availableMasters and the mMastersWidget
@ -238,52 +302,6 @@ void DataFilesPage::setupDataFiles(const QStringList &paths, bool strict)
readConfig(); readConfig();
} }
void DataFilesPage::setupConfig()
{
QString config = (mCfgMgr.getLocalPath() / "launcher.cfg").string().c_str();
QFile file(config);
if (!file.exists()) {
config = QString::fromStdString((mCfgMgr.getUserPath() / "launcher.cfg").string());
}
file.setFileName(config); // Just for displaying information
// Open our config file
mLauncherConfig = new QSettings(config, QSettings::IniFormat);
mLauncherConfig->sync();
// Make sure we have no groups open
while (!mLauncherConfig->group().isEmpty()) {
mLauncherConfig->endGroup();
}
mLauncherConfig->beginGroup("Profiles");
QStringList profiles = mLauncherConfig->childGroups();
if (profiles.isEmpty()) {
// Add a default profile
profiles.append("Default");
}
mProfilesComboBox->addItems(profiles);
QString currentProfile = mLauncherConfig->value("CurrentProfile").toString();
if (currentProfile.isEmpty()) {
// No current profile selected
currentProfile = "Default";
}
mProfilesComboBox->setCurrentIndex(mProfilesComboBox->findText(currentProfile));
mLauncherConfig->endGroup();
// Now we connect the combobox to do something if the profile changes
// This prevents strange behaviour while reading and appending the profiles
connect(mProfilesComboBox, SIGNAL(textChanged(const QString&, const QString&)), this, SLOT(profileChanged(const QString&, const QString&)));
}
void DataFilesPage::createActions() void DataFilesPage::createActions()
{ {
// Refresh the plugins // Refresh the plugins
@ -983,6 +1001,53 @@ void DataFilesPage::writeConfig(QString profile)
return; return;
} }
// Prepare the OpenMW config
// Open the config as a QFile
QFile file(QString::fromStdString((mCfgMgr.getUserPath()/"openmw.cfg").string()));
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
// File cannot be opened or created
QMessageBox msgBox;
msgBox.setWindowTitle("Error writing OpenMW configuration file");
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>Could not open or create %0</b><br><br> \
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
msgBox.exec();
QApplication::exit(1);
}
QTextStream in(&file);
QByteArray buffer;
// Remove all previous master/plugin entries from config
while (!in.atEnd()) {
QString line = in.readLine();
if (!line.contains("master") && !line.contains("plugin")) {
buffer += line += "\n";
}
}
file.close();
// Now we write back the other config entries
if (!file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
QMessageBox msgBox;
msgBox.setWindowTitle("Error writing OpenMW configuration file");
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>Could not write to %0</b><br><br> \
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
msgBox.exec();
QApplication::exit(1);
}
file.write(buffer);
QTextStream gameConfig(&file);
// Make sure we have no groups open // Make sure we have no groups open
while (!mLauncherConfig->group().isEmpty()) { while (!mLauncherConfig->group().isEmpty()) {
mLauncherConfig->endGroup(); mLauncherConfig->endGroup();
@ -995,13 +1060,16 @@ void DataFilesPage::writeConfig(QString profile)
mLauncherConfig->beginGroup(profile); mLauncherConfig->beginGroup(profile);
mLauncherConfig->remove(""); // Clear the subgroup mLauncherConfig->remove(""); // Clear the subgroup
// First write the masters to the config // First write the masters to the configs
const QStringList masterList = selectedMasters(); const QStringList masters = selectedMasters();
// We don't use foreach because we need i // We don't use foreach because we need i
for (int i = 0; i < masterList.size(); ++i) { for (int i = 0; i < masters.size(); ++i) {
const QString master = masterList.at(i); const QString currentMaster = masters.at(i);
mLauncherConfig->setValue(QString("Master%0").arg(i), master);
mLauncherConfig->setValue(QString("Master%0").arg(i), currentMaster);
gameConfig << "master=" << currentMaster << endl;
} }
// Now write all checked plugins // Now write all checked plugins
@ -1009,9 +1077,12 @@ void DataFilesPage::writeConfig(QString profile)
for (int i = 0; i < plugins.size(); ++i) for (int i = 0; i < plugins.size(); ++i)
{ {
mLauncherConfig->setValue(QString("Plugin%1").arg(i), plugins.at(i)); const QString currentPlugin = plugins.at(i);
mLauncherConfig->setValue(QString("Plugin%1").arg(i), currentPlugin);
gameConfig << "plugin=" << currentPlugin << endl;
} }
file.close();
mLauncherConfig->endGroup(); mLauncherConfig->endGroup();
mLauncherConfig->endGroup(); mLauncherConfig->endGroup();

@ -29,16 +29,9 @@ public:
DataFilesPage(Files::ConfigurationManager& cfg, QWidget *parent = 0); DataFilesPage(Files::ConfigurationManager& cfg, QWidget *parent = 0);
ComboBox *mProfilesComboBox; ComboBox *mProfilesComboBox;
QSettings *mLauncherConfig;
const QStringList checkedPlugins();
const QStringList selectedMasters();
void setupConfig();
void readConfig();
void writeConfig(QString profile = QString()); void writeConfig(QString profile = QString());
void setupDataFiles(const QStringList &paths, bool strict);
public slots: public slots:
void masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); void masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
void setCheckState(QModelIndex index); void setCheckState(QModelIndex index);
@ -83,13 +76,20 @@ private:
QAction *mCheckAction; QAction *mCheckAction;
QAction *mUncheckAction; QAction *mUncheckAction;
Files::ConfigurationManager& mCfgMgr; Files::ConfigurationManager &mCfgMgr;
QSettings *mLauncherConfig;
const QStringList checkedPlugins();
const QStringList selectedMasters();
void addPlugins(const QModelIndex &index); void addPlugins(const QModelIndex &index);
void removePlugins(const QModelIndex &index); void removePlugins(const QModelIndex &index);
void uncheckPlugins(); void uncheckPlugins();
void createActions(); void createActions();
void setupDataFiles();
void setupConfig();
void readConfig();
void scrollToSelection(); void scrollToSelection();
}; };

@ -3,7 +3,7 @@
#include "graphicspage.hpp" #include "graphicspage.hpp"
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
GraphicsPage::GraphicsPage(Files::ConfigurationManager& cfg, QWidget *parent) GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, QWidget *parent)
: QWidget(parent) : QWidget(parent)
, mCfgMgr(cfg) , mCfgMgr(cfg)
{ {

@ -20,9 +20,7 @@ class GraphicsPage : public QWidget
Q_OBJECT Q_OBJECT
public: public:
GraphicsPage(Files::ConfigurationManager& cfg, QWidget *parent = 0); GraphicsPage(Files::ConfigurationManager &cfg, QWidget *parent = 0);
QSettings *mOgreConfig;
void writeConfig(); void writeConfig();
@ -30,7 +28,6 @@ public slots:
void rendererChanged(const QString &renderer); void rendererChanged(const QString &renderer);
private: private:
Files::ConfigurationManager& mCfgMgr;
Ogre::Root *mOgre; Ogre::Root *mOgre;
Ogre::RenderSystem *mSelectedRenderSystem; Ogre::RenderSystem *mSelectedRenderSystem;
Ogre::RenderSystem *mOpenGLRenderSystem; Ogre::RenderSystem *mOpenGLRenderSystem;
@ -60,6 +57,10 @@ private:
QCheckBox *mD3DVSyncCheckBox; QCheckBox *mD3DVSyncCheckBox;
QCheckBox *mD3DFullScreenCheckBox; QCheckBox *mD3DFullScreenCheckBox;
QSettings *mOgreConfig;
Files::ConfigurationManager &mCfgMgr;
QString getConfigValue(const QString &key, Ogre::RenderSystem *renderer); QString getConfigValue(const QString &key, Ogre::RenderSystem *renderer);
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer); QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);

@ -31,13 +31,6 @@ int main(int argc, char *argv[])
QDir::setCurrent(dir.absolutePath()); QDir::setCurrent(dir.absolutePath());
// Load the stylesheet
QFile file("./launcher.qss");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
app.setStyleSheet(styleSheet);
MainDialog dialog; MainDialog dialog;
return dialog.exec(); return dialog.exec();

@ -45,6 +45,20 @@ MainDialog::MainDialog()
setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
setMinimumSize(QSize(575, 575)); setMinimumSize(QSize(575, 575));
// Load the stylesheet
QString config = QString::fromStdString((mCfgMgr.getGlobalDataPath() / "launcher.qss").string());
QFile file(config);
if (!file.exists()) {
file.setFileName(QString::fromStdString((mCfgMgr.getLocalPath() / "launcher.qss").string()));
}
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
qApp->setStyleSheet(styleSheet);
file.close();
connect(buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(buttonBox, SIGNAL(accepted()), this, SLOT(play())); connect(buttonBox, SIGNAL(accepted()), this, SLOT(play()));
@ -85,116 +99,13 @@ void MainDialog::createIcons()
} }
QStringList MainDialog::readConfig(const QString &fileName)
{
// We can't use QSettings directly because it
// does not support multiple keys with the same name
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox msgBox;
msgBox.setWindowTitle("Error opening OpenMW configuration file");
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>Could not open %0</b><br><br> \
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
msgBox.exec();
QApplication::exit(); // File cannot be opened or created
}
QTextStream in(&file);
QStringList dataDirs;
QString dataLocal;
// Read the config line by line
while (!in.atEnd()) {
QString line = in.readLine();
if (line.startsWith("data=")) {
dataDirs.append(line.remove("data="));
}
// Read the data-local key, if more than one are found only the last is used
if (line.startsWith("data-local=")) {
dataLocal = line.remove("data-local=");
}
// Read fs-strict key
if (line.startsWith("fs-strict=")) {
QString value = line.remove("fs-strict=");
(value.toLower() == QLatin1String("true"))
? mStrict = true
: mStrict = false;
}
}
// Add the data-local= key to the end of the dataDirs for priority reasons
if (!dataLocal.isEmpty()) {
dataDirs.append(dataLocal);
}
if (!dataDirs.isEmpty())
{
// Reset the global datadirs to the newly read entries
// Else return the previous dataDirs because nothing was found in this file;
mDataDirs = dataDirs;
}
file.close();
return mDataDirs;
}
void MainDialog::createPages() void MainDialog::createPages()
{ {
mPlayPage = new PlayPage(this); mPlayPage = new PlayPage(this);
mGraphicsPage = new GraphicsPage(mCfgMgr, this); mGraphicsPage = new GraphicsPage(mCfgMgr, this);
mDataFilesPage = new DataFilesPage(mCfgMgr, this); mDataFilesPage = new DataFilesPage(mCfgMgr, this);
// Retrieve all data entries from the configs // Set the combobox of the play page to imitate the combobox on the datafilespage
QStringList dataDirs;
// Global location
QFile file(QString::fromStdString((mCfgMgr.getGlobalPath()/"openmw.cfg").string()));
if (file.exists()) {
dataDirs = readConfig(file.fileName());
}
// Local location
file.setFileName("./openmw.cfg");
if (file.exists()) {
dataDirs = readConfig(file.fileName());
}
// User location
file.setFileName(QString::fromStdString((mCfgMgr.getUserPath()/"openmw.cfg").string()));
if (file.exists()) {
dataDirs = readConfig(file.fileName());
}
file.close();
if (!dataDirs.isEmpty()) {
// Now pass the datadirs on to the DataFilesPage
mDataFilesPage->setupDataFiles(dataDirs, mStrict);
} else {
QMessageBox msgBox;
msgBox.setWindowTitle("Error reading OpenMW configuration file");
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>Could not read the location of the data files</b><br><br> \
Please make sure OpenMW is correctly configured and try again.<br>"));
msgBox.exec();
QApplication::exit(); // No data or data-local entries in openmw.cfg
}
// Set the combobox of the play page to imitate the comobox on the datafilespage
mPlayPage->mProfilesComboBox->setModel(mDataFilesPage->mProfilesComboBox->model()); mPlayPage->mProfilesComboBox->setModel(mDataFilesPage->mProfilesComboBox->model());
mPlayPage->mProfilesComboBox->setCurrentIndex(mDataFilesPage->mProfilesComboBox->currentIndex()); mPlayPage->mProfilesComboBox->setCurrentIndex(mDataFilesPage->mProfilesComboBox->currentIndex());
@ -246,14 +157,16 @@ void MainDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous)
void MainDialog::closeEvent(QCloseEvent *event) void MainDialog::closeEvent(QCloseEvent *event)
{ {
// Now write all config files // Now write all config files
writeConfig(); mDataFilesPage->writeConfig();
mGraphicsPage->writeConfig();
event->accept(); event->accept();
} }
void MainDialog::play() void MainDialog::play()
{ {
// First do a write of all the configs, just to be sure // First do a write of all the configs, just to be sure
writeConfig(); mDataFilesPage->writeConfig();
mGraphicsPage->writeConfig();
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
QString game = "./openmw.exe"; QString game = "./openmw.exe";
@ -313,75 +226,3 @@ void MainDialog::play()
close(); close();
} }
} }
void MainDialog::writeConfig()
{
// Write the profiles
mDataFilesPage->writeConfig();
mDataFilesPage->mLauncherConfig->sync();
// Write the graphics settings
mGraphicsPage->writeConfig();
mGraphicsPage->mOgreConfig->sync();
QStringList dataFiles = mDataFilesPage->selectedMasters();
dataFiles.append(mDataFilesPage->checkedPlugins());
// Open the config as a QFile
QFile file(QString::fromStdString((mCfgMgr.getUserPath()/"openmw.cfg").string()));
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
// File cannot be opened or created
QMessageBox msgBox;
msgBox.setWindowTitle("Error writing OpenMW configuration file");
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>Could not open or create %0</b><br><br> \
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
msgBox.exec();
QApplication::exit(1);
}
QTextStream in(&file);
QByteArray buffer;
// Remove all previous master/plugin entries from config
while (!in.atEnd()) {
QString line = in.readLine();
if (!line.contains("master") && !line.contains("plugin")) {
buffer += line += "\n";
}
}
file.close();
// Now we write back the other config entries
if (!file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
QMessageBox msgBox;
msgBox.setWindowTitle("Error writing OpenMW configuration file");
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>Could not write to %0</b><br><br> \
Please make sure you have the right permissions and try again.<br>").arg(file.fileName()));
msgBox.exec();
QApplication::exit(1);
}
file.write(buffer);
QTextStream out(&file);
// Write the list of game files to the config
foreach (const QString &currentFile, dataFiles) {
if (currentFile.endsWith(QString(".esm"), Qt::CaseInsensitive)) {
out << "master=" << currentFile << endl;
} else if (currentFile.endsWith(QString(".esp"), Qt::CaseInsensitive)) {
out << "plugin=" << currentFile << endl;
}
}
file.close();
}

@ -28,15 +28,11 @@ public slots:
void play(); void play();
void profileChanged(int index); void profileChanged(int index);
private: private:
void createIcons(); void createIcons();
void createPages(); void createPages();
void writeConfig();
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event);
QStringList readConfig(const QString &fileName);
QListWidget *mIconWidget; QListWidget *mIconWidget;
QStackedWidget *mPagesWidget; QStackedWidget *mPagesWidget;
@ -44,9 +40,6 @@ private:
GraphicsPage *mGraphicsPage; GraphicsPage *mGraphicsPage;
DataFilesPage *mDataFilesPage; DataFilesPage *mDataFilesPage;
QStringList mDataDirs;
bool mStrict;
Files::ConfigurationManager mCfgMgr; Files::ConfigurationManager mCfgMgr;
}; };

@ -124,7 +124,7 @@ void ConfigurationManager::loadConfig(const boost::filesystem::path& path,
if (configFileStream.is_open()) if (configFileStream.is_open())
{ {
boost::program_options::store(boost::program_options::parse_config_file( boost::program_options::store(boost::program_options::parse_config_file(
configFileStream, description), variables); configFileStream, description, true), variables);
std::cout << "done." << std::endl; std::cout << "done." << std::endl;
} }

Loading…
Cancel
Save