packages feed

OpenVG 0.2 → 0.2.1

raw patch · 2 files changed

+42/−74 lines, 2 filesdep ~GLUTdep ~OpenGL

Dependency ranges changed: GLUT, OpenGL

Files

InstallWindows.txt view
@@ -1,38 +1,43 @@-It is tedious to install ShivaVG on Windows with MinGW/Msys (I -don't think Cygwin will work at all). With GHC-6.10.1 (and 6.10.2,-and 6.10.3 ?) most people appear to be following these instructions -to install HOpenGL and HGLUT - they are the ones I followed:+These instructions assume you have Haskell and OpenGL working +(probably via the Haskell Plaform) and have MinGW/msys installed+and are comfortable with them. -http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/+------------------------------------------------------------------+Step 1. -To get Shiva-VG to work under MinGW/Msys you have to do the same -trick of compiling directly with gcc rather than using the makefiles-as per *Compile and Install freeglut*.+Download the ShivaVG C library from Sourceforge (version 0.2.1):+http://sourceforge.net/projects/shivavg/ -Here's what I did:+Unzip ShivaVG-0.2.1.zip somewhere below msys/1.0, I use my home+directory: -I dropped the archive into my home directory-C:\msys\1.0\home\stephen+C:/msys/1.0/home/stephen -> tar xvfz shivavg-0.2.0.tar.gz+Run msys and go to ShivaVG's src directory:  -> cd shivavg-0.2.0/src+> 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 `libshivavg32.a` into your MinGW lib directory, on my system++Put `libopenvg32.a` into your MinGW lib directory, on my system it is here:  C:\MinGW\lib -Also copy the `vg` folder from `shivavg-0.2.0\include` to the-MinGW include directory, on my system it is here:+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 @@ -41,68 +46,28 @@ C:\MinGW\include\GL C:\MinGW\include\vg -Now you should be able to build the Haskell binding to Shiva:+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.1.tar.gz+> tar xvfz OpenVG-0.2.1.tar.gz -> cd OpenVG-0.1+> cd OpenVG-0.2.1 > runhaskell Setup.lhs configure > runhaskell Setup.lhs build > runhaskell Setup.lhs install > runhaskell Setup.lhs haddock -To run the test you need to copy `openvg32.dll` from-the shivavg src directory into OpenVG-0.2/examples.-The cd to examples and run with:-> runhaskell -lopenvg32 TestVgu.hs--This should display a white window with some line drawn-shapes.--Better examples of OpenVG capabilities are in the ShivaVG -examples. Particularly test_tiger which uses the famous -tiger from SVG tutorials.---Running ShivaVG's C examples-------------------------------ShivaVG itself seems to have some problems with FreeGlut - -at least if the are both compiled through the direct gcc -(no makefile) hack as per the *netsuperbrain.com* blog tutorial. --Compiling should be straight-forward, the following command -compiles test_tiger.exe: --> gcc -o test_tiger test.c test_tiger_paths.c test_tiger.c -lm -lglut32 -lglu32 -lopengl32 -lopenvg32--To run the test_tiger.exe you will need to drop to put a copy of -the `openvg32.dll` that you compiled (in the src directory) into -the examples directory.--You will also need a copy of `glut32.dll` in the examples -directory -  and here seems to be the snag. --I don't think the `glut32.dll` produced by FreeGlut works -- at least not if its compiled as per the *netsuperbrain.com* -guide. The `glut32.dll` compiled from FreeGlut is identifiable -as its 308KB in size (on my computer at least). If you try to -run test_tiger.exe with this it may fail with an -`Entry Point Not Found` dialog for the function -`_glutCreateMenuWithExit` (it certainly fails for me). --To get around this, I have to use the `glut32.dll` from my -Cygwin installation, this is 232KB in size and was in the folder:--C:\cygwin\bin--I copied this into the `examples` folder along with `openvg32.dll`-then double-clicking on test_tiger.exe should work.+Finally try the example: +Copy `openvg32.dll` into the examples directory. +> cd examples +> runhaskell -lopenvg32 TestVgu.hs  
OpenVG.cabal view
@@ -1,5 +1,5 @@ name:             OpenVG-version:          0.2+version:          0.2.1 license:          BSD3 license-file:     LICENSE copyright:        Stephen Tetley <stephen.tetley@gmail.com>@@ -9,12 +9,17 @@ synopsis:         OpenVG (shivag-0.2.1) binding description:   A Haskell binding for the OpenVG vector graphics API version 1.0.1-  specifically the shivavg-0.2.1 implementation.-  *** Windows users - use version 1.0 and ShivaVG-0.2.0. ***-+  specifically the ShivaVG-0.2.1 implementation.+  .+  This version (0.2.1) is compatible with the Haskell Platform +  (2009.2.0.2) and works on Windows with MinGW/msys.+  .+  Changelog+  0.2 to 0.2.1 .cabal file upper bounds for OpenGL and GLUT, and+   Windows installation instructions updated.  build-type:         Simple-stability:          alpha+stability:          experimental cabal-version:      >= 1.2  extra-source-files:@@ -26,7 +31,7 @@  library   hs-source-dirs:     src-  build-depends:      base < 5, OpenGL >= 2.2, GLUT >= 2.1.1.2+  build-depends:      base < 5, OpenGL >= 2.2 && < 2.3, GLUT >= 2.1.1.2 && < 2.2       exposed-modules:@@ -60,8 +65,6 @@     ForeignFunctionInterface, TypeSynonymInstances, CPP    ghc-options:  -Wall -  -  includes: vg/openvg.h, vg/vgu.h