Commit 66c87a1e authored by Fabio Bas's avatar Fabio Bas
Browse files

OSX: Handle sounds for first time installations

If the sounds path is unset in the settings and a “sounds” directory
doesn’t exists in the user’s data directory, install the sounds files
and set the settings value accordingly
parent d06d6453
......@@ -154,6 +154,20 @@ int main(int argc, char *argv[])
settingsCache->setPlayerBgPath(destDir + "/fabric_gray.png");
}
}
if(settingsCache->getSoundPath().isEmpty())
{
QString srcDir = QLibraryInfo::location(QLibraryInfo::DataPath);
QString destDir = dataDir + "/sounds";
QDir tmpDir(destDir);
if(!tmpDir.exists())
{
// try to install the default sounds for the current user and set the settigs value
settingsCache->copyPath(srcDir + "/sounds", destDir);
settingsCache->setSoundPath(destDir);
}
}
#endif
if (!settingsValid() || db->getLoadStatus() != Ok) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment