[postgis-users] Installing postgis from an NSIS installer

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Wed Feb 18 10:26:18 PST 2009

Yves Moisan wrote:

> Some results.  First, I tried commenting out the sections on checking
> the existence of template_postgis but I need a couple more pieces to be
> able to build the NSI file on my system.  Is there a location where I
> can find all files or do I have to set up mingw and execute the bash
> files ?
> Anyhow, I manually created template_postgis in pgAdmin just to test the
> postGIS installer : 
> CREATE DATABASE template_postgis
>  WITH OWNER = postgres ENCODING = 'WIN1252'
> Then when I run the postGIS installer I have the message saying
> template_postgis exists (which this time is true) and if I proceed it
> will overwrite it, so I go "yes" and it does the delete of the existing
> template_postgis object and creates the new one fine.  From then on, the
> rest of the postGIS installation runs fine.  Only glitch is that my
> newly created template_postgis object now reads :
> CREATE DATABASE template_postgis
>  WITH OWNER = postgres ENCODING = 'UTF-8'
> So there's an encoding problem.  The NSI file mentions Unicode as
> encoding ??
> To summarize :
> - I have found the installer to think template_postgis exists whereas it
> does not exist (which causes the installer to crash when it tries to
> delete a non-existing object)
> - It is not possible to specify an encoding other that UTF-8
> If I could easily build the NSI file I could try and play with the
> condition that checks the existence of the template_postgis object.
> Cheers,
> Yves

Hi Yves,

If you check the source you can see that all the installer does is 
create some batch files to launch psql and run them in the background. 
Hence if you look in the %TEMP%\postgis_installer directory you should 
be able to see these batch files, along with any error output produced 
by each one. Normally it is fairly easy to find out what is going wrong 
by running these files manually.



Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
T: +44 870 608 0063

More information about the postgis-users mailing list