HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
439 stars 77 forks source link

Enable resource file embedding. #27 #50

Closed duplode closed 11 years ago

duplode commented 11 years ago

To work around the Haddock bug, a seemingly superfluous TemplateHaskell pragma was added to 'Graphics.UI.Threepenny.Internal.Include'.

Additional comments:


() Abusing of your hospitality: what are the odds of you including my Wine hack in 0.4.? I assure you it is not pretty! :smile: (It involves building the Internal.Resources module as a separate library and then using a -fwine cabal flag and a corresponding -DWINE CPP one to have it loaded.)

HeinrichApfelmus commented 11 years ago

Thanks!

Concerning wine: good question. Threepenny is supposed to be cross-platform, so I would say that we should include it. But I would prefer a principled approach rather than an ugly hack -- or at least an approach where the library user doesn't see that it was a hack. :smirk:

From that point of view, it may be a better idea to spin off the Include stuff into a separate package and integrate a little with cabal, similar to the cabal-macosx package. After all, this is an issue with deployment and sooner or later, we want to wrap the web browser thing in a native shell anyway. (We don't have to do this with Template Haskell, there might be other means.) For instance, a shell would be perfect for opening and saving files: a native application runs a WebKit browser and supplies a JavaScript addon to the driver.js which allows us to alter the menu bar of the shell window and display file picker dialogs.

I'm thinking of a package named threepenny-wrapper that hooks into cabal and which depends on threepenny-wrapper-wine and so on depending on the platform.

PS: Let's open a new issue for this discussion. #52