mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
sys: Replaced many helper functions with libwolv
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include <hex.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#include "window.hpp"
|
||||
@@ -10,16 +9,19 @@
|
||||
|
||||
#include <hex/api/project_file_manager.hpp>
|
||||
|
||||
#include <wolv/io/fs.hpp>
|
||||
#include <wolv/utils/guards.hpp>
|
||||
|
||||
int main(int argc, char **argv, char **envp) {
|
||||
using namespace hex;
|
||||
ImHexApi::System::impl::setProgramArguments(argc, argv, envp);
|
||||
|
||||
// Check if ImHex is installed in portable mode
|
||||
{
|
||||
if (const auto executablePath = fs::getExecutablePath(); executablePath.has_value()) {
|
||||
if (const auto executablePath = wolv::io::fs::getExecutablePath(); executablePath.has_value()) {
|
||||
const auto flagFile = executablePath->parent_path() / "PORTABLE";
|
||||
|
||||
if (fs::exists(flagFile) && fs::isRegularFile(flagFile))
|
||||
if (wolv::io::fs::exists(flagFile) && wolv::io::fs::isRegularFile(flagFile))
|
||||
ImHexApi::System::impl::setPortableVersion(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user