<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<pre>Hi
Just to follow up on this
When setting up a Qt path, the bin/*.app directory on Mac OS X
no longer exists (maybe from Qt 4.6), the .apps are in the main Qt folder.
So when setting up the Qt path (/Developer/Applications/Qt) in Eric4, I had to
create a /bin dir and symlinks for eric to launch designer etc.
Just thought I'd bring this to your attention, since not that many of the people
here seems to be using eric on mac :)
- Ole Johan
On Dienstag, 30. Dezember 2008, Colin McPhail wrote:
><i> Hi Detlev,
</i>><i>
</i>><i> Yes, the Mac OS X platform name is "darwin".
</i>><i>
</i>><i> I tried this patch, but got the error message about not being able to
</i>><i> start developer.app.
</i>><i> I then made it do the same as the version 3 code (which builds the
</i>><i> complete path name) but I got the same error message box (except it
</i>><i> said "make sure Qt-Designer is available as /usr/local/bin/.../
</i>><i> designer.app").
</i>><i> Next I tried making 'open' the command, with '/usr/local/bin/.../
</i>><i> designer.app' as the first argument and any supplied .ui file as the
</i>><i> next argument. This works OK if I invoke it from Extras->Tools->
</i>><i>
</i>><i> Designer 4 but if I double-click a .ui file or right-click it and
</i>><i>
</i>><i> choose 'open in designer' then I get *two* copies of Designer
</i>><i> started! One has the .ui file opened and the other is a 'clean start'.
</i>
According to the open man page that is because open takes the given list as
programs and files to open. In case of a file, it opens the file with the
standard application registered for it. However, that might not always be
designer for a .ui file.
><i>
</i>><i> I'm a bit confused by this. I will play with QProcess a bit more and
</i>><i> see what I can find.
</i>
Thanks for you support. It is highly appreciated.
Detlev
><i>
</i>><i> Regards,
</i>><i> -- Colin
</i>><i>
</i>><i> On 30 Dec 2008, at 11:18, Detlev Offenbach wrote:
</i>><i> > Hi Colin,
</i>><i> >
</i>><i> > please try the following. In UserInterface.py in method __designer
</i>><i> > (around
</i>><i> > line 3700) find these statements.
</i>><i> >
</i>><i> > if sys.platform == "win32":
</i>><i> > designer = designer + '.exe'
</i>><i> >
</i>><i> > Please add this code after the lines.
</i>><i> >
</i>><i> > elif sys.platform == "???":        # Enter Mac OS X platform name
</i>><i> > darwin?
</i>><i> > designer = designer + '.app'
</i>><i> >
</i>><i> > Please report your results.
</i>><i> >
</i>><i> > Regards,
</i>><i> > Detlev
</i>><i> >
</i>><i> > On Montag, 29. Dezember 2008, Colin McPhail wrote:
</i>><i> >> On 29 Dec 2008, at 10:37, Detlev Offenbach wrote:
</i>><i> >>>> ...
</i>><i> >>>> The QT designer application is installed as /Developer/
</i>><i> >>>> Applications/
</i>><i> >>>> Qt/
</i>><i> >>>> Designer.app on Mac OS X. Designer.app is a Mac OS X 'package' (a
</i>><i> >>>> folder, really). Inside the package is an executable called
</i>><i> >>>> Designer. I have created a hard link to it in ~/bin called
</i>><i> >>>> designer
</i>><i> >>>> (lower-case 'd') and now eric4 can find it OK. It would be nice to
</i>><i> >>>> be
</i>><i> >>>> able to configure eric4 to find the installed executable, though.
</i>><i> >>>
</i>><i> >>> eric4 uses several executables of the Qt4 package. These are:
</i>><i> >>>
</i>><i> >>> - designer
</i>><i> >>> - linguist
</i>><i> >>> - assistant
</i>><i> >>> - lrelease
</i>><i> >>>
</i>><i> >>> eric4 expects these executables in the search path, which is set via
</i>><i> >>> the
</i>><i> >>> environment variable PATH (at least on *nix and Win* systems). How
</i>><i> >>> is this
</i>><i> >>> accomplished on Mac OS X? Is it standard, that the executables
</i>><i> >>> have an
</i>><i> >>> uppercase first letter?
</i>><i> >>>
</i>><i> >>> Unfortunately I don't own a Mac, so I need support in this area.
</i>><i> >>
</i>><i> >> I'm not too knowledgeable about Mac OS X conventions but I've poked
</i>><i> >> about and here's what I've discovered:
</i>><i> >>
</i>><i> >> (a) Somewhat to my surprise I find that the default MAC OS X file-
</i>><i> >> system is case-insensitive, so there is no problem about that.
</i>><i> >>
</i>><i> >> (b) The Mac OS X install of Qt creates an installation directory
</i>><i> >> (e.g. /usr/local/Trolltech/Qt-4.4.3 ) with a bin subdirectory in
</i>><i> >> which reside all the executable files. Assuming your users put this
</i>><i> >> subdirectory on their PATH then eric4 will find the plain executables
</i>><i> >> such as lrelease, lupdate, qmake, uic, etc.
</i>><i> >>
</i>><i> >> (c) Assistant, Designer and Linguist also live in this subdirectory
</i>><i> >> but as packages (full name Designer.app, etc).
</i>><i> >>
</i>><i> >> (d) There is a standard command 'open' (man page text attached) that
</i>><i> >> can be used to execute packages. It requires the package's full path
</i>><i> >> however, it won't find the package just because it is held in a
</i>><i> >> directory on the PATH. Perhaps eric4 could find lrelease on the
</i>><i> >> PATH,
</i>><i> >> extract the directory path and use it to construct 'open' commands
</i>><i> >> for
</i>><i> >> Designer.app, Assistant.app and Linguist.app?
</i>><i> >>
</i>><i> >> What I've done for now is to export a shell variable QTDIR in
</i>><i> >> my .bashrc and to have a set of single-line shell scripts in ~/bin
</i>><i> >> called designer, linguist and assistant that just open $QTDIR/bin/
</i>><i> >> Designer.app, etc.
</i>><i> >>
</i>><i> >> Hope this helps. Let me know if you need more information.
</i>><i> >>
</i>><i> >> Regards,
</i>><i> >> -- Colin
</i>><i> >
</i>><i> > --
</i>><i> > Detlev Offenbach
</i>> > <a
href="http://www.riverbankcomputing.com/mailman/listinfo/eric">detlev at die-offenbachs.de</a></pre>
<!--beginarticle-->
<pre><i>
</i></pre>
</body>
</html>