ruuda / pris

A language for designing slides
https://docs.ruuda.nl/pris/
GNU General Public License v3.0
116 stars 5 forks source link

Windows support #5

Open ruuda opened 7 years ago

ruuda commented 7 years ago

Pris currently builds on Linux out of the box, and on OS X by installing a few dependencies with brew. On Windows however, the situation is more difficult. I did manage to produce a working binary under MSYS2, but I don’t have a clear deterministic guide for getting this to work.

Once it works, the steps should be automated in order to run CI on AppVeyor.

In an MSYS2 shell, I installed the following packages:

make
gcc
pkg-config
mingw-w64-x86_64-cairo
mingw-w64-x86_64-harfbuzz
mingw-w64-x86_64-fontconfig
mingw-w64-x86_64-freetype
mingw-w64-x86_64-librsvg

With a bit of trial and error, and by manually including the linker flags reported by pkg-config in my RUSTFLAGS (including the double ones), I was able to produce a working binary. The binary then depends transitively on 24 (if I counted correctly) dlls. I would be good to identify those in order to facilitate packaging. On Linux this is not so much of an issue because they are generally installed already, and they can be installed by the system package manager otherwise. It might also be worth investigating static linking of all nonstandard dependencies too.

ruuda commented 7 years ago

Some work is being done on the windows branch.

ruuda commented 7 years ago

Status update: Appveyor can successfully do a build and produce a binary that is usable even outside of MSYS. The binary works as long as no text is involved; the current roadblock is locating fonts. Fontconfig does work inside an MSYS shell, but it does not locate regular Windows fonts.