PDA

View Full Version : Mac OS X UI not working



hvengel
30th March 2006, 20:24
I had a user post the following on the help forum for my application today:


I am working on building LProf on my Powerbook (OS X 10.4, PPC).
After finally having all prerequisites together, tweaking the darwin/SConscript file, patching some .ui-files (QT 3.3.6 shows the same include-error as 3.3.5) I have the following problem. The build process finishes (with some (minor) warnings) and the targets are built.
When I execute lprof I get a nice program window but I cannot do anything with it. The only thing which works are the OS maximize, minimize and close buttons. I cannot even get focus on the window by clicking on it, nor is it shown in the dock.
Maybe an QT-issue? Any ideas?

The app is working on Linux (perfectly) and Windows (minor porting issues that should be fixed in the next day or two) and I would like it to build and run correctly on a Mac. Does anyone here have any ideas about what might need to be done to get this to work on a Mac? I know not much info to go on but I am hoping that there is something specific to the Mac that needs to be done that may have been over looked since we do not have a Mac person on the development team.

axeljaeger
30th March 2006, 21:05
I remember that you have to add some "resource fork" to your application. I had the same problem when I used FLTK on a mac. From http://wiki.cocan.org/getting_started_with_ocaml_on_mac_os_x



Now, to make the program work properly, one must perform one of two additional steps: adding a resource fork to the executable, or building a Mac OS X .app structure.

To add a resource fork, one needs to use the program Rez, included in the OS X Developer tools. This can be done with the following command:

/Developer/Tools/Rez -t APPL -o hello ~/dev/mac.r \
-i /Library/Frameworks/Tcl.framework/Headers \
-i /Library/Frameworks/Tk.framework/Headers
Where mac.r is a Rez source file. It is part of the FLTK distribution. This will add the required resource fork to the hello application. The program can be run either by typing hello at the command line or by double-clicking the app's icon (note that if it is launched by double-clicking, hello will send its output to the OS X console rather than the terminal).

I don't know wether there is such a resource file for Qt but making an .app-bundle might help.

hvengel
30th March 2006, 23:29
I have asked my user to have a look at this.

hvengel
1st April 2006, 01:02
That was it. The user created an app bundle and it started working. Thanks