Commit Graph

50 Commits

Author SHA1 Message Date
WerWolv 46ba46ce9d
build/plugins: Added initial support for Rust plugins (#327)
* build: Added initial support for Rust plugins

* github: Install correct rust version

* github: Fixed rustup command

* github: Fix swapped win/linux commands

* github: Install linux rust toolchain on Linux

* github: Add rustup parameters to correct command

* build: libimhex-rust -> hex

* rust-plugins: Disable optimization to export functions correctly

* build: Use cdylib instead of dylib

* build: Fixed rust building and artifact copying

* build: Fixed installing plugins

* build: Fix copying and installing on Windows

* github: Added windows debugging

* github: Use curl instead of wget

* github: Added debug on failure

* github: Update path variable with rust toolchain path

* build/github: Set rust location so cmake can find it

* build: Remove leftovers

* api: Added rust wrappers for the ImHexAPI

* rust: Fixed compile flags with older gcc/clang

* build: Enable concepts for cxx.rs

* build: Explicitly set compiler for cxx.rs

* rust: Added imgui-rs to libimhex-rust

* rust: Export functions with double underscore prefix on mac

* rust: Export functions adjusted for ABI

* Add Rust target folder to gitignore

* Add vendored imgui-rs copy

* Add Context::current() to vendored imgui-rs

* Fix libimhex not exporting cimgui symbols

* Simplify plugin export mangling

* build: Fixed cimgui linking

* build: Only specify --export-all-symbols on Windows

* Add context setting to Rust plugins

* rust: Cleanup

* deps: Update curl

Co-authored-by: jam1garner <8260240+jam1garner@users.noreply.github.com>
2021-10-16 11:37:29 +02:00
Kuruyia 72ec6baf79
sys: Fix macOS compilation (as of 2dc1886) (#317)
* sys: Updated curl to latest version

* sys: Fix macOS compilation

* ui: Fix splash screen OpenGL init for macOS

* sys: Fix std::min compile errors

* git: Re-enabled macos workflow

* sys: Remove includes of the range library

* build: Find OpenGL using CMake

* sys/build: Fix bundled plugins on macOS

* build: Copy plugins to bundle when creating a bundle

* build: Fixup bundled plugins

* sys: Search for plugins in the bundle instead of in Application Support

* sys: Allow resources to be placed in multiple directories on macOS

* build: Output built plugins to the plugins/ directory when not creating a bundle on macOS

* sys: Fix Application Support paths on macOS

* sys: Define ftruncate64 on macOS

* sys: Fix absolute value computation for std::string::at on macOS

Co-authored-by: WerWolv <werwolv98@gmail.com>
2021-10-09 23:07:58 +02:00
WerWolv 4e520938c9 sys: Fixed Project load/save and Save as command 2021-10-07 22:51:16 +02:00
WerWolv d3e3de3fa2 ux: Improved dropped file loading; Added magic db loading 2021-09-30 12:29:03 +02:00
WerWolv 5db608c3fc ui: Fixed automatic pattern loading, added better pattern browse popup 2021-09-26 21:18:25 +02:00
WerWolv e74c0f5cf5 sys: Tons of long overdue cleanup
- std::string -> const std::string& where needed
- Added a FileIO abstraction class
- Fixed recent files not updating
- Removed localization file from global include
- Renamed lang to pattern_language/pl
- Renamed EventFileDropped to RequestFileOpen
2021-09-08 15:18:24 +02:00
WerWolv 68d72eac16 sys: Move imhex path resolution away from utils 2021-09-03 02:33:15 +02:00
WerWolv 633fa7213a sys: More compile time improvements 2021-08-29 22:15:18 +02:00
WerWolv 37d2d58d2f ui: Added toolbar 2021-08-21 00:52:11 +02:00
WerWolv 551da69a4c sys: Fixed file modification detection 2021-08-17 13:41:19 +02:00
Foster Brereton ac53b4bcab
Add rpath to binary executable on macOS (#258)
* removing superfluous slash from paths

* Add a necessary rpath to the imhex binary

* add a little error handling to dlopen

* fall back on en-US if no language specified in prefs

* PR changes as per @WerWolv
2021-06-18 20:09:36 +02:00
WerWolv c42bd6008a sys: Fixed various issues related to plugins 2021-05-29 21:51:00 +02:00
WerWolv 0d11f4460f nodes: Allow data processor content to be stored in project files 2021-05-18 18:06:47 +02:00
WerWolv 1f2fe6b93d sys: Merge splash screen and ImHex into one application
This fixes so many issues the previous implementation had, especially on Unix
2021-04-20 21:46:48 +02:00
WerWolv 2f19ff768d sys: Improved ScopeGuard syntax a lot 2021-03-31 22:54:43 +02:00
WerWolv f263685e44 bug: Fix loading of bookmark name and comment from project file
Fixes #211
2021-03-27 22:54:26 +01:00
WerWolv d805d976a6 sys: Replace the terrible event manager with a much better one 2021-03-27 11:36:36 +01:00
WerWolv 188723e888 sys: Replace printf formatting with libfmt 2021-03-03 19:58:22 +01:00
WerWolv 3e6865ffa9
sys/build: Properly support per-system metadata file paths (#181)
* sys: Move away from metadata paths next to executable in the application

Build system doesn't properly install / pack stuff yet

* build: Updated README to contain better install instructions

* sys: Search for imhex resource files in ~/Application Support

* sys: MAX_PATH -> PATH_MAX

* sys: Seach for imhex resource files in Application Support using NSFileManager (#180)

* sys: Allow for multiple file search paths

Also use install prefix instead of just /usr on Linux

* build: Fixed IMHEX_INSTALL_PREFIX macro definition

* build: Fix duplicate switch entry on Linux

* docs: Updated readme to properly reflect new paths and dependencies

* sys: Install files in their proper paths on linux (#183)

* Install files in their proper paths on linux

* Only create user directories

* Follow the XDG specification on linux

XDG specification specifies how to find config and data directories on
linux systems. Specifically, it says this:

- Data should be written to $XDG_DATA_HOME
- Config should be written to $XDG_CONFIG_HOME
- Data should be read from $XDG_DATA_HOME:$XDG_DATA_DIRS
- Config should be read from $XDG_CONFIG_HOME:$XDG_CONFIG_DIRS

The default values are this:

- XDG_DATA_HOME: $HOME/.local/share
- XDG_CONFIG_HOME: $HOME/.config
- XDG_DATA_DIRS: /usr/share:/usr/local/share
- XDG_CONFIG_DIRS: /etc/xdg

Platforms with non-standard filesystems (like NixOS) will correctly set
up those environment variables, allowing softwares to work unmodified.

In order to make integration as simple as possible, we use a simple
header-only dependency called XDGPP which does all the hard work for us
to find the default directories.

* Look for plugins in all Plugin Paths

If the plugin folder was missing from one of the PluginPaths, we would
immediately stop loading plugins. We now keep looking even if one of the
path is missing.

Co-authored-by: Nichole Mattera <me@nicholemattera.com>
Co-authored-by: Robin Lambertz <unfiltered@roblab.la>
2021-03-01 08:56:49 +01:00
@xAndy 372981920e
Don't dlclose nullptrs in plugins (#179)
* dont dlclose nullptrs in plugins

this fixes a segmentation fault at startup when dlclose is called with a nullptr

* Style fixes

Co-authored-by: WerWolv <werwolv98@gmail.com>
2021-02-26 12:49:33 +01:00
WerWolv 4a1de5d1cb bookmarks: Added ability to lock bookmarks 2021-02-24 21:42:18 +01:00
WerWolv 0da508594b ui/api: Added loaded plugin information to welcome screen 2021-02-19 13:22:12 +01:00
WerWolv 5286a2d9ae Added some safety checks to thingy file parser 2021-02-14 12:32:48 +01:00
WerWolv 714b62049c Improved thingy file parsing 2021-02-14 12:05:58 +01:00
WerWolv b4c2f7d371 Implemented crude support for custom encodings via thingy files
Relevant issue: #26
2021-02-14 01:11:55 +01:00
WerWolv cfb4b5bd51 I wish I was good at C++ (Properly fix plugin system) 2021-02-07 14:57:13 +01:00
WerWolv 15bcf71aaf Removed debug prints 2021-02-07 14:28:53 +01:00
WerWolv 5b38c43b7e Fixed plugin loading and closing issues mainly on Windows
This fixes #87
2021-02-07 13:40:47 +01:00
WerWolv ac019a7d7e Fixed build on Unix, move crypto wrapper to libimhex 2021-02-03 11:54:41 +01:00
WerWolv 785ecb8a78 Switch from openssl/libcrypto to mbedtls 2021-02-02 23:11:23 +01:00
WerWolv 83bbde8d29 Fixed multiple memory leaks 2021-02-01 20:07:57 +01:00
WerWolv 104000fbc4 Huge refactoring of builtin features into an external plugin 2021-01-22 18:01:42 +01:00
WerWolv b2648afc7b Improve bookmark API 2021-01-20 20:16:24 +01:00
WerWolv eb066b3539 Refactored libimhex to and includes to better represent it as library 2021-01-13 17:28:27 +01:00
WerWolv dc85616549 Hopefully fixed the whole plugin mess I started 2021-01-12 23:28:41 +01:00
WerWolv 84a6fff034 Refactored plugin system 2021-01-12 16:50:15 +01:00
WerWolv eed7ef1ac3 Make sure important data is synchronized between ImHex and plugins 2021-01-04 00:19:56 +01:00
WerWolv f74eff8934 Add support for custom providers via plugins 2020-12-27 15:39:06 +01:00
WerWolv 8ba96904a6 More plugin support work 2020-12-27 14:12:53 +01:00
WerWolv dbbc525174
Added Plugin support (#102)
* Build refactoring and initial plugin support

* Possibly fixed linux / mac build

* Added libdl to libglad build script

* Add glfw to imgui dependencies

* Refactored common functionality into "libimhex" for plugins

* Added plugin loading and example plugin

* Added proper API for creating a custom view and a custom tools entry with plugins
2020-12-22 18:10:01 +01:00
Mary 310059f274 Support macOS
This allows building and running under macOS.
There is still some issues with dpi but the application compiles and run now.
2020-12-18 21:44:13 +01:00
WerWolv 4720cf9fbe Added possible support for MacOS. Completely untested.
Relevant: #32
2020-12-06 13:48:56 +01:00
Mary d3dccace37 Detect python version at build time
This remove the hardcoded version in CMakeLists.txt and
loader_script_handler.cpp.

Fixing building on Arch Linux and probably other systems.
2020-12-05 12:46:50 +01:00
WerWolv 192e7d5060 Added Python API function to create structs and unions 2020-12-01 18:21:29 +01:00
WerWolv 6aed140ecf Use custom "argc" and "argv" exposing. Fixes #6 2020-12-01 18:19:49 +01:00
WerWolv 17096055f8 Added create_struct and create_union function to Python API 2020-12-01 16:41:38 +01:00
WerWolv c6134bc038 Added basic python-based load scripts 2020-12-01 02:21:40 +01:00
WerWolv 4878f70e58 Added project files 2020-11-30 00:03:12 +01:00
WerWolv 9e8523470d Added applying of IPS and IPS32 patches 2020-11-29 15:09:36 +01:00
WerWolv c90ef343c1 Added math evaluator / calculator to tools window 2020-11-28 21:55:52 +01:00