Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2294 closed bug (fixed)

help dialogs don't work on osx

Reported by: epifanio Owned by: dassau
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: Documentation and Help Version: Trunk
Keywords: qgis_help Cc:
Must Fix for Release: No Platform: OS X
Platform Version: Awaiting user input: no

Description

i simply tried to load a shape file, using the identify tool and click on the "help button" inside the dialogue

it generate a qgis_help crash see attached log, some libraries are not loaded.

Attachments (1)

qgis_help.txt (1.5 KB ) - added by epifanio 14 years ago.
qgis_help log

Download all attachments as: .zip

Change History (13)

by epifanio, 14 years ago

Attachment: qgis_help.txt added

qgis_help log

comment:1 by kyngchaos, 14 years ago

known issue, sortof. The qgis libraries link with the @executable_path relative path, which inside the qgis_help 'app' have the wrong relative path. I thought it was fixed in the cmake build. It certainly is not problem in the xcode build.

One way to fix it is to make a symlink in the qgis_help contents/macos to the qgis lib folder.

ln -s ../../../../lib /path/to/qgis_help/Contents/MacOS/

Better is to change the install_name in the qgis_help binary. I don't know how to do this in the cmake build. Manually, after install, would be:

install_name_tool -change @executable_path/lib/libqgis_core.1.4.0.dylib \
@executable_path/../../../../lib/libqgis_core.1.4.0.dylib \
/path/to/qgis_help/Contents/MacOS/qgis_help

Or, I personally recommend the Xcode build.

comment:2 by pcav, 14 years ago

Priority: critical: causes crash or data corruptionmajor: does not work as expected
Summary: help dialogs don't woks on osxhelp dialogs don't work on osx

Still true for current trunk?

comment:3 by kyngchaos, 14 years ago

I think this used to work - that qgis_help was built with the correct relative path for the qgis_core library. I see r11996 that might have changed the linking. I don't use the cmake build, so I'd have to dust off cmake and try a couple builds to see.

Or, maybe it's this typo from r12454:

    ${QT_QTCORE_LIBRA}

in reply to:  3 comment:4 by jef, 14 years ago

Replying to kyngchaos:

Or, maybe it's this typo from r12454:

that one is fixed in r12536. Not sure if it helps with OSX.

comment:5 by jctull, 14 years ago

Looking over William's comments on the thread, I ran the following command and got the help system working for my setup. Perhaps someone else can figure out how to get this into the cmake build system so it will be done automagically:

install_name_tool -change @executable_path/lib/libqgis_core.1.4.0.dylib @executable_path/../../../../lib/libqgis_core.1.4.0.dylib /Applications/qgis1.4.0.app/Contents/MacOS/bin/qgis_help.app/Contents/MacOS/qgis_help

comment:6 by jef, 14 years ago

Resolution: fixed
Status: newclosed

should be fixed in r12622

comment:7 by kyngchaos, 14 years ago

Resolution: fixed
Status: closedreopened

OK, it mostly works. I was worried about the removing of Mac-specific code is the fix. It does build with a working library path now, but now there are 2 other problems, which I think were the reason for the original Mac code:

  • The help program doesn't open in the foreground.
  • It has the same application icon as Qgis, in the Dock, which is confusing.

Both of these I think may be because qgis_help binary is at the same folder level as the Qgis application binary. So it thinks it's Qgis and picks up the icon from the application package, and it may be confusing the window order.

comment:8 by jctull, 14 years ago

Also, the icon is low-resolution again in the dock and application switcher. Not sure if this is related or not, but guessing it is.

Is there a property item that makes an application icon not appear in the dock? If the help application does not have an icon it would be ok. Alternatively, it should have a unique icon. How is this handled on other systems?

in reply to:  8 comment:9 by kyngchaos, 14 years ago

Massimo is using Qt 4.6 Cocoa, and at least the help app appears in front for him, so that may be either a Qt version thing or Cocoa vs Carbon (I'm using 4.5 Carbon).

Replying to jctull:

Also, the icon is low-resolution again in the dock and application switcher. Not sure if this is related or not, but guessing it is.

Just qgis_help, or both? Didn't happen for me (xcode build), and Massimo sent me a screenshot and qgis_help has a hires icon. Try a clean configure and make?

Is there a property item that makes an application icon not appear in the dock? If the help application does not have an icon it would be ok. Alternatively, it should have a unique icon. How is this handled on other systems?

I pondered the possibility of a help icon or not showing it in the Dock.

It looks like other systems just use whatever the system does, ie no special handling like was done with the original help app here. On Windows, I assume it would show up as a generic command prompt app or generic app in the start bar. On Linux, probably just nothing but the window, unless the window system does something with CLI programs.

Not showing it in the Dock requires an application package, like the original build, so the info.plist can have a certain key set.

An icon on OSX would also require the original app build for qgis_help, so the plist can define a separate icon for it.

So, both ideas require an app package build.

in reply to:  7 comment:10 by kyngchaos, 14 years ago

  • It has the same application icon as Qgis, in the Dock, which is confusing.

Note that also the name is "Qgis", same as the Qgis application, even more confusing.

So, I wonder, why was the context help window done as a separate application, instead of a window in Qgis? Can it be done as a window?

If not, I'm going to have to revert r12622, I think the confusion of the hidden and misnamed application is worse than not working. The application method does work in the Xcode project build, but it requires the Qgis source to reference the correct path to qgis_help (so it's one or the other).

Maybe I can wrap my brain around the cmake stuff to get it to do a post-install install_name_tool, but don't count on it... I'll also try reverting that r11996 I found to see if that was it.

comment:11 by kyngchaos, 14 years ago

Resolution: fixed
Status: reopenedclosed

I'm such a lazy whiner ;)

Restored pre-r12622. Figured out CMake enough to add a 2nd install step to fix the install_name, r12753.

comment:12 by kyngchaos, 14 years ago

P.S. It still opens behind Qgis for me, so that looks like a different problem.

Note: See TracTickets for help on using tickets.