Bug report #2294
help dialogs don't work on osx
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Otto Dassau | ||
Category: | Documentation and Help | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | OS X | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 12354 |
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.
Associated revisions
fix #2294
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12622 c8812cc2-4d05-0410-92ff-de0c093fc19c
fix #2294
git-svn-id: http://svn.osgeo.org/qgis/trunk@12622 c8812cc2-4d05-0410-92ff-de0c093fc19c
restore previous bundle build of helpviewer (r12622), add 2nd install step to correct install_name (fix #2294)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12753 c8812cc2-4d05-0410-92ff-de0c093fc19c
restore previous bundle build of helpviewer (r12622), add 2nd install step to correct install_name (fix #2294)
git-svn-id: http://svn.osgeo.org/qgis/trunk@12753 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by William Kyngesburye almost 15 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.
#2 Updated by Paolo Cavallini almost 15 years ago
Still true for current trunk?
#3 Updated by William Kyngesburye almost 15 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 87ddaaad (SVN r11997) 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 5795c35c (SVN r12455):
${QT_QTCORE_LIBRA}
#4 Updated by Jürgen Fischer almost 15 years ago
#5 Updated by John Tull almost 15 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
#6 Updated by Jürgen Fischer almost 15 years ago
- Status changed from Open to Closed
- Resolution set to fixed
should be fixed in
#7 Updated by William Kyngesburye almost 15 years ago
- Status changed from Closed to Feedback
- Resolution deleted (
fixed)
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.
#8 Updated by John Tull almost 15 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?
#9 Updated by William Kyngesburye almost 15 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 [comment:8 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.
#10 Updated by William Kyngesburye almost 15 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 , 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 87ddaaad (SVN r11997) I found to see if that was it.
#11 Updated by William Kyngesburye almost 15 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
I'm such a lazy whiner ;)
Restored pre-. Figured out CMake enough to add a 2nd install step to fix the install_name, dd7fb487 (SVN r12754).
#12 Updated by William Kyngesburye almost 15 years ago
P.S. It still opens behind Qgis for me, so that looks like a different problem.