mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Replaced __linux macro with __linux__
This commit is contained in:
parent
7a1574a853
commit
7d751753bc
6 changed files with 9 additions and 9 deletions
|
@ -257,7 +257,7 @@ bool instance_check(int argc, char** argv, bool app_config_single_instance)
|
|||
hashed_path = std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
|
||||
#else
|
||||
boost::system::error_code ec;
|
||||
#ifdef __linux
|
||||
#ifdef __linux__
|
||||
// If executed by an AppImage, start the AppImage, not the main process.
|
||||
// see https://docs.appimage.org/packaging-guide/environment-variables.html#id2
|
||||
const char *appimage_env = std::getenv("APPIMAGE");
|
||||
|
@ -275,7 +275,7 @@ bool instance_check(int argc, char** argv, bool app_config_single_instance)
|
|||
BOOST_LOG_TRIVIAL(error) << "APPIMAGE environment variable was set, but it does not point to a valid file: " << appimage_env;
|
||||
}
|
||||
if (! appimage_env_valid)
|
||||
#endif // __linux
|
||||
#endif // __linux__
|
||||
hashed_path = 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 the executable (can happen with appimage on some systems. Does it fail on Fuse file systems?)
|
||||
ec.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue