27 June 2013

Node.js with posix path support

It was Mat Sutcliffe who sent me a patch to compile node.js with mingw last weekend, if I recalled node.js used to be compilable with mingw via scons but apparently they switch to gyp entirely and mingw support became broken since then. I though it was a bit weird to sent it to me, but it turn out the process would involve msys python (needed by gyp to work properly).

The patch itself is a win-win solution as it will build native win32 binary but with support for posix path (MSYS and CYGWIN) via generic mount mechanism. He further explain why he choose mount over cygpath, that is because node.js operate asynchronously so by using mount path would settled once rather repeatedly as with cygpath.

This is binary of node.js 0.10.12 (built as ./configure --gdb --without-etw --without-perfctr)
nodejs-0.10.12.7z
original patch for mingw by Mat -> replace msysmnt with mount
modified patch for mingw-w64
python msys

The functionality is implemented in path.js which is bundled inside the executable. So actually you could modify (if you wish) that part (look for mingwToWindowsPath resolvedPath) with your favorite hex editor if you don't want to recompile. Just make sure you don't add and reduce the string block length. Or if you think mingw is such mundane task feel free to apply patch only to path.js and then compile it with M$VS as usual :-)

How to build with mingw:
1. extract the source file for node.js homepage
2. download python for msys and extract to msys installation
3. download one of appropriate patches (above) put in source tree
3. start mingw, navigate to source tree and apply patch
4. ./configure [your options] (make sure that python for msys is the active one)
5. python tools/gyp_node -f make
6. LINK=g++ make -C out BUILDTYPE=Release V=1

Notes:
- I'm not sure about etw and perfctr whether those compilable with mingw but both don't compile out of box. 
- The download is contain official installation hierarchy with node.exe replaced. Since it's not installer (it make no sense anyway) I'll assume you know what to do next ;-)

Enjoy!

16 June 2013

Pinpoint, another approach for presentation

Previously I've tried fluxus for live presentation using a basically game engine + scheme scripting. Due to unresolved issue and the need to learn new language, I'm giving up and looking for much simpler alternative despite I still consider fluxus as a novel apps with no equal alternative.

Pinpoint is small, light and opengl accelerated presentation tool with a kind of magicpoint approach (you write down tagged text representation). It's similar to OSG's Present3D which is between pinpoint and fluxus in term of features, but Present3D require you to write a not-that-readable XML file instead which is nasty without the help of WYSIWYG editor. Pinpoint is simple, it has no advanced timeline/layer like in office software and geared for quick and dirty presentation. Pinpoint also feature extendable transition FX system (powered by clutter) by writing your own FX via loadable json file.

Here you go:

Static build win32, patched to make it more standalone :-)
download: pinpoint and sample+patch

notes:
- to test just drag and drop introduction.pp to pinpoint.exe
- no video support (I'm still figuring out how to build gst-ffmpeg statically) seems played but not rendered by cluttersink
- image support: png, jpg, gif
- basic FX are bundled in the executable, if you make new fx put the json file alongside the executable
- export: pdf only
- pinpoint.exe has console window, pinpointw.exe doesn't
- if you want to compile it yourself, please use gnome libraries released circa 2011 and avoid cairo 1.12.x

see their homepage to learn how to write a presentation file https://live.gnome.org/Pinpoint
Enjoy!