Building on Windows
Software to install:
- WinRAR
- PostgresSQL 8.3
- TortoiseSVN 9(32 bit)
- Boost C++ libraries 1.38.0
- Visual Studio C++ Express Edition 2005
- Windows Platform SDK.
Installation Locations
If installing off the C: drive, keep everything on the same drive and in the standard directory tree otherwise you will have to modify the project settings to point to the right include and lib folders.
D:\Program Files\boost\boost_1_38_0 D:\Program Files\PostgreSQL\8.3 D:\Documents and settings\steve\Desktop\exodus
Installing Tortoise Subversion
Installing Visual Studio Express C++
Granting Exodus access to Postgres
Use pgadmin to create a user role with whichever role privileges you wish and a database.
Any roles that you do not grant exodus will have to be performed using pgadmin or other postgres management tools.
CREATE ROLE exodus LOGIN PASSWORD 'somesillysecret' CREATEDB CREATEROLE;
CREATE DATABASE exodus WITH ENCODING='UTF8' OWNER=exodus;
Getting Project Exodus onto your Computer:
- Go to your desktop, and create a new folder.
- Right click on the folder, and got to TortoiseSVN, checkout.
- In the URL field type in (or copy and paste) http://svn.neosys.com/svn/trunk and click Ok.
- Another window will pop up, and start listing the files you are importing onto your pc.
- Click Ok, once loading is finished.
For help on how to use: http://devwiki.neosys.com/index.php/Installing_and_Using_Tortoise_Subversion
Building and installing pgexodus
pgexodus is a shared library providing basic functions that allow postgres so see fields and therefore perform sorting, selecting and indexing on fields.
Building and installing on Windows
Make sure you installed mingw above
Get a command prompt open in the pgexodus folder
Edit the config.cmd file and ensure the folders are all pointing to the right postgres folders.
build
install
Downloading and installing prebuilt binary for Windows
If you are updating exodus pgexodus.dll after using it then stop and restart the postgres service to remove it from memory otherwise you will not be able to download and update it.
download and extract pgexodus.dll from File:Pgexodus.zip into \program files\postgresql\8.3\lib
Declaring the dll in Postgres
You must login as a postgres superuser to do the following since the C language is not trusted.
In pgadmin or some other tool, select the exodus database and run the following as an sql command to create the necessary special functions that exodus requires to perform dictionary extractions for sort/select etc.
open the pgexodus.cpp file and copy the section that looks something like the following:
CREATE OR REPLACE FUNCTION neo_call(bytea, bytea, bytea, bytea, bytea, int4, int4) RETURNS bytea AS 'pgexodus', 'mvneo_call' LANGUAGE C IMMUTABLE; CREATE OR REPLACE FUNCTION neo_extract_bytea(bytea, int4, int4, int4) RETURNS bytea AS 'pgexodus', 'mvExtractByteA' LANGUAGE C IMMUTABLE; CREATE OR REPLACE FUNCTION neo_extract_text(bytea, int4, int4, int4) RETURNS text AS 'pgexodus', 'mvExtractText' LANGUAGE C IMMUTABLE; -- Remaining functions are STRICT therefore never get called with NULLS -- also return NULL if passed zero length strings CREATE OR REPLACE FUNCTION neo_extract_text2(bytea, int4, int4, int4) RETURNS text AS 'pgexodus', 'mvExtractText2' LANGUAGE C IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION neo_extract_date(bytea, int4, int4, int4) RETURNS date AS 'pgexodus', 'mvExtractDate' LANGUAGE C IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION neo_extract_time(bytea, int4, int4, int4) RETURNS time AS 'pgexodus', 'mvExtractTime' LANGUAGE C IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION neo_extract_datetime(bytea, int4, int4, int4) RETURNS timestamp AS 'pgexodus', 'mvExtractDateTime' LANGUAGE C IMMUTABLE STRICT;
Building Agency
- Run Microsoft Visual Studio C++ Express Edition.
- Now go to File, Open, File, Desktop, Exodus, agency, agency.sln and then open.
- You should see:
- Open agency pointed to you by the red arrow, by clicking on the + sign.
- Remove Market and schedule.
- In the agency folder, open Main then double click on main.cpp
- You should now have C++ code to the right side of the Visual Studio program window.
Possible Problems During Building
Possible Problems During Execution
libpq.dll
- Check whether libpq.dll is in C:\Program Files\PostgreSQL\8.1\lib\????, if not there then change project properties to reflect version on location in where you installed postgreSQL.
- Right click on My computer, properties, advanced, environment variables, system variables, scroll down and find Path, double click it. variable value, go to the end of the path and type a semi-colon, then copy and paste the following path after the semi-colon:
C:\Program Files\PostgreSQL\8.1\lib\ms and close Visual Studio C++ Express Edition, and then open again.
ssleay32.dll
There are dozens of versions of this open source secure sockets library which are widely used by many vendors some of whom very wrongly install them in the windows\system32 folder which has precedence after the local folder but before the path is searched. postgres requires them and will use the wrong version.
The simplest solution is often to delete them.
del c:\Windows\system32\ssleay32.dll del c:\Windows\system32\libeay32.dll
If you cannot delete them then try rebooting. If that doesnt work then find out which program has them open using some dll search facility like sysinternals procexplorer.
Another solution is simply to upgrade them to the latest version of the files that you can find on your computer or on the web or from the postgres bin folder. See properties not the file date.
INITIAL VERSION BY GREG BUSH 19/10/2007
Helpful Websites
- For help on Microsoft Visual Studio C++ Express Edition go to http://msdn2.microsoft.com/en-gb/express/aa700755.aspx
- For help on Boost go to http://www.boost.org
- For help on PostgeSQL go to http://www.postgresql.org/
- For help on WinRAR go to http://www.win-rar.com/winrarsupport.html
- For help on TortoiseSVN go to http://tortoisesvn.tigris.org/
- For how to use tortoiseSVN go to Installing_and_Using_Tortoise_Subversion