OpenWaterFoundation / owf-app-geoprocessor-python

Open Water Foundation geoprocessor based on QGIS
GNU General Public License v3.0
2 stars 1 forks source link

Need to standardize the installation folder structure #107

Open smalers opened 5 years ago

smalers commented 5 years ago

The GeoProcessor is intended to be installed in various operating systems. Some basic requirements for installation configurations are:

  1. Will be installed on Windows and Linux computers.
  2. Relies on Python runtime environment.
  3. Full version relies on QGIS runtime environment, test framework version does not rely on QGIS.
  4. Being able to install different versions of the GeoProcessor on a computer (similar to TSTool) provides flexibility in upgrades and testing/comparison.

Windows software installation can be confusing with changing standards and variability between software providers and programs. A basic guideline is to install software's protected files (files that users should not change) in C:/Program Files/Provider/Package (see discussion of Program Files and install user-modified files in C:\User\Users (see discussion here). See also the discussion of AppData folders.

Linux software installation for non-system third-party software is standardized to go into /opt/Provider/Package. See the /opt discussion. Linux also has the concept of hidden files that start with period and this has implications for application data see discussion on hidden files.

The above information, while trying to define standards, is not completely clear, and it leads to differences on the different platforms. The GeoProcessor software needs to recognize standards but also be straightforward to distribute and maintain. Consequently, the following installation/runtime environments are recommend in the initial release, and can be evaluated over time:

  1. Need to allow installing multiple versions of the GeoProcessor in the QGIS and non-QGIS (test) environments. This means that a versioned installation folder needs to be used such as /opt/OpenWaterFoundation/GeoProcessor-1.0.0 and C:\Program Files\Open Water Foundation\GeoProcessor-1.0.0, which is possible for the test framework version because it is independent of QGIS.
  2. Need to provide menus to run the software such as on Windows: Start / Open Water Foundation / GeoProcessor 1.0.0. This will point to the installed software regardless of where it lives.
  3. Where possible, isolate the GeoProcessor files from other software. For example, the test framework should use a Python Virtual Environment that includes Python 3.6, the GeoProcessor Python files, and any third-party software that is needed. This will isolate the GeoProcessor from other Python versions and applications on the system.
  4. For QGIS, it is more difficult to isolate the GeoProcessor so maybe need to use a folder other than site-packages? Creating a virtual environment may be a pain due to the dependence on all the QGIS software, but don't want to install GeoProcessor code and third-party packages and risk compromising the QGIS installation. Also want to support multiple versions of GeoProcessor whereas the default Python environment tends to install all packages in the same place.

More details will be added as implementation is worked out.

smalers commented 5 years ago

The build scripts now create a virtual environment that works for Cygwin and Linux for gptest. Additional work is needed to build an installer for the full QGIS version, in particular for Windows.