Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable resource file embedding. #27 #50

Merged
merged 1 commit into from
Sep 7, 2013

Conversation

duplode
Copy link
Contributor

@duplode duplode commented Sep 7, 2013

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

Additional comments:

  • Inspired by http://code.google.com/p/ndmitchell/issues/detail?id=539
  • One side-effect of re-enabling the quasiquotes is that, when compiling under Wine, a bizarre linkage failure happens. Fortunately (as I need Wine to make Win32 builds for my project) there is a tolerable workaround for that(*).

() Abusing of your hospitality: what are the odds of you including my Wine hack in 0.4.? I assure you it is not pretty! 😄 (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.)

To work around the Haddock bug, a seemingly superfluous TemplateHaskell pragma
was added to 'Graphics.UI.Threepenny.Internal.Include'.
HeinrichApfelmus added a commit that referenced this pull request Sep 7, 2013
Enable resource file embedding. #27
@HeinrichApfelmus HeinrichApfelmus merged commit 9bc7993 into HeinrichApfelmus:develop Sep 7, 2013
@HeinrichApfelmus
Copy link
Owner

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. 😏

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants