mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
only install/copy srs.db that we're using (fix 56d03f783f041)
This commit is contained in:
parent
93cd83255b
commit
557d1afcf7
1
debian/qgis-providers-common.postinst
vendored
1
debian/qgis-providers-common.postinst
vendored
@ -3,7 +3,6 @@ set -e
|
||||
|
||||
if [ "$1" = "configure" ] && [ -x /usr/lib/qgis/crssync ]; then
|
||||
cp /usr/share/qgis/resources/srs-template.db /usr/share/qgis/resources/srs.db
|
||||
cp /usr/share/qgis/resources/srs6-template.db /usr/share/qgis/resources/srs6.db
|
||||
dpkg-trigger qgis-crssync
|
||||
fi
|
||||
|
||||
|
3
debian/qgis-providers-common.prerm
vendored
3
debian/qgis-providers-common.prerm
vendored
@ -4,8 +4,5 @@ set -e
|
||||
if [ "$1" = "remove" ] && [ -e /usr/share/qgis/resources/srs.db ]; then
|
||||
rm -f /usr/share/qgis/resources/srs.db || true
|
||||
fi
|
||||
if [ "$1" = "remove" ] && [ -e /usr/share/qgis/resources/srs6.db ]; then
|
||||
rm -f /usr/share/qgis/resources/srs6.db || true
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
3
debian/qgis-providers.postinst
vendored
3
debian/qgis-providers.postinst
vendored
@ -5,9 +5,6 @@ if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then
|
||||
if [ -w /usr/share/qgis/resources/srs.db ] && [ -x /usr/lib/qgis/crssync ]; then
|
||||
/usr/lib/qgis/crssync
|
||||
fi
|
||||
if [ -w /usr/share/qgis/resources/srs6.db ] && [ -x /usr/lib/qgis/crssync ]; then
|
||||
/usr/lib/qgis/crssync
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
1
debian/rules
vendored
1
debian/rules
vendored
@ -300,7 +300,6 @@ override_dh_auto_install:
|
||||
|
||||
# Don't ship srs.db, automatically updated in postinst with crssync
|
||||
mv $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs.db $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs-template.db
|
||||
mv $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs6.db $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs6-template.db
|
||||
|
||||
# Mime info
|
||||
install -o root -g root -d $(CURDIR)/debian/tmp/usr/share/mime/packages
|
||||
|
@ -322,7 +322,6 @@ for %%i in (%packages%) do (
|
||||
"apps/%PACKAGENAME%/resources/qgis.db" ^
|
||||
"apps/%PACKAGENAME%/resources/spatialite.db" ^
|
||||
"apps/%PACKAGENAME%/resources/srs.db" ^
|
||||
"apps/%PACKAGENAME%/resources/srs.db" ^
|
||||
"apps/%PACKAGENAME%/resources/symbology-style.xml" ^
|
||||
"apps/%PACKAGENAME%/resources/cpt-city-qgis-min/" ^
|
||||
"apps/%PACKAGENAME%/svg/" ^
|
||||
|
@ -1,5 +1,14 @@
|
||||
INSTALL(FILES srs.db
|
||||
srs6.db
|
||||
IF (PROJ_VERSION_MAJOR GREATER 5)
|
||||
MESSAGE(STATUS "Using PROJ 6 srs database.")
|
||||
SET(SRSDB srs6.db)
|
||||
ELSE (PROJ_VERSION_MAJOR GREATER 5)
|
||||
MESSAGE(STATUS "Using PROJ <6 srs database.")
|
||||
SET(SRSDB srs.db)
|
||||
ENDIF (PROJ_VERSION_MAJOR GREATER 5)
|
||||
|
||||
INSTALL(FILES ${SRSDB} DESTINATION ${QGIS_DATA_DIR}/resources RENAME srs.db)
|
||||
|
||||
INSTALL(FILES
|
||||
qgis.db
|
||||
symbology-style.xml
|
||||
spatialite.db
|
||||
|
@ -955,34 +955,17 @@ QString QgsApplication::iconsPath()
|
||||
|
||||
QString QgsApplication::srsDatabaseFilePath()
|
||||
{
|
||||
#if PROJ_VERSION_MAJOR>=6
|
||||
if ( ABISYM( mRunningFromBuildDir ) )
|
||||
{
|
||||
QString tempCopy = QDir::tempPath() + "/srs6.db";
|
||||
|
||||
if ( !QFile( tempCopy ).exists() )
|
||||
{
|
||||
QFile f( pkgDataPath() + "/resources/srs6.db" );
|
||||
if ( !f.copy( tempCopy ) )
|
||||
{
|
||||
qFatal( "Could not create temporary copy" );
|
||||
}
|
||||
}
|
||||
|
||||
return tempCopy;
|
||||
}
|
||||
else
|
||||
{
|
||||
return pkgDataPath() + QStringLiteral( "/resources/srs6.db" );
|
||||
}
|
||||
#else
|
||||
if ( ABISYM( mRunningFromBuildDir ) )
|
||||
{
|
||||
QString tempCopy = QDir::tempPath() + "/srs.db";
|
||||
|
||||
if ( !QFile( tempCopy ).exists() )
|
||||
{
|
||||
#if PROJ_VERSION_MAJOR>=6
|
||||
QFile f( pkgDataPath() + "/resources/srs6.db" );
|
||||
#else
|
||||
QFile f( pkgDataPath() + "/resources/srs.db" );
|
||||
#endif
|
||||
if ( !f.copy( tempCopy ) )
|
||||
{
|
||||
qFatal( "Could not create temporary copy" );
|
||||
@ -995,7 +978,6 @@ QString QgsApplication::srsDatabaseFilePath()
|
||||
{
|
||||
return pkgDataPath() + QStringLiteral( "/resources/srs.db" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
QStringList QgsApplication::svgPaths()
|
||||
|
Loading…
x
Reference in New Issue
Block a user