mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Servatrice portable + cmake options
Use -DPORTABLE=1 to build a portable version
This commit is contained in:
parent
4125d690fa
commit
0b94b47f72
4 changed files with 20 additions and 3 deletions
|
|
@ -15,9 +15,11 @@ SettingsCache::SettingsCache(const QString & fileName, QSettings::Format format,
|
|||
|
||||
QString SettingsCache::guessConfigurationPath(QString & specificPath)
|
||||
{
|
||||
const QString fileName="servatrice.ini";
|
||||
const QString fileName="servatrice.ini";
|
||||
#ifdef PORTABLE_BUILD
|
||||
return fileName;
|
||||
#endif
|
||||
QString guessFileName;
|
||||
|
||||
// specific path
|
||||
if(!specificPath.isEmpty() && QFile::exists(specificPath))
|
||||
return specificPath;
|
||||
|
|
@ -40,4 +42,4 @@ QString SettingsCache::guessConfigurationPath(QString & specificPath)
|
|||
guessFileName = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/" + fileName;
|
||||
#endif
|
||||
return guessFileName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue