linz / QGIS-AIMS-Plugin

QGIS Plugin for managing LINZ address information
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Move Configuration file location #221

Open SPlanzer opened 6 years ago

SPlanzer commented 6 years ago

A release of the QGIS plugin is due as part of the DaaS 2.18 Role out.

As part of this release the user config .ini file needs to be decoupled from the plugin. The current location causes several issues

The .ini should be moved to the QgsApplication.qgisSettingsDirPath()

config_path = os.path.join( QgsApplication.qgisSettingsDirPath(), "aims", "config.ini" )

QgsApplication.qgisSettingsDirPath() being the .qgis2 folder

SPlanzer commented 6 years ago

Will also need to:

SPlanzer commented 6 years ago

Documented

SPlanzer commented 6 years ago

Approach has failed when applied to DaaS

Part of the reason of moving the location of the config file is to allow DaaS users to navigate to the files location via the Windows GUI. Where this file is currently stored in the plugin dir of the DaaS QGIS installation users can not navigate here via the Windows GUI.

It was expected users would be able to access the config file if it was placed in the users settings dir (C:\Users\\qgis2).

It turns out in DaaS users can not navigate to this dir via the windows GUI also.

As shown in the image below - When listing the contents of the directory C:\Users\splanzer\qgis2 via OSGeo4W Shell as installed as part of the DaaS QGIS installation and Windows native terminal C:\Users\splanzer\qgis2 different directory contents are listed.

It appears these paths point to different file storage locations. Is this because QGIS is 'siloed' in DaaS?

From here

An alternative solution is required. The above has been proven to work with linux and QGIS installed by users into their own user directories, But this will not work because of the way QGIS is installed in DaaS

settingsdir

SPlanzer commented 6 years ago

UI Element in DEV.