The branch, master, has been updated. - Log -----------------------------------------------------------------
commit 273ebbef19dda5621986c036670c9ed7119bfb7b Author: Stephan Witt <sw...@lyx.org> Date: Sun Sep 23 15:27:36 2012 +0200 avoid deprecated functions on Mac - use Qt instead diff --git a/src/Makefile.am b/src/Makefile.am index 43edb94..d3c52f5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,7 +40,7 @@ if LYX_WIN_RESOURCE endif if INSTALL_MACOSX -lyx_LDFLAGS = -framework AppKit +lyx_LDFLAGS = -framework AppKit -framework ApplicationServices endif #lyx_LDFLAGS=-Wl,-O1 diff --git a/src/support/Makefile.am b/src/support/Makefile.am index f7fad7c..2418168 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -28,7 +28,7 @@ liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES) ################################################################## AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES) -AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) +AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_INCLUDES) liblyxsupport_a_SOURCES = \ FileMonitor.h \ diff --git a/src/support/Package.cpp b/src/support/Package.cpp index ec08a55..a158b49 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -36,7 +36,9 @@ #endif #if defined (USE_MACOSX_PACKAGING) -# include <CoreServices/CoreServices.h> // FSFindFolder, FSRefMakePath +# include "support/qstring_helpers.h" +# include <QDir> +# include <QDesktopServices> #endif using namespace std; @@ -169,6 +171,8 @@ FileName const & Package::get_home_dir() { #if defined (USE_WINDOWS_PACKAGING) static FileName const home_dir(getEnv("USERPROFILE")); +#elif defined (USE_MACOSX_PACKAGING) + static FileName const home_dir(fromqstr(QDir::homePath())); #else // Posix-like. static FileName const home_dir(getEnv("HOME")); #endif @@ -370,6 +374,9 @@ FileName const get_document_dir(FileName const & home_dir) (void)home_dir; // Silence warning about unused variable. os::GetFolderPath win32_folder_path; return FileName(win32_folder_path(os::GetFolderPath::PERSONAL)); +#elif defined (USE_MACOSX_PACKAGING) + (void)home_dir; // Silence warning about unused variable. + return FileName(fromqstr(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation))); #else // Posix-like. return home_dir; #endif @@ -635,23 +642,7 @@ FileName const get_default_user_support_dir(FileName const & home_dir) #elif defined (USE_MACOSX_PACKAGING) (void)home_dir; // Silence warning about unused variable. - - FSRef fsref; - OSErr const error_code = - FSFindFolder(kUserDomain, kApplicationSupportFolderType, - kDontCreateFolder, &fsref); - if (error_code != 0) - return FileName(); - - // FSRefMakePath returns the result in utf8 - char store[PATH_MAX + 1]; - OSStatus const status_code = - FSRefMakePath(&fsref, - reinterpret_cast<UInt8*>(store), PATH_MAX); - if (status_code != 0) - return FileName(); - - return FileName(addPath(reinterpret_cast<char const *>(store), PACKAGE)); + return FileName(addPath(fromqstr(QDesktopServices::storageLocation(QDesktopServices::DataLocation)), PACKAGE)); #else // USE_POSIX_PACKAGING return FileName(addPath(home_dir.absFileName(), string(".") + PACKAGE)); diff --git a/src/support/os_unix.cpp b/src/support/os_unix.cpp index bb6a86b..495bb2c 100644 --- a/src/support/os_unix.cpp +++ b/src/support/os_unix.cpp @@ -26,7 +26,7 @@ #include <stdlib.h> #ifdef __APPLE__ -#include <Carbon/Carbon.h> +#include <CoreServices/CoreServices.h> #endif using namespace std; diff --git a/src/tex2lyx/CMakeLists.txt b/src/tex2lyx/CMakeLists.txt index f032d4d..1952a81 100644 --- a/src/tex2lyx/CMakeLists.txt +++ b/src/tex2lyx/CMakeLists.txt @@ -49,6 +49,7 @@ target_link_libraries(${_tex2lyx} support ${Lyx_Boost_Libraries} ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} ${LIBINTL_LIBRARIES} ${ICONV_LIBRARY}) commit f1ab5dfc5878bc736fd185279a0ef7a185b2d8d8 Author: Stephan Witt <sw...@lyx.org> Date: Sun Sep 23 15:10:28 2012 +0200 remove unnecessary Carbon include diff --git a/src/support/AppleSpeller.m b/src/support/AppleSpeller.m index 82901f4..3e9a2f8 100644 --- a/src/support/AppleSpeller.m +++ b/src/support/AppleSpeller.m @@ -8,7 +8,6 @@ * Full author contact details are available in file CREDITS. */ -#import <Carbon/Carbon.h> #import <Cocoa/Cocoa.h> #import <AvailabilityMacros.h> commit 99e53ffce04337cc50c9cfbdb900e66064d450ed Author: Stephan Witt <sw...@lyx.org> Date: Sun Sep 23 15:08:24 2012 +0200 add high resolution display support diff --git a/development/MacOSX/Info.plist.in b/development/MacOSX/Info.plist.in index 32accf4..7bbd2fc 100644 --- a/development/MacOSX/Info.plist.in +++ b/development/MacOSX/Info.plist.in @@ -40,6 +40,10 @@ <key>NSAppleScriptEnabled</key> <string>YES</string> <key>OSAScriptingDefinition</key> - <string>LyX.sdef</string> + <string>LyX.sdef</string> + <key>NSHighResolutionCapable</key> + <true/> + <key>NSPrincipalClass</key> + <string>NSApplication</string> </dict> </plist> commit 5a9aa21350a2f7c7cae24dfc513c1c3939c09652 Author: Stephan Witt <sw...@lyx.org> Date: Sun Sep 23 15:07:41 2012 +0200 correct Messages class implementation for non-NLS diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index a1df980..5eee6b7 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -234,9 +234,14 @@ docstring const Messages::get(string const & m) const return trans; } +std::string Messages::language() const + { + return string(); + } -bool Messages::available() const +bool Messages::available(string const & c) { + (void)c; return false; } commit 404ef2467c22a913dc79c5bc123813eae79d64ff Author: Stephan Witt <sw...@lyx.org> Date: Sun Sep 23 15:06:02 2012 +0200 moving Reconfigure to LyX menu does not work diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 8bea710..22d1d9e 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -1754,8 +1754,8 @@ void Menus::Impl::macxMenuBarInit(GuiView * view, QMenuBar * qmb) QAction::AboutRole}, {LFUN_DIALOG_SHOW, "prefs", "Preferences", QAction::PreferencesRole}, - {LFUN_RECONFIGURE, "", "Reconfigure", - QAction::ApplicationSpecificRole}, + /* {LFUN_RECONFIGURE, "", "Reconfigure", + QAction::ApplicationSpecificRole}, */ {LFUN_LYX_QUIT, "", "Quit LyX", QAction::QuitRole} }; const size_t num_entries = sizeof(entries) / sizeof(entries[0]); commit 040374f3439d067286726afcb2e62c3dfb84dd92 Author: Stephan Witt <sw...@lyx.org> Date: Sun Sep 23 15:04:53 2012 +0200 use -F instead of -L to link Qt frameworks diff --git a/config/qt4.m4 b/config/qt4.m4 index eea6fdf..5cbf7f7 100644 --- a/config/qt4.m4 +++ b/config/qt4.m4 @@ -202,10 +202,18 @@ AC_DEFUN([QT4_DO_MANUAL_CONFIG], done QT4_CORE_INCLUDES="-I$qt4_cv_includes -I$qt4_cv_includes/QtCore" fi - if test -n "$qt4_cv_libraries"; then + case "$qt4_cv_libraries" in + *framework*) + QT4_LDFLAGS="-F$qt4_cv_libraries" + QT4_CORE_LDFLAGS="-F$qt4_cv_libraries" + ;; + "") + ;; + *) QT4_LDFLAGS="-L$qt4_cv_libraries" QT4_CORE_LDFLAGS="-L$qt4_cv_libraries" - fi + ;; + esac AC_SUBST(QT4_INCLUDES) AC_SUBST(QT4_CORE_INCLUDES) AC_SUBST(QT4_LDFLAGS) commit 2d278850cb54ae81d7e750398063c714f1780e5c Author: Stephan Witt <sw...@lyx.org> Date: Sun Sep 23 15:02:46 2012 +0200 support for Xcode 4.3 and Mountain Lion diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index 0c027c7..96b0912 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -12,6 +12,8 @@ Qt4Version=${Qt4Version:-"4.6.3"} Qt4SourceVersion="qt-everywhere-opensource-src-${Qt4Version}" Qt4BuildSubDir="qt-${Qt4Version}-build${MAC_API}" +unset DYLD_LIBRARY_PATH LD_LIBRARY_PATH + # Prerequisite: # * a decent checkout of LyX sources (probably you have it already) # * Qt4 - build with shared or static libraries for the used platforms (default: i386 and ppc) @@ -42,8 +44,17 @@ thesaurus_deployment="yes" qt4_deployment="yes" -MACOSX_DEPLOYMENT_TARGET="10.4" # Tiger support is default -SDKROOT="/Developer/SDKs/MacOSX10.5.sdk" # Leopard build is default +if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" ]; then + DEVELOPER_SDKS="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" + XCODE_DEVELOPER="/Applications/Xcode.app/Contents/Developer" + MACOSX_DEPLOYMENT_TARGET="10.7" # Tiger support is default + SDKROOT="${DEVELOPER_SDKS}/MacOSX10.7.sdk" # Leopard build is default +elif [ -d "/Developer/SDKs" ]; then + DEVELOPER_SDKS="/Developer/SDKs" + XCODE_DEVELOPER="/Developer" + MACOSX_DEPLOYMENT_TARGET="10.4" # Tiger support is default + SDKROOT="${DEVELOPER_SDKS}/MacOSX10.5.sdk" # Leopard build is default +fi # detection of script home LyxSourceDir=$(dirname "$0") @@ -112,13 +123,13 @@ while [ $# -gt 0 ]; do SDKROOT=$(echo ${1}|cut -d= -f2) case "${SDKROOT}" in 10.4) - SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk" + SDKROOT="${DEVELOPER_SDKS}/MacOSX10.4u.sdk" export CC=gcc-4.0 export OBJC=gcc-4.0 export CXX=g++-4.0 ;; - 10.5|10.6) - SDKROOT="/Developer/SDKs/MacOSX${SDKROOT}.sdk" + 10.5|10.6|10.7|10.8) + SDKROOT="${DEVELOPER_SDKS}/MacOSX${SDKROOT}.sdk" ;; *) usage @@ -237,24 +248,24 @@ DMGNAME="${LyxBase}" DMGSIZE="550m" # Check for existing SDKs -SDKs=$(echo /Developer/SDKs/MacOSX10*sdk) -case "$SDKs" in -${SDKROOT}) +SDKs=$(echo ${DEVELOPER_SDKS}/MacOSX10*sdk) +case $SDKs in +*${SDKROOT}*) ;; *10.6*) MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-"10.5"}; export MACOSX_DEPLOYMENT_TARGET case "${MACOSX_DEPLOYMENT_TARGET}" in 10.6) - SDKROOT="/Developer/SDKs/MacOSX10.6.sdk"; export SDKROOT + SDKROOT="${DEVELOPER_SDKS}/MacOSX10.6.sdk"; export SDKROOT ;; 10.5|10.4) - SDKROOT=${SDKROOT:-"/Developer/SDKs/MacOSX10.5.sdk"}; export SDKROOT + SDKROOT=${SDKROOT:-"${DEVELOPER_SDKS}/MacOSX10.5.sdk"}; export SDKROOT ;; esac ;; *10.5*) MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-"10.4"}; export MACOSX_DEPLOYMENT_TARGET - SDKROOT=${SDKROOT:-"/Developer/SDKs/MacOSX10.5.sdk"}; export SDKROOT + SDKROOT=${SDKROOT:-"${DEVELOPER_SDKS}/MacOSX10.5.sdk"}; export SDKROOT ;; *) echo Unknown or missing SDK for Mac OS X. @@ -725,7 +736,7 @@ make_dmg() { ln -s /Applications/ "${VOLUME}"/Applications test -d "${DocumentationDir}" && cp -r "${DocumentationDir}" "${VOLUME}" set_bundle_display_options "${VOLUME}" ${BG_W} ${BG_H} - /Developer/Tools/SetFile -a C "${VOLUME}" + ${XCODE_DEVELOPER}/Tools/SetFile -a C "${VOLUME}" mv "${VOLUME}/Pictures" "${VOLUME}/.Pictures" # Unmount the disk image ----------------------------------------------------------------------- Summary of changes: config/qt4.m4 | 12 +++++++++- development/LyX-Mac-binary-release.sh | 35 +++++++++++++++++++++----------- development/MacOSX/Info.plist.in | 6 ++++- src/Makefile.am | 2 +- src/frontends/qt4/Menus.cpp | 4 +- src/support/AppleSpeller.m | 1 - src/support/Makefile.am | 2 +- src/support/Messages.cpp | 7 +++++- src/support/Package.cpp | 27 ++++++++----------------- src/support/os_unix.cpp | 2 +- src/tex2lyx/CMakeLists.txt | 1 + 11 files changed, 59 insertions(+), 40 deletions(-) hooks/post-receive -- The LyX Source Repository