1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Use a new/better location for the CRS data

This commit is contained in:
Martin Tůma 2023-04-13 23:53:31 +02:00
parent 5ca04dd78a
commit dc799f4642
9 changed files with 23 additions and 23 deletions

View File

@ -484,8 +484,8 @@ macx {
QMAKE_INFO_PLIST = pkg/mac/Info.plist QMAKE_INFO_PLIST = pkg/mac/Info.plist
locale.path = Contents/Resources/translations locale.path = Contents/Resources/translations
locale.files = $$files(lang/*.qm) locale.files = $$files(lang/*.qm)
csv.path = Contents/Resources crs.path = Contents/Resources
csv.files = data/csv crs.files = data/CRS
maps.path = Contents/Resources maps.path = Contents/Resources
maps.files = data/maps maps.files = data/maps
symbols.path = Contents/Resources/symbols symbols.path = Contents/Resources/symbols
@ -495,7 +495,7 @@ macx {
lproj.path = Contents/Resources lproj.path = Contents/Resources
lproj.files = $$files(pkg/mac/lproj/*) lproj.files = $$files(pkg/mac/lproj/*)
QMAKE_BUNDLE_DATA += locale maps symbols icons csv lproj QMAKE_BUNDLE_DATA += locale maps symbols icons crs lproj
} }
win32 { win32 {
@ -542,8 +542,8 @@ unix:!macx:!android {
maps.files = $$files(data/maps/*) maps.files = $$files(data/maps/*)
maps.path = $$PREFIX/share/gpxsee/maps maps.path = $$PREFIX/share/gpxsee/maps
csv.files = $$files(data/csv/*) crs.files = $$files(data/CRS/*)
csv.path = $$PREFIX/share/gpxsee/csv crs.path = $$PREFIX/share/gpxsee/CRS
symbols.files = $$files(icons/symbols/*.png) symbols.files = $$files(icons/symbols/*.png)
symbols.path = $$PREFIX/share/gpxsee/symbols symbols.path = $$PREFIX/share/gpxsee/symbols
locale.files = $$files(lang/*.qm) locale.files = $$files(lang/*.qm)
@ -557,7 +557,7 @@ unix:!macx:!android {
appdata.files = pkg/linux/gpxsee.appdata.xml appdata.files = pkg/linux/gpxsee.appdata.xml
appdata.path = $$PREFIX/share/metainfo appdata.path = $$PREFIX/share/metainfo
target.path = $$PREFIX/bin target.path = $$PREFIX/bin
INSTALLS += target maps csv symbols locale icon desktop mime appdata INSTALLS += target maps crs symbols locale icon desktop mime appdata
} }
android { android {
@ -595,11 +595,11 @@ android {
maps.files = $$files(data/maps/*) maps.files = $$files(data/maps/*)
maps.path = /assets/maps maps.path = /assets/maps
csv.files = $$files(data/csv/*) crs.files = $$files(data/CRS/*)
csv.path = /assets/csv crs.path = /assets/CRS
symbols.files = $$files(icons/symbols/*.png) symbols.files = $$files(icons/symbols/*.png)
symbols.path = /assets/symbols symbols.path = /assets/symbols
translations.files = $$files(lang/*.qm) translations.files = $$files(lang/*.qm)
translations.path = /assets/translations translations.path = /assets/translations
INSTALLS += maps csv symbols translations INSTALLS += maps crs symbols translations
} }

View File

@ -119,7 +119,7 @@ Section "GPXSee" SEC_APP
; Put the files there ; Put the files there
File "gpxsee.exe" File "gpxsee.exe"
File /r "maps" File /r "maps"
File /r "csv" File /r "CRS"
File /r "symbols" File /r "symbols"
; Create the uninstaller ; Create the uninstaller

View File

@ -904,8 +904,8 @@ void GUI::paths()
+ QDir::cleanPath(ProgramPaths::mapDir(true)) + "<br><br><b>" + QDir::cleanPath(ProgramPaths::mapDir(true)) + "<br><br><b>"
+ tr("POI directory:") + "</b><br>" + tr("POI directory:") + "</b><br>"
+ QDir::cleanPath(ProgramPaths::poiDir(true)) + "<br><br><b>" + QDir::cleanPath(ProgramPaths::poiDir(true)) + "<br><br><b>"
+ tr("GCS/PCS directory:") + "</b><br>" + tr("CRS directory:") + "</b><br>"
+ QDir::cleanPath(ProgramPaths::csvDir(true)) + "<br><br><b>" + QDir::cleanPath(ProgramPaths::crsDir(true)) + "<br><br><b>"
+ tr("DEM directory:") + "</b><br>" + tr("DEM directory:") + "</b><br>"
+ QDir::cleanPath(ProgramPaths::demDir(true)) + "<br><br><b>" + QDir::cleanPath(ProgramPaths::demDir(true)) + "<br><br><b>"
+ tr("Styles directory:") + "</b><br>" + tr("Styles directory:") + "</b><br>"
@ -922,8 +922,8 @@ void GUI::paths()
+ QDir::cleanPath(ProgramPaths::mapDir(true)) + "</code></td></tr><tr><td>" + QDir::cleanPath(ProgramPaths::mapDir(true)) + "</code></td></tr><tr><td>"
+ tr("POI directory:") + "</td><td><code>" + tr("POI directory:") + "</td><td><code>"
+ QDir::cleanPath(ProgramPaths::poiDir(true)) + "</code></td></tr><tr><td>" + QDir::cleanPath(ProgramPaths::poiDir(true)) + "</code></td></tr><tr><td>"
+ tr("GCS/PCS directory:") + "</td><td><code>" + tr("CRS directory:") + "</td><td><code>"
+ QDir::cleanPath(ProgramPaths::csvDir(true)) + "</code></td></tr><tr><td>" + QDir::cleanPath(ProgramPaths::crsDir(true)) + "</code></td></tr><tr><td>"
+ tr("DEM directory:") + "</td><td><code>" + tr("DEM directory:") + "</td><td><code>"
+ QDir::cleanPath(ProgramPaths::demDir(true)) + "</code></td></tr><tr><td>" + QDir::cleanPath(ProgramPaths::demDir(true)) + "</code></td></tr><tr><td>"
+ tr("Styles directory:") + "</td><td><code>" + tr("Styles directory:") + "</td><td><code>"

View File

@ -6,7 +6,7 @@
#define MAP_DIR "maps" #define MAP_DIR "maps"
#define POI_DIR "POI" #define POI_DIR "POI"
#define CSV_DIR "csv" #define CRS_DIR "CRS"
#define DEM_DIR "DEM" #define DEM_DIR "DEM"
#define TILES_DIR "tiles" #define TILES_DIR "tiles"
#define TRANSLATIONS_DIR "translations" #define TRANSLATIONS_DIR "translations"
@ -63,17 +63,17 @@ QString ProgramPaths::poiDir(bool writable)
QStandardPaths::LocateDirectory); QStandardPaths::LocateDirectory);
} }
QString ProgramPaths::csvDir(bool writable) QString ProgramPaths::crsDir(bool writable)
{ {
if (writable) if (writable)
return QDir(QStandardPaths::writableLocation(DATA_LOCATION)) return QDir(QStandardPaths::writableLocation(DATA_LOCATION))
.filePath(CSV_DIR); .filePath(CRS_DIR);
else else
#ifdef Q_OS_ANDROID #ifdef Q_OS_ANDROID
return assetsPath(QStandardPaths::locate(DATA_LOCATION, CSV_DIR, return assetsPath(QStandardPaths::locate(DATA_LOCATION, CSV_DIR,
QStandardPaths::LocateDirectory), CSV_DIR); QStandardPaths::LocateDirectory), CSV_DIR);
#else // Q_OS_ANDROID #else // Q_OS_ANDROID
return QStandardPaths::locate(DATA_LOCATION, CSV_DIR, return QStandardPaths::locate(DATA_LOCATION, CRS_DIR,
QStandardPaths::LocateDirectory); QStandardPaths::LocateDirectory);
#endif // Q_OS_ANDROID #endif // Q_OS_ANDROID
} }
@ -132,22 +132,22 @@ QString ProgramPaths::translationsDir()
QString ProgramPaths::ellipsoidsFile() QString ProgramPaths::ellipsoidsFile()
{ {
return QDir(csvDir()).filePath(ELLIPSOIDS_FILE); return QDir(crsDir()).filePath(ELLIPSOIDS_FILE);
} }
QString ProgramPaths::gcsFile() QString ProgramPaths::gcsFile()
{ {
return QDir(csvDir()).filePath(GCS_FILE); return QDir(crsDir()).filePath(GCS_FILE);
} }
QString ProgramPaths::projectionsFile() QString ProgramPaths::projectionsFile()
{ {
return QDir(csvDir()).filePath(PROJECTIONS_FILE); return QDir(crsDir()).filePath(PROJECTIONS_FILE);
} }
QString ProgramPaths::pcsFile() QString ProgramPaths::pcsFile()
{ {
return QDir(csvDir()).filePath(PCS_FILE); return QDir(crsDir()).filePath(PCS_FILE);
} }
QString ProgramPaths::typFile() QString ProgramPaths::typFile()

View File

@ -7,7 +7,7 @@ namespace ProgramPaths
{ {
QString mapDir(bool writable = false); QString mapDir(bool writable = false);
QString poiDir(bool writable = false); QString poiDir(bool writable = false);
QString csvDir(bool writable = false); QString crsDir(bool writable = false);
QString demDir(bool writable = false); QString demDir(bool writable = false);
QString styleDir(bool writable = false); QString styleDir(bool writable = false);
QString symbolsDir(bool writable = false); QString symbolsDir(bool writable = false);