diff --git a/CMakeLists.txt b/CMakeLists.txt index c6f9ff6..9b57de6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,9 +4,9 @@ project(Lampray) set(CMAKE_CXX_STANDARD 17) +option(USE_XDG_DIRECTORY "Use XDG directory to store data instead of the working directory" ON) - -add_executable(Lampray main.cpp +add_executable(${PROJECT_NAME} main.cpp third-party/imgui/imconfig.h third-party/imgui/imgui.cpp third-party/imgui/imgui.h @@ -39,7 +39,7 @@ add_executable(Lampray main.cpp Lampray/Filesystem/lampUpdate.cpp Lampray/Control/lampGames.h Lampray/Filesystem/lampShare.cpp - "Lampray/Menu/lampCustomise .h" + Lampray/Menu/lampCustomise.h Lampray/Filesystem/lampTrack.cpp game-data/C77/C77.cpp game-data/C77/C77.h @@ -50,6 +50,9 @@ add_executable(Lampray main.cpp Lampray/Lang/lampLang.h ) +if(USE_XDG_DIRECTORY) + target_compile_definitions(${PROJECT_NAME} PUBLIC USE_XDG) +endif(USE_XDG_DIRECTORY) diff --git a/Lampray/Base/lampBase.h b/Lampray/Base/lampBase.h index 153dd4c..5549fbe 100644 --- a/Lampray/Base/lampBase.h +++ b/Lampray/Base/lampBase.h @@ -134,6 +134,27 @@ namespace Lamp::Core::Base{ return data < other.data; } + + /** + * brief Custom equality operator for lampStrings + * + * @param other The lampString to compare with + * @return true if the contents of the strings are the same, false otherwise. + */ + bool operator==(const lampString& other) const { + return data == other.data; + } + + /** + * @brief Custom equality operator for C-style strings + * + * @param the string to compare to + * @return true if the contents of the strings are the same, fale otherwise. + */ + bool operator==(const char* other) const { + return data == other; + } + /** * @brief Custom operator to convert a lampString to a C-style string (const char*). * diff --git a/Lampray/Control/lampConfig.cpp b/Lampray/Control/lampConfig.cpp index b44e5ef..f9d1600 100644 --- a/Lampray/Control/lampConfig.cpp +++ b/Lampray/Control/lampConfig.cpp @@ -7,17 +7,17 @@ bool Lamp::Core::lampConfig::init() { Base::lampLog::getInstance().log("Initializing Lampray"); - if((std::string)bit7zLibaryLocation == "") { + if((std::string)bit7zLibraryLocation == "") { Base::lampLog::getInstance().log("Searching for 7z.so"); std::filesystem::path f{"/usr/libexec/p7zip/7z.so"}; if (std::filesystem::exists(f)) { - bit7zLibaryLocation = "/usr/libexec/p7zip/7z.so"; + bit7zLibraryLocation = "/usr/libexec/p7zip/7z.so"; } else if (exists(std::filesystem::path{"/usr/lib/p7zip/7z.so"})) { - bit7zLibaryLocation = "/usr/lib/p7zip/7z.so"; + bit7zLibraryLocation = "/usr/lib/p7zip/7z.so"; } else if (exists(std::filesystem::path{"/usr/lib64/p7zip/7z.so"})) { - bit7zLibaryLocation = "/usr/lib64/p7zip/7z.so"; + bit7zLibraryLocation = "/usr/lib64/p7zip/7z.so"; } else if (exists(std::filesystem::path{"/usr/libexec/7z.so"})) { - bit7zLibaryLocation = "/usr/libexec/7z.so"; + bit7zLibraryLocation = "/usr/libexec/7z.so"; } else { Base::lampLog::getInstance().log("Fatal. Cannot locate 7z.so", Base::lampLog::ERROR, true, Base::lampLog::LMP_NO7ZP); diff --git a/Lampray/Control/lampConfig.h b/Lampray/Control/lampConfig.h index 2be0bd0..a55cd28 100644 --- a/Lampray/Control/lampConfig.h +++ b/Lampray/Control/lampConfig.h @@ -7,6 +7,7 @@ #include #include +#include #include "../../game-data/gameControl.h" #include "../Base/lampBase.h" @@ -35,17 +36,16 @@ namespace Lamp::Core { } lampConfig(lampConfig const&) = delete; - void operator=(lampConfig const&) = delete; - - //((std::string)std::getenv("HOME")) + "/.lamp/ - const lampString baseDataPath = "Lamp_Data/"; + void operator=(lampConfig const&) = delete; + + const lampString baseDataPath = getBaseDataPath(); const lampString saveDataPath = baseDataPath + "Mod_Lists/"; const lampString archiveDataPath = baseDataPath + "Archives/"; const lampString ConfigDataPath = baseDataPath + "Config/"; const lampString DeploymentDataPath = baseDataPath + "Deployment/"; const lampString workingPaths = baseDataPath + "WorkingDirectories/"; - lampString bit7zLibaryLocation = ""; + lampString bit7zLibraryLocation = ""; const bool defaultCheckForUpdateAtStart = true; bool checkForUpdatesAtStartup = true; @@ -78,6 +78,23 @@ namespace Lamp::Core { * The constructor is private to ensure that only one instance of `lampConfig` can exist. */ lampConfig(){}; + + static lampString getBaseDataPath() { + std::string ret = ""; +#ifdef USE_XDG + char *xdg_data_home = std::getenv("XDG_DATA_HOME"); + + if (!xdg_data_home) { + ret += std::getenv("HOME"); + ret += "/.local/share"; + } + + ret += "/lampray/"; +#else + ret = "Lamp_Data/"; +#endif + return lampString(ret); + } }; }; #endif //LAMP_LAMPCONFIG_H diff --git a/Lampray/Filesystem/lampExtract.cpp b/Lampray/Filesystem/lampExtract.cpp index 19df6c3..36fb2f3 100644 --- a/Lampray/Filesystem/lampExtract.cpp +++ b/Lampray/Filesystem/lampExtract.cpp @@ -17,7 +17,7 @@ Lamp::Core::FS::lampReturn Lamp::Core::FS::lampExtract::extract(const Base::lamp Base::lampLog::getInstance().log("Extracting File: " + mod->ArchivePath, Base::lampLog::LOG); if (std::regex_match((std::string)mod->ArchivePath, std::regex("^.*\\.(zip)$"))) { try { - bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation}; + bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation}; bit7z::BitArchiveReader reader{lib, mod->ArchivePath, bit7z::BitFormat::Zip}; reader.test(); reader.extract(workingDir + "/ext/" + std::filesystem::path(mod->ArchivePath).filename().stem().string()); @@ -28,14 +28,14 @@ Lamp::Core::FS::lampReturn Lamp::Core::FS::lampExtract::extract(const Base::lamp } } else if (std::regex_match((std::string)mod->ArchivePath, std::regex("^.*\\.(rar)$"))) { try { - bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation}; + bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation}; bit7z::BitArchiveReader reader{lib, mod->ArchivePath, bit7z::BitFormat::Rar5}; reader.test(); reader.extract(workingDir + "/ext/" + std::filesystem::path(mod->ArchivePath).filename().stem().string()); return Base::lampLog::getInstance().pLog({1, "Extraction Successful. : "+ mod->ArchivePath}, Base::lampLog::LOG); } catch (const bit7z::BitException &ex) { try { - bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation}; + bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation}; bit7z::BitArchiveReader reader{lib, mod->ArchivePath, bit7z::BitFormat::Rar}; reader.test(); reader.extract(workingDir + "/ext/" + std::filesystem::path(mod->ArchivePath).filename().stem().string()); @@ -47,7 +47,7 @@ Lamp::Core::FS::lampReturn Lamp::Core::FS::lampExtract::extract(const Base::lamp } } else if (std::regex_match((std::string)mod->ArchivePath, std::regex("^.*\\.(7z)$"))) { try { - bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation}; + bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation}; bit7z::BitArchiveReader reader{lib, mod->ArchivePath, bit7z::BitFormat::SevenZip}; reader.test(); reader.extract(workingDir + "/ext/" + std::filesystem::path(mod->ArchivePath).filename().stem().string()); diff --git a/Lampray/Filesystem/lampIO.cpp b/Lampray/Filesystem/lampIO.cpp index bf45282..36c75f0 100644 --- a/Lampray/Filesystem/lampIO.cpp +++ b/Lampray/Filesystem/lampIO.cpp @@ -106,8 +106,8 @@ Lamp::Core::FS::lampIO::saveModList(Lamp::Core::FS::lampString game, std::vector Lamp::Core::FS::lampReturn Lamp::Core::FS::lampIO::saveKeyData(Lamp::Core::FS::lampString key, Lamp::Core::FS::lampString data, Lamp::Core::FS::lampString game) { - std::string actual = game; - if((std::string)game == "") { + lampString actual = game; + if(game == "") { actual = (std::string)Lamp::Games::getInstance().currentGame->Ident().ShortHand;; } Base::lampLog::getInstance().log("Saving " + actual + ":" + key + ":" + data); @@ -148,17 +148,13 @@ Lamp::Core::FS::lampIO::saveKeyData(Lamp::Core::FS::lampString key, Lamp::Core:: Base::lampLog::getInstance().log("Failed to save " + game + ":" + key + ":" + ":" + data, Base::lampLog::ERROR, true, Base::lampLog::LMP_KEYSAVEFAILED); return Lamp::Core::FS::lampReturn(0); - - - - } Lamp::Core::FS::lampReturn Lamp::Core::FS::lampIO::loadKeyData(Lamp::Core::FS::lampString key, Lamp::Core::FS::lampString game) { std::string actual = game; - if((std::string)game == "") { + if(game == "") { actual = (std::string)Lamp::Games::getInstance().currentGame->Ident().ShortHand;; } Base::lampLog::lampLog::getInstance().log("Loading " + actual + ":" + key); @@ -210,8 +206,8 @@ void Lamp::Core::FS::lampIO::fileDrop(const char *inputPath) { Base::lampLog::LMP_NOFILEDROP); } } if(std::regex_match(path.filename().string(), std::regex("^.*\\.(pak)$"))){ - if((std::string)Lamp::Games::getInstance().currentGame->Ident().ReadableName == "Baldur's Gate 3") { - bit7z::Bit7zLibrary lib{ Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation }; + if(Lamp::Games::getInstance().currentGame->Ident().ReadableName == "Baldur's Gate 3") { + bit7z::Bit7zLibrary lib{ Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation }; bit7z::BitArchiveWriter archive{ lib, bit7z::BitFormat::SevenZip }; archive.addFile(path); archive.compressTo(lampConfig::getInstance().archiveDataPath+"/"+path.filename().string()+" LMP.zip" ); diff --git a/Lampray/Filesystem/lampShare.cpp b/Lampray/Filesystem/lampShare.cpp index 350a22d..6375849 100644 --- a/Lampray/Filesystem/lampShare.cpp +++ b/Lampray/Filesystem/lampShare.cpp @@ -197,7 +197,7 @@ void Lamp::Core::FS::lampShare::importProfile() { Lamp::Core::lampControl::getInstance().inDeployment = true; Lamp::Core::lampControl::getInstance().deploymentStageTitle = "Importing Profile"; Lamp::Core::lampControl::getInstance().deplopmentTracker = {0,11}; - bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation}; + bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation}; std::filesystem::create_directories("import/"); nfdchar_t *outPath = NULL; nfdresult_t result = NFD_OpenDialog( "lampProfile", NULL, &outPath ); @@ -329,7 +329,7 @@ void Lamp::Core::FS::lampShare::exportProfile(std::string profileNameS) { Lamp::Core::lampControl::getInstance().inDeployment = true; Lamp::Core::lampControl::getInstance().deploymentStageTitle = "Creating "+profileName +".lampProfile"; Lamp::Core::lampControl::getInstance().deplopmentTracker = {0,3}; - bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation}; + bit7z::Bit7zLibrary lib{Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation}; std::vector TempModList = Lamp::Core::FS::lampIO::loadModList( Lamp::Games::getInstance().currentGame->Ident().ShortHand, profileName); std::map files_map = {}; diff --git a/Lampray/Lang/lampLang.h b/Lampray/Lang/lampLang.h index 1bac271..49a2757 100644 --- a/Lampray/Lang/lampLang.h +++ b/Lampray/Lang/lampLang.h @@ -5,10 +5,12 @@ #ifndef LAMPRAY_LAMPLANG_H #define LAMPRAY_LAMPLANG_H +#include #include #include #include #include +#include "../Control/lampConfig.h" #include "../Base/lampBase.h" namespace Lamp { @@ -49,10 +51,10 @@ namespace Lamp { } - Base::lampTypes::lampReturn build(Base::lampTypes::lampString filePath){ + Base::lampTypes::lampReturn build(const std::filesystem::path& filePath){ if (!std::filesystem::exists(filePath)) { - return {false, "File not found: " + filePath}; + return {false, "File not found: " + filePath.string()}; } // Load the XML document @@ -68,7 +70,7 @@ namespace Lamp { if (langNode) { LanguageName = langNode.attribute("name").value(); } else { - return {false,"Failed to load language. No Name."}; + return {false, "Failed to load language. No Name."}; } for (pugi::xml_node node = langNode.child("LangNode"); node; node = node.next_sibling("LangNode")) { @@ -93,7 +95,7 @@ namespace Lamp { LanguageContainer CurrentLanguage; - void createEnglishUK(){ + std::filesystem::path createEnglishUK(){ pugi::xml_document doc; auto root = doc.append_child("LamprayLang"); root.append_attribute("name").set_value("English (UK)"); @@ -194,8 +196,13 @@ This action cannot be undone.)"); addLangNode("LAMPRAY_SELECT_PATH", "Select Path"); addLangNode("LAMPRAY_ERROR_7Z", "Failed to find 7z.so! Many actions, such as deployment, will not function correctly. See the wiki for more information."); addLangNode("LAMPRAY_WARN_GAME_PATH", " directories are not set. Deployment will not work until you have set them in the Game Configuration menu."); - std::filesystem::create_directories("Lamp_Language/"); - doc.save_file("Lamp_Language/English (UK).xml"); + + auto baseDirectory = Lamp::Core::lampConfig::getInstance().baseDataPath + "Language/"; + std::filesystem::create_directory(baseDirectory); + + std::filesystem::path path = baseDirectory + "English (UK).xml"; + doc.save_file(path.c_str()); + return path; } private: diff --git a/Lampray/Menu/lampCustomise .h b/Lampray/Menu/lampCustomise.h similarity index 100% rename from Lampray/Menu/lampCustomise .h rename to Lampray/Menu/lampCustomise.h diff --git a/Lampray/Menu/lampMenu.cpp b/Lampray/Menu/lampMenu.cpp index 2b5e0de..e7f8722 100644 --- a/Lampray/Menu/lampMenu.cpp +++ b/Lampray/Menu/lampMenu.cpp @@ -1,10 +1,9 @@ // // Created by charles on 27/09/23. -// +#include #include "lampMenu.h" -#include "lampCustomise .h" +#include "lampCustomise.h" #include "../Lang/lampLang.h" -#include #include "../Control/lampNotification.h" void Lamp::Core::lampMenu::RunMenus() { diff --git a/README.md b/README.md index e1037fb..44f2a98 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,17 @@ Launch the Lampray application. The first time you run Lampray, the following files and directories will be created: +If the CMake option `USE_XDG_DIRECTORY` is set (default): +```bash +~ +└── $XDG_DATA_HOME + ├── Archives + ├── Config + ├── Deployment + ├── Language + └── Mod_Lists +``` +If `USE_XDG_DIRECTORY` is not set: ```bash ~ ├── imgui.ini @@ -58,11 +69,11 @@ The first time you run Lampray, the following files and directories will be crea │ ├── Archives │ ├── Config │ ├── Deployment +│ ├── Language │ └── Mod_Lists ├── lamp.log └── Lampray ``` - Now you're ready to [mod your game](./docs/managing-mods.md). ## Supported games diff --git a/docs/customizing-lampray.md b/docs/customizing-lampray.md index e08a659..59a3e02 100644 --- a/docs/customizing-lampray.md +++ b/docs/customizing-lampray.md @@ -16,7 +16,7 @@ In most cases, Lampray can find your 7-Zip installation automatically. However, First open `~/Lampray/Config/config.mdf` in your text editor, then find and replace the following line with the path to your `7z.so` utility. ```sql -/usr/lib/p7zip/7z.so +/usr/lib/p7zip/7z.so ``` ## Customizing your font diff --git a/game-data/BG3/BG3.cpp b/game-data/BG3/BG3.cpp index 92125f6..39eda02 100644 --- a/game-data/BG3/BG3.cpp +++ b/game-data/BG3/BG3.cpp @@ -2,6 +2,7 @@ // Created by charles on 27/09/23. // +#include #include #include "BG3.h" #include "../../Lampray/Control/lampControl.h" @@ -232,15 +233,11 @@ Lamp::Game::lampReturn Lamp::Game::BG3::preCleanUp() { Lamp::Core::lampControl::getInstance().deplopmentTracker.first = 6; - if(std::filesystem::is_empty(keyInfo["installDirPath"])){ - // Overlay did exist, not anymore. - } - std::filesystem::path installPath(keyInfo["installDirPath"]); if (std::filesystem::exists(installPath) && std::filesystem::is_directory(installPath) && std::filesystem::exists(installPath.parent_path() / ("Lampray Managed - " + installPath.stem().string())) && std::filesystem::is_directory(installPath.parent_path() / ("Lampray Managed - " + installPath.stem().string()))) { - if(std::filesystem::is_empty(std::filesystem::path(keyInfo["installDirPath"]))){ + if(std::filesystem::is_empty(installPath)){ system(("pkexec umount \""+Lamp::Games::getInstance().currentGame->KeyInfo()["installDirPath"]+"\"").c_str()); try { std::filesystem::rename( @@ -251,28 +248,29 @@ Lamp::Game::lampReturn Lamp::Game::BG3::preCleanUp() { } skipMount = false; - }else { + } else { skipMount = true; } + } + + std::filesystem::path appPath(keyInfo["appDataPath"]); + std::filesystem::path tempAppPath(appPath.parent_path() / ("Lampray Managed - " + appPath.stem().string())); + + if(std::filesystem::exists(appPath) && std::filesystem::is_directory(appPath) + && std::filesystem::exists(tempAppPath) && std::filesystem::is_directory(tempAppPath)) { + if(std::filesystem::is_empty(std::filesystem::path(KeyInfo()["appDataPath"]+"/Mods"))){ system(("pkexec umount \""+Lamp::Games::getInstance().currentGame->KeyInfo()["appDataPath"]+"/Mods\"").c_str()); try { - std::filesystem::rename(std::filesystem::path(KeyInfo()["appDataPath"] + "/Mods").parent_path() / - ("Lampray Managed - " + - std::filesystem::path(KeyInfo()["appDataPath"] + "/Mods").stem().string()), - std::filesystem::path(KeyInfo()["appDataPath"] + "/Mods")); + std::filesystem::rename(tempAppPath / "Mods", + appPath / "Mods"); } catch (std::exception ex) { } skipMount = false; + } else { + skipMount = true; } - - std::cout << "The version directory exists in the parent path." << std::endl; - } else { - if(std::filesystem::is_empty(keyInfo["installDirPath"])){ - // panic - } - // we good } // std::string managedString = std::string("Lampray Managed - ") + gamePath.filename().string(); diff --git a/main.cpp b/main.cpp index d975f88..518d576 100644 --- a/main.cpp +++ b/main.cpp @@ -1,10 +1,11 @@ +#include "Lampray/Control/lampConfig.h" #include "third-party/imgui/imgui.h" #include "third-party/imgui/imgui_impl_sdl2.h" #include "third-party/imgui/imgui_impl_sdlrenderer2.h" #include "Lampray/Lang/lampLang.h" #include "Lampray/Control/lampControl.h" #include "Lampray/Menu/lampMenu.h" -#include "Lampray/Menu/lampCustomise .h" +#include "Lampray/Menu/lampCustomise.h" #include #include "SDL2/SDL.h" @@ -47,7 +48,7 @@ int main(int, char**) ImGui_ImplSDL2_InitForSDLRenderer(window, renderer); ImGui_ImplSDLRenderer2_Init(renderer); - std::filesystem::path fontFolder("Lamp_Font/"); + auto fontFolder = Lamp::Core::lampConfig::getInstance().baseDataPath + "Fonts/"; // Check if the "Font" folder exists if (std::filesystem::is_directory(fontFolder)) { @@ -61,29 +62,22 @@ int main(int, char**) ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); - std::string languageCheck = Lamp::Core::FS::lampIO::loadKeyData("LanguagePath", "LAMP CONFIG"); - Lamp::Core::lampLang::getInstance().CurrentLanguage = Lamp::Core::lampLang::LanguageContainer(); - - if(languageCheck != ""){ - if (!std::filesystem::exists(languageCheck)) { - Lamp::Core::Base::lampLog::getInstance().log(Lamp::Core::lampLang::getInstance().CurrentLanguage.build(languageCheck).returnReason); - }else{ - if (!std::filesystem::exists("Lamp_Language/English (UK).xml")) { - Lamp::Core::lampLang::getInstance().createEnglishUK(); - } - Lamp::Core::Base::lampLog::getInstance().log(Lamp::Core::lampLang::getInstance().CurrentLanguage.build("Lamp_Language/English (UK).xml").returnReason); - } - }else{ - if (!std::filesystem::exists("Lamp_Language/English (UK).xml")) { - Lamp::Core::lampLang::getInstance().createEnglishUK(); - } - Lamp::Core::Base::lampLog::getInstance().log(Lamp::Core::lampLang::getInstance().CurrentLanguage.build("Lamp_Language/English (UK).xml").returnReason); + std::string preferredLanguage = Lamp::Core::FS::lampIO::loadKeyData("LanguagePath", "LAMP CONFIG"); + Lamp::Core::lampLang::getInstance().CurrentLanguage = Lamp::Core::lampLang::LanguageContainer(); + + auto languageLoaded = Lamp::Core::lampLang::getInstance() + .CurrentLanguage.build(preferredLanguage); + Lamp::Core::Base::lampLog::getInstance().log(languageLoaded.returnReason); + if(!languageLoaded) { + auto path = Lamp::Core::lampLang::getInstance().createEnglishUK(); + Lamp::Core::Base::lampLog::getInstance().log( + Lamp::Core::lampLang::getInstance() + .CurrentLanguage.build(path) + .returnReason); } - - Lamp::Core::lampControl::getInstance().Colour_SearchHighlight = Lamp::Core::Base::lampTypes::lampHexAlpha(Lamp::Core::lampCustomise::getInstance().defaultColours[13]); ImGui::GetStyle().Colors[ImGuiCol_Text] = Lamp::Core::Base::lampTypes::lampHexAlpha(Lamp::Core::lampCustomise::getInstance().defaultColours[0]); ImGui::GetStyle().Colors[ImGuiCol_WindowBg] = Lamp::Core::Base::lampTypes::lampHexAlpha(Lamp::Core::lampCustomise::getInstance().defaultColours[1]); @@ -129,12 +123,12 @@ int main(int, char**) Lamp::Core::FS::lampUpdate::getInstance().checkForUpdates(); } Lamp::Core::lampConfig::getInstance().lampFlags["showIntroMenu"]=(std::string)Lamp::Core::FS::lampIO::loadKeyData("showIntroMenu","LAMP CONFIG").returnReason; - Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation = (std::string)Lamp::Core::FS::lampIO::loadKeyData("bit7zLibaryLocation","LAMP CONFIG").returnReason; + Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation = (std::string)Lamp::Core::FS::lampIO::loadKeyData("bit7zLibraryLocation","LAMP CONFIG").returnReason; bool found7z = Lamp::Core::lampConfig::getInstance().init(); if(!found7z){ Lamp::Core::lampNotification::getInstance().pushErrorNotification(Lamp::Core::lampLang::getInstance().LS("LAMPRAY_ERROR_7Z")); } - Lamp::Core::FS::lampIO::saveKeyData("bit7zLibaryLocation", Lamp::Core::lampConfig::getInstance().bit7zLibaryLocation, "LAMP CONFIG"); + Lamp::Core::FS::lampIO::saveKeyData("bit7zLibraryLocation", Lamp::Core::lampConfig::getInstance().bit7zLibraryLocation, "LAMP CONFIG"); Lamp::Core::lampMenu Menus; // This is a very inefficent way of doing this.