mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
fix: Can't load lang resource on mac
This commit is contained in:
parent
d28d357a63
commit
fff0e69634
@ -331,6 +331,20 @@ QString GetAppDataDir()
|
||||
dsv_err("%s", "Data directory is not exists: ../share/DSView");
|
||||
assert(false);
|
||||
#else
|
||||
|
||||
#ifdef Q_OS_DARWIN
|
||||
QDir dir1(QCoreApplication::applicationDirPath());
|
||||
//"./res" is not exists
|
||||
if (dir1.cd("res") == false){
|
||||
QDir dir(QCoreApplication::applicationDirPath());
|
||||
// ../share/DSView
|
||||
if (dir.cd("..") && dir.cd("share") && dir.cd("DSView"))
|
||||
{
|
||||
return dir.absolutePath();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// The bin location
|
||||
return QCoreApplication::applicationDirPath();
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user