Export to GitHub

evoluspencil - issue #215

[PATCH] Add native OS X support


Posted on Sep 24, 2010 by Quick Wombat

Attached are two files:

  • Build_MacOS.tar.gz: This contains a directory (MacOS) that should be extracted to the Build directory. It contains all the necessary pieces to generate a Pencil.app.
  • osx_support_and_desktop_fixes.diff: This contains the necessary changes to the build system to enable building for MacOS and a few patches that causes the MacOS build to not work[1]

If you extract Build_MacOS.tar.gz so that there is a MacOS directory within the Build directory and apply the osx_support_and_desktop_fixes.diff path to the root of the working copy, you should be able to run "ant macos" in the Build directory and end up with Build/Outputs/MacOs/Pencil.app that will run on any OS X system that XULRunner 1.9.2 runs on [2]. Please let me know what you think.

[1] I found the following issues with Pencil when running outside of Firefox: * Saving a document without changing the page title failed due to an extraneous Property being saved in the .ep * Opening a document outside of Pencil, like using the OS to open the file while that file is associated with Pencil, would not actually load the document

Both of the bugs above have been fixed and have been tested on OS X. I think these issues might actually solve general bugs in the application reported on other operating systems, like Windows, as well.

[2] I had to install XULRunner on OS X to get the xulrunner stub that runs the application. I'm not 100% sure if this is enough to run on other OS X systems or not. I think I might need to put the whole XULRunner.framework into the application for it to be runnable without manually installing the XUL.framework.

Attachments

Comment #1

Posted on Sep 24, 2010 by Quick Wombat

For posterity, I'll attach my OS X build. Like I said before, I'm not sure whether this will run standalone as-is or not. If you try this package on OS X and it doesn't run, please let me know and I'll try building a package with a complete XUL.framework in the .app.

All you need to do is extract the .tar.gz. (tar -zxf Pencil.app.tar.gz)

Comment #2

Posted on Sep 24, 2010 by Quick Wombat

So...it seems that you do have to install the XULRunner OS X bundle for this to work. There are two options:

1) Provide an installer that installes XULRunner and Pencil.app 2) Bundle XUL.framework with Pencil.app

I've tested that #2 works but #1 would require more work to actually create the OS X PackageMaker project and automate it.

Unfortunately, to test this you either need to install XULRunner, so that you have /Library/Frameworks/XUL.framework, or I need to upload a 19MB Pencil.app.tar.gz somewhere.

Comment #3

Posted on Sep 24, 2010 by Quick Wombat

Here is the standalone download link:

http://dl.dropbox.com/u/479971/Pencil.app.tar.gz

Of course, having to include the XUL.framework changes the build.xml and the content of the Build/MacOS contents. I will hold off attaching a new Build_MacOS.tar.gz and osx_support_and_desktop_fixes.diff until we know that we have a working package and we can agree on how to package this.

Comment #4

Posted on Sep 24, 2010 by Quick Wombat

I'm not sure if you guys can tell but I've deleted the attachments. The reason for this is I have created a discussion in the Pencil Users group to discuss my contributions and the packaging of such. After finding that XUL.framework needed to be packaged into Pencil.app to run, my previous attachments were obsolete. That and the fact that the discussion could seriously change the patch and files added, I have decided to just remove them. The link to the standalone/complete Pencil.app is still valid. Comments welcome.

Comment #5

Posted on Sep 24, 2010 by Quick Wombat

Here is the link to the discussion: http://groups.google.com/group/pencil-user/browse_thread/thread/46046f81a5bcefe4

Comment #6

Posted on Sep 25, 2010 by Swift Lion

i can't get your standalone app to run - it just tells me that there is already an instance running (which there isn't)

Comment #7

Posted on Sep 25, 2010 by Quick Wombat

I have a handful of people test the Pencil.app in comment #3 and it worked great for them. Based on the message, I'd assume that you have Firefox running and the Pencil extension installed/active when you got this but before I making any assumptions, I'll do more digging. Can you give me anymore information? (OS version, CPU type, was Firefox running, etc.)

Comment #8

Posted on Sep 25, 2010 by Quick Wombat

I've found a few instance on Google where people are reporting this with XULRunner applications but I can't seem to reproduce it. Here are the scenarios I tried:

1) Launched Firefox (without Pencil opened in Firefox) and opened Pencil.app 2) Launched Firefox, opened Pencil in Firefox and opened Pencil.app 3) Launched Pencil.app and tried to launch another Pencil.app 4) Launched Pencil.app and then tried to open a .ep file from the Terminal

I really will need more information before I can see what the problem is.

Comment #9

Posted on Oct 6, 2010 by Happy Bird

No issues with your particular build. No Firefox or XULRunner installed here on Snow Leopard.

Thanks for making it public :-)

Comment #10

Posted on Oct 8, 2010 by Quick Wombat

That's great news to hear Jak. Now if we could get some traction to make this official...

Comment #11

Posted on Oct 20, 2010 by Swift Elephant

I've tested app in Snow Leopard in French locale and first I had the message :

XML Parsing Error: undefined entity Location: chrome://pencil/content/UI/Window.xul Line Number 23, Column 1:

I've changed in Pencil.app/Contents/Resources/defaults/preferences/prefs.js the line :

pref("intl.locale.matchOS", true);

to

pref("intl.locale.matchOS", false);

and it's works now ! Thank for the OSX build !

Comment #12

Posted on Oct 20, 2010 by Quick Wombat

Okay...that's two successful reports. What about taking this effort and putting it into the Pencil sources so anyone can build this? I'd be glad to submit a patch.

Comment #13

Posted on Oct 26, 2010 by Swift Bird

This is fantastic! Thank you for porting this.

Comment #14

Posted on Oct 26, 2010 by Quick Wombat

Glad to hear it's working for you as well.

Comment #15

Posted on Oct 31, 2010 by Quick Kangaroo

Hi Everybody! Tried jcsoobyrs package; didn't work the first time. I then followed ra...@boiboite's hint and then worked fine. System: Snow Leopard German. Thanks for relasing this OSX build. Maybe it's time to post it on the official site...

Comment #16

Posted on Mar 6, 2011 by Massive Bear

It worked great! And it's even been a while since last update!

It'd be awesome if this was on the main page of the project. I almost turned away from this great tool, used it the other day on a windows station had to try it on my pc, which happens to be a mac.

Hope this gets more attention!

All the best, from Brasil!

Comment #17

Posted on Aug 4, 2011 by Grumpy Rhino

Just downloaded the .app file in comment 3 and it launched without issue. Will play with it.

Comment #18

Posted on Aug 6, 2011 by Quick Bear

+1 I have installed it without problems on mac osx 10.7 Lion :)

This should be on the main page, I found this thread by accident while trying to find at least Firefox 5 plugin to run on my mac (BTW I didn't find it)

Comment #19

Posted on Aug 7, 2011 by Swift Ox

Just installed it on osx 10.5.8. Same scenario as #18--looking for something that ran in firefox 5, but this is even better. Thanks!

Comment #20

Posted on Aug 11, 2011 by Quick Panda

Comment deleted

Comment #21

Posted on Aug 11, 2011 by Quick Panda

I have run it without problems on Mac OS X Lion. Does it have a stencil to iOS (iPhone or iPad)?

Comment #22

Posted on Sep 23, 2011 by Quick Camel

This is great would you mind sharing the source to make newer builds?

Thanks

Comment #23

Posted on Sep 23, 2011 by Quick Wombat

I gave up on this a long time ago when the owner of the project wouldn't address this request. That being said, the last sources I have for this are the ones attached to the issue. Based on the feedback I see it's been working since I created the request so I've not put anymore time into it. I wish this would become part of the project officially but it's never happened. Sorry.

Comment #24

Posted on Sep 29, 2011 by Quick Wombat

Looks like someone deleted my attachments. I've undeleted them and they include the actual source diff to apply and the binary/new files necessary to overlay into the Pencil sources. Like I mentioned earlier, I've never received any feedback from the Pencil developer(s) so I gave up on this a while back. I will be glad to help where I can and I'm happy to hear it's working.

P.S. - You figure this would be good enough feedback to get this officially applied to the project...

Status: New

Labels:
Type-Defect Priority-Medium