This PR it just a hack to fix#1160 , it doesn't solve the underlying
problem.
It fixes the problem because by using execvp() directly, it avoids the
call to `sh` done with `system()`, which has a bug on Ubuntu 22.04 which
makes it i,compatibles with the glibc inside the AppImage.
It doesn't fix the underlying problem because the programs we call
themselves still link to the AppImage's libraries instead of the system
ones.
This PR handles errors that NFD might encounter (both in Init() and the
other method to open the dialog), and log them in the logs and in the
GUI
This (among other) fix the crash I had running ImHex as root and opening
a file
This pull request changes Config Directories on Linux to only include
the XDG_CONFIG_HOME directory, as opposed to all directories in
XDG_DATA_DIRS before (introduced in
https://github.com/WerWolv/ImHex/pull/644/files#diff-c1a4d2b63fed168a9a3568944e9cadeae096f2ddcec3649e4a9b2d29fd104be0L162-L166).
Reasons:
- This changes the location of the config file to the standard directory
meant for configurations
- This prevents the config file from being read/written in system
locations, like /usr/share
This PR also includes a migration task that will run on Linux and move
config/GUI dimensions to the new directory
as a bonus, as discussed on discord, it writes the logs to a Data
directory instead of a Config directory
* add error message for the file picker
* set a different message for Windows/MacOS
* fix typos
* Moved file dialog error handling to a callback function
Co-authored-by: Nik <werwolv98@gmail.com>
* cmake: use GNUInstallDirs to find install dirs on Linux
* install plugins to lib/imhex/plugins
* fix included files in imhex.spec
* fix the release CI + do not upload x86_64 folder for Fedora
* change rpm names
* added IMHEX_STRIP_RELEASE option to optionally strip releases files (was done all the time before)
* Customize our imhex.spec file (use online building for our Fedora package)
* added IMHEX_PLUGINS_IN_SHARE option for AppImage
* test
fix not saving to "XDG_DATA_HOME", when "XDG_DATA_DIRS" is available.
fix "Content Store" persist in flatpak.
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
* build: Experimentally switch to gcc on macOS
* build: Corrected gcc paths
* build: Enable objective c support on macOS
* build: Enable ObjC and ObjC++ on macOS
* build: Add ObjC and ObjC++ flags
* build: Try compiling objc with clang
* build: Remove invalid flags again
* fix: Let's not include objc headers in C++ code
* sys: Move macos utils code to its own file
* fix: Missing unistd include on mac
* sys: Removed loader script stuff since it's currently unused and broken
* fix: Missing include
* fix: Another missing include
* fix: CFURLCreateWithBytes wants a pointer to mutable data
* fix: Try disabling name mangling of ObjC functions
* sys: Move macos utils declarations to its own header file
* fix: C Linkage
* fix: Move objc function prototypes to C++ headers
* fix: More missing includes
* fix: Warning error
* sys: Call ObjC with C ABI instead of trying to use C++
* build: Update libraries
* sys: Fixed build errors
* sys: No const correctness I guess
* sys: Fixed prototypes
* sys: This is C now
* sys: More nullptr -> NULL
* sys: Fix crash on exit
* sys: Try using proper std concepts instead of custom ones
* sys: Replaced another hex::is_signed
* build: Upgrade to gcc 12 and MacOS Monterey
* build: Fixed MacOS runner name
* build: Cache correct ccache folder on macOS
* sys: Make ImHex compile with -Wall -Wextra -Werror
* sys: Fixed various build errors on Linux
* sys: Explicitly ignore return value of `system` function
* sys: More fixes for the warnings GitHub Actions enables somehow
* sys: More fixes
* sys: Remove -Werror again to see all GitHub Actions warnings
* sys: Hopefully fixed all remaining warnings
* sys: Added back -Werror
* git: Change windows icon in GitHub Actions