diff --git a/.gitmodules b/.gitmodules index 1513ce1a8..4e7bbee3d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,26 +1,26 @@ -[submodule "external/nativefiledialog"] - path = external/nativefiledialog +[submodule "lib/external/nativefiledialog"] + path = lib/external/nativefiledialog url = https://github.com/btzy/nativefiledialog-extended ignore = dirty -[submodule "external/yara/yara"] - path = external/yara/yara +[submodule "lib/external/yara/yara"] + path = lib/external/yara/yara url = https://github.com/VirusTotal/yara ignore = dirty -[submodule "external/xdgpp"] - path = external/xdgpp +[submodule "lib/external/xdgpp"] + path = lib/external/xdgpp url = https://git.sr.ht/~danyspin97/xdgpp ignore = dirty -[submodule "external/fmt"] - path = external/fmt +[submodule "lib/external/fmt"] + path = lib/external/fmt url = https://github.com/fmtlib/fmt ignore = dirty -[submodule "external/curl"] - path = external/curl +[submodule "lib/external/curl"] + path = lib/external/curl url = https://github.com/curl/curl ignore = dirty -[submodule "external/capstone"] - path = external/capstone +[submodule "lib/external/capstone"] + path = lib/external/capstone url = https://github.com/capstone-engine/capstone -[submodule "external/libromfs"] - path = external/libromfs +[submodule "lib/external/libromfs"] + path = lib/external/libromfs url = https://github.com/WerWolv/libromfs diff --git a/CMakeLists.txt b/CMakeLists.txt index 344fc2f9b..5d93b59d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,9 @@ detectBadClone() set(PLUGINS builtin windows + + example_cpp + example_rust ) # Add various defines @@ -26,7 +29,7 @@ addVersionDefines() configurePackingResources() # Add ImHex sources -add_subdirectory(plugins/libimhex) +add_subdirectory(lib/libimhex) add_subdirectory(main) add_custom_target(imhex ALL DEPENDS main) diff --git a/README.md b/README.md index 92be38149..0860dcce5 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ make -j To create a standalone zipfile on Windows, get the Python standard library (e.g. from https://github.com/python/cpython/tree/master/Lib) and place the files and folders in `lib/python3.8` next to your built executable. Don't forget to also copy the `libpython3.8.dll` and `libwinpthread-1.dll` from your mingw setup next to the executable. -- Copy the files from `python_libs` in the `lib` folder next to your built executable. +- Copy the files inside the `/resources/lib/python` folder into the `lib` folder next to your built executable. - Place your magic databases in the `magic` folder next to your built executable - Place your patterns in the `pattern` folder next to your built executable - Place your include pattern files in the `include` folder next to your built executable diff --git a/external/capstone b/lib/external/capstone similarity index 100% rename from external/capstone rename to lib/external/capstone diff --git a/external/curl b/lib/external/curl similarity index 100% rename from external/curl rename to lib/external/curl diff --git a/external/fmt b/lib/external/fmt similarity index 100% rename from external/fmt rename to lib/external/fmt diff --git a/external/ImGui/CMakeLists.txt b/lib/external/imgui/CMakeLists.txt similarity index 100% rename from external/ImGui/CMakeLists.txt rename to lib/external/imgui/CMakeLists.txt diff --git a/external/ImGui/fonts/codicons_font.c b/lib/external/imgui/fonts/codicons_font.c similarity index 100% rename from external/ImGui/fonts/codicons_font.c rename to lib/external/imgui/fonts/codicons_font.c diff --git a/external/ImGui/fonts/codicons_font.h b/lib/external/imgui/fonts/codicons_font.h similarity index 100% rename from external/ImGui/fonts/codicons_font.h rename to lib/external/imgui/fonts/codicons_font.h diff --git a/external/ImGui/fonts/fontawesome_font.c b/lib/external/imgui/fonts/fontawesome_font.c similarity index 100% rename from external/ImGui/fonts/fontawesome_font.c rename to lib/external/imgui/fonts/fontawesome_font.c diff --git a/external/ImGui/fonts/fontawesome_font.h b/lib/external/imgui/fonts/fontawesome_font.h similarity index 100% rename from external/ImGui/fonts/fontawesome_font.h rename to lib/external/imgui/fonts/fontawesome_font.h diff --git a/external/ImGui/fonts/unifont_font.c b/lib/external/imgui/fonts/unifont_font.c similarity index 100% rename from external/ImGui/fonts/unifont_font.c rename to lib/external/imgui/fonts/unifont_font.c diff --git a/external/ImGui/fonts/unifont_font.h b/lib/external/imgui/fonts/unifont_font.h similarity index 100% rename from external/ImGui/fonts/unifont_font.h rename to lib/external/imgui/fonts/unifont_font.h diff --git a/external/ImGui/include/TextEditor.h b/lib/external/imgui/include/TextEditor.h similarity index 100% rename from external/ImGui/include/TextEditor.h rename to lib/external/imgui/include/TextEditor.h diff --git a/external/ImGui/include/cimgui.h b/lib/external/imgui/include/cimgui.h similarity index 100% rename from external/ImGui/include/cimgui.h rename to lib/external/imgui/include/cimgui.h diff --git a/external/ImGui/include/imconfig.h b/lib/external/imgui/include/imconfig.h similarity index 100% rename from external/ImGui/include/imconfig.h rename to lib/external/imgui/include/imconfig.h diff --git a/external/ImGui/include/imgui.h b/lib/external/imgui/include/imgui.h similarity index 100% rename from external/ImGui/include/imgui.h rename to lib/external/imgui/include/imgui.h diff --git a/external/ImGui/include/imgui_freetype.h b/lib/external/imgui/include/imgui_freetype.h similarity index 100% rename from external/ImGui/include/imgui_freetype.h rename to lib/external/imgui/include/imgui_freetype.h diff --git a/external/ImGui/include/imgui_impl_glfw.h b/lib/external/imgui/include/imgui_impl_glfw.h similarity index 100% rename from external/ImGui/include/imgui_impl_glfw.h rename to lib/external/imgui/include/imgui_impl_glfw.h diff --git a/external/ImGui/include/imgui_impl_opengl3.h b/lib/external/imgui/include/imgui_impl_opengl3.h similarity index 100% rename from external/ImGui/include/imgui_impl_opengl3.h rename to lib/external/imgui/include/imgui_impl_opengl3.h diff --git a/external/ImGui/include/imgui_impl_opengl3_loader.h b/lib/external/imgui/include/imgui_impl_opengl3_loader.h similarity index 100% rename from external/ImGui/include/imgui_impl_opengl3_loader.h rename to lib/external/imgui/include/imgui_impl_opengl3_loader.h diff --git a/external/ImGui/include/imgui_internal.h b/lib/external/imgui/include/imgui_internal.h similarity index 100% rename from external/ImGui/include/imgui_internal.h rename to lib/external/imgui/include/imgui_internal.h diff --git a/external/ImGui/include/imgui_memory_editor.h b/lib/external/imgui/include/imgui_memory_editor.h similarity index 100% rename from external/ImGui/include/imgui_memory_editor.h rename to lib/external/imgui/include/imgui_memory_editor.h diff --git a/external/ImGui/include/imnodes.h b/lib/external/imgui/include/imnodes.h similarity index 100% rename from external/ImGui/include/imnodes.h rename to lib/external/imgui/include/imnodes.h diff --git a/external/ImGui/include/imnodes_internal.h b/lib/external/imgui/include/imnodes_internal.h similarity index 100% rename from external/ImGui/include/imnodes_internal.h rename to lib/external/imgui/include/imnodes_internal.h diff --git a/external/ImGui/include/implot.h b/lib/external/imgui/include/implot.h similarity index 100% rename from external/ImGui/include/implot.h rename to lib/external/imgui/include/implot.h diff --git a/external/ImGui/include/implot_internal.h b/lib/external/imgui/include/implot_internal.h similarity index 100% rename from external/ImGui/include/implot_internal.h rename to lib/external/imgui/include/implot_internal.h diff --git a/external/ImGui/include/imstb_rectpack.h b/lib/external/imgui/include/imstb_rectpack.h similarity index 100% rename from external/ImGui/include/imstb_rectpack.h rename to lib/external/imgui/include/imstb_rectpack.h diff --git a/external/ImGui/include/imstb_textedit.h b/lib/external/imgui/include/imstb_textedit.h similarity index 100% rename from external/ImGui/include/imstb_textedit.h rename to lib/external/imgui/include/imstb_textedit.h diff --git a/external/ImGui/include/imstb_truetype.h b/lib/external/imgui/include/imstb_truetype.h similarity index 100% rename from external/ImGui/include/imstb_truetype.h rename to lib/external/imgui/include/imstb_truetype.h diff --git a/external/ImGui/include/stb_image.h b/lib/external/imgui/include/stb_image.h similarity index 100% rename from external/ImGui/include/stb_image.h rename to lib/external/imgui/include/stb_image.h diff --git a/external/ImGui/source/TextEditor.cpp b/lib/external/imgui/source/TextEditor.cpp similarity index 100% rename from external/ImGui/source/TextEditor.cpp rename to lib/external/imgui/source/TextEditor.cpp diff --git a/external/ImGui/source/cimgui.cpp b/lib/external/imgui/source/cimgui.cpp similarity index 100% rename from external/ImGui/source/cimgui.cpp rename to lib/external/imgui/source/cimgui.cpp diff --git a/external/ImGui/source/imgui.cpp b/lib/external/imgui/source/imgui.cpp similarity index 100% rename from external/ImGui/source/imgui.cpp rename to lib/external/imgui/source/imgui.cpp diff --git a/external/ImGui/source/imgui_demo.cpp b/lib/external/imgui/source/imgui_demo.cpp similarity index 100% rename from external/ImGui/source/imgui_demo.cpp rename to lib/external/imgui/source/imgui_demo.cpp diff --git a/external/ImGui/source/imgui_draw.cpp b/lib/external/imgui/source/imgui_draw.cpp similarity index 100% rename from external/ImGui/source/imgui_draw.cpp rename to lib/external/imgui/source/imgui_draw.cpp diff --git a/external/ImGui/source/imgui_freetype.cpp b/lib/external/imgui/source/imgui_freetype.cpp similarity index 100% rename from external/ImGui/source/imgui_freetype.cpp rename to lib/external/imgui/source/imgui_freetype.cpp diff --git a/external/ImGui/source/imgui_impl_glfw.cpp b/lib/external/imgui/source/imgui_impl_glfw.cpp similarity index 100% rename from external/ImGui/source/imgui_impl_glfw.cpp rename to lib/external/imgui/source/imgui_impl_glfw.cpp diff --git a/external/ImGui/source/imgui_impl_opengl3.cpp b/lib/external/imgui/source/imgui_impl_opengl3.cpp similarity index 100% rename from external/ImGui/source/imgui_impl_opengl3.cpp rename to lib/external/imgui/source/imgui_impl_opengl3.cpp diff --git a/external/ImGui/source/imgui_tables.cpp b/lib/external/imgui/source/imgui_tables.cpp similarity index 100% rename from external/ImGui/source/imgui_tables.cpp rename to lib/external/imgui/source/imgui_tables.cpp diff --git a/external/ImGui/source/imgui_widgets.cpp b/lib/external/imgui/source/imgui_widgets.cpp similarity index 100% rename from external/ImGui/source/imgui_widgets.cpp rename to lib/external/imgui/source/imgui_widgets.cpp diff --git a/external/ImGui/source/imnodes.cpp b/lib/external/imgui/source/imnodes.cpp similarity index 100% rename from external/ImGui/source/imnodes.cpp rename to lib/external/imgui/source/imnodes.cpp diff --git a/external/ImGui/source/implot.cpp b/lib/external/imgui/source/implot.cpp similarity index 100% rename from external/ImGui/source/implot.cpp rename to lib/external/imgui/source/implot.cpp diff --git a/external/ImGui/source/implot_demo.cpp b/lib/external/imgui/source/implot_demo.cpp similarity index 100% rename from external/ImGui/source/implot_demo.cpp rename to lib/external/imgui/source/implot_demo.cpp diff --git a/external/ImGui/source/implot_items.cpp b/lib/external/imgui/source/implot_items.cpp similarity index 100% rename from external/ImGui/source/implot_items.cpp rename to lib/external/imgui/source/implot_items.cpp diff --git a/external/libromfs b/lib/external/libromfs similarity index 100% rename from external/libromfs rename to lib/external/libromfs diff --git a/external/llvm/CMakeLists.txt b/lib/external/llvm/CMakeLists.txt similarity index 100% rename from external/llvm/CMakeLists.txt rename to lib/external/llvm/CMakeLists.txt diff --git a/external/llvm/Demangle/Demangle.cpp b/lib/external/llvm/Demangle/Demangle.cpp similarity index 100% rename from external/llvm/Demangle/Demangle.cpp rename to lib/external/llvm/Demangle/Demangle.cpp diff --git a/external/llvm/Demangle/ItaniumDemangle.cpp b/lib/external/llvm/Demangle/ItaniumDemangle.cpp similarity index 100% rename from external/llvm/Demangle/ItaniumDemangle.cpp rename to lib/external/llvm/Demangle/ItaniumDemangle.cpp diff --git a/external/llvm/Demangle/MicrosoftDemangle.cpp b/lib/external/llvm/Demangle/MicrosoftDemangle.cpp similarity index 100% rename from external/llvm/Demangle/MicrosoftDemangle.cpp rename to lib/external/llvm/Demangle/MicrosoftDemangle.cpp diff --git a/external/llvm/Demangle/MicrosoftDemangleNodes.cpp b/lib/external/llvm/Demangle/MicrosoftDemangleNodes.cpp similarity index 100% rename from external/llvm/Demangle/MicrosoftDemangleNodes.cpp rename to lib/external/llvm/Demangle/MicrosoftDemangleNodes.cpp diff --git a/external/llvm/include/llvm/Demangle/Demangle.h b/lib/external/llvm/include/llvm/Demangle/Demangle.h similarity index 100% rename from external/llvm/include/llvm/Demangle/Demangle.h rename to lib/external/llvm/include/llvm/Demangle/Demangle.h diff --git a/external/llvm/include/llvm/Demangle/DemangleConfig.h b/lib/external/llvm/include/llvm/Demangle/DemangleConfig.h similarity index 100% rename from external/llvm/include/llvm/Demangle/DemangleConfig.h rename to lib/external/llvm/include/llvm/Demangle/DemangleConfig.h diff --git a/external/llvm/include/llvm/Demangle/ItaniumDemangle.h b/lib/external/llvm/include/llvm/Demangle/ItaniumDemangle.h similarity index 100% rename from external/llvm/include/llvm/Demangle/ItaniumDemangle.h rename to lib/external/llvm/include/llvm/Demangle/ItaniumDemangle.h diff --git a/external/llvm/include/llvm/Demangle/MicrosoftDemangle.h b/lib/external/llvm/include/llvm/Demangle/MicrosoftDemangle.h similarity index 100% rename from external/llvm/include/llvm/Demangle/MicrosoftDemangle.h rename to lib/external/llvm/include/llvm/Demangle/MicrosoftDemangle.h diff --git a/external/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h b/lib/external/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h similarity index 100% rename from external/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h rename to lib/external/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h diff --git a/external/llvm/include/llvm/Demangle/StringView.h b/lib/external/llvm/include/llvm/Demangle/StringView.h similarity index 100% rename from external/llvm/include/llvm/Demangle/StringView.h rename to lib/external/llvm/include/llvm/Demangle/StringView.h diff --git a/external/llvm/include/llvm/Demangle/Utility.h b/lib/external/llvm/include/llvm/Demangle/Utility.h similarity index 100% rename from external/llvm/include/llvm/Demangle/Utility.h rename to lib/external/llvm/include/llvm/Demangle/Utility.h diff --git a/external/microtar/CMakeLists.txt b/lib/external/microtar/CMakeLists.txt similarity index 100% rename from external/microtar/CMakeLists.txt rename to lib/external/microtar/CMakeLists.txt diff --git a/external/microtar/LICENSE b/lib/external/microtar/LICENSE similarity index 100% rename from external/microtar/LICENSE rename to lib/external/microtar/LICENSE diff --git a/external/microtar/README.md b/lib/external/microtar/README.md similarity index 100% rename from external/microtar/README.md rename to lib/external/microtar/README.md diff --git a/external/microtar/include/microtar.h b/lib/external/microtar/include/microtar.h similarity index 100% rename from external/microtar/include/microtar.h rename to lib/external/microtar/include/microtar.h diff --git a/external/microtar/source/microtar.c b/lib/external/microtar/source/microtar.c similarity index 100% rename from external/microtar/source/microtar.c rename to lib/external/microtar/source/microtar.c diff --git a/external/nativefiledialog b/lib/external/nativefiledialog similarity index 100% rename from external/nativefiledialog rename to lib/external/nativefiledialog diff --git a/external/nlohmann_json/CMakeLists.txt b/lib/external/nlohmann_json/CMakeLists.txt similarity index 100% rename from external/nlohmann_json/CMakeLists.txt rename to lib/external/nlohmann_json/CMakeLists.txt diff --git a/external/nlohmann_json/include/nlohmann/json.hpp b/lib/external/nlohmann_json/include/nlohmann/json.hpp similarity index 100% rename from external/nlohmann_json/include/nlohmann/json.hpp rename to lib/external/nlohmann_json/include/nlohmann/json.hpp diff --git a/external/nlohmann_json/include/nlohmann/json_fwd.hpp b/lib/external/nlohmann_json/include/nlohmann/json_fwd.hpp similarity index 100% rename from external/nlohmann_json/include/nlohmann/json_fwd.hpp rename to lib/external/nlohmann_json/include/nlohmann/json_fwd.hpp diff --git a/external/xdgpp b/lib/external/xdgpp similarity index 100% rename from external/xdgpp rename to lib/external/xdgpp diff --git a/external/yara/CMakeLists.txt b/lib/external/yara/CMakeLists.txt similarity index 100% rename from external/yara/CMakeLists.txt rename to lib/external/yara/CMakeLists.txt diff --git a/external/yara/crypto.h b/lib/external/yara/crypto.h similarity index 100% rename from external/yara/crypto.h rename to lib/external/yara/crypto.h diff --git a/external/yara/yara b/lib/external/yara/yara similarity index 100% rename from external/yara/yara rename to lib/external/yara/yara diff --git a/plugins/libimhex-rust/Cargo.lock b/lib/libimhex-rs/Cargo.lock similarity index 99% rename from plugins/libimhex-rust/Cargo.lock rename to lib/libimhex-rs/Cargo.lock index 41a2733aa..4549c1ce6 100644 --- a/plugins/libimhex-rust/Cargo.lock +++ b/lib/libimhex-rs/Cargo.lock @@ -81,7 +81,7 @@ dependencies = [ ] [[package]] -name = "hex" +name = "libimhex-rs" version = "0.1.0" dependencies = [ "cxx", diff --git a/plugins/libimhex-rust/Cargo.toml b/lib/libimhex-rs/Cargo.toml similarity index 81% rename from plugins/libimhex-rust/Cargo.toml rename to lib/libimhex-rs/Cargo.toml index ff8ff8573..6cd5c2cf3 100644 --- a/plugins/libimhex-rust/Cargo.toml +++ b/lib/libimhex-rs/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hex" +name = "libimhex-rs" version = "0.1.0" edition = "2018" build = "build.rs" @@ -7,7 +7,7 @@ build = "build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -macros = { path = "proc_macros" } +imhex-macros = { path = "proc_macros" } imgui = { path = "imgui-rs" } cxx = "1.0.55" diff --git a/plugins/libimhex-rust/build.rs b/lib/libimhex-rs/build.rs similarity index 100% rename from plugins/libimhex-rust/build.rs rename to lib/libimhex-rs/build.rs diff --git a/plugins/libimhex-rust/imgui-rs/Cargo.lock b/lib/libimhex-rs/imgui-rs/Cargo.lock similarity index 100% rename from plugins/libimhex-rust/imgui-rs/Cargo.lock rename to lib/libimhex-rs/imgui-rs/Cargo.lock diff --git a/plugins/libimhex-rust/imgui-rs/Cargo.toml b/lib/libimhex-rs/imgui-rs/Cargo.toml similarity index 100% rename from plugins/libimhex-rust/imgui-rs/Cargo.toml rename to lib/libimhex-rs/imgui-rs/Cargo.toml diff --git a/plugins/libimhex-rust/imgui-rs/LICENSE-APACHE b/lib/libimhex-rs/imgui-rs/LICENSE-APACHE similarity index 100% rename from plugins/libimhex-rust/imgui-rs/LICENSE-APACHE rename to lib/libimhex-rs/imgui-rs/LICENSE-APACHE diff --git a/plugins/libimhex-rust/imgui-rs/LICENSE-MIT b/lib/libimhex-rs/imgui-rs/LICENSE-MIT similarity index 100% rename from plugins/libimhex-rust/imgui-rs/LICENSE-MIT rename to lib/libimhex-rs/imgui-rs/LICENSE-MIT diff --git a/lib/libimhex-rs/imgui-rs/README.markdown b/lib/libimhex-rs/imgui-rs/README.markdown new file mode 100644 index 000000000..1691050d1 --- /dev/null +++ b/lib/libimhex-rs/imgui-rs/README.markdown @@ -0,0 +1 @@ +../README.markdown \ No newline at end of file diff --git a/plugins/libimhex-rust/imgui-rs/src/clipboard.rs b/lib/libimhex-rs/imgui-rs/src/clipboard.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/clipboard.rs rename to lib/libimhex-rs/imgui-rs/src/clipboard.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/color.rs b/lib/libimhex-rs/imgui-rs/src/color.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/color.rs rename to lib/libimhex-rs/imgui-rs/src/color.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/columns.rs b/lib/libimhex-rs/imgui-rs/src/columns.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/columns.rs rename to lib/libimhex-rs/imgui-rs/src/columns.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/context.rs b/lib/libimhex-rs/imgui-rs/src/context.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/context.rs rename to lib/libimhex-rs/imgui-rs/src/context.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/drag_drop.rs b/lib/libimhex-rs/imgui-rs/src/drag_drop.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/drag_drop.rs rename to lib/libimhex-rs/imgui-rs/src/drag_drop.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/draw_list.rs b/lib/libimhex-rs/imgui-rs/src/draw_list.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/draw_list.rs rename to lib/libimhex-rs/imgui-rs/src/draw_list.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/fonts/atlas.rs b/lib/libimhex-rs/imgui-rs/src/fonts/atlas.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/fonts/atlas.rs rename to lib/libimhex-rs/imgui-rs/src/fonts/atlas.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/fonts/font.rs b/lib/libimhex-rs/imgui-rs/src/fonts/font.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/fonts/font.rs rename to lib/libimhex-rs/imgui-rs/src/fonts/font.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/fonts/glyph.rs b/lib/libimhex-rs/imgui-rs/src/fonts/glyph.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/fonts/glyph.rs rename to lib/libimhex-rs/imgui-rs/src/fonts/glyph.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/fonts/glyph_ranges.rs b/lib/libimhex-rs/imgui-rs/src/fonts/glyph_ranges.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/fonts/glyph_ranges.rs rename to lib/libimhex-rs/imgui-rs/src/fonts/glyph_ranges.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/fonts/mod.rs b/lib/libimhex-rs/imgui-rs/src/fonts/mod.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/fonts/mod.rs rename to lib/libimhex-rs/imgui-rs/src/fonts/mod.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/input/keyboard.rs b/lib/libimhex-rs/imgui-rs/src/input/keyboard.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/input/keyboard.rs rename to lib/libimhex-rs/imgui-rs/src/input/keyboard.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/input/mod.rs b/lib/libimhex-rs/imgui-rs/src/input/mod.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/input/mod.rs rename to lib/libimhex-rs/imgui-rs/src/input/mod.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/input/mouse.rs b/lib/libimhex-rs/imgui-rs/src/input/mouse.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/input/mouse.rs rename to lib/libimhex-rs/imgui-rs/src/input/mouse.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/input_widget.rs b/lib/libimhex-rs/imgui-rs/src/input_widget.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/input_widget.rs rename to lib/libimhex-rs/imgui-rs/src/input_widget.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/internal.rs b/lib/libimhex-rs/imgui-rs/src/internal.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/internal.rs rename to lib/libimhex-rs/imgui-rs/src/internal.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/io.rs b/lib/libimhex-rs/imgui-rs/src/io.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/io.rs rename to lib/libimhex-rs/imgui-rs/src/io.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/layout.rs b/lib/libimhex-rs/imgui-rs/src/layout.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/layout.rs rename to lib/libimhex-rs/imgui-rs/src/layout.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/lib.rs b/lib/libimhex-rs/imgui-rs/src/lib.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/lib.rs rename to lib/libimhex-rs/imgui-rs/src/lib.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/list_clipper.rs b/lib/libimhex-rs/imgui-rs/src/list_clipper.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/list_clipper.rs rename to lib/libimhex-rs/imgui-rs/src/list_clipper.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/plothistogram.rs b/lib/libimhex-rs/imgui-rs/src/plothistogram.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/plothistogram.rs rename to lib/libimhex-rs/imgui-rs/src/plothistogram.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/plotlines.rs b/lib/libimhex-rs/imgui-rs/src/plotlines.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/plotlines.rs rename to lib/libimhex-rs/imgui-rs/src/plotlines.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/popups.rs b/lib/libimhex-rs/imgui-rs/src/popups.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/popups.rs rename to lib/libimhex-rs/imgui-rs/src/popups.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/render/draw_data.rs b/lib/libimhex-rs/imgui-rs/src/render/draw_data.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/render/draw_data.rs rename to lib/libimhex-rs/imgui-rs/src/render/draw_data.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/render/mod.rs b/lib/libimhex-rs/imgui-rs/src/render/mod.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/render/mod.rs rename to lib/libimhex-rs/imgui-rs/src/render/mod.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/render/renderer.rs b/lib/libimhex-rs/imgui-rs/src/render/renderer.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/render/renderer.rs rename to lib/libimhex-rs/imgui-rs/src/render/renderer.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/stacks.rs b/lib/libimhex-rs/imgui-rs/src/stacks.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/stacks.rs rename to lib/libimhex-rs/imgui-rs/src/stacks.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/string.rs b/lib/libimhex-rs/imgui-rs/src/string.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/string.rs rename to lib/libimhex-rs/imgui-rs/src/string.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/style.rs b/lib/libimhex-rs/imgui-rs/src/style.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/style.rs rename to lib/libimhex-rs/imgui-rs/src/style.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/tables.rs b/lib/libimhex-rs/imgui-rs/src/tables.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/tables.rs rename to lib/libimhex-rs/imgui-rs/src/tables.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/test.rs b/lib/libimhex-rs/imgui-rs/src/test.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/test.rs rename to lib/libimhex-rs/imgui-rs/src/test.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/tokens.rs b/lib/libimhex-rs/imgui-rs/src/tokens.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/tokens.rs rename to lib/libimhex-rs/imgui-rs/src/tokens.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/utils.rs b/lib/libimhex-rs/imgui-rs/src/utils.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/utils.rs rename to lib/libimhex-rs/imgui-rs/src/utils.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/color_editors.rs b/lib/libimhex-rs/imgui-rs/src/widget/color_editors.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/color_editors.rs rename to lib/libimhex-rs/imgui-rs/src/widget/color_editors.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/combo_box.rs b/lib/libimhex-rs/imgui-rs/src/widget/combo_box.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/combo_box.rs rename to lib/libimhex-rs/imgui-rs/src/widget/combo_box.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/drag.rs b/lib/libimhex-rs/imgui-rs/src/widget/drag.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/drag.rs rename to lib/libimhex-rs/imgui-rs/src/widget/drag.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/image.rs b/lib/libimhex-rs/imgui-rs/src/widget/image.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/image.rs rename to lib/libimhex-rs/imgui-rs/src/widget/image.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/list_box.rs b/lib/libimhex-rs/imgui-rs/src/widget/list_box.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/list_box.rs rename to lib/libimhex-rs/imgui-rs/src/widget/list_box.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/menu.rs b/lib/libimhex-rs/imgui-rs/src/widget/menu.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/menu.rs rename to lib/libimhex-rs/imgui-rs/src/widget/menu.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/misc.rs b/lib/libimhex-rs/imgui-rs/src/widget/misc.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/misc.rs rename to lib/libimhex-rs/imgui-rs/src/widget/misc.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/mod.rs b/lib/libimhex-rs/imgui-rs/src/widget/mod.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/mod.rs rename to lib/libimhex-rs/imgui-rs/src/widget/mod.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/progress_bar.rs b/lib/libimhex-rs/imgui-rs/src/widget/progress_bar.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/progress_bar.rs rename to lib/libimhex-rs/imgui-rs/src/widget/progress_bar.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/selectable.rs b/lib/libimhex-rs/imgui-rs/src/widget/selectable.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/selectable.rs rename to lib/libimhex-rs/imgui-rs/src/widget/selectable.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/slider.rs b/lib/libimhex-rs/imgui-rs/src/widget/slider.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/slider.rs rename to lib/libimhex-rs/imgui-rs/src/widget/slider.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/tab.rs b/lib/libimhex-rs/imgui-rs/src/widget/tab.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/tab.rs rename to lib/libimhex-rs/imgui-rs/src/widget/tab.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/text.rs b/lib/libimhex-rs/imgui-rs/src/widget/text.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/text.rs rename to lib/libimhex-rs/imgui-rs/src/widget/text.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/widget/tree.rs b/lib/libimhex-rs/imgui-rs/src/widget/tree.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/widget/tree.rs rename to lib/libimhex-rs/imgui-rs/src/widget/tree.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/window/child_window.rs b/lib/libimhex-rs/imgui-rs/src/window/child_window.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/window/child_window.rs rename to lib/libimhex-rs/imgui-rs/src/window/child_window.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/window/content_region.rs b/lib/libimhex-rs/imgui-rs/src/window/content_region.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/window/content_region.rs rename to lib/libimhex-rs/imgui-rs/src/window/content_region.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/window/mod.rs b/lib/libimhex-rs/imgui-rs/src/window/mod.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/window/mod.rs rename to lib/libimhex-rs/imgui-rs/src/window/mod.rs diff --git a/plugins/libimhex-rust/imgui-rs/src/window/scroll.rs b/lib/libimhex-rs/imgui-rs/src/window/scroll.rs similarity index 100% rename from plugins/libimhex-rust/imgui-rs/src/window/scroll.rs rename to lib/libimhex-rs/imgui-rs/src/window/scroll.rs diff --git a/plugins/libimhex-rust/imgui-sys/Cargo.lock b/lib/libimhex-rs/imgui-sys/Cargo.lock similarity index 100% rename from plugins/libimhex-rust/imgui-sys/Cargo.lock rename to lib/libimhex-rs/imgui-sys/Cargo.lock diff --git a/plugins/libimhex-rust/imgui-sys/Cargo.toml b/lib/libimhex-rs/imgui-sys/Cargo.toml similarity index 100% rename from plugins/libimhex-rust/imgui-sys/Cargo.toml rename to lib/libimhex-rs/imgui-sys/Cargo.toml diff --git a/plugins/libimhex-rust/imgui-sys/LICENSE-APACHE b/lib/libimhex-rs/imgui-sys/LICENSE-APACHE similarity index 100% rename from plugins/libimhex-rust/imgui-sys/LICENSE-APACHE rename to lib/libimhex-rs/imgui-sys/LICENSE-APACHE diff --git a/plugins/libimhex-rust/imgui-sys/LICENSE-MIT b/lib/libimhex-rs/imgui-sys/LICENSE-MIT similarity index 100% rename from plugins/libimhex-rust/imgui-sys/LICENSE-MIT rename to lib/libimhex-rs/imgui-sys/LICENSE-MIT diff --git a/plugins/libimhex-rust/imgui-sys/README.markdown b/lib/libimhex-rs/imgui-sys/README.markdown similarity index 100% rename from plugins/libimhex-rust/imgui-sys/README.markdown rename to lib/libimhex-rs/imgui-sys/README.markdown diff --git a/plugins/libimhex-rust/imgui-sys/build.rs b/lib/libimhex-rs/imgui-sys/build.rs similarity index 100% rename from plugins/libimhex-rust/imgui-sys/build.rs rename to lib/libimhex-rs/imgui-sys/build.rs diff --git a/plugins/libimhex-rust/imgui-sys/include_all_imgui.cpp b/lib/libimhex-rs/imgui-sys/include_all_imgui.cpp similarity index 100% rename from plugins/libimhex-rust/imgui-sys/include_all_imgui.cpp rename to lib/libimhex-rs/imgui-sys/include_all_imgui.cpp diff --git a/plugins/libimhex-rust/imgui-sys/src/bindings.rs b/lib/libimhex-rs/imgui-sys/src/bindings.rs similarity index 100% rename from plugins/libimhex-rust/imgui-sys/src/bindings.rs rename to lib/libimhex-rs/imgui-sys/src/bindings.rs diff --git a/plugins/libimhex-rust/imgui-sys/src/lib.rs b/lib/libimhex-rs/imgui-sys/src/lib.rs similarity index 100% rename from plugins/libimhex-rust/imgui-sys/src/lib.rs rename to lib/libimhex-rs/imgui-sys/src/lib.rs diff --git a/plugins/libimhex-rust/imgui-sys/src/wasm_bindings.rs b/lib/libimhex-rs/imgui-sys/src/wasm_bindings.rs similarity index 100% rename from plugins/libimhex-rust/imgui-sys/src/wasm_bindings.rs rename to lib/libimhex-rs/imgui-sys/src/wasm_bindings.rs diff --git a/plugins/libimhex-rust/proc_macros/CMakeLists.txt b/lib/libimhex-rs/proc_macros/CMakeLists.txt similarity index 100% rename from plugins/libimhex-rust/proc_macros/CMakeLists.txt rename to lib/libimhex-rs/proc_macros/CMakeLists.txt diff --git a/plugins/libimhex-rust/proc_macros/Cargo.lock b/lib/libimhex-rs/proc_macros/Cargo.lock similarity index 98% rename from plugins/libimhex-rust/proc_macros/Cargo.lock rename to lib/libimhex-rs/proc_macros/Cargo.lock index b85071fcb..d25db7639 100644 --- a/plugins/libimhex-rust/proc_macros/Cargo.lock +++ b/lib/libimhex-rs/proc_macros/Cargo.lock @@ -3,7 +3,7 @@ version = 3 [[package]] -name = "macros" +name = "hex-macros" version = "0.1.0" dependencies = [ "quote", diff --git a/plugins/libimhex-rust/proc_macros/Cargo.toml b/lib/libimhex-rs/proc_macros/Cargo.toml similarity index 79% rename from plugins/libimhex-rust/proc_macros/Cargo.toml rename to lib/libimhex-rs/proc_macros/Cargo.toml index e06b64c08..e04864122 100644 --- a/plugins/libimhex-rust/proc_macros/Cargo.toml +++ b/lib/libimhex-rs/proc_macros/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "macros" +name = "imhex-macros" version = "0.1.0" edition = "2018" diff --git a/plugins/libimhex-rust/proc_macros/src/lib.rs b/lib/libimhex-rs/proc_macros/src/lib.rs similarity index 100% rename from plugins/libimhex-rust/proc_macros/src/lib.rs rename to lib/libimhex-rs/proc_macros/src/lib.rs diff --git a/plugins/libimhex-rust/src/imhex_api.rs b/lib/libimhex-rs/src/imhex_api.rs similarity index 100% rename from plugins/libimhex-rust/src/imhex_api.rs rename to lib/libimhex-rs/src/imhex_api.rs diff --git a/plugins/libimhex-rust/src/lib.rs b/lib/libimhex-rs/src/lib.rs similarity index 71% rename from plugins/libimhex-rust/src/lib.rs rename to lib/libimhex-rs/src/lib.rs index e658143c2..a7342c610 100644 --- a/plugins/libimhex-rust/src/lib.rs +++ b/lib/libimhex-rs/src/lib.rs @@ -2,7 +2,7 @@ mod imhex_api; -pub use macros::plugin_setup; +pub use imhex_macros::plugin_setup; pub use imhex_api::ImHexApi; pub use imhex_api::Region; pub use imhex_api::Color; diff --git a/plugins/libimhex/CMakeLists.txt b/lib/libimhex/CMakeLists.txt similarity index 76% rename from plugins/libimhex/CMakeLists.txt rename to lib/libimhex/CMakeLists.txt index 6cdfb67ec..d6cfc8abe 100644 --- a/plugins/libimhex/CMakeLists.txt +++ b/lib/libimhex/CMakeLists.txt @@ -4,20 +4,20 @@ project(libimhex) set(CMAKE_CXX_STANDARD 20) set(BUILD_SHARED_LIBS OFF) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/ImGui ${CMAKE_CURRENT_BINARY_DIR}/external/ImGui) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/imgui ${CMAKE_CURRENT_BINARY_DIR}/external/imgui) set_target_properties(imgui PROPERTIES POSITION_INDEPENDENT_CODE ON) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/microtar ${CMAKE_CURRENT_BINARY_DIR}/external/microtar EXCLUDE_FROM_ALL) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/microtar ${CMAKE_CURRENT_BINARY_DIR}/external/microtar EXCLUDE_FROM_ALL) set_target_properties(microtar PROPERTIES POSITION_INDEPENDENT_CODE ON) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nativefiledialog ${CMAKE_CURRENT_BINARY_DIR}/external/nativefiledialog EXCLUDE_FROM_ALL) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/nativefiledialog ${CMAKE_CURRENT_BINARY_DIR}/external/nativefiledialog EXCLUDE_FROM_ALL) set_target_properties(nfd PROPERTIES POSITION_INDEPENDENT_CODE ON) set(LIBROMFS_RESOURCE_LOCATION ${IMHEX_BASE_FOLDER}/resources/romfs) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/libromfs ${CMAKE_CURRENT_BINARY_DIR}/external/libromfs EXCLUDE_FROM_ALL) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/libromfs ${CMAKE_CURRENT_BINARY_DIR}/external/libromfs EXCLUDE_FROM_ALL) set_target_properties(libromfs PROPERTIES POSITION_INDEPENDENT_CODE ON) -set(XDGPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../external/xdgpp") +set(XDGPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../external/xdgpp") set(CURL_USE_MBEDTLS ON) set(BUILD_CURL_EXE OFF) set(FPHSA_NAME_MISMATCHED ON CACHE BOOL "") @@ -26,7 +26,7 @@ set(FPHSA_NAME_MISMATCHED ON CACHE BOOL "") find_package(PkgConfig REQUIRED) if(NOT USE_SYSTEM_NLOHMANN_JSON) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nlohmann_json ${CMAKE_CURRENT_BINARY_DIR}/external/nlohmann_json EXCLUDE_FROM_ALL) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/nlohmann_json ${CMAKE_CURRENT_BINARY_DIR}/external/nlohmann_json EXCLUDE_FROM_ALL) set(NLOHMANN_JSON_LIBRARIES nlohmann_json) else() find_package(nlohmann_json 3.10.2 REQUIRED) @@ -34,7 +34,7 @@ else() endif() if(NOT USE_SYSTEM_FMT) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/fmt ${CMAKE_CURRENT_BINARY_DIR}/external/fmt EXCLUDE_FROM_ALL) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/fmt ${CMAKE_CURRENT_BINARY_DIR}/external/fmt EXCLUDE_FROM_ALL) set(FMT_LIBRARIES fmt-header-only) else() find_package(fmt 8.0.0 REQUIRED) @@ -42,7 +42,7 @@ else() endif() if(NOT USE_SYSTEM_CURL) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/curl ${CMAKE_CURRENT_BINARY_DIR}/external/curl EXCLUDE_FROM_ALL) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/curl ${CMAKE_CURRENT_BINARY_DIR}/external/curl EXCLUDE_FROM_ALL) set_target_properties(libcurl PROPERTIES POSITION_INDEPENDENT_CODE ON) set(LIBCURL_LIBRARIES libcurl) else() @@ -51,14 +51,14 @@ else() endif() if (NOT USE_SYSTEM_LLVM) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/llvm ${CMAKE_CURRENT_BINARY_DIR}/external/llvm EXCLUDE_FROM_ALL) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/llvm ${CMAKE_CURRENT_BINARY_DIR}/external/llvm EXCLUDE_FROM_ALL) set_target_properties(LLVMDemangle PROPERTIES POSITION_INDEPENDENT_CODE ON) else() find_package(LLVM REQUIRED Demangle) endif() if (NOT USE_SYSTEM_YARA) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/yara ${CMAKE_CURRENT_BINARY_DIR}/external/yara EXCLUDE_FROM_ALL) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/yara ${CMAKE_CURRENT_BINARY_DIR}/external/yara EXCLUDE_FROM_ALL) set_target_properties(libyara PROPERTIES POSITION_INDEPENDENT_CODE ON) set(YARA_LIBRARIES libyara) else() @@ -70,10 +70,10 @@ if (NOT USE_SYSTEM_CAPSTONE) set(CAPSTONE_BUILD_STATIC_RUNTIME OFF CACHE BOOL "Disable shared library building") set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "Disable shared library building") set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "Disable tests") - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/capstone ${CMAKE_CURRENT_BINARY_DIR}/external/capstone EXCLUDE_FROM_ALL) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/capstone ${CMAKE_CURRENT_BINARY_DIR}/external/capstone EXCLUDE_FROM_ALL) set_target_properties(capstone-static PROPERTIES POSITION_INDEPENDENT_CODE ON) set(CAPSTONE_LIBRARIES "capstone-static") - set(CAPSTONE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../external/capstone/include/capstone) + set(CAPSTONE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../external/capstone/include/capstone) else() find_package(PkgConfig REQUIRED) pkg_search_module(CAPSTONE 4.0.2 REQUIRED capstone) diff --git a/plugins/libimhex/include/hex.hpp b/lib/libimhex/include/hex.hpp similarity index 100% rename from plugins/libimhex/include/hex.hpp rename to lib/libimhex/include/hex.hpp diff --git a/plugins/libimhex/include/hex/api/content_registry.hpp b/lib/libimhex/include/hex/api/content_registry.hpp similarity index 100% rename from plugins/libimhex/include/hex/api/content_registry.hpp rename to lib/libimhex/include/hex/api/content_registry.hpp diff --git a/plugins/libimhex/include/hex/api/event.hpp b/lib/libimhex/include/hex/api/event.hpp similarity index 100% rename from plugins/libimhex/include/hex/api/event.hpp rename to lib/libimhex/include/hex/api/event.hpp diff --git a/plugins/libimhex/include/hex/api/imhex_api.hpp b/lib/libimhex/include/hex/api/imhex_api.hpp similarity index 100% rename from plugins/libimhex/include/hex/api/imhex_api.hpp rename to lib/libimhex/include/hex/api/imhex_api.hpp diff --git a/plugins/libimhex/include/hex/api/keybinding.hpp b/lib/libimhex/include/hex/api/keybinding.hpp similarity index 100% rename from plugins/libimhex/include/hex/api/keybinding.hpp rename to lib/libimhex/include/hex/api/keybinding.hpp diff --git a/plugins/libimhex/include/hex/api/task.hpp b/lib/libimhex/include/hex/api/task.hpp similarity index 100% rename from plugins/libimhex/include/hex/api/task.hpp rename to lib/libimhex/include/hex/api/task.hpp diff --git a/plugins/libimhex/include/hex/data_processor/attribute.hpp b/lib/libimhex/include/hex/data_processor/attribute.hpp similarity index 100% rename from plugins/libimhex/include/hex/data_processor/attribute.hpp rename to lib/libimhex/include/hex/data_processor/attribute.hpp diff --git a/plugins/libimhex/include/hex/data_processor/link.hpp b/lib/libimhex/include/hex/data_processor/link.hpp similarity index 100% rename from plugins/libimhex/include/hex/data_processor/link.hpp rename to lib/libimhex/include/hex/data_processor/link.hpp diff --git a/plugins/libimhex/include/hex/data_processor/node.hpp b/lib/libimhex/include/hex/data_processor/node.hpp similarity index 100% rename from plugins/libimhex/include/hex/data_processor/node.hpp rename to lib/libimhex/include/hex/data_processor/node.hpp diff --git a/plugins/libimhex/include/hex/helpers/concepts.hpp b/lib/libimhex/include/hex/helpers/concepts.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/concepts.hpp rename to lib/libimhex/include/hex/helpers/concepts.hpp diff --git a/plugins/libimhex/include/hex/helpers/crypto.hpp b/lib/libimhex/include/hex/helpers/crypto.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/crypto.hpp rename to lib/libimhex/include/hex/helpers/crypto.hpp diff --git a/plugins/libimhex/include/hex/helpers/disassembler.hpp b/lib/libimhex/include/hex/helpers/disassembler.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/disassembler.hpp rename to lib/libimhex/include/hex/helpers/disassembler.hpp diff --git a/plugins/libimhex/include/hex/helpers/encoding_file.hpp b/lib/libimhex/include/hex/helpers/encoding_file.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/encoding_file.hpp rename to lib/libimhex/include/hex/helpers/encoding_file.hpp diff --git a/plugins/libimhex/include/hex/helpers/file.hpp b/lib/libimhex/include/hex/helpers/file.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/file.hpp rename to lib/libimhex/include/hex/helpers/file.hpp diff --git a/plugins/libimhex/include/hex/helpers/fmt.hpp b/lib/libimhex/include/hex/helpers/fmt.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/fmt.hpp rename to lib/libimhex/include/hex/helpers/fmt.hpp diff --git a/plugins/libimhex/include/hex/helpers/lang.hpp b/lib/libimhex/include/hex/helpers/lang.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/lang.hpp rename to lib/libimhex/include/hex/helpers/lang.hpp diff --git a/plugins/libimhex/include/hex/helpers/literals.hpp b/lib/libimhex/include/hex/helpers/literals.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/literals.hpp rename to lib/libimhex/include/hex/helpers/literals.hpp diff --git a/plugins/libimhex/include/hex/helpers/loader_script_handler.hpp b/lib/libimhex/include/hex/helpers/loader_script_handler.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/loader_script_handler.hpp rename to lib/libimhex/include/hex/helpers/loader_script_handler.hpp diff --git a/plugins/libimhex/include/hex/helpers/logger.hpp b/lib/libimhex/include/hex/helpers/logger.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/logger.hpp rename to lib/libimhex/include/hex/helpers/logger.hpp diff --git a/plugins/libimhex/include/hex/helpers/magic.hpp b/lib/libimhex/include/hex/helpers/magic.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/magic.hpp rename to lib/libimhex/include/hex/helpers/magic.hpp diff --git a/plugins/libimhex/include/hex/helpers/net.hpp b/lib/libimhex/include/hex/helpers/net.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/net.hpp rename to lib/libimhex/include/hex/helpers/net.hpp diff --git a/plugins/libimhex/include/hex/helpers/patches.hpp b/lib/libimhex/include/hex/helpers/patches.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/patches.hpp rename to lib/libimhex/include/hex/helpers/patches.hpp diff --git a/plugins/libimhex/include/hex/helpers/paths.hpp b/lib/libimhex/include/hex/helpers/paths.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/paths.hpp rename to lib/libimhex/include/hex/helpers/paths.hpp diff --git a/plugins/libimhex/include/hex/helpers/paths_mac.h b/lib/libimhex/include/hex/helpers/paths_mac.h similarity index 100% rename from plugins/libimhex/include/hex/helpers/paths_mac.h rename to lib/libimhex/include/hex/helpers/paths_mac.h diff --git a/plugins/libimhex/include/hex/helpers/project_file_handler.hpp b/lib/libimhex/include/hex/helpers/project_file_handler.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/project_file_handler.hpp rename to lib/libimhex/include/hex/helpers/project_file_handler.hpp diff --git a/plugins/libimhex/include/hex/helpers/shared_data.hpp b/lib/libimhex/include/hex/helpers/shared_data.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/shared_data.hpp rename to lib/libimhex/include/hex/helpers/shared_data.hpp diff --git a/plugins/libimhex/include/hex/helpers/socket.hpp b/lib/libimhex/include/hex/helpers/socket.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/socket.hpp rename to lib/libimhex/include/hex/helpers/socket.hpp diff --git a/plugins/libimhex/include/hex/helpers/utils.hpp b/lib/libimhex/include/hex/helpers/utils.hpp similarity index 100% rename from plugins/libimhex/include/hex/helpers/utils.hpp rename to lib/libimhex/include/hex/helpers/utils.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/ast_node.hpp b/lib/libimhex/include/hex/pattern_language/ast_node.hpp similarity index 99% rename from plugins/libimhex/include/hex/pattern_language/ast_node.hpp rename to lib/libimhex/include/hex/pattern_language/ast_node.hpp index 6caa3b697..3ddb65ad0 100644 --- a/plugins/libimhex/include/hex/pattern_language/ast_node.hpp +++ b/lib/libimhex/include/hex/pattern_language/ast_node.hpp @@ -107,7 +107,7 @@ namespace hex::pl { class ASTNodeLiteral : public ASTNode { public: - explicit ASTNodeLiteral(Token::Literal literal) : ASTNode(), m_literal(literal) { } + explicit ASTNodeLiteral(Token::Literal literal) : ASTNode(), m_literal(std::move(literal)) { } ASTNodeLiteral(const ASTNodeLiteral&) = default; diff --git a/plugins/libimhex/include/hex/pattern_language/evaluator.hpp b/lib/libimhex/include/hex/pattern_language/evaluator.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/evaluator.hpp rename to lib/libimhex/include/hex/pattern_language/evaluator.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/lexer.hpp b/lib/libimhex/include/hex/pattern_language/lexer.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/lexer.hpp rename to lib/libimhex/include/hex/pattern_language/lexer.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/log_console.hpp b/lib/libimhex/include/hex/pattern_language/log_console.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/log_console.hpp rename to lib/libimhex/include/hex/pattern_language/log_console.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/parser.hpp b/lib/libimhex/include/hex/pattern_language/parser.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/parser.hpp rename to lib/libimhex/include/hex/pattern_language/parser.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/pattern_data.hpp b/lib/libimhex/include/hex/pattern_language/pattern_data.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/pattern_data.hpp rename to lib/libimhex/include/hex/pattern_language/pattern_data.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/pattern_language.hpp b/lib/libimhex/include/hex/pattern_language/pattern_language.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/pattern_language.hpp rename to lib/libimhex/include/hex/pattern_language/pattern_language.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/preprocessor.hpp b/lib/libimhex/include/hex/pattern_language/preprocessor.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/preprocessor.hpp rename to lib/libimhex/include/hex/pattern_language/preprocessor.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/token.hpp b/lib/libimhex/include/hex/pattern_language/token.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/token.hpp rename to lib/libimhex/include/hex/pattern_language/token.hpp diff --git a/plugins/libimhex/include/hex/pattern_language/validator.hpp b/lib/libimhex/include/hex/pattern_language/validator.hpp similarity index 100% rename from plugins/libimhex/include/hex/pattern_language/validator.hpp rename to lib/libimhex/include/hex/pattern_language/validator.hpp diff --git a/plugins/libimhex/include/hex/plugin.hpp b/lib/libimhex/include/hex/plugin.hpp similarity index 100% rename from plugins/libimhex/include/hex/plugin.hpp rename to lib/libimhex/include/hex/plugin.hpp diff --git a/plugins/libimhex/include/hex/providers/overlay.hpp b/lib/libimhex/include/hex/providers/overlay.hpp similarity index 100% rename from plugins/libimhex/include/hex/providers/overlay.hpp rename to lib/libimhex/include/hex/providers/overlay.hpp diff --git a/plugins/libimhex/include/hex/providers/provider.hpp b/lib/libimhex/include/hex/providers/provider.hpp similarity index 100% rename from plugins/libimhex/include/hex/providers/provider.hpp rename to lib/libimhex/include/hex/providers/provider.hpp diff --git a/plugins/libimhex/include/hex/ui/imgui_imhex_extensions.h b/lib/libimhex/include/hex/ui/imgui_imhex_extensions.h similarity index 100% rename from plugins/libimhex/include/hex/ui/imgui_imhex_extensions.h rename to lib/libimhex/include/hex/ui/imgui_imhex_extensions.h diff --git a/plugins/libimhex/include/hex/views/view.hpp b/lib/libimhex/include/hex/views/view.hpp similarity index 100% rename from plugins/libimhex/include/hex/views/view.hpp rename to lib/libimhex/include/hex/views/view.hpp diff --git a/plugins/libimhex/source/api/content_registry.cpp b/lib/libimhex/source/api/content_registry.cpp similarity index 100% rename from plugins/libimhex/source/api/content_registry.cpp rename to lib/libimhex/source/api/content_registry.cpp diff --git a/plugins/libimhex/source/api/event.cpp b/lib/libimhex/source/api/event.cpp similarity index 100% rename from plugins/libimhex/source/api/event.cpp rename to lib/libimhex/source/api/event.cpp diff --git a/plugins/libimhex/source/api/imhex_api.cpp b/lib/libimhex/source/api/imhex_api.cpp similarity index 100% rename from plugins/libimhex/source/api/imhex_api.cpp rename to lib/libimhex/source/api/imhex_api.cpp diff --git a/plugins/libimhex/source/api/keybinding.cpp b/lib/libimhex/source/api/keybinding.cpp similarity index 100% rename from plugins/libimhex/source/api/keybinding.cpp rename to lib/libimhex/source/api/keybinding.cpp diff --git a/plugins/libimhex/source/api/task.cpp b/lib/libimhex/source/api/task.cpp similarity index 100% rename from plugins/libimhex/source/api/task.cpp rename to lib/libimhex/source/api/task.cpp diff --git a/plugins/libimhex/source/data_processor/attribute.cpp b/lib/libimhex/source/data_processor/attribute.cpp similarity index 100% rename from plugins/libimhex/source/data_processor/attribute.cpp rename to lib/libimhex/source/data_processor/attribute.cpp diff --git a/plugins/libimhex/source/data_processor/link.cpp b/lib/libimhex/source/data_processor/link.cpp similarity index 100% rename from plugins/libimhex/source/data_processor/link.cpp rename to lib/libimhex/source/data_processor/link.cpp diff --git a/plugins/libimhex/source/data_processor/node.cpp b/lib/libimhex/source/data_processor/node.cpp similarity index 100% rename from plugins/libimhex/source/data_processor/node.cpp rename to lib/libimhex/source/data_processor/node.cpp diff --git a/plugins/libimhex/source/helpers/crypto.cpp b/lib/libimhex/source/helpers/crypto.cpp similarity index 100% rename from plugins/libimhex/source/helpers/crypto.cpp rename to lib/libimhex/source/helpers/crypto.cpp diff --git a/plugins/libimhex/source/helpers/encoding_file.cpp b/lib/libimhex/source/helpers/encoding_file.cpp similarity index 100% rename from plugins/libimhex/source/helpers/encoding_file.cpp rename to lib/libimhex/source/helpers/encoding_file.cpp diff --git a/plugins/libimhex/source/helpers/file.cpp b/lib/libimhex/source/helpers/file.cpp similarity index 100% rename from plugins/libimhex/source/helpers/file.cpp rename to lib/libimhex/source/helpers/file.cpp diff --git a/plugins/libimhex/source/helpers/lang.cpp b/lib/libimhex/source/helpers/lang.cpp similarity index 100% rename from plugins/libimhex/source/helpers/lang.cpp rename to lib/libimhex/source/helpers/lang.cpp diff --git a/plugins/libimhex/source/helpers/loader_script_handler.cpp b/lib/libimhex/source/helpers/loader_script_handler.cpp similarity index 100% rename from plugins/libimhex/source/helpers/loader_script_handler.cpp rename to lib/libimhex/source/helpers/loader_script_handler.cpp diff --git a/plugins/libimhex/source/helpers/magic.cpp b/lib/libimhex/source/helpers/magic.cpp similarity index 100% rename from plugins/libimhex/source/helpers/magic.cpp rename to lib/libimhex/source/helpers/magic.cpp diff --git a/plugins/libimhex/source/helpers/net.cpp b/lib/libimhex/source/helpers/net.cpp similarity index 100% rename from plugins/libimhex/source/helpers/net.cpp rename to lib/libimhex/source/helpers/net.cpp diff --git a/plugins/libimhex/source/helpers/patches.cpp b/lib/libimhex/source/helpers/patches.cpp similarity index 100% rename from plugins/libimhex/source/helpers/patches.cpp rename to lib/libimhex/source/helpers/patches.cpp diff --git a/plugins/libimhex/source/helpers/paths.cpp b/lib/libimhex/source/helpers/paths.cpp similarity index 100% rename from plugins/libimhex/source/helpers/paths.cpp rename to lib/libimhex/source/helpers/paths.cpp diff --git a/plugins/libimhex/source/helpers/paths_mac.mm b/lib/libimhex/source/helpers/paths_mac.mm similarity index 100% rename from plugins/libimhex/source/helpers/paths_mac.mm rename to lib/libimhex/source/helpers/paths_mac.mm diff --git a/plugins/libimhex/source/helpers/project_file_handler.cpp b/lib/libimhex/source/helpers/project_file_handler.cpp similarity index 100% rename from plugins/libimhex/source/helpers/project_file_handler.cpp rename to lib/libimhex/source/helpers/project_file_handler.cpp diff --git a/plugins/libimhex/source/helpers/shared_data.cpp b/lib/libimhex/source/helpers/shared_data.cpp similarity index 100% rename from plugins/libimhex/source/helpers/shared_data.cpp rename to lib/libimhex/source/helpers/shared_data.cpp diff --git a/plugins/libimhex/source/helpers/socket.cpp b/lib/libimhex/source/helpers/socket.cpp similarity index 100% rename from plugins/libimhex/source/helpers/socket.cpp rename to lib/libimhex/source/helpers/socket.cpp diff --git a/plugins/libimhex/source/helpers/utils.cpp b/lib/libimhex/source/helpers/utils.cpp similarity index 100% rename from plugins/libimhex/source/helpers/utils.cpp rename to lib/libimhex/source/helpers/utils.cpp diff --git a/plugins/libimhex/source/pattern_language/evaluator.cpp b/lib/libimhex/source/pattern_language/evaluator.cpp similarity index 100% rename from plugins/libimhex/source/pattern_language/evaluator.cpp rename to lib/libimhex/source/pattern_language/evaluator.cpp diff --git a/plugins/libimhex/source/pattern_language/lexer.cpp b/lib/libimhex/source/pattern_language/lexer.cpp similarity index 100% rename from plugins/libimhex/source/pattern_language/lexer.cpp rename to lib/libimhex/source/pattern_language/lexer.cpp diff --git a/plugins/libimhex/source/pattern_language/log_console.cpp b/lib/libimhex/source/pattern_language/log_console.cpp similarity index 100% rename from plugins/libimhex/source/pattern_language/log_console.cpp rename to lib/libimhex/source/pattern_language/log_console.cpp diff --git a/plugins/libimhex/source/pattern_language/parser.cpp b/lib/libimhex/source/pattern_language/parser.cpp similarity index 100% rename from plugins/libimhex/source/pattern_language/parser.cpp rename to lib/libimhex/source/pattern_language/parser.cpp diff --git a/plugins/libimhex/source/pattern_language/pattern_language.cpp b/lib/libimhex/source/pattern_language/pattern_language.cpp similarity index 100% rename from plugins/libimhex/source/pattern_language/pattern_language.cpp rename to lib/libimhex/source/pattern_language/pattern_language.cpp diff --git a/plugins/libimhex/source/pattern_language/preprocessor.cpp b/lib/libimhex/source/pattern_language/preprocessor.cpp similarity index 100% rename from plugins/libimhex/source/pattern_language/preprocessor.cpp rename to lib/libimhex/source/pattern_language/preprocessor.cpp diff --git a/plugins/libimhex/source/pattern_language/validator.cpp b/lib/libimhex/source/pattern_language/validator.cpp similarity index 100% rename from plugins/libimhex/source/pattern_language/validator.cpp rename to lib/libimhex/source/pattern_language/validator.cpp diff --git a/plugins/libimhex/source/providers/provider.cpp b/lib/libimhex/source/providers/provider.cpp similarity index 100% rename from plugins/libimhex/source/providers/provider.cpp rename to lib/libimhex/source/providers/provider.cpp diff --git a/plugins/libimhex/source/ui/imgui_imhex_extensions.cpp b/lib/libimhex/source/ui/imgui_imhex_extensions.cpp similarity index 100% rename from plugins/libimhex/source/ui/imgui_imhex_extensions.cpp rename to lib/libimhex/source/ui/imgui_imhex_extensions.cpp diff --git a/plugins/libimhex/source/views/view.cpp b/lib/libimhex/source/views/view.cpp similarity index 100% rename from plugins/libimhex/source/views/view.cpp rename to lib/libimhex/source/views/view.cpp diff --git a/plugins/builtin/CMakeLists.txt b/plugins/builtin/CMakeLists.txt index 504b6e7c6..b0bad72ed 100644 --- a/plugins/builtin/CMakeLists.txt +++ b/plugins/builtin/CMakeLists.txt @@ -68,8 +68,4 @@ if (WIN32) endif() add_compile_definitions(IMHEX_PLUGIN_NAME=${PROJECT_NAME}) -set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) - -if (NOT TARGET libimhex) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libimhex ${CMAKE_CURRENT_BINARY_DIR}/plugins/libimhex) -endif() \ No newline at end of file +set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) \ No newline at end of file diff --git a/plugins/example_cpp/CMakeLists.txt b/plugins/example_cpp/CMakeLists.txt index 003d43b77..453d84656 100644 --- a/plugins/example_cpp/CMakeLists.txt +++ b/plugins/example_cpp/CMakeLists.txt @@ -26,8 +26,4 @@ if (WIN32) endif() add_compile_definitions(IMHEX_PLUGIN_NAME=${PROJECT_NAME}) -set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) - -if (NOT TARGET libimhex) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libimhex ${CMAKE_CURRENT_BINARY_DIR}/plugins/libimhex) -endif() \ No newline at end of file +set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) \ No newline at end of file diff --git a/plugins/example_rust/CMakeLists.txt b/plugins/example_rust/CMakeLists.txt index 8fcf20da8..71911c330 100644 --- a/plugins/example_rust/CMakeLists.txt +++ b/plugins/example_rust/CMakeLists.txt @@ -38,8 +38,4 @@ set_target_properties(${PROJECT_NAME} PROPERTIES RUST_PROJECT 1) set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE Rust) set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) -add_compile_definitions(IMHEX_PLUGIN_NAME=${PROJECT_NAME}) - -if (NOT TARGET libimhex) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libimhex ${CMAKE_CURRENT_BINARY_DIR}/plugins/libimhex) -endif() \ No newline at end of file +add_compile_definitions(IMHEX_PLUGIN_NAME=${PROJECT_NAME}) \ No newline at end of file diff --git a/plugins/example_rust/Cargo.lock b/plugins/example_rust/Cargo.lock index 4b83728b9..598b4cc7c 100644 --- a/plugins/example_rust/Cargo.lock +++ b/plugins/example_rust/Cargo.lock @@ -84,17 +84,7 @@ dependencies = [ name = "example_rust" version = "0.1.0" dependencies = [ - "hex", -] - -[[package]] -name = "hex" -version = "0.1.0" -dependencies = [ - "cxx", - "cxx-build", - "imgui", - "macros", + "libimhex-rs", ] [[package]] @@ -114,6 +104,14 @@ dependencies = [ "chlorine", ] +[[package]] +name = "imhex-macros" +version = "0.1.0" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "instant" version = "0.1.11" @@ -135,6 +133,16 @@ version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" +[[package]] +name = "libimhex-rs" +version = "0.1.0" +dependencies = [ + "cxx", + "cxx-build", + "imgui", + "imhex-macros", +] + [[package]] name = "link-cplusplus" version = "1.0.5" @@ -153,14 +161,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "macros" -version = "0.1.0" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "parking_lot" version = "0.11.2" diff --git a/plugins/example_rust/Cargo.toml b/plugins/example_rust/Cargo.toml index 4da89a0c2..bebc59594 100644 --- a/plugins/example_rust/Cargo.toml +++ b/plugins/example_rust/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib"] path = "source/plugin_example.rs" [dependencies] -hex = { path = "../libimhex-rust" } +hex = { package = "libimhex-rs", path = "../../lib/libimhex-rs" } [profile.release] lto = true diff --git a/plugins/libimhex-rust/imgui-rs/README.markdown b/plugins/libimhex-rust/imgui-rs/README.markdown deleted file mode 120000 index 1691050d1..000000000 --- a/plugins/libimhex-rust/imgui-rs/README.markdown +++ /dev/null @@ -1 +0,0 @@ -../README.markdown \ No newline at end of file diff --git a/plugins/windows/CMakeLists.txt b/plugins/windows/CMakeLists.txt index 6ee810f0f..48873bb78 100644 --- a/plugins/windows/CMakeLists.txt +++ b/plugins/windows/CMakeLists.txt @@ -37,8 +37,4 @@ if (WIN32) add_compile_definitions(IMHEX_PLUGIN_NAME=${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) - if (NOT TARGET libimhex) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libimhex ${CMAKE_CURRENT_BINARY_DIR}/plugins/libimhex) - endif() - endif () \ No newline at end of file diff --git a/python_libs/lib/imhex_python/__pycache__/types.cpython-38.pyc b/python_libs/lib/imhex_python/__pycache__/types.cpython-38.pyc deleted file mode 100644 index 97f84d295..000000000 Binary files a/python_libs/lib/imhex_python/__pycache__/types.cpython-38.pyc and /dev/null differ diff --git a/python_libs/lib/imhex.py b/resources/lib/python/lib/imhex.py similarity index 100% rename from python_libs/lib/imhex.py rename to resources/lib/python/lib/imhex.py diff --git a/python_libs/lib/imhex_python/types.py b/resources/lib/python/lib/imhex_python/types.py similarity index 100% rename from python_libs/lib/imhex_python/types.py rename to resources/lib/python/lib/imhex_python/types.py