build: mac bundle fix and other prerelease fixes

* fixed rpath in mac bundle
* added Qt5Network and Qt5DBus frameworks to bundle
* fixed project settings not saved
* fixed preferences not shown on first start
* added coati_manual.pdf
This commit is contained in:
Eberhard Graether
2015-10-20 16:15:17 +02:00
parent 73b25c45ff
commit dc39e10858
13 changed files with 43 additions and 32 deletions
+6 -6
View File
@@ -37,7 +37,7 @@ endif ()
# Project ----------------------------------------------------------------------
project(${PROJECT_NAME})
if (UNIX)
if (UNIX AND NOT APPLE)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" )
@@ -233,7 +233,7 @@ if (APPLE)
set(MACOSX_BUNDLE_NAME ${PROJECT_NAME})
set(MACOSX_BINARY_NAME ${APP_PROJECT_NAME})
set(MACOSX_DYNAMIC_LIBRARIES ${Boost_LIBRARIES} "${LLVM_LIBRARY_DIRS}/libLTO.dylib")
set(MACOSX_DYNAMIC_LIBRARIES ${Boost_LIBRARIES} "${LLVM_LIBRARY_DIRS}/libLTO.3.8.dylib")
string(REPLACE ";" " " MACOSX_DYNAMIC_LIBRARIES "${MACOSX_DYNAMIC_LIBRARIES}")
get_property(QT_CORE_PATH TARGET ${Qt5Core_LIBRARIES} PROPERTY LOCATION)
@@ -247,11 +247,11 @@ if (APPLE)
get_property(QT_PRINT_PATH TARGET ${Qt5PrintSupport_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_PRINT_PATH ${QT_PRINT_PATH} REALPATH)
#get_property(QT_NETWORK_PATH TARGET ${Qt5Network_LIBRARIES} PROPERTY LOCATION)
#get_filename_component(QT_NETWORK_PATH ${QT_NETWORK_PATH} REALPATH)
list(APPEND MACOSX_QT_FRAMEWORKS ${QT_CORE_PATH} ${QT_GUI_PATH} ${QT_WIDGETS_PATH} ${QT_PRINT_PATH})
get_property(QT_NETWORK_PATH TARGET ${Qt5Network_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_NETWORK_PATH ${QT_NETWORK_PATH} REALPATH)
list(APPEND MACOSX_QT_FRAMEWORKS ${QT_CORE_PATH} ${QT_GUI_PATH} ${QT_WIDGETS_PATH} ${QT_PRINT_PATH} ${QT_NETWORK_PATH})
string(REPLACE ";" " " MACOSX_QT_FRAMEWORKS "${MACOSX_QT_FRAMEWORKS}")
set(MACOSX_QT_DIR "$ENV{QT_DIR}")
+2 -2
View File
@@ -48,7 +48,7 @@ if [ $PLATFORM == "Windows" ]; then
echo -e $INFO "copy test_main file"
cp -u setup/cxx_test/windows/test_main.cpp build
echo -e $INFO "creating program icon"
sh script/create_windows_icon.sh
fi
@@ -62,7 +62,7 @@ if [ $PLATFORM == "Linux" ] || [ $PLATFORM == "MacOS" ]; then
cd build/Debug && cmake -G Ninja -DCMAKE_BUILD_TYPE="Debug" ../..
echo -e $INFO "run cmake with Release configuration"
cd ../Release && cmake -G Ninja -DCMAKE_BUILD_TYPE="Release" ../..
cd ../Release && cmake -G Xcode -DCMAKE_BUILD_TYPE="Release" ../..
fi
echo -e $SUCCESS "setup complete"
+2
View File
@@ -36,5 +36,7 @@
<true/>
<key>CFBundleIconFile</key>
<string>icon</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
</dict>
</plist>
+20 -12
View File
@@ -14,7 +14,7 @@ APP_NAME="@MACOSX_BINARY_NAME@"
DYNLIB_PATHS=(@MACOSX_DYNAMIC_LIBRARIES@)
QT_DIR="@MACOSX_QT_DIR@"
QT_FRAMEWORK_PATHS=(@MACOSX_QT_FRAMEWORKS@)
QT_FRAMEWORK_PATHS=(/Users/ebsi/Documents/Qt/5.5/clang_64/lib/QtDBus.framework/Versions/5/QtDBus @MACOSX_QT_FRAMEWORKS@)
if [ ! -x "$APP_NAME" ]
then
@@ -86,7 +86,7 @@ do
FRAMEWORK_SUB_PATH=$(echo $FRAMEWORK_BIN_PATH | grep -o "\w*.framework\S*")
install_name_tool -id @executable_path/../Frameworks/$FRAMEWORK_SUB_PATH $FRAMEWORK_DIR/$FRAMEWORK_SUB_PATH
install_name_tool -change $FRAMEWORK_BIN_PATH @executable_path/../Frameworks/$FRAMEWORK_SUB_PATH $APP_PATH
install_name_tool -change @rpath/$FRAMEWORK_SUB_PATH @executable_path/../Frameworks/$FRAMEWORK_SUB_PATH $APP_PATH
echo "framework" $FRAMEWORK_BIN_PATH $FRAMEWORK_PATH
done
@@ -94,23 +94,31 @@ done
# http://qt-project.org/doc/qt-4.8/deployment-mac.html
echo -e $INFO "Fixing framework dependencies"
install_name_tool -change $QT_DIR/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtGui.framework/Versions/5/QtGui
install_name_tool -change $QT_DIR/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtWidgets.framework/Versions/5/QtWidgets
install_name_tool -change $QT_DIR/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $FRAMEWORK_DIR/QtWidgets.framework/Versions/5/QtWidgets
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtGui.framework/Versions/5/QtGui
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtWidgets.framework/Versions/5/QtWidgets
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $FRAMEWORK_DIR/QtWidgets.framework/Versions/5/QtWidgets
install_name_tool -change $QT_DIR/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change $QT_DIR/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change $QT_DIR/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
install_name_tool -change $QT_DIR/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change $QT_DIR/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change $QT_DIR/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change $QT_DIR/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtDBus.framework/Versions/5/QtDBus @executable_path/../Frameworks/QtDBus.framework/Versions/5/QtDBus $PLUGIN_DIR/libqcocoa.dylib
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtDBus.framework/Versions/5/QtDBus
install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $FRAMEWORK_DIR/QtNetwork.framework/Versions/5/QtNetwork
install_name_tool -change @rpath/QtDBus.framework/Versions/5/QtDBus @executable_path/../Frameworks/QtDBus.framework/Versions/5/QtDBus $FRAMEWORK_DIR/QtNetwork.framework/Versions/5/QtNetwork
otool -L $FRAMEWORK_DIR/QtCore.framework/Versions/5/QtCore
otool -L $FRAMEWORK_DIR/QtGui.framework/Versions/5/QtGui
otool -L $FRAMEWORK_DIR/QtWidgets.framework/Versions/5/QtWidgets
otool -L $FRAMEWORK_DIR/QtPrintSupport.framework/Versions/5/QtPrintSupport
otool -L $FRAMEWORK_DIR/QtDBus.framework/Versions/5/QtDBus
otool -L $FRAMEWORK_DIR/QtNetwork.framework/Versions/5/QtNetwork
otool -L $PLUGIN_DIR/libqcocoa.dylib
+2 -2
View File
@@ -64,9 +64,9 @@ void QtMainView::setStatusBar(QStatusBar* statusbar)
m_window->setStatusBar(statusbar);
}
void QtMainView::showStartScreen()
void QtMainView::hideStartScreen()
{
m_window->showStartScreen();
m_window->hideScreens();
}
void QtMainView::setTitle(const std::string& title)
+1 -1
View File
@@ -33,7 +33,7 @@ public:
virtual void setStatusBar(QStatusBar* statusBar);
// MainView implementation
virtual void showStartScreen();
virtual void hideStartScreen();
virtual void setTitle(const std::string& title);
private:
+5 -1
View File
@@ -71,7 +71,11 @@ void QtMainWindow::init()
{
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
if (!appSettings->getUserHasSeenSettings())
if (appSettings->getUserHasSeenSettings())
{
showStartScreen();
}
else
{
openSettings();
m_startScreenWasVisible = true;
+1 -1
View File
@@ -141,7 +141,7 @@ void QtProjectSetupScreen::handleCancelButtonPress()
emit canceled();
}
void QtProjectSetupScreen::handleDoneButtonPress()
void QtProjectSetupScreen::handleUpdateButtonPress()
{
if (m_projectName->text().isEmpty())
{
+1 -1
View File
@@ -48,7 +48,7 @@ protected:
private slots:
void handleCancelButtonPress();
void handleDoneButtonPress();
void handleUpdateButtonPress();
private:
QLineEdit* m_projectName;
+1 -1
View File
@@ -144,7 +144,7 @@ void QtSettingsWindow::setupForm()
m_doneButton->setObjectName("windowButton");
connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(handleCancelButtonPress()));
connect(m_doneButton, SIGNAL(clicked()), this, SLOT(handleDoneButtonPress()));
connect(m_doneButton, SIGNAL(clicked()), this, SLOT(handleUpdateButtonPress()));
QHBoxLayout* buttons = new QHBoxLayout();
buttons->addWidget(m_cancelButton);
+1 -4
View File
@@ -36,10 +36,7 @@ std::shared_ptr<Application> Application::create(ViewFactory* viewFactory, Netwo
if (startupProjectFilePath.size())
{
MessageLoadProject(startupProjectFilePath).dispatch();
}
else
{
ptr->m_mainView->showStartScreen();
ptr->m_mainView->hideStartScreen();
}
ptr->m_ideCommunicationController = networkFactory->createIDECommunicationController();
+1 -1
View File
@@ -11,7 +11,7 @@ public:
MainView();
virtual ~MainView();
virtual void showStartScreen() = 0;
virtual void hideStartScreen() = 0;
virtual void setTitle(const std::string& title) = 0;
};
Binary file not shown.