|
| 1 | +--- a/skyscraper.pro |
| 2 | ++++ b/skyscraper.pro |
| 3 | +@@ -29,6 +29,12 @@ isEmpty(PREFIX) { |
| 4 | + PREFIX = /usr/local |
| 5 | + } |
| 6 | + |
| 7 | ++# System configuration directory |
| 8 | ++SYSCONFDIR = $$(SYSCONFDIR) |
| 9 | ++isEmpty(SYSCONFDIR) { |
| 10 | ++ SYSCONFDIR = $${PREFIX}/etc |
| 11 | ++} |
| 12 | ++ |
| 13 | + unix:target.path=$${PREFIX}/bin |
| 14 | + unix:target.files=Skyscraper Skyscraper.app/Contents/MacOS/Skyscraper |
| 15 | + |
| 16 | +@@ -39,25 +45,25 @@ unix:supplementary.files=\ |
| 17 | + supplementary/scraperdata/peas_and_idmap_verify.py \ |
| 18 | + supplementary/scraperdata/README-Skyscraper-Scripts.md |
| 19 | + |
| 20 | +-unix:config.path=$${PREFIX}/etc/skyscraper |
| 21 | ++unix:config.path=$${SYSCONFDIR}/skyscraper |
| 22 | + unix:config.files=aliasMap.csv hints.xml mameMap.csv \ |
| 23 | + mobygames_platforms.json peas.json platforms_idmap.csv \ |
| 24 | + screenscraper_platforms.json tgdb_developers.json \ |
| 25 | + tgdb_genres.json tgdb_platforms.json tgdb_publishers.json |
| 26 | + |
| 27 | +-unix:examples.path=$${PREFIX}/etc/skyscraper |
| 28 | ++unix:examples.path=$${SYSCONFDIR}/skyscraper |
| 29 | + unix:examples.files=config.ini.example README.md artwork.xml \ |
| 30 | + artwork.xml.example1 artwork.xml.example2 artwork.xml.example3 \ |
| 31 | + artwork.xml.example4 batocera-artwork.xml docs/ARTWORK.md docs/CACHE.md |
| 32 | + |
| 33 | +-unix:cacheexamples.path=$${PREFIX}/etc/skyscraper/cache |
| 34 | ++unix:cacheexamples.path=$${SYSCONFDIR}/skyscraper/cache |
| 35 | + unix:cacheexamples.files=cache/priorities.xml.example docs/CACHE.md |
| 36 | + |
| 37 | +-unix:impexamples.path=$${PREFIX}/etc/skyscraper/import |
| 38 | ++unix:impexamples.path=$${SYSCONFDIR}/skyscraper/import |
| 39 | + unix:impexamples.files=docs/IMPORT.md import/definitions.dat.example1 \ |
| 40 | + import/definitions.dat.example2 |
| 41 | + |
| 42 | +-unix:resexamples.path=$${PREFIX}/etc/skyscraper/resources |
| 43 | ++unix:resexamples.path=$${SYSCONFDIR}/skyscraper/resources |
| 44 | + unix:resexamples.files=resources/maskexample.png resources/frameexample.png \ |
| 45 | + resources/boxfront.png resources/boxside.png resources/scanlines1.png \ |
| 46 | + resources/scanlines2.png |
| 47 | +@@ -73,6 +79,7 @@ unix:count(dev, 1) { |
| 48 | + } |
| 49 | + DEFINES+=VERSION=\\\"$$VERSION\\\" |
| 50 | + DEFINES+=PREFIX=\\\"$$PREFIX\\\" |
| 51 | ++DEFINES+=SYSCONFDIR=\\\"$$SYSCONFDIR\\\" |
| 52 | + |
| 53 | + CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT |
| 54 | + |
| 55 | +diff --git a/src/config.cpp b/src/config.cpp |
| 56 | +index 4d5abb0..cce5209 100644 |
| 57 | +--- a/src/config.cpp |
| 58 | ++++ b/src/config.cpp |
| 59 | +@@ -234,7 +234,7 @@ void Config::setupUserConfig() { |
| 60 | + } |
| 61 | + } |
| 62 | + |
| 63 | +- QString localEtcPath = QString(PREFIX "/etc/skyscraper/"); |
| 64 | ++ QString localEtcPath = QString(SYSCONFDIR "/skyscraper/"); |
| 65 | + if (!QFileInfo::exists(localEtcPath) || isRpInstall) { |
| 66 | + // RetroPie or Windows installation type: handled externally |
| 67 | + return; |
| 68 | +@@ -391,4 +391,4 @@ const char *Config::pathToCStr(QString &in) { |
| 69 | + ret = ret.replace(QDir::homePath(), "~"); |
| 70 | + #endif |
| 71 | + return ret.toUtf8().constData(); |
| 72 | +-} |
| 73 | +\ No newline at end of file |
| 74 | ++} |
0 commit comments