Changes to the Installer
The Patchworks installer (also known as the setup program) is a simple click-through program used to set up Patchworks on your workstation. As Patchworks' capabilities have increased over the years, so has the library of additional runtime dependencies that the installer needs to manage. Some changes were required to make this all work reliably, so read on to find out more.
The Patchworks installer copies the core Patchworks files and libraries onto the client workstation and sets up the environment variables and shortcuts needed to run Patchworks. In earlier versions of Patchworks, the library of runtime dependencies was small, but as features have been added (such as reading from Excel files, writing to PDF files, and reading various spatial formats), the number of additional libraries has increased significantly. This is not a problem on its own, but Patchworks isn't the only tenant in your workstation. Many analysts may have installed other useful tools such as QGIS or GeoPandas, and some of the libraries they contain may duplicate those loaded by Patchworks. This also isn't a problem on its own, but it is not uncommon for these duplicated libraries to be incompatible with each other. This situation (known as DLL Hell) can cause applications to fail unexpectedly when they are installed alongside other applications.
The best way to avoid library incompatibilities is for each individual application to isolate its library dependencies so that they are not exposed to other applications. When the application starts up, it adds the source of its libraries at the beginning of the library search list. Once the application is finished, the private libraries are no longer in the search list.
Patchworks has now implemented this approach with a new script used to start up Patchworks. This executable script is found in the Patchworks home directory (located using the SPSHOME environment variable) and is named "patchworks.bat". To set up the library search path and start Patchworks, you can simply use the command
"%SPSHOME%\patchworks.bat"
This command will open an Application Launcher window. If you want to run an application directly, you can add the class name and any other parameters to the command line:
"%SPSHOME%\patchworks.bat" ca.spatial.patchworks.Patchworks C5.pin
The shortcuts created by the installer have been updated to refer to this new script. If you have pinned the previous shortcut to the start menu or to the taskbar, it is likely that it won't work anymore. The solution is to unpin the old shortcut and then repin the new one.
Another change to the installer is that it now supports user-level installations without requiring elevated administrator permissions. This type of installation will only install Patchworks for the current user, so if you are sharing a workstation, this may not be the best option. User-level installations must be run from the command line with the following parameter:
patchworks-setup.exe /currentuser
User-level installs are similar to all-users installs, except
- The installation folder must be writable by the user
- Only the user environment variables will be updated
- Icons will not be set for BSH or PIN files
Contact Patchworks technical support if you encounter any problems with this new feature.