added detecting of an AppImage and set proper path to html foldr

This commit is contained in:
cryptozoidberg 2023-01-11 14:57:51 +01:00
parent 404b20fa03
commit 0ed7ead8df
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
3 changed files with 14 additions and 3 deletions

@ -1 +1 @@
Subproject commit aa509880f06292ac8078046f3d49ff854e400716
Subproject commit b589edb1906dccb387cfeded6ed12286c5f0405f

@ -1 +1 @@
Subproject commit b091d45ad697db2d35e94de41be3f175bad0f71d
Subproject commit 73d36003da48622469ebe8f5bd39d2a8ed49a5d5

View file

@ -331,7 +331,18 @@ bool wallets_manager::init(view::i_view* pview_handler)
std::string path_to_html;
if (!command_line::has_arg(m_vm, arg_html_folder))
{
path_to_html = string_tools::get_current_module_folder() + "/html";
#if defined(__unix__) || defined(__linux__)
const char* env_p = std::getenv("APPDIR");
if (env_p && std::strlen(env_p))
{
//app running inside AppImage
path_to_html = std::string(env_p) + "usr/bin/html";
}
else
#endif
{
path_to_html = string_tools::get_current_module_folder() + "/html";
}
}
else
{