Windows: Difference between revisions

From NEOSYS Dev Wiki
Jump to navigationJump to search
 
(39 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Visual C++ compiler ==
If you want to program in Exodus then you need to install an MS C++ compiler.
If you have VS C++ 2003/2005/2008 already installed then you have nothing to do, otherwise do a standard install of free VS Express C++ (2008 currently) preferably in the default location on C: or parallel default location but on the same drive as Exodus. No need for any SQL or options.
== Postgres ==
If you want to use Exodus to operate a Pick-style database then you have to have or install a postgres database.
If you need calculated dictionary entries or are not prepared to do the simple installation of the postgres exodus plugin yourself then the postgres server needs to run on the same host as exodus, otherwise you can use any remote postgres server version 8+ on any os.
If you need to install Postgres then do a standard install of the current version (8.3) preferably in the default location on C: or parallel default location but on the same drive as Exodus.
Exodus needs to be granted a postgres username, password and database to work in - and preferably rights to create databases and users. By default, Exodus uses the following to connect or you can put a file called .exodus containing some similar line in your home directory (%USERPROFILE% on windows).
host=127.0.0.1 port=5432 dbname=exodus user=exodus password=somesillysecret connect_timeout=10
Use the installed PGAdminIII or your preferred postgres client to create the chosen user and database. If you prefer SQL, use the following:
CREATE ROLE exodus LOGIN PASSWORD 'somesillysecret' CREATEDB CREATEROLE;
CREATE DATABASE exodus WITH ENCODING='UTF8' OWNER=exodus;
Sorry but just at the moment you have to install the pgexodus.dll plugin for postgres manually.
copy pg exodus.dll from the exodus bin directory to the postgres lib directory \Program Files\8.3\lib and then using PGAdminIII as postgres superuser run the following SQL
 
http://devwiki.neosys.com/index.php/Installing_%26_Building_all_Components_for_Exodus_on_Windows#Declaring_the_dll_in_Postgres
== Downloading and Installing Exodus ==
== Downloading and Installing Exodus ==


http://www.neosys.com/software/exodus.msi
[[Step by step instructions]]
 
Start, Run, All Programs, Exodus, Exodus Command Prompt
 
Try the following commands.
 
{|
!Command !!Comment
|-
|edit test ||Creates a skeleton test.cpp file using nano editor with exodus. edit will compile on exit if saved, so make some change before you exit.
|-
|test ||Run it
|-
|compile test ||compile without editing
|-
|edit testsort ||Browse a sample exodus program showing all fundamental database operations including dictionaries and list.
|-
|testsort ||Run it and inspect the output
|-
|listfiles ||quick tool avoiding need to use any database client
|-
|list test_clients ||text output - no page/column headers just yet sorry
|-
|list test_clients (H) ||html output (port of a LIST replacement in heave use since 2000)
|-
|list dict_test_clients ||nb the underscore after "dict" is required - dict(space)voc wont work
|-
|list dict_voc ||if you understand this then you understand your pick
|-
|edit test_clients SB001 ||you can edit data or dictionaries directly
|-
|delete test_clients SB001 ||useful command line tool
|-
|createfile tempfile ||ditto
|-
|deletefile tempfile ||ditto
|-
|createindex test_clients CLIENT_TYPE ||speeds up select commands on the indexed fields in the traditional way
|-
|deleteindex test_clients CLIENT_TYPE ||filenames are case insensitive, keys and fieldnames are not
|}
 
If you have Visual Studio installed try the test project (VS2005+).
 
Start, Run, All Programs, Exodus, Blank Visual Studio Solution.
 
== Documentation how to program in Exodus ==
 
Sorry nothing yet but you might be able to work out what functions are available from the following:
 
include\exodusfuncs.h lists the functions that simulates pickish syntax as close as can be achieved. The functionality however should be identical.
 
include\exodusmacros.h lists a few keywords to simplify programming for application programmers not interested in the raw power of c++.
 
include\mv.h lists the massive var class definition that defines how to write pick in oo object.method() style syntax.
 
[[Unorganised notes about programming in Exodus]]


== Source code and Exodus development environment ==
== Using Exodus ==


http://svn.neosys.com/svn/trunk has full source code and tools build exodus from scratch. Also a script make.sh for a basic build and install on linux (redhat but probably works with minor tweaks anywhere).
Start, All Programs, Exodus, Exodus Console


This devwiki site was initially written more in mind with BUILDING exodus. It will now be updated to reflect USING exodus.
{{exodus console first steps}}

Latest revision as of 04:15, 15 May 2011

Downloading and Installing Exodus

Step by step instructions

Using Exodus

Start, All Programs, Exodus, Exodus Console

Try the following commands.

Command Comment
EDITING AND COMPILING
edic hello edic=edit+compile+catalog. Creates a skeleton hello.cpp file using nano editor. edic will only compile on exit if saved, so make some change before you exit.
hello Run it
compile hello compile without editing
edic testsort Browse a sample exodus program showing all fundamental database operations including dictionaries and list.
compile testsort compile the preinstalled test program
testsort Run it to generate some data and inspect the output
DATABASE OPERATIONS
listfiles quick tool avoiding need to use any database client
list myclients text output - no page/column headers just yet sorry
list myclients {H} html output (port of a fully blown LIST replacement in heavy production use since 2000)
list dict_myclients NB the underscore after "dict" is *required*. "dict(SPACE)myclients" wont work
list dict_voc if you understand this then you understand your pick
edir myclients SB001 you can edit data or dictionaries directly. edir="edit record"
delete myclients SB001 useful command line tool
createfile tempfile ditto
deletefile tempfile ditto
createindex myclients CLIENT_TYPE speeds up select commands on the indexed fields in the traditional way
deleteindex myclients CLIENT_TYPE filenames are case insensitive, keys and fieldnames are CASE SENSITIVE

If you get the following error then you have not completed the installation of the Exodus plugin for Postgres.

PGRES_FATAL_ERROR: ERROR: function exodus_extract_text(bytea, integer, integer, integer) does not exist