Skip to content

Commit

Permalink
restore previous bundle build of helpviewer (r12622), add 2nd install…
Browse files Browse the repository at this point in the history
… step to correct install_name (fix #2294)

git-svn-id: http://svn.osgeo.org/qgis/trunk@12753 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
kyngchaos committed Jan 13, 2010
1 parent d7fadd1 commit dd7fb48
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/core/qgsapplication.cpp
Expand Up @@ -225,6 +225,9 @@ const QString QgsApplication::developerPath()
const QString QgsApplication::helpAppPath()
{
QString helpAppPath = applicationDirPath();
#ifdef Q_OS_MACX
helpAppPath += "/bin/qgis_help.app/Contents/MacOS";
#endif
helpAppPath += "/qgis_help";
return helpAppPath;
}
Expand Down
5 changes: 3 additions & 2 deletions src/helpviewer/CMakeLists.txt
Expand Up @@ -54,7 +54,7 @@ QT4_WRAP_CPP (HELP_MOC_SRCS ${HELP_MOC_HDRS})

#QT4_ADD_RESOURCES(HELP_RCC_SRCS ${HELP_RCCS})

ADD_EXECUTABLE (qgis_help ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H})
ADD_EXECUTABLE (qgis_help MACOSX_BUNDLE ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../core
Expand Down Expand Up @@ -98,7 +98,8 @@ SET_TARGET_PROPERTIES(qgis_help PROPERTIES
# Install

IF (APPLE)
INSTALL (TARGETS qgis_help RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
INSTALL (TARGETS qgis_help BUNDLE DESTINATION ${QGIS_BIN_DIR})
INSTALL (CODE "EXECUTE_PROCESS(COMMAND install_name_tool -change @executable_path/lib/libqgis_core.${COMPLETE_VERSION}.dylib @executable_path/../../../../lib/libqgis_core.${COMPLETE_VERSION}.dylib \"${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_help.app/Contents/MacOS/qgis_help\")")
ELSE (APPLE)
INSTALL (TARGETS qgis_help RUNTIME DESTINATION ${QGIS_BIN_DIR})
ENDIF (APPLE)
4 changes: 4 additions & 0 deletions src/helpviewer/main.cpp
Expand Up @@ -41,6 +41,10 @@ int main( int argc, char ** argv )
{
context = argv[1];
}
#ifdef Q_WS_MACX
// If we're on Mac, we have the resource library way above us...
a.setPkgDataPath( QgsApplication::prefixPath() + "/../../../../" + QString( QGIS_DATA_SUBDIR ) );
#endif

QString i18nPath = QgsApplication::i18nPath();
if ( myTranslationCode.isEmpty() )
Expand Down

0 comments on commit dd7fb48

Please sign in to comment.