Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • applications/mhwd
  • johann-koebbe/mhwd
  • yochananmarqos1/mhwd
3 results
Show changes
/*
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PRINTER_HPP_
#define PRINTER_HPP_
#include <hd.h>
#include <string>
#include <vector>
#include "Config.hpp"
#include "Device.hpp"
#include "Enums.hpp"
class ConsoleWriter
{
public:
void printStatus(std::string statusMsg) const;
void printError(std::string errorMsg) const;
void printWarning(std::string warningMsg) const;
void printMessage(MHWD::MESSAGETYPE type, std::string str) const;
void printHelp() const;
void printVersion(std::string& versionMhwd, std::string& yearCopy) const;
void listDevices(const std::vector<std::shared_ptr<Device>>& devices,
std::string typeOfDevice) const;
void listConfigs(const std::vector<std::shared_ptr<Config>>& configs,
std::string header) const;
void printAvailableConfigsInDetail(const std::string& deviceType,
const std::vector<std::shared_ptr<Device>>& devices) const;
void printInstalledConfigs(const std::string& deviceType,
const std::vector<std::shared_ptr<Config>>& installedConfigs) const;
void printConfigDetails(const Config& config) const;
void printDeviceDetails(hw_item hw, FILE *f = stdout) const;
private:
void printLine() const;
const char* CONSOLE_COLOR_RESET {"\033[m"};
const char* CONSOLE_RED_MESSAGE_COLOR {"\033[1m\033[31m"};
const char* CONSOLE_TEXT_OUTPUT_COLOR {"\033[0;32m"};
};
#endif /* PRINTER_HPP_ */
This diff is collapsed.
/*
* Data.hpp
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Created on: 28 sie 2014
* Author: dec
* Copyright (C) 2012 - 2024 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DATA_HPP_
......@@ -12,20 +29,24 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <memory>
#include <string>
#include <vector>
#include <cstdint>
#include "Config.hpp"
#include "const.h"
#include "Device.hpp"
#include "../libmhwd/const.h"
#include "../libmhwd/vita/string.hpp"
#include "vita/string.hpp"
class Data {
class Data
{
public:
Data();
~Data();
~Data() = default;
struct Environment {
struct Environment
{
std::string PMCachePath {MHWD_PM_CACHE_DIR};
std::string PMConfigPath {MHWD_PM_CONFIG};
std::string PMRootPath {MHWD_PM_ROOT};
......@@ -33,44 +54,45 @@ public:
};
Environment environment;
std::vector<Device*> USBDevices;
std::vector<Device*> PCIDevices;
std::vector<Config*> installedUSBConfigs;
std::vector<Config*> installedPCIConfigs;
std::vector<Config*> allUSBConfigs;
std::vector<Config*> allPCIConfigs;
std::vector<Config*> invalidConfigs;
std::vector<std::shared_ptr<Device>> USBDevices;
std::vector<std::shared_ptr<Device>> PCIDevices;
std::vector<std::shared_ptr<Config>> installedUSBConfigs;
std::vector<std::shared_ptr<Config>> installedPCIConfigs;
std::vector<std::shared_ptr<Config>> allUSBConfigs;
std::vector<std::shared_ptr<Config>> allPCIConfigs;
std::vector<std::shared_ptr<Config>> invalidConfigs;
void updateInstalledConfigData();
void getAllDevicesOfConfig(Config *config, std::vector<Device*>* foundDevices);
bool fillConfig(Config *config, std::string configPath, std::string type);
void getAllDevicesOfConfig(std::shared_ptr<Config> config, std::vector<std::shared_ptr<Device>>& foundDevices);
std::vector<Config*> getAllDependenciesToInstall(Config *config);
void getAllDependenciesToInstall(Config *config, std::vector<Config*>* installedConfigs,
std::vector<Config*> *depends);
Config* getDatabaseConfig(const std::string configName, const std::string configType);
std::vector<Config*> getAllLocalConflicts(Config *config);
std::vector<Config*> getAllLocalRequirements(Config *config);
std::vector<std::shared_ptr<Config>> getAllDependenciesToInstall(std::shared_ptr<Config> config);
void getAllDependenciesToInstall(std::shared_ptr<Config> config,
std::vector<std::shared_ptr<Config>>& installedConfigs,
std::vector<std::shared_ptr<Config>> *depends);
std::shared_ptr<Config> getDatabaseConfig(const std::string configName,
const std::string configType);
std::vector<std::shared_ptr<Config>> getAllLocalConflicts(std::shared_ptr<Config> config);
std::vector<std::shared_ptr<Config>> getAllLocalRequirements(std::shared_ptr<Config> config);
private:
void getAllDevicesOfConfig(std::vector<Device*>* devices, Config *config,
std::vector<Device*>* foundDevices);
void getAllDevicesOfConfig(const std::vector<std::shared_ptr<Device>>& devices,
std::shared_ptr<Config> config, std::vector<std::shared_ptr<Device>>& foundDevices);
void fillInstalledConfigs(std::string type);
void fillDevices(std::string type);
void fillDevices(hw_item hw, std::vector<std::shared_ptr<Device>>& devices);
void fillAllConfigs(std::string type);
void setMatchingConfigs(std::vector<Device*>* devices, std::vector<Config*>* configs,
void setMatchingConfigs(const std::vector<std::shared_ptr<Device>>& devices,
std::vector<std::shared_ptr<Config>>& configs, bool setAsInstalled);
void setMatchingConfig(std::shared_ptr<Config> config, const std::vector<std::shared_ptr<Device>>& devices,
bool setAsInstalled);
void setMatchingConfig(Config* config, std::vector<Device*>* devices, bool setAsInstalled);
void addConfigSorted(std::vector<Config*>* configs, Config* config);
std::vector<std::string> getRecursiveDirectoryFileList(const std::string directoryPath,
void addConfigSorted(std::vector<std::shared_ptr<Config>>& configs, std::shared_ptr<Config> newConfig);
std::vector<std::string> getRecursiveDirectoryFileList(const std::string& directoryPath,
std::string onlyFilename = "");
Vita::string getRightConfigPath(Vita::string str, Vita::string baseConfigPath);
std::vector<std::string> splitValue(Vita::string str, Vita::string onlyEnding = "");
void updateConfigData();
Vita::string from_Hex(uint16_t hexnum, int fill);
Vita::string from_CharArray(char* c);
std::string from_CharArray(char* c);
};
#endif /* DATA_HPP_ */
/*
* Device.cpp
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Created on: 28 sie 2014
* Author: dec
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Device.hpp"
......
/*
* Device.hpp
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Created on: 28 sie 2014
* Author: dec
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEVICE_HPP_
#define DEVICE_HPP_
#include <memory>
#include <string>
#include <vector>
#include "Config.hpp"
#include "Enums.hpp"
struct Device
{
std::string type;
std::string className;
std::string deviceName;
std::string vendorName;
std::string classID;
std::string deviceID;
std::string vendorID;
std::string sysfsBusID;
std::string sysfsID;
std::vector<Config*> availableConfigs;
std::vector<Config*> installedConfigs;
std::string type_;
std::string className_;
std::string deviceName_;
std::string vendorName_;
std::string classID_;
std::string deviceID_;
std::string vendorID_;
std::string sysfsBusID_;
std::string sysfsID_;
std::vector<std::shared_ptr<Config>> availableConfigs_;
std::vector<std::shared_ptr<Config>> installedConfigs_;
};
#endif /* DEVICE_HPP_ */
/*
* Enums.hpp
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Created on: 28 sie 2014
* Author: dec
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ENUMS_HPP_
......@@ -10,22 +27,6 @@
namespace MHWD
{
enum ARGUMENTS
{
NONE = 0x0000,
SHOWPCI = 0x0001,
SHOWUSB = 0x0002,
INSTALL = 0x004,
REMOVE = 0x0008,
DETAIL = 0x0010,
FORCE = 0x0020,
LISTALL = 0x0040,
LISTINSTALLED = 0x0080,
LISTAVAILABLE = 0x0100,
LISTHARDWARE = 0x0200,
CUSTOMINSTALL = 0x0400,
AUTOCONFIGURE = 0x0800
};
enum class STATUS
{
......
This diff is collapsed.
/*
* Mhwd.hpp
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* Created on: 26 sie 2014
* Author: dec
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MHWD_HPP_
......@@ -20,54 +37,70 @@
#include <vector>
#include "Config.hpp"
#include "../libmhwd/const.h"
#include "const.h"
#include "ConsoleWriter.hpp"
#include "Data.hpp"
#include "Device.hpp"
#include "Enums.hpp"
#include "Printer.hpp"
#include "vita/string.hpp"
#include "Transaction.hpp"
class Mhwd
{
public:
Mhwd();
~Mhwd();
Mhwd() = default;
~Mhwd() = default;
void setVersionMhwd(std::string versionOfSoftware, std::string yearCopyright);
int launch(int argc, char *argv[]);
private:
bool performTransaction(Config* config, MHWD::TRANSACTIONTYPE type);
bool isUserRoot() const;
std::string checkEnvironment();
void printDeviceDetails(std::string type, FILE *f = stdout);
Config* getInstalledConfig(const std::string& configName, const std::string& configType);
Config* getDatabaseConfig(const std::string& configName, const std::string configType);
Config* getAvailableConfig(const std::string& configName, const std::string configType);
std::vector<Config*> getAllLocalRequirements(Config *config);
MHWD::ARGUMENTS arguments_;
Config* config_;
struct Arguments
{
bool SHOW_PCI = false;
bool SHOW_USB = false;
bool INSTALL = false;
bool REMOVE = false;
bool DETAIL = false;
bool FORCE = false;
bool LIST_ALL = false;
bool LIST_INSTALLED = false;
bool LIST_AVAILABLE = false;
bool LIST_HARDWARE = false;
bool CUSTOM_INSTALL = false;
bool AUTOCONFIGURE = false;
} arguments_;
std::shared_ptr<Config> config_;
Data data_;
Printer printer_;
ConsoleWriter consoleWriter_;
std::vector<std::string> configs_;
std::string version_, year_;
bool performTransaction(std::shared_ptr<Config> config, MHWD::TRANSACTIONTYPE type);
bool isUserRoot() const;
std::vector<std::string> checkEnvironment() const;
MHWD::STATUS performTransaction(Transaction *transaction);
std::shared_ptr<Config> getInstalledConfig(const std::string& configName, const std::string& configType);
std::shared_ptr<Config> getDatabaseConfig(const std::string& configName, const std::string& configType);
std::shared_ptr<Config> getAvailableConfig(const std::string& configName, const std::string& configType);
int hexToInt(std::string hex);
MHWD::STATUS performTransaction(const Transaction& transaction);
bool proceedWithInstallation(const std::string& input) const;
bool copyDirectory(const std::string source, const std::string destination);
bool copyFile(const std::string source, const std::string destination, const mode_t mode =
bool copyDirectory(const std::string& source, const std::string& destination);
bool copyFile(const std::string& source, const std::string destination, const mode_t mode =
S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IROTH);
bool removeDirectory(const std::string directory);
bool checkExist(const std::string path);
bool createDir(const std::string path, const mode_t mode =
bool removeDirectory(const std::string& directory);
bool dirExists(const std::string& path) const;
bool createDir(const std::string& path, const mode_t mode =
S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH);
MHWD::STATUS installConfig(Config *config);
MHWD::STATUS installConfig(std::shared_ptr<Config> config);
MHWD::STATUS uninstallConfig(Config *config);
bool runScript(Config *config, MHWD::TRANSACTIONTYPE operationType);
bool runScript(std::shared_ptr<Config> config, MHWD::TRANSACTIONTYPE operationType);
void tryToParseCmdLineOptions(int argc, char* argv[], bool& autoConfigureNonFreeDriver,
std::string& operationType, std::string& autoConfigureClassID);
bool optionsDontInterfereWithEachOther() const;
std::string gatherConfigContent(const std::vector<std::shared_ptr<Config>> & config) const;
};
#endif /* MHWD_HPP_ */
/*
* Printer.hpp
*
* Created on: 28 sie 2014
* Author: dec
*/
#ifndef PRINTER_HPP_
#define PRINTER_HPP_
#include <string>
#include <vector>
#include "Config.hpp"
#include "Device.hpp"
#include "Enums.hpp"
class Printer
{
public:
Printer();
~Printer();
void printStatus(std::string statusMsg) const;
void printError(std::string errorMsg) const;
void printWarning(std::string warningMsg) const;
void printMessage(MHWD::MESSAGETYPE type, std::string str) const;
void printHelp() const;
void listDevices(const std::vector<Device*>& devices, std::string typeOfDevice) const;
void listConfigs(const std::vector<Config*>& configs,
std::string beg, std::string empty = "") const;
void printAvailableConfigs(const std::string& deviceType,
const std::vector<Device*>& devices) const;
void printInstalledConfigs(const std::string& deviceType,
const std::vector<Config*>& installedConfigs) const;
void printConfigDetails(const Config& config) const;
private:
void printLine() const;
const char* CONSOLE_COLOR_RESET {"\e[m"};
const char* CONSOLE_MESSAGE_COLOR {"\e[1m\e[31m"};
const char* CONSOLE_TEXT_OUTPUT_COLOR {"\e[0;32m"};
};
#endif /* PRINTER_HPP_ */
/*
* Transaction.cpp
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Created on: 28 sie 2014
* Author: dec
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Transaction.hpp"
Transaction::Transaction(Data data, Config* config, MHWD::TRANSACTIONTYPE type,
bool allowReinstallation = false)
Transaction::Transaction(Data data, std::shared_ptr<Config> config, MHWD::TRANSACTIONTYPE type,
bool allowReinstallation)
: config_(config), type_(type),
dependencyConfigs_(data.getAllDependenciesToInstall(config)),
conflictedConfigs_(data.getAllLocalConflicts(config)),
configsRequirements_(data.getAllLocalRequirements(config)),
data_(data), allowedToReinstall_(allowReinstallation)
allowedToReinstall_(allowReinstallation)
{
}
......
/*
* Transaction.hpp
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* Created on: 28 sie 2014
* Author: dec
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRANSACTION_HPP_
......@@ -17,18 +34,19 @@
class Transaction
{
public:
Transaction() {}
Transaction(Data data, Config* config, MHWD::TRANSACTIONTYPE type, bool allowReinstallation);
Transaction() = delete;
Transaction(Data data, std::shared_ptr<Config> config, MHWD::TRANSACTIONTYPE type,
bool allowReinstallation);
bool isAllowedToReinstall() const;
Config* config_;
std::shared_ptr<Config> config_;
MHWD::TRANSACTIONTYPE type_;
std::vector<Config*> dependencyConfigs_;
std::vector<Config*> conflictedConfigs_;
std::vector<Config*> configsRequirements_;
std::vector<std::shared_ptr<Config>> dependencyConfigs_;
std::vector<std::shared_ptr<Config>> conflictedConfigs_;
std::vector<std::shared_ptr<Config>> configsRequirements_;
Data data_;
bool allowedToReinstall_;
private:
bool allowedToReinstall_ = false;
};
#endif /* TRANSACTION_HPP_ */
/*
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
* Oscar Forner Martinez <oscar.forner.martinez@gmail.com>
*
* Copyright (C) 2012 - 2016 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MHWDUTILS_HPP_
#define MHWDUTILS_HPP_
#include <string>
#include <cstdint>
namespace MhwdUtils
{
typedef std::uint64_t hash_t;
// Hardcoded values for the prime and the basis to calculate hash values.
constexpr hash_t prime = 0x100000001B3ull;
constexpr hash_t basis = 0xCBF29CE484222325ull;
constexpr hash_t hash_compile_time(char const* str, hash_t last_value = basis)
{
return *str ? hash_compile_time(str+1, (*str ^ last_value) * prime) : last_value;
}
hash_t hash(char const* str)
{
hash_t ret{basis};
while(*str){
ret ^= *str;
ret *= prime;
str++;
}
return ret;
}
}; // End namespace
#endif /* MHWDUTILS_HPP_ */
/*
* This file is part of the mhwd - Manjaro Hardware Detection project
*
* mhwd - Manjaro Hardware Detection
* Roland Singer <roland@manjaro.org>
* Philip Müller <philm@manjaro.org>
* Łukasz Matysiak <december0123@gmail.com>
* Filipe Marques <eagle.software3@gmail.com>
*
* Copyright (C) 2007 Free Software Foundation, Inc.
* Copyright (C) 2012 - 2024 Manjaro (http://manjaro.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -17,10 +22,22 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include "Mhwd.hpp"
int main(int argc, char *argv[])
{
Mhwd mhwd;
return mhwd.launch(argc, argv);
try
{
Mhwd mhwd;
mhwd.setVersionMhwd("0.6.6","2012-2024");
return mhwd.launch(argc, argv);
}
catch(...)
{
std::cerr << "Unknown errors occured...";
return -1;
}
}