1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +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
locale.path = Contents/Resources/translations
locale.files = $$files(lang/*.qm)
csv.path = Contents/Resources
csv.files = data/csv
crs.path = Contents/Resources
crs.files = data/CRS
maps.path = Contents/Resources
maps.files = data/maps
symbols.path = Contents/Resources/symbols
@ -495,7 +495,7 @@ macx {
lproj.path = Contents/Resources
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 {
@ -542,8 +542,8 @@ unix:!macx:!android {
maps.files = $$files(data/maps/*)
maps.path = $$PREFIX/share/gpxsee/maps
csv.files = $$files(data/csv/*)
csv.path = $$PREFIX/share/gpxsee/csv
crs.files = $$files(data/CRS/*)
crs.path = $$PREFIX/share/gpxsee/CRS
symbols.files = $$files(icons/symbols/*.png)
symbols.path = $$PREFIX/share/gpxsee/symbols
locale.files = $$files(lang/*.qm)
@ -557,7 +557,7 @@ unix:!macx:!android {
appdata.files = pkg/linux/gpxsee.appdata.xml
appdata.path = $$PREFIX/share/metainfo
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 {
@ -595,11 +595,11 @@ android {
maps.files = $$files(data/maps/*)
maps.path = /assets/maps
csv.files = $$files(data/csv/*)
csv.path = /assets/csv
crs.files = $$files(data/CRS/*)
crs.path = /assets/CRS
symbols.files = $$files(icons/symbols/*.png)
symbols.path = /assets/symbols
translations.files = $$files(lang/*.qm)
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
File "gpxsee.exe"
File /r "maps"
File /r "csv"
File /r "CRS"
File /r "symbols"
; Create the uninstaller

View File

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

View File

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

View File

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