Download Latest Version libmwaw-0.3.16.tar.bz2 (1.6 MB)
Email in envelope

Get an email when there's a new version of libmwaw

Home / testEmscriptenCompilation
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2016-08-28 2.5 kB
mwaw2odf.html 2016-08-28 3.2 kB
mwaw2odf.cxx 2016-08-28 2.5 kB
Totals: 3 Items   8.2 kB 0
   ===============================================================
   ==    Small example to create a javascript executable on OSX ==
   ===============================================================

In the following, I choose to install all bytecode/javascript in /usr/local/em/ and I do:

- I install Emscripten from http://emscripten.org, add emscripten binary directory to my PATH
  and create a zlib's javascript version:
    see https://kripken.github.io/emscripten-site/docs/compiling/Building-Projects.html#using-libraries.

- then I download and install librevenge from http://libwpd.sourceforge.net/download.html:

  emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ [YOUR OPTIONs] --prefix=/usr/local/em/
  emmake make clean all
  sudo emmake make install
  
- then I download and install libmwaw from https://sourceforge.net/projects/libmwaw/files/:

  emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ [YOUR OPTIONs] --prefix=/usr/local/em/
  emmake make clean all
  sudo emmake make install

- then I download and install libodfgen from http://libwpd.sourceforge.net/download.html:

  emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ [YOUR OPTIONs] --prefix=/usr/local/em/
  emmake make clean all
  sudo emmake make install

- then I download writerperfect also from http://libwpd.sourceforge.net/download.html,
  and I compile it:

  emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ [YOUR OPTIONs] --prefix=/usr/local/em/
  emmake make clean all

  then I download mwaw2odf.cxx from https://sourceforge.net/projects/libmwaw/files/testEmscriptenCompilation/
    and I finish the linking by hand:
WRITERDIR=~/sources/libwpd-rw.git/writerperfect/src; EMDIR=/usr/local/em/ ; em++ -O2 -DSHAREDPTR_STD -DDEFINE_GETXATTR -I $WRITERDIR/lib -I $WRITERDIR/conv/odf -I$EMDIR/include/librevenge-0.0 -s DEMANGLE_SUPPORT=1 -L$EMDIR/lib -llibmwaw-0.3 -llibodfgen-0.1 -llibrevenge-0.0 -llibrevenge-stream-0.0 -llibz mwaw2odf.cxx -L$WRITERDIR/conv/odf/.libs -llibodfhelper -llibodfmwaw -L$WRITERDIR/lib/.libs -llibwriterperfect_internal -s EXPORTED_FUNCTIONS='["_main","_callConversion"]' -o mwaw2odf.js

- to finish, I regroup:

  + mwaw2odf.html (from https://sourceforge.net/projects/libmwaw/files/testEmscriptenCompilation/ )
  + fileSaver.js from https://github.com/eligrey/FileSaver.js/blob/master/FileSaver.js
  + mwaw2odf.js ( just created )
  + mwaw2odf.js.mem (just created )

in the final repository.



Source: README.txt, updated 2016-08-28