This is a method to build your own qgis configuration packages using osgeo4W.

Overview

This project shows how to create a QGIS customized installation for your organization, using the power of OSGEO4W.

QGIS is highly customizable, and most of the tricks are very well documented in the official documentation.

OSGeo4W is the package manager used by QGIS, GRASS and most OSGeo project to provide binaries for Windows.

QGIS, all the underlying libraries (OGR, GDAL, etc..), GRASS, SAGA, a full python environnement, Qt , etc are available in OSGEO4W.

QGIS can also be installed in its different maintained versions : LTR - Release and dev in a stable way, where the standalone installer will duplicate the whole environnement at each version.

As OSGEO4W is a package manager, it is possible to set dependencies between applications, libraries and command line utilities.

Installing minor upgrades is really light and simple, and thus highly recommended in a corporate environnement

This script currently used former osgeo4W setup that was updated to V2 in june 2021. Porting still needs to be done.

Thanks a lot to all the QGIS contributors, bakers and developpers that allowed to reach to target.

Configuring your QGIS install

A pre-configured QGIS will allow you to

  • simplify and accelerate your QGIS upgrades
  • Let you automate this in your favorite deployment system (OCS Inventory, SCCM, Wapt, etc...)
  • Control users settings, either in a strict way (proxy, authentication and connexion methods) or in a permissive way (default value but users allowed to be free)
  • wire pre-installed ressources like plugins, SVG libraries, layout templates, startup project, etc...
  • etc..

How-to

Build a OSGEO4W customization package

This recipe uses linux shell scripts to create the package. It is possible - though painfull - to adapt it to a Windows environnement. However, WSL2 may help you in building and deploying on the same machine easily.

Directory structure

The directory structure is standard and provided by OSGEO4W

qgis-yourorganizationname/
├── apps
│   ├── qgis-yourorganizationname
│   │   ├── WMTS_scales.xml  -- some default scales (optional)
│   │   ├── layout_checks.py  -- some layout checks (copyright, citations, etc..) (optional)
│   │   ├── qgis-ltr-yourorganizationname.bat.template  -- .bat launcher template. This launcher will override the native qgis launchers after install
│   │   ├── qgis_constrained_settings.py -- a nice utility to constraint some in place user settings
│   │   ├── qgis_constrained_settings.yml -- the config file to decide which settings to constrain
│   │   ├── qgis_global_settings.ini      -- your customized default settings ini file. 
│   │   └── startup_project.qgs            -- a qgis startup project (optional)
│   │   └── qgis-ltr-backup  -- a directory to save the native OSGEO4W shortcut .lnk files that will be removed on install. Uninstall will reinstate them 
│   └── qgis-ltr
│       └── python
│           └── plugins      -- Some plugins you need to deploy on the PC. 
│               ├── SpreadsheetLayers│  
│               ├── coordinator
│               ├── french_locator_filter
│               ├── mask
│               ├── menu_from_project
│               ├── qNote
│               └── redLayer
├── etc
│   ├── postinstall
│   │   └── qgis-yourorganizationname.bat  -- postinstall plugin dealing with shortcuts launchers mainly
│   └── preremove
│       └── qgis-yourorganizationname.bat  -- preremove logic to restore a clean install when uninstalling your package
├── make.sh     -- Build your package tar.bz2 using the version tag in the setup.hint
├── deploy.sh   -- Deploy your built tar.bz2 to a local osgeo4W repository
├── deploy_ressources_somewhere.sh  -- a demo script if you wish to deploy things on a centralized repository (optional)
├── setup.hint   -- package metadat - Change here the package name and the version only

Build and deploy your package

work on your local computer. a linux / shell command line is required to build the package.

  1. play with package content
  2. increment version in setup.hint
  3. Build with ./make.sh
  4. Deploy with ./deploy.sh
  5. (uninstall) / install using either command line or OSGEO4w GUI

Install / Uninstall your package

This parts is run on a Windows OS.

The recommended install process for organizations is to first download OSGEO4W packages and then use them for offline installs. This way, the GIS admin can control precisely which packages are deployed and avoid multiple downloads of ~1Go of binaries for each install.

The command line install is also the prefered way to automate your installs :

You need a powershell or classical Windows console with elevation (ie admin) privileges.

Note that the next OSGEO4W generation will allow non-admin installs.

Full documentation for OSGEO4W CLI here

Below the variable names you need to change depending on your target directories choices

--menu-name "WINDOWS_MENU_NAME  Ex : "OSGEO4W" , "QGIS-LTR-MonOrganisation", "QGIS"
--root "X:\OSGEO4W_DEPLOY_TEST\INSTALL" = target install directory. Ex: "C:\OSGEO4W" , "C:\Program Files\QGIS" 
--local-package-dir "X:\OSGEO4W_DEPLOY_TEST\PAQUETS\http%3a%2f%2fwww.norbit.de%2fosgeo4w%2f"  = directory where you store your osgeo4W binaries for offline install   

Examples of possible commands

-- Install all available packages using caterogy names 

.\osgeo4w-setup.exe  --menu-name "WINDOWS_MENU_NAME" --root "X:\OSGEO4W_DEPLOY_TEST\INSTALL" --advanced  --quiet-mode --local-install --local-package-dir "X:\OSGEO4W_DEPLOY_TEST\PAQUETS\http%3a%2f%2fwww.norbit.de%2fosgeo4w%2f" --autoaccept  --delete-orphans --upgrade-also -C Libs -C Desktop -C Commandline_Utilitiesinstall

-- Uninstall only your qgis-yourorganizationname package, back to a native QGIS

.\osgeo4w-setup.exe  --menu-name "WINDOWS_MENU_NAME" --root "X:\OSGEO4W_DEPLOY_TEST\INSTALL" --quiet-mode --advanced  --local-install --local-package-dir "X:\OSGEO4W_DEPLOY_TEST\PAQUETS\http%3a%2f%2fwww.norbit.de%2fosgeo4w%2f" --autoaccept  --delete-orphans --upgrade-also -x qgis-yourorganizationname

--- Install only your package. Will also install qgis-ltr as it depends on it 

.\osgeo4w-setup.exe  --menu-name "WINDOWS_MENU_NAME" --root "X:\OSGEO4W_DEPLOY_TEST\INSTALL" --advanced  --local-install --local-package-dir "X:\OSGEO4W_DEPLOY_TEST\PAQUETS\http%3a%2f%2fwww.norbit.de%2fosgeo4w%2f" --autoaccept  --delete-orphans --upgrade-also -P qgis-yourorganizationname
 

Choosing between "shared directory" and "installer embedded" approach

You can choose to install most of the resources in the binaries install dir, OR point to a shared network location. You can choose for each ressource what is the best for you. For instance, an organisation with no shared network will embbed everything in the package. If you have shared disks or databases, then you can use it and it is often easier to maintain. BUT, in case of the need for remote / offline work, having all the resources already installed can save your butt :)

Advantages of centralized resources :

  • Easy to maintain (just add files, edit them, done)
  • No need to launch software updates for minor configuration changes

Drawbacks :

  • Network mounts can fails. Windows "letter drive" mounts does not help (tip: use UNC paths).
  • Network latence can slow down a lot QGIS opening because of on-the-fly compilation nature of python plugins.
  • Some shared drives can have metadata or privileges access issues causing issues with plugin's load

Tip: centralize all the resources here in this git repository and deploy them automatically when releasing a new version. This will let you version in one unique place and avoid issues with forgeting to version some network drive files.

What can be centralized on shared location

  • python plugins - using PYTHON_PLUGINPATH variable: can't be unistalled, take precedence over user's version (to be confirmed)
  • SVG symbols - using qsettings searchPathsForSVG
  • fichier global_settings.ini : default parameters
  • startup project , layout and project templates
  • python code (expressions, etc.. )

What can't be centralized currently

  • Style collections and color ramps
Owner
Régis Haubourg
Environment and agronomy engineer, I fell down into GIS passion 15 years ago, and definitely sank into Open Source projects
Régis Haubourg
Eatlocal - This package helps users solve PyBites code challenges on their local machine

eatlocal This package helps the user solve Pybites code challenges locally. Inst

Russell 0 Jul 25, 2022
Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Clifford Onyonka 2 Feb 23, 2022
Packaging tools for shanty services.

parcel Packaging tools for shanty services. What? Services are docker containers deployed by shanty on a hosting appliance. Each service consists of t

0 Jan 20, 2022
More granular intermediaries for legacy Minecraft versions

Orinthe/Intermediary mappings This repository contains the match information between different versions of Minecraft created by the Orinthe project, a

4 Jan 11, 2022
Practice10 - Operasi String With Python

Operasi String MY SOSIAL MEDIA : Apa itu Python String ? String adalah urutan si

Maulana Reza Badrudin 1 Jan 05, 2022
A collection of UIKit components that can be used as a Wagtail StreamField block.

Wagtail UIKit Blocks A collection of UIKit components that can be used as a Wagtail StreamField block. Available UIKit components Container Grid Headi

Krishna Prasad K 13 Dec 15, 2022
Process RunGap output file of a workout and load data into Apple Numbers Spreadsheet and my website with API calls

BSD 3-Clause License Copyright (c) 2020, Mike Bromberek All rights reserved. ProcessWorkout Exercise data is exported in JSON format to iCloud using

Mike Bromberek 1 Jan 03, 2022
Linux Backlight Manager

Is a program to manage your laptop keyboard backlights in linux. Tested on Tuxedo / Clevo / Monste models. Must be tested on other devices

Arshia Ihammi 4 Jan 14, 2022
Fast Base64 encoding/decoding in Python

Fast Base64 implementation This project is a wrapper on libbase64. It aims to provide a fast base64 implementation for base64 encoding/decoding. Insta

Matthieu Darbois 96 Dec 26, 2022
Python solutions to Codeforces problems

CodeForces This repository is dedicated to my Python solutions for CodeForces problems. Feel free to copy, contribute and/or comment. If you find any

Shukur Sabzaliev 15 Dec 20, 2022
Modify version of impacket wmiexec.py, get output(data,response) from registry, don't need SMB connection, also bypassing antivirus-software in lateral movement like WMIHACKER.

wmiexec-RegOut Modify version of impacket wmiexec.py,wmipersist.py. Got output(data,response) from registry, don't need SMB connection, but I'm in the

小离 228 Jan 04, 2023
Programming labs for 6.S060 (Foundations of Computer Security).

6.S060 Labs This git repository contains the code for the labs in 6.S060. In these labs, you will add a series of security features to a photo-sharing

MIT PDOS 10 Nov 02, 2022
A python module for DeSo

DeSo.py A python package for DeSo. Developed by ItsAditya Run pip install deso to install the module! Examples of How To Use DeSo.py Getting $DeSo pri

ItsAditya 0 Jun 30, 2022
Flask html response minifier

Flask-HTMLmin Minify flask text/html mime type responses. Just add MINIFY_HTML = True to your deployment config to minify HTML and text responses of y

Hamid Feizabadi 85 Dec 07, 2022
👀 nothing to see here

Woofy Woofy is blue dog companion token of YFI (Wifey) It utilizes a special Woof bonding curve which allows two-way conversion between the tokens. Th

Yearn Finance 36 Mar 14, 2022
A very basic ciphering/deciphering tool

ckrett-python-library This is an useful python library for people who care about privacy, this library is useful to cipher and decipher text using 4 s

SasiVatsal 8 Oct 18, 2022
Automates the fixing of problems reported by yamllint by parsing its output

yamlfixer yamlfixer automates the fixing of problems reported by yamllint by parsing its output. Usage This software automatically fixes some errors a

OPT Nouvelle Caledonie 26 Dec 26, 2022
List Less Than Ten with python

List Less Than Ten with python

PyLaboratory 0 Feb 07, 2022
Performance monitoring and testing of OpenStack

Browbeat Browbeat is a performance tuning and analysis tool for OpenStack. Browbeat is free, Open Source software. Analyze and tune your Cloud for opt

cloud-bulldozer 83 Dec 14, 2022
Slotscheck - Find mistakes in your slots definitions

🎰 Slotscheck Adding __slots__ to a class in Python is a great way to reduce mem

Arie Bovenberg 67 Dec 31, 2022