Merge branch 'dk_filaments' into master
This commit is contained in:
commit
2ea00cf916
@ -825,7 +825,9 @@ bool GUI_App::on_init_inner()
|
||||
// create splash screen with updated bmp
|
||||
scrn = new SplashScreen(bmp.IsOk() ? bmp : create_scaled_bitmap("prusa_slicer_logo", nullptr, 400),
|
||||
wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_TIMEOUT, 4000, splashscreen_pos);
|
||||
#ifndef __linux__
|
||||
wxYield();
|
||||
#endif
|
||||
scrn->SetText(_L("Loading configuration..."));
|
||||
}
|
||||
|
||||
|
@ -251,11 +251,24 @@ namespace instance_check_internal
|
||||
|
||||
bool instance_check(int argc, char** argv, bool app_config_single_instance)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
boost::system::error_code ec;
|
||||
#endif
|
||||
std::size_t hashed_path =
|
||||
#ifdef _WIN32
|
||||
std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
|
||||
#else
|
||||
std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0])).string());
|
||||
std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0]), ec).string());
|
||||
if(ec.value() > 0) { // canonical was not able to find execitable (can happen with appimage on some systems)
|
||||
ec.clear();
|
||||
// Compose path with boost canonical of folder and filename
|
||||
hashed_path = std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0]).parent_path(), ec).string() + "/" + boost::filesystem::system_complete(argv[0]).filename().string());
|
||||
if(ec.value() > 0) {
|
||||
// Still not valid, process without canonical
|
||||
hashed_path = std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
|
||||
|
||||
}
|
||||
}
|
||||
#endif // win32
|
||||
|
||||
std::string lock_name = std::to_string(hashed_path);
|
||||
|
Loading…
Reference in New Issue
Block a user