mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +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");
|
dsv_err("%s", "Data directory is not exists: ../share/DSView");
|
||||||
assert(false);
|
assert(false);
|
||||||
#else
|
#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
|
// The bin location
|
||||||
return QCoreApplication::applicationDirPath();
|
return QCoreApplication::applicationDirPath();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user