packages feed

OpenVG-0.2.1: InstallWindows.txt

These instructions assume you have Haskell and OpenGL working 
(probably via the Haskell Plaform) and have MinGW/msys installed
and are comfortable with them.

------------------------------------------------------------------
Step 1.

Download the ShivaVG C library from Sourceforge (version 0.2.1):
http://sourceforge.net/projects/shivavg/

Unzip ShivaVG-0.2.1.zip somewhere below msys/1.0, I use my home
directory:

C:/msys/1.0/home/stephen

Run msys and go to ShivaVG's src directory: 

> cd ShivaVG-0.2.1/src

Compile with gcc directly - this is a hack but the makefile has
problems with MinGW/msys:

> gcc -O2 -c *.c -I../include/VG


That should build the *.o files.

> gcc -shared -o openvg32.dll *.o -Wl,--enable-stdcall-fixup,--out-implib,libopenvg32.a -lopengl32 -lglu32 -lgdi32 -lwinmm

That should create `openvg32.dll` and `libopenvg32.a`.


Put `libopenvg32.a` into your MinGW lib directory, on my system
it is here:

C:\MinGW\lib

Also copy the `vg` folder that contains the header files from 
`shivavg-0.2.0\include` to the MinGW include directory, on my 
system it is here:

C:\MinGW\include

You should have folders for both the GL and OpenVG headers:

C:\MinGW\include\GL
C:\MinGW\include\vg

You should now be able to build the Haskell binding to Shiva.

------------------------------------------------------------------


I dropped the archive into my home directory
C:\msys\1.0\home\stephen

> tar xvfz OpenVG-0.2.1.tar.gz

> cd OpenVG-0.2.1
> runhaskell Setup.lhs configure
> runhaskell Setup.lhs build
> runhaskell Setup.lhs install
> runhaskell Setup.lhs haddock

Finally try the example:

Copy `openvg32.dll` into the examples directory.

> cd examples

> runhaskell -lopenvg32 TestVgu.hs