Help needed creating a Mac OS X installer for Frescobaldi

448 views
Skip to first unread message

Wilbert Berendsen

unread,
Mar 22, 2012, 12:29:43 PM3/22/12
to fresc...@googlegroups.com, lilypo...@gnu.org
Hi all,

Unfortunately I don't have access to a Mac. But it would be very nice
if someone is able to create an installer for the Macintosh (by
creating/adapting a 'freeze.py'-like script) for Frescobaldi.

This means that an Application Bundle would be created, containing
PyQt4, Python, portmidi and python-poppler-qt4. The cx_Freeze python
module (also used by the freeze.py script that creates a Windows
installer) is able to handle that.

Here[1] is an example of a Python script that freezes an application
comparable to Frescobaldi (in that it also uses PyQt4), with support
for creating a Mac DMG file containing all the needed libraries.

[1] http://code.google.com/p/iep/source/browse/freezeScript.py

Is anyone here able to understand the application bundle part of this
and to create a freeze_macox.py script for Frescobaldi, based on the
exising freeze.py[2] and the other example?

[2] https://github.com/wbsoft/frescobaldi/blob/master/freeze.py

Otherwise I would need to setup a donation infracture just to get a Mac
for building the installer :-) (although it would also help furthering
development and testing of Frescobaldi in general on Mac OS X :-)

--
Wilbert Berendsen
(http://www.wilbertberendsen.nl)

Rodolfo Zitellini

unread,
Mar 22, 2012, 5:09:51 PM3/22/12
to Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org
I can give this a try. I tried using py2app on frescobaldi but it had
some issues and I didn't have time to sort them out.

Rodolfo

> _______________________________________________
> lilypond-user mailing list
> lilypo...@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Stan Sanderson

unread,
Mar 22, 2012, 5:18:54 PM3/22/12
to Rodolfo Zitellini, Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org

Stan

Stan Sanderson

unread,
Mar 22, 2012, 5:22:41 PM3/22/12
to Rodolfo Zitellini, Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org

On Mar 22, 2012, at 4:09 PM, Rodolfo Zitellini <xher...@gmail.com> wrote:

I would be happy to help when you get to the testing stage but haven't the skills to do more. My platforms are PPC (PowerBook) and x86 (iMac) running 10.5.8.

Stan

Siska Ádám

unread,
Mar 22, 2012, 7:13:51 PM3/22/12
to Stan Sanderson, Rodolfo Zitellini, fresc...@googlegroups.com, Wilbert Berendsen, lilypo...@gnu.org
Hi,

I'm also happy to help you in the testing phase, although I don't know Frescobaldi at all, so I might need quite specific instructions on what to test exactly. I'm on a MBP with 10.6.8.

Best,
Ádám

Rodolfo Zitellini

unread,
Mar 25, 2012, 9:37:27 AM3/25/12
to Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org
Hi All,
I did some quick and quite dirty esperimenting with cx_freeze, and I
should have something more or less working which I'd like to test on
other systems:

http://www.xhero.org/frescobaldi.zip

this was compiled on macos 10.7.3 intel with qt 4.8 from macports. The
archive should contain everything and on my machine works - more or
less, there are many issues, but I can load a lilypond doc and
navigate the pdf (with point and click too).
If someone wants to download the archive and give a try, I will be
grateful for every feedback (hoping it does not crash instantly on
other machines!).

The icon file is still missing (at least, it is there but on my
machine it does not work, next thing to do :)

For Wilbert:
if this thing works for others too I have a couple of files to add
(info.plist and qt.conf) and we should decide how to merge the mac
part in freeze.py :)

Ciao!
Rodolfo

Rodolfo Zitellini

unread,
Mar 25, 2012, 11:26:17 AM3/25/12
to Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org
I fixed the icon :)
BUT I am having some issues with various TypeErrors with
PyQtNullVariants, ex., in the open menu item:

Traceback (most recent call last):
File "/Users/xhero/devel/frescobaldi-2.0.4/frescobaldi_app/mainwindow.py",
line 372, in openDocument
files = QFileDialog.getOpenFileNames(self, caption, directory, filetypes)
TypeError: QFileDialog.getOpenFileNames(QWidget parent=None, QString
caption=QString(), QString directory=QString(), QString
filter=QString(), QString selectedFilter=None, QFileDialog.Options
options=0): argument 3 has unexpected type 'QPyNullVariant'

Is there a specific version of python to run? I'm currently using 2.7.2.
BTW drag&drop of a file in the main window opens it without issues.

Rodolfo

Stan Sanderson

unread,
Mar 25, 2012, 12:45:23 PM3/25/12
to Rodolfo Zitellini, Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org

On OS 10.5.8, x86 (iMac), it gives the "not supported on this
architecture" message.

Stan

Stefan Vollmar

unread,
Mar 25, 2012, 2:00:44 PM3/25/12
to Rodolfo Zitellini, Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org
Dear Rodolfo,
dear Wilbert,

it works out-of-the-box on my system which is running MacOS X 10.6.8 - very, very neat - thank you! (nice logo, too)

Warm regards,
Stefan

> _______________________________________________
> lilypond-user mailing list
> lilypo...@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213 FAX +49-221-4726-298
Tel.: +49-221-478-5713 Mobile: 0160-93874279
Email: vol...@nf.mpg.de http://www.nf.mpg.de


Rodolfo Zitellini

unread,
Mar 25, 2012, 2:04:41 PM3/25/12
to Stan Sanderson, Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org

I will try to recompile everything on a system with 10.5 and see if it
works on 10.6 and 10.7 too, but it will take me some time.

Rodolfo

Stefan Vollmar

unread,
Mar 25, 2012, 2:51:46 PM3/25/12
to Rodolfo Zitellini, Stan Sanderson, fresc...@googlegroups.com, Wilbert Berendsen, lilypo...@gnu.org
Dear Rodolfo,

On 25.03.2012, at 20:04, Rodolfo Zitellini wrote:

> [...]


> I will try to recompile everything on a system with 10.5 and see if it
> works on 10.6 and 10.7 too, but it will take me some time.

you are probably better of with two different versions of frescobaldi - 10.5 has been around for some time and you will loose some Qt features otherwise, I believe. -

When dropping a ly-file onto Frescobaldi, your Mac version works beautifully. It also works, if frescobaldi.app is not located in the /Applications directory.

However, when I change something in the source window and then do an "Engrave (preview)" I get this error:

Could not start lilypond.
Please check path and permissions.

Warm regards,
Stefan

ole

unread,
Mar 25, 2012, 5:54:04 PM3/25/12
to Rodolfo Zitellini, Stan Sanderson, fresc...@googlegroups.com, Wilbert Berendsen, lilypo...@gnu.org

Hi Rodolfo,

I just downloaded the link above- frescobaldi opens fine and load and display a file correct
(on a Macbook Pro running Mac OS 10.6.8.)

Can investigate it further the next days...(I am very new to frescobaldi...)

ole

Stan Sanderson

unread,
Mar 25, 2012, 9:55:00 PM3/25/12
to ole, Rodolfo Zitellini, fresc...@googlegroups.com, Wilbert Berendsen, lilypo...@gnu.org

Clicking on the frescobaldi executable in the application results in "-
bash: /Users/ssanders/Desktop/frescobaldi.app/Contents/MacOS/
frescobaldi: Bad CPU type in executable
logout"

My iMac (running OS X 10.5.8) is an Intel Core Duo. Is it possible
that there is a 32-/64- bit problem? I have read that 10.5 is capable
of running 64-bit applications but only if they are compiled for 10.5.

Stan

Wilbert Berendsen

unread,
Mar 26, 2012, 4:47:02 AM3/26/12
to fresc...@googlegroups.com, xher...@gmail.com, lilypo...@gnu.org
Op Sun, 25 Mar 2012 15:37:27 +0200
Rodolfo Zitellini <xher...@gmail.com> schreef:

> if this thing works for others too I have a couple of files to add
> (info.plist and qt.conf) and we should decide how to merge the mac
> part in freeze.py :)

Many, many thanks for your effort! I just follow it, and indeed it
might be nice to merge it in freeze.py.

Wilbert Berendsen

unread,
Mar 26, 2012, 4:49:08 AM3/26/12
to fresc...@googlegroups.com
Op Sun, 25 Mar 2012 17:26:17 +0200
Rodolfo Zitellini <xher...@gmail.com> schreef:

> Is there a specific version of python to run? I'm currently using


> 2.7.2. BTW drag&drop of a file in the main window opens it without
> issues.

2.7.2 should be very fine. Which PyQt4 and SIP version are used?

Siska Ádám

unread,
Mar 26, 2012, 8:47:12 AM3/26/12
to Rodolfo Zitellini, Wilbert Berendsen, fresc...@googlegroups.com, lilypo...@gnu.org
Hi,

A few comments (although I've never seen Frescobaldi before, so I'm not sure whether the problems come from the software itself or the port):
- The first letter of the executable is not capitalized (it says 'frescobaldi' instead of 'Frescobaldi'), which is not very common with Mac software (unless they start with 'i'). Not a bug, though.
- Hitting the 'Engrave' button I get the following in the log window:
Starting lilypond [test01.ly]...


Could not start lilypond.
Please check path and permissions.

- In Preferences/LilyPond Preferences one can't set the LilyPond include path, as the file open dialog won't let the user open the contents of the LilyPond application bundle and the input field can't be edited by typing into the list of LilyPond include paths.
- If one sets the appropriate path in the frescobaldi.plist file (for me, this would be /Applications/LilyPond/LilyPond.app/bin), after running frescobaldi, it would revert my modification to /Applications/LilyPond.
- The Preference File 'frescobaldi.plist' should be called 'org.frescobaldi.plist' to meet Apple's naming conventions.

The weird thing is that the bin library of LilyPond is included in my user path (so I can run LilyPond in Terminal directly without needing to specify the folder where it is located), so I don't really understand why Frescobaldi wouldn't find the executables...


Hope this helps,
Ádám

Rodolfo Zitellini

unread,
Mar 27, 2012, 3:21:45 AM3/27/12
to fresc...@googlegroups.com, lilypo...@gnu.org
On Mon, Mar 26, 2012 at 12:11 AM, vic hug <xelnag...@hotmail.com> wrote:
> hello,
>
> seems to work here (mbpro 15" early 2011 osx 10.6.8), but can't find
> Lilypond, asks to check for lily path and permissions and i don't see where
> i should indicate the path. Anyway, i'm starting with updating Lilypond,
> which i haven't done in quite a time. And does lilypond work on osx 10.7 ?
> because download page says no...
>
> thanks for porting frescobaldi to mac btw :)

>
> _______________________________________________
> lilypond-user mailing list
> lilypo...@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

Thanks to all for your reports!
* 10.5 support: For the moment I'm unsure on how to support this, as I
packaged python + qt compiled with macports using the default system
compiler, I have to study a bit on how to have compatibility.

@Philippe: can you please try running Frescobaldi directly on the
terminal: frescobaldi.app/Contents/MacOS/frescobaldi
It is possible that it has some conflicts since you already have the
libs for frescobaldi installed (it should not, but nevertheless...)

In the next few days I fill try to figure out the various quirks with
runnin lilypond (I admit I always use it directly from the cmdline :)

@Wilbert: I will try to pack a bit the mods/additions and send you something :)

Ciao!
Rodolfo

Philippe Massart

unread,
Mar 27, 2012, 4:38:54 AM3/27/12
to Rodolfo Zitellini, fresc...@googlegroups.com, lilypo...@gnu.org
Hello,

Here is the message I receive when running from the command line :

imac-de-philippe-massart:~ philippe$ /Users/philippe/Desktop/frescobaldi.app/Contents/MacOS/frescobaldi

Traceback (most recent call last):

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cx_Freeze/initscripts/Console.py", line 27, in <module>
exec code in m.__dict__
File "frescobaldi", line 3, in <module>

File "/Users/philippe/Desktop/frescobaldi.app/Contents/MacOS/frescobaldi_app/main.py", line 41, in <module>
import po.setup # Setup language
File "/Users/philippe/Desktop/frescobaldi.app/Contents/MacOS/frescobaldi_app/po/setup.py", line 74, in <module>
setup()
File "/Users/philippe/Desktop/frescobaldi.app/Contents/MacOS/frescobaldi_app/po/setup.py", line 59, in setup
language = current()
File "/Users/philippe/Desktop/frescobaldi.app/Contents/MacOS/frescobaldi_app/po/setup.py", line 46, in current
if not language or language.isNull():
AttributeError: 'unicode' object has no attribute 'isNull'

I tried to run it from the Applications folder, but it didn't change anything.

Philippe

Wilbert Berendsen

unread,
Mar 27, 2012, 10:09:34 AM3/27/12
to fresc...@googlegroups.com, phil...@philmassart.net, Rodolfo Zitellini, lilypo...@gnu.org
Op Tue, 27 Mar 2012 10:38:54 +0200
Philippe Massart <phil...@philmassart.net> schreef:

> File
> "/Users/philippe/Desktop/frescobaldi.app/Contents/MacOS/frescobaldi_app/po/setup.py",
> line 46, in current if not language or language.isNull():
> AttributeError: 'unicode' object has no attribute 'isNull'

Strange: I never wrote the 'or language.isNull()' part...
Which frescobaldi version is this?

Philippe Massart

unread,
Mar 27, 2012, 11:22:31 AM3/27/12
to Wilbert Berendsen, fresc...@googlegroups.com, lilypond-user
That's the message I got while running the bundle Rodolfo made for OS X.

Philippe

Rodolfo Zitellini

unread,
Mar 27, 2012, 1:03:26 PM3/27/12
to Wilbert Berendsen, fresc...@googlegroups.com, phil...@philmassart.net, lilypo...@gnu.org

I think it is my fault :)
I fiddled a bit with the code since I got repeated QPyNullVariant
typeerrors, so I added the 'isNull() for testing - but I forgot to
remove it oops!

Rodolfo

Nelson Altimari

unread,
Jun 13, 2012, 11:34:18 PM6/13/12
to fresc...@googlegroups.com, Wilbert Berendsen, phil...@philmassart.net, lilypo...@gnu.org
I downloaded Rodolfo's zip (from the previous posts) and moved frescobaldi.app inside Applications. It opens, but it seems it can't get to Lilypond.

I'm on Lion 10.7.3, and I'm getting Python errors, mostly PyVariant. My iMac was bought recently, so it's mostly empty - I mean practically no software has been installed.
  • Do I need to install any other libraries?
  • Exactly how do I configure Frescobaldi's Preferences (Lilypond location, includes, paths, etc)?
Installation instructions for MacOSX are missing on Frescobaldi's page, unfortunely.

If you provide me the info to get it working on my system, I can update the wiki with the information.

[]s
Nelson

Wilbert Berendsen

unread,
Jun 14, 2012, 8:59:13 AM6/14/12
to Nelson Altimari, fresc...@googlegroups.com
Op Wed, 13 Jun 2012 20:34:18 -0700 (PDT)
Nelson Altimari <nel...@altimari.com.br> schreef:

> I downloaded Rodolfo's zip (from the previous posts) and moved
> frescobaldi.app inside Applications. It opens, but it seems it can't
> get to Lilypond.
>
> I'm on Lion 10.7.3, and I'm getting Python errors, mostly PyVariant.
> My iMac was bought recently, so it's mostly empty - I mean
> practically no software has been installed.
>
> - Do I need to install any other libraries?
> - Exactly how do I configure Frescobaldi's Preferences (Lilypond
> location, includes, paths, etc)?
>
> Installation instructions for MacOSX are missing on Frescobaldi's
> page, unfortunely.
>
> If you provide me the info to get it working on my system, I can
> update the wiki with the information.

Frescobaldi on OS X needs more testing, unfortunately I have no machine
to test with.

You should provide the full path to the LilyPond binary, located
probably somewhere inside LilyPond.App

Nelson Altimari

unread,
Jun 14, 2012, 10:07:19 AM6/14/12
to fresc...@googlegroups.com, Nelson Altimari
On Thursday, June 14, 2012 9:59:13 AM UTC-3, Wilbert Berendsen wrote:

Frescobaldi on OS X needs more testing, unfortunately I have no machine
to test with.

Well, I'm a 'mac newbie', but I'm actually a Python developer with some experience. Never used PyQt but I wouldn't be afraid to learn.

Though this is the first Mac I use, I have a lot of experience with Windows and I'm no stranger to Linux.

Maybe I can help, if you point me the way. What kind of testing would you like to do?

Nelson Altimari

unread,
Jun 14, 2012, 11:04:42 AM6/14/12
to fresc...@googlegroups.com, Nelson Altimari
You should provide the full path to the LilyPond binary, located
probably somewhere inside LilyPond.App

Actually, Frescobaldi 'finds' Lilypond even though I pointed it to the .app.

As soon as I point the path to the .app and click 'ok', Fresco seems to 'call' Lilypond, which opens a console window, but Frescobaldi keeps waiting for something to happen (something about fonts, I don't remember). I have to close Lilypond console manually for Frescobaldi to stop waiting.

After that, I eventually get Python errors in Frescobaldi, such as 'PyVariant type doesn't have that method' or something like that.

Rodolfo Zitellini

unread,
Jun 16, 2012, 5:49:01 AM6/16/12
to Nelson Altimari, fresc...@googlegroups.com, Wilbert Berendsen, lilypo...@gnu.org
Hi Nelson,
this is an issue with QT 4.8 in macports, that seems not to behave
well with Frescobaldi. I prepared a version with the old 4.7, but with
this version the pdf preview is broken. Unfortunately I did not have
any further time to see this issues, I hope to find some this summer.
If you want I can send you the script to generate the app bundle (BTH
Wilbert, did I send it to you too?)
Ciao
Rodolfo

Nelson Altimari

unread,
Jun 16, 2012, 4:13:11 PM6/16/12
to fresc...@googlegroups.com, Nelson Altimari, Wilbert Berendsen, lilypo...@gnu.org
On Saturday, June 16, 2012 6:49:01 AM UTC-3, Rodolfo Zitellini wrote:
If you want I can send you the script to generate the app bundle

Yes, please!

Do you think downloading Qt for Mac (and installing manually) would solve the issues?

Or maybe building it from scratch using brew, instead of macports?

(BTW, it would be nice to provide Frescobaldi through brew - it's more friendly than Macports, from what I've seen).

Jean-Alexis Montignies

unread,
Oct 14, 2012, 4:43:49 PM10/14/12
to Rodolfo Zitellini, fresc...@googlegroups.com
Hi!

Back on this thread after several months ;).

I've always launched frescobaldi from the command line (dependencies and lilypond installed by macports) but now I need an app wrapper to set the HiDpi flag (unless it can be set from the terminal).

The edit text font is really tiring on the eyes and some symbols hardly readable at the default size (like ' ). I've tried with the bundle posted here and it does work on retina, but unfortunately, the preview is not hi-def.

On 16 juin 2012, at 11:49, Rodolfo Zitellini <xher...@gmail.com> wrote:
If you want I can send you the script to generate the app bundle

Conclusin: I'm also interested in the script so I can create a bundle for the last versions. 

Greetings,

Jean-Alexis


paulw...@gmail.com

unread,
Nov 5, 2012, 2:58:04 PM11/5/12
to fresc...@googlegroups.com, Rodolfo Zitellini, j...@montignies.info
I tried installing it from http://www.xhero.org/frescobaldi.zip   but I got the following when trying to render a file:

Starting lilypond [TwinNote-piano-melody-lyrics.ly]...

rb....@gmail.com

unread,
Dec 17, 2012, 6:44:20 PM12/17/12
to fresc...@googlegroups.com, Rodolfo Zitellini, j...@montignies.info, paulw...@gmail.com
I got the same error message. What worked for me was to change my lilypond version in Preferences > Lilypond Preferences from "lilypond" to "/Applications/LilyPond.app/Contents/Resources/bin/lilypond"

Otherwise install seems to work perfectly!

paulw...@gmail.com

unread,
Dec 18, 2012, 1:46:11 AM12/18/12
to fresc...@googlegroups.com, Rodolfo Zitellini, j...@montignies.info, paulw...@gmail.com, rb....@gmail.com
On Monday, December 17, 2012 6:44:20 PM UTC-5, rb....@gmail.com wrote:
I got the same error message. What worked for me was to change my lilypond version in Preferences > Lilypond Preferences from "lilypond" to "/Applications/LilyPond.app/Contents/Resources/bin/lilypond"

Thank you!  This fixed the error for me as well.  I had no idea you would enter a path there...  Now I am finally up and running with 2.0.4 and it is working really well.  I can already tell it will make using LilyPond so much better.

It would be great if we could get a mac binary for 2.0.8 now that it's out.  (I tried to build one from source tonight, but did not succeed, see other thread.)

Thanks again,
-Paul 
Reply all
Reply to author
Forward
0 new messages