How to create the ]po[ Windows Installer

This is an internal document about how to build the ]po[ Windows installer. This document should not be publicly linked on www.project-open.com. The information provided may be incomplete or even incorrect.

]po[ Version

The instructions below are for creating the ]po[ V5.0 Windows installer on 2017-02-27.


Install CygWin

Do a standard 64bit install of CygWin in C:\project-open\.

First do a standard install with the base packages only. In a second step select and install the following:

Package selection:

  • Archieve
    • bzip2
    • zip
  • Base
    • everything
  • Database
    • In case of a Cygwin PG installation please select postgresql-* (currently PG 9.6.2-1).
      However the main installer uses the PostgreSQL "binary distribution" below.
  • Devel
    • cvs
    • git
    • subversion
  • Editors
    • emacs-nox
    • emacs-win32
    • vim
  • Net
    • openldap
    • openssh
    • openssl
    • openssl-perl
    • rsync
    • wget
  • Perl
    • perl
    • perl-Data-Compare
    • perl-DBI
    • perl-IO-Socket-IP
    • perl-IO-Socket-INET6
    • perl-IO-String
    • perl-JSON
    • perl-LWP-Online
    • perl-Net-IP
    • perl-Net-HTTP
    • perl-Net-SSLeay
    • perl-YAML
    • perl_base



Install  NSIS (Nullsoft Scriptable Install System)

We are currently using version 3.0.1

You need to install the following plug-ins:

  • Registry:
    You need to copy "registry.dll" into C:\ProgramFiles (x86)\NSIS\Plugins\x86-ansi.
    Watch out that the older plugins may install themselves in C:\ProgramFiles (x86)\NSIS\Plugins. This is wrong since NSIS 3.0 apparently.
    Otherwise you will get an error
    Plugin not found, cannot call registry::_KeyExists
  • UserMgr:
    You need to manually copy the UserMgr.dll into the x86-ansi folder like above.

  • ExecCmd:
    Like UsrMgr above


Install PostgreSQL

There is a "binary distribution" of PG available for win64 as a ZIP. We currently use:

  • postgresql-9.2.20-1-windows-x64-binaries.zip

Unzip into C:\project-open\pgsq.

Please note that more recent PostgreSQL versions are incompatible with Windows 2008 Server and Windows 7.

Now install PostgreSQL with the commands from the installer:

    net user postgres "Qwer.1234" /add /fullname:"PostgreSQL"
    # ToDo: UF_PASSWD_NOTREQD, UF_DONT_EXPIRE_PASSWD, SeBatchLogonRight, SeServiceLogonRight
    chown -R postgres "/pgsql"
    chmod -R go=u "/pgsql"
    chgrp" -R Users "/pgsql"
    sc create postgresql-9.2 \
        binpath= "$INSTDIR\pgsql\bin\pg_ctl.exe runservice -N \
        postgresql-9.2 -D $INSTDIR/pgsql/data -w" \
        DisplayName= "]po[ PostgreSQL 9.2" start= "delayed-auto" \
        type= own obj= ".\postgres" password= "Qwer.1234"
    sc start postgresql-9.2

You can manually run PostgreSQL with the following command (from within a CygWin shell):

/pgsql/bin/pg_ctl.exe -D "C:\project-open\pgsql\data" start

Some error messages that you might encounter then and how to fix them:

  • Error while loading shared libraries: MSVCR100.dll: cannot open shared object file: No such file or directory:
    This means that you have to install the 2010 vcredist_x64.exe distributable. This file is included in the ]po[ installer as vcredist_2010_x64.exe.
  • PANIC:  could not open control file "global/pg_control": Permission denied:
    You forgot to execute the chown and chmod commands below.

 

 

Finally initialize the database and load a database backup from the ]po[ product master:

initdb -D "c:/project-open/pgsql/data" --encoding=utf8 --locale=en_US
chown -R postgres:Users /pgsql
chmod -R go=u /pgsql
psql -f pgback.project-open-v50.projop.20170223.0529.sql projop > import.log 2>&1 &
psql -c "select count(*) from persons" projop

 

Install Java JRI

Java is used to run the "Service Panel" for starting/stoping/show the status of the ]po[ server. We currently use:

  • jre-8u121-windows-x64.tar.gz

NaviServer

This installer starts off with the OpenACS installer from Maurizio Martignani from SpazioIT.

However, we have decided for a different layout of files:

/usr/local/tcl8.5.18       Official TCL source distribution
/usr/local/ns/bin
    nscgi.dll
    nscp.dll
    nsd.dll
    nsdb.dll
    nsdbpg.dll
    nslog.dll
    nsoracle.dll
    nsperm.dll
    nssock.dll
    nsssl.dll
    nsthread.dll

/usr/local/ns/lib
    nsf2.0.0                  XoTcl libraries
    tcllib1.18                TCLLib
    nfs2.0.0                  XoTcl libraries
    tdom0.8.3                 XML parser libraries
    Thread
    thread2.8.0
    threads
    libxotcl1.6.7.dll         XoTcl DLL

/usr/local/ns/tcl             TCL Library



Manually Testing PostgreSQL

 

Windows Server 2012 R2

There is a known issue with Windows Server 2012 R2 causing an installation failure of the Visual Studio 2015 vcredist_x64.exe. Please make sure Microsoft updates KB2919442 and KB2919355 are installed (in this order), before starting with the installation of ]project-open[.


ToDo:

- Cleanup unused DLLs in /usr/local/ns/bin



  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

E-08907 Hospitalet de Llobregat (Barcelona)

 Tel Europe: +34 932 202 088
 Tel US: +1 415 429 5995
 Mail: info@project-open.com