sys: Get rid of SharedData struct and cleanup code structure (#411)

* sys: Initial refactoring of the SharedData class

* sys/pattern: More refactoring, make every provider have its own patterns

* sys: Finished up refactoring. No more SharedData!

* sys: Fixed compile on Unix

* tests: Fixed unit tests

* sys: Moved view and lang files

* pattern: Added assignment operator support to for loops

* tests: Fixed compile issue
This commit is contained in:
WerWolv
2022-02-01 18:09:40 +01:00
committed by GitHub
parent 61fc479c79
commit 1991afb87b
110 changed files with 1592 additions and 1259 deletions

View File

@@ -3,7 +3,7 @@
#include <hex/helpers/utils.hpp>
#include <hex/helpers/paths.hpp>
#include <hex/helpers/file.hpp>
#include <hex/views/view.hpp>
#include <hex/ui/view.hpp>
#include <hex/providers/provider.hpp>
#define PY_SSIZE_T_CLEAN
@@ -179,7 +179,7 @@ namespace hex {
}
bool LoaderScript::processFile(const fs::path &scriptPath) {
Py_SetProgramName(Py_DecodeLocale((SharedData::mainArgv)[0], nullptr));
Py_SetProgramName(Py_DecodeLocale("ImHex", nullptr));
for (const auto &dir : hex::getPath(ImHexPath::Python)) {
if (fs::exists(fs::path(dir / "lib" / "python" PYTHON_VERSION_MAJOR_MINOR))) {