Commit c26257d8 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - made help stuff work again

parent 65c5f533
......@@ -374,7 +374,8 @@ ADD_SUBDIRECTORY( core )
# -----------------------------------------------------------------------------------------------------------------------------------------------
# QT4 Walnut binary
SET( OWQt4GuiName "walnut" )
SET( OWQt4GuiName "qt4gui" )
SET( OWBinaryName "walnut" )
# build core
ADD_SUBDIRECTORY( qt4gui )
......
See the "doc" directory for more information, e.g. on build and installation process.
------------------------------------------------------
Directory Structure:
-gui
-dataHandler
-graphicsEngine
-common
-kernel
-tools
Building OpenWalnut on Windows
******************************
Visual Studio
*************
If you want to build OpenWalnut in 64 Bit with Microsoft tools on a Microsoft Operating System, you have to spend only
$549 (according to Microsoft's Visual Studio 2010 Website on http://www.microsoft.com/germany/visualstudio at
2010/08/08). Of course you can spend even more. For nice features, like an integrated UML Editor, you can spend up
to $11899! And even more exciting is the amazing syntax-highlighting text editor inside the IDE. Wow ... features you
surely won't get with other tools.
But we have to be fair with Microsoft. Instead of providing the 64 Bit compiler in the Visual Studio 2010 Express
Edition, they spend their (and, therefore, your) money for amazing transparent window borders and new
security-anti-virus-über-features like "Are you sure that you are sure that you want me to ask you whether you are sure
to open naked_women.jpg.vba?"-dialogs in their current operating system. But, as we all know, the 64 Bit architecture
gets overrated. AMD has released their Athlon 64 in 2003. No reason for Microsoft to to provide the tools to everybody,
allowing them to make use of it. But who cares. Who needs standards-complying and compatible tools if you can't
install them because the authorization-dialog does not trust you.
We, the OpenWalnut-Team give you a well-meant advice: use the time you would fiddle about getting OpenWalnut compiled in
your Visual Studio for installing one of the numerous free operating systems and for compiling OpenWalnut with the
integrated (free) tools while watching an episode of your favorite TV show.
If you really want to use Visual Studio, try it. We spend a lot of effort to get OpenWalnut "compatible" with Visual
Studio but we can't guarantee that it will compile there. It simply is not made for portable open-source software.
MSYS
****
Have a look at MSYS (http://www.mingw.org/wiki/MSYS). This is a nice alternative and works very good and makes compiling
OpenWalnut very simple.
......@@ -27,6 +27,7 @@
# ---------------------------------------------------------------------------------------------------------------------------------------------------
SET( LibName ${OWQt4GuiName} )
SET( BinName ${OWBinaryName} )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Setup QT4
......@@ -79,13 +80,13 @@ QT4_AUTOMOC( ${TARGET_CPP_FILES} )
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
# Setup the target
ADD_EXECUTABLE( ${LibName} ${TARGET_CPP_FILES} ${TARGET_H_FILES} "version.h" )
TARGET_LINK_LIBRARIES( ${LibName} ${OWCoreName} ${QT_LIBS} ${Boost_LIBRARIES} )
ADD_EXECUTABLE( ${BinName} ${TARGET_CPP_FILES} ${TARGET_H_FILES} "version.h" )
TARGET_LINK_LIBRARIES( ${BinName} ${OWCoreName} ${QT_LIBS} ${Boost_LIBRARIES} )
# TODO(all): comment this stuff. I do not know what the purpose is
IF( MSVC_IDE )
SET_TARGET_PROPERTIES( ${LibName} PROPERTIES DEBUG_POSTFIX "d")
SET_TARGET_PROPERTIES( ${LibName} PROPERTIES PREFIX "../")
SET_TARGET_PROPERTIES( ${BinName} PROPERTIES DEBUG_POSTFIX "d")
SET_TARGET_PROPERTIES( ${BinName} PROPERTIES PREFIX "../")
ENDIF( MSVC_IDE )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
......@@ -93,17 +94,31 @@ ENDIF( MSVC_IDE )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Setup tests of this target
SETUP_TESTS( "${TARGET_TEST_FILES}" "${LibName}" "" )
SETUP_TESTS( "${TARGET_TEST_FILES}" "${BinName}" "" )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Copy the documentation
# Copy local resources
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Copy the help documents. This is not in the resource directory since it is qt4gui specific, so we need to copy it.
ADD_CUSTOM_TARGET( help
ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/../doc/user/help/ ${OW_SHARE_DIR}/${LibName}/
COMMENT "Copy the GUI help"
)
# Copy the icons of the GUI. They might be needed in the help system
ADD_CUSTOM_TARGET( icons
ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/icons/ ${OW_SHARE_DIR}/${LibName}/icons
COMMENT "Copy the GUI icons"
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Style Checker
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# setup the stylechecker. Ignore the platform specific stuff.
SETUP_STYLECHECKER( "${LibName}"
SETUP_STYLECHECKER( "${BinName}"
"${TARGET_CPP_FILES};${TARGET_H_FILES};${TARGET_TEST_FILES};${TARGET_GLSL_FILES}" # add all these files to the stylechecker
"" ) # exlude some ugly files
".*/version\\.h" ) # exlude some ugly files
......@@ -752,14 +752,14 @@ void WMainWindow::openAboutQtDialog()
void WMainWindow::openAboutDialog()
{
std::string filename( WPathHelper::getAppPath().file_string() + "/../share/OpenWalnut/OpenWalnutAbout.html" );
std::string filename( WPathHelper::getSharePath().file_string() + "/OpenWalnutAbout.html" );
std::string content = readFileIntoString( filename );
QMessageBox::about( this, "About OpenWalnut", content.c_str() );
}
void WMainWindow::openOpenWalnutHelpDialog()
{
std::string filename( WPathHelper::getAppPath().file_string() + "/../share/OpenWalnut/OpenWalnutHelp.html" );
std::string filename( WPathHelper::getSharePath().file_string() + "/qt4gui/OpenWalnutHelp.html" );
std::string content = readFileIntoString( filename );
QWidget* window = new QWidget( this, Qt::Window );
......@@ -772,7 +772,7 @@ void WMainWindow::openOpenWalnutHelpDialog()
window->show();
QWebView *view = new QWebView( this );
QString location( QString( "file://" ) + WPathHelper::getAppPath().file_string().c_str() + "/../share/OpenWalnut/" );
QString location( QString( "file://" ) + WPathHelper::getSharePath().file_string().c_str() + "/qt4gui/" );
view->setHtml( content.c_str(), QUrl( location ) );
view->show();
layout->addWidget( view );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment