WebKit embedded in a standalone OS X app you could write in ten minutes
By glazou on Friday 26 September 2014, 17:24 - Computing - Permalink
- install Haxe: download it from here
- install nme and hxcpp: in a terminal, type
haxelib install hxcpp
haxelib install nme
- install my own build of waxe-works (that's only needed to build my own fork of waxe, the haxe lib for wxWidgets); in a terminal type:
cd <a_safe_place>
git clone https://github.com/therealglazou/waxe-works.git
cd waxe-works
git checkout addWebViewWebKit
cd build
neko build.n
haxelib dev waxe-works <a_safe_place>/waxe-works
- install my own build of waxe; in a terminal type
cd <a_safe_place>
git clone https://github.com/therealglazou/waxe
cd waxe
git checkout WebView
cd project
neko build.n ndll-mac-m32
haxelib dev waxe <a_safe_place>/waxe
haxelib remove waxe-works
- build my example (and don't forget to look at the trivial source):
cd <a_safe_place>/waxe/samples/04-Simple
haxelib run nme test Simple.nmml mac
The cool part is of course step 5. The rest is environment's setup only. Look at the source, recognize very common wxWidgets stuff there, and compare to other ways of embedding WebKit... Click on the thumbnail below to see a screenshot of the resulting OSX app.