reanimate/reanimate.cabal
Mike Pilgrem ceb727e8da
Enable use of POV-Ray for Windows (#225)
This pull request reflects code changes made to be able to use POV-Ray for Windows, Version 3.7.0.msvc10.win64.

The changes have been tested on Windows 10 but not on unix-like operating systems. However, I don't think the code for unix-like operating systems has been affected.

The reason for the changes is explained below.

1. The POV-Ray for Windows executable is named `pvengine64.exe` on 64-bit Windows, not `povray

I've created two modules `POVRay`, specified separately for `windows` and `unix`, that export `povrayApp :: String`, yielding the correct name of the executable. The function is used in place of `"povray"` (eg in `Reanimate.Driver.Check.hasPovray`).

2. Generated file names containing `$` cause problems under PowerShell, due to automatic variables, and file names on Windows are not case sensitive

I've changed the 64-character `alphabet` in `Reanimate.Cache.encodeInt` for a 32-character one which includes only capital letters and digits. This affects both Windows and unix-like operating systems. (An alternative would be versions of `encodeInt` specified differently for `windows` and `unix`.)

3. POV-Ray for Windows requires the special command line option `/EXIT` to return

I've moved `Reanimate.Povray.mkPovrayImage'` to the two modules `POVRay`. In the `windows` version, `/EXIT` is now added to the list of switches passed to the POV-Ray executable.

4. POV-Ray for Windows cannot parse switches enclosed in `""` as switches

The cause of the problem is described in more detail in the comments in the source code of module `POVRay`.

As a work around, in the `windows` version of `mkPovrayImage'`, the POV-Ray command is written to a temporary batch file and it is that batch file which is passed to `runCmd`.

Other matters

In addition to the above, POV-Ray 3.7 includes 'Script I\O Restrictions` which can prevent the writing of files. These need to be disabled in the POV-Ray for Windows GUI (under the Options menu).
2021-10-16 16:20:34 +08:00

192 lines
6.4 KiB
Text

cabal-version: 2.0
-- Initial reani.cabal generated by cabal init. For further documentation,
-- see http://haskell.org/cabal/users-guide/
name: reanimate
version: 1.1.4.0
-- synopsis:
-- description:
license: PublicDomain
author: David Himmelstrup
maintainer: lemmih@gmail.com
category: Graphics
synopsis: Animation library based on SVGs.
homepage: https://reanimate.github.io
bug-reports: https://github.com/reanimate/reanimate/issues
build-type: Simple
extra-source-files: ChangeLog.md, examples/*.hs, examples/golden/*.golden
extra-doc-files: docs/gifs/*.gif
description:
Animation library based on SVGs. Can import (and manipulate) SVGs from
LaTeX and diagrams. Exports gifs, mp4s, and more. Ships with a webbased
viewer and auto-reloader.
data-files: viewer-elm/dist/index.html
viewer-elm/dist/elm.js
viewer-elm/dist/style.css
data/CIExyz.csv
data/CIE_XYZ.csv
data/cone_sensitivity_lms.csv
data/*.svg
data/*.jpg
Source-Repository head
Type: git
Location: git://github.com/lemmih/reanimate.git
flag no-hgeometry
description:
Disable all features that depend on hgeometry. Should only
be used when developing new hgeometry algorithms.
default: False
manual: True
library
hs-source-dirs: src
if os(windows)
hs-source-dirs: windows
else
hs-source-dirs: unix
build-depends: unix
default-language: Haskell2010
default-extensions: PackageImports, PatternSynonyms
exposed-modules: Reanimate
Reanimate.Animation
Reanimate.Ease
Reanimate.Render
Reanimate.LaTeX
Reanimate.Svg
Reanimate.Svg.Unuse
Reanimate.Svg.Constructors
Reanimate.Svg.BoundingBox
Reanimate.Svg.LineCommand
Reanimate.Transform
Reanimate.Math.Triangulate
Reanimate.Math.Common
Reanimate.Math.Polygon
Reanimate.Math.SSSP
Reanimate.Math.Balloon
Reanimate.Morph.Common
Reanimate.Morph.Linear
Reanimate.Morph.Rotational
Reanimate.Raster
Reanimate.ColorComponents
Reanimate.ColorMap
Reanimate.ColorSpace
Reanimate.Memo
Reanimate.Scene
Reanimate.Povray
Reanimate.Blender
Reanimate.Transition
Reanimate.Effect
Reanimate.Builtin.TernaryPlot
Reanimate.Builtin.CirclePlot
Reanimate.Builtin.Flip
Reanimate.Builtin.Slide
Reanimate.Constants
Reanimate.Parameters
Reanimate.PolyShape
Reanimate.GeoProjection
Reanimate.Builtin.Documentation
Reanimate.Builtin.Images
Reanimate.Debug
Reanimate.Voice
Reanimate.External
Geom2D.CubicBezier.Linear
other-modules: Reanimate.Cache
Reanimate.Morph.Cache
Reanimate.Driver
Reanimate.Driver.Check
Reanimate.Driver.CLI
Reanimate.Driver.Magick
Reanimate.Driver.Server
Reanimate.Driver.Daemon
Reanimate.Misc
Paths_reanimate
Reanimate.Scene.Core
Reanimate.Scene.Var
Reanimate.Scene.Sprite
Reanimate.Scene.Object
Detach
POVRay
autogen-modules: Paths_reanimate
if flag(no-hgeometry)
cpp-options: -DNO_HGEOMETRY
else
build-depends:
hgeometry >=0.11.0.0,
hgeometry-combinatorial >=0.11.0.0
build-depends:
base >=4.10 && <5,
JuicyPixels >=3.3.3,
aeson >=1.3.0.0 && <2,
ansi-terminal >=0.8.0.4,
array >=0.5.2.0,
attoparsec >=0.13.2.0,
base64-bytestring >=1.0.0.1,
bytestring >=0.10.8.0,
cassava >=0.5.1.0,
cereal >=0.5.5.0,
colour >=2.3.4,
containers >=0.5.11.0,
cubicbezier >=0.6.0.5,
directory >=1.3.1.0,
filelock >=0.1.1.2,
filepath >=1.4.2,
fingertree >=0.1.0.0,
fsnotify >=0.3.0.1,
geojson >=3.0.4,
hashable >=1.3.0.0,
lens >=4.16.1,
linear >=1.20.8,
matrix >=0.3.6.1,
mtl >=2.2.2,
neat-interpolation >=0.3,
open-browser >=0.2.1.0,
optparse-applicative >=0.14.2.0,
parallel >=3.2.1.0,
process >=1.6.3.0,
random >=1.1,
random-shuffle >=0.0.4,
reanimate-svg >=0.13.0.1,
split >=0.2.3.3,
temporary >=1.3,
text >=1.2.3.0,
time >=1.8.0.0,
unordered-containers >=0.2.0.0,
vector >=0.12.0.0,
vector-space >=0.13,
websockets >=0.12.7.0,
xml >=1.3.14,
cryptohash-sha256,
base64-bytestring,
network >=3.1.0.0
ghc-options: -Wall -fno-ignore-asserts
test-suite spec
type: exitcode-stdio-1.0
main-is: Spec.hs
default-language: Haskell2010
other-modules:
UnitTests
TimeVarTests
Properties
Helpers
hs-source-dirs: test
ghc-options: -w
build-depends:
base,
directory,
filepath,
bytestring, process,
reanimate,
vector, linear,
QuickCheck >= 2.1.0, text,
temporary,
tasty, tasty-golden, tasty-hunit,
tasty-quickcheck, tasty-rerun >= 1.1.17,
tasty-expected-failure