Skip to content

Commit

Permalink
Qt5 version 0.7 with qt-project.org QtCreator 2.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Becker-Asano committed Jul 19, 2013
1 parent 43012e5 commit 8856baf
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 17 deletions.
42 changes: 37 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,62 @@ qwt as submodule: http://stackoverflow.com/a/465151
Contact: Christian Becker-Asano (christian (at) becker-asano (dot) de)

1a. Setup
This program can be compiled as using "Qt Creator" version 2.4.1 (MinGW4.6.2, Qt4.7.4) under MS Windows 7. It depends on Qt, OpenGL, QWT (http://qwt.sourceforge.net/), and the WASABIEngine as dynamically linked libraries.
The first two come with the Qt SDK. The last two are integrated as submudules.
After a fresh clone of this project, you will only have the empty subdirectories "WASABIEngine" and "WASABI-qwt-clone" and compiling will fail. Thus, perform:

As of July 2013, this program can be compiled as using "Qt Creator" version 2.7.2 available here:
http://qt-project.org/downloads
Internally it uses MinGW gcc 4.8.0 for Qt5.1.0 (under MS Windows 7).
Older versions of Qt shipping with older versions of the Qt Creator might work as well, but lately I ran into serious trouble with the Nokia SDK version. Thus, I switched to the qt-project.org version of Qt5.

It depends on Qt, OpenGL, QWT (http://qwt.sourceforge.net/), and the WASABIEngine as dynamically linked libraries. The first two come with the Qt SDK. The last two are integrated as submodules.

After a fresh clone of this project or after the first "Pull" that updates your local repo to the submodule version, you will only have the empty subdirectories "WASABIEngine" and "WASABI-qwt-clone" and compiling will fail. Thus, perform:
$ git submodule update --init "WASABIEngine"
$ git submodule update --init "WASABI-qwt-clone"

1b. Compiling

-- Win7 --

OLD instructions for the Nokia SDK version of Qt4:
===
IMPORTANT: Please make sure to change the setting of every project to use the "MinGW (32bit)" toolchain and not the option "MinGW as a gcc for Windows targets" under Projects->Goals->Build configurations->Toolchains". In addition, currently only the RELEASE configuration seems to work. So, please also change to "release" configuration in each project.
Then proceed as follows:
A1. open the file "\WASABI-qwt-clone\qwt-code\qwt\qwt.pro" in QtCreator don't using "shadow build".
A1. open the file "\WASABI-qwt-clone\qwt-code\qwt\qwt.pro" in QtCreator not using "shadow build".
A2. change the Toolchain setting as explained above for both the debug and release configuration.
A3. change to the release configuration (left panel button)
A4. "build" the project (Ctrl-B). This will take some time.
B1. open the file "\WASABIEngine\WASABIEngine.pro" in QtCreator don't using "shadow build".
B1. open the file "\WASABIEngine\WASABIEngine.pro" in QtCreator not using "shadow build".
B2. change the Toolchain setting as explained above for both the debug and release configuration.
B3. change to the release configuration (left panel button)
B4. "build" the project (Ctrl-B). This won't take too long.
C1. set the project "WASABIGuiQt" to be the "active project" (right-click menu)
C2. change the Toolchain setting as explained above for both the debug and release configuration.
C3. change to the release configuration (left panel button)
C4. press the play button to compile and run.
===

NEW instructions for the qt-project.org-Version of Qt5:
===
A1. Open the file "WASABIGuiQt.pro" by double clicking on it.
A2. use the default configuration for "Desktop Qt 5.1.0 MinGW 32bit" with two seperate directories for "Debug" and "Release".
That looks something like "../build-WASABIGuiQt-Desktop_Qt_5_1_0_MinGW_32bit-Debug" and "../build-WASABIGuiQt-Desktop_Qt_5_1_0_MinGW_32bit-Release" for me.
A3. Try to compile in Debug mode and you will get a message like "cannot find -lWASABIEngine".
B1. Open the file "WASABIEngine/WASABIEngine.pro".
B2. IMPORTANT: Manually change the build directories for Debug and Release to the folders "WASABIEngine/debug" and "WASABIEngine/release", resp. Ignore the qmake warning.
B3. Change to "Debug" mode on the left panel (the Computer screen button), and hit "build" (the hammer button).
This should result in the file "WASABIEngine/debug/WASABIEngine.dll".
C1. Open the file "WASABI-qwt-clone/qwt-code/qwt/qwt.pro",
C2. AGAIN: Change both build directories for Debug and Release to "WASABI-qwt-clone/qwt-code/qwt/lib".
C3 Change to "Debug" mode again, and hit "build".
This takes some time, because all the qwt projects are compiled as well.
A4. Finally, make the WASABIGuiQt project the active project by right-clicking on it in the "Projects" pane and selecting the corresponding option.
A5. Press the green "Play" button to the left.
You will be presented with an error message like "Unable to load WASABI.ini", because the following files need to be copied to the folder indicated in that message:
- WASABI.ini
- *.emo_dyn
- *.emo_pad
- *.se
They can be found in the main folder of the project.

Take a look at the WASABIGuiQt.pro file, if you run into trouble. The system expects to find the "WASABIEngine.dll" in the directory "WASABIEngine\release" subdirectory. The qwt.dll should reside in the "WASABI-qwt-clone/qwt-code/qwt/lib" subdirectory.

Expand Down
25 changes: 16 additions & 9 deletions WASABIGuiQt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,32 @@
# Project created by QtCreator 2011-09-21T11:33:35
#
#-------------------------------------------------
include(WASABIEngine/WASABIEngine.pri)
include(WASABI-qwt-clone/qwt-code/qwt/qwtconfig.pri)
QMAKEFEATURES += WASABI-qwt-clone/qwt-code/qwt
#include($$_PRO_FILE_PWD_/WASABIEngine/WASABIEngine.pri)
#include($$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt/qwtconfig.pri)
#QMAKEFEATURES += $$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt
#QMAKEFEATURES += $$_PRO_FILE_PWD_/WASABIEngine
QT += core gui opengl network
CONFIG += qwt

TARGET = WASABIGuiQt
TEMPLATE = app

DEPENDPATH += . WASABIEngine
INCLUDEPATH += WASABIEngine
INCLUDEPATH += WASABI-qwt-clone/qwt-code/qwt/src
win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/WASABIEngine/release" -lWASABIEngine
win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt/lib" -lqwt
DEPENDPATH += . $$_PRO_FILE_PWD_/WASABIEngine $$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt
INCLUDEPATH += $$_PRO_FILE_PWD_/WASABIEngine
INCLUDEPATH += $$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt/src
CONFIG(release, debug|release) {
win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/WASABIEngine/release" -lWASABIEngine
win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt/lib" -lqwt
}
CONFIG(debug, debug|release) {
win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/WASABIEngine/debug" -lWASABIEngine
win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt/lib" -lqwtd
}
# win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/WASABI-qwt-clone/qwt-code/qwt/lib" -lqwtmathml
#win32-g++:LIBS += -lWASABIEngine
# win32-g++:LIBS += -L"WASABI-qwt-clone/qwt-code/qwt"
# win32-g++:LIBS += -lqwt
unix:!symbian|win32: LIBS += -L$$PWD/WASABIEngine/ -lWASABIEngine
# unix:!symbian|win32: LIBS += -L$$PWD/WASABIEngine/ -lWASABIEngine

SOURCES += main.cpp\
wasabiqtwindow.cpp \
Expand Down
11 changes: 9 additions & 2 deletions wasabiqtwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include <QInputDialog>
#include <QtGui>
#include <QtNetwork>
#include <QMessageBox>
#include <QErrorMessage>


// some helpers from http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2896
Expand Down Expand Up @@ -93,6 +95,10 @@ WASABIQtWindow::WASABIQtWindow(QWidget *parent) :

if (!loadInitFile(sPort)) {
qDebug() << "WASABIQtWindow::WASABIQtWindow: unable to load WASABI.ini or something went wrong!";
QErrorMessage *error = new QErrorMessage(this);
QString errorMessage;
errorMessage.append("Unable to load WASABI.ini, which should be in ").append(dir.currentPath()).append("!");
error->showMessage(errorMessage);
}
qDebug() << "WASABIQtWindow::WASABIQtWindow: serverPort is '" << sPort << "'";

Expand Down Expand Up @@ -327,8 +333,9 @@ bool WASABIQtWindow::loadInitFile(int& sPort) {
} //if (file)
else {
qDebug()
<< "MyApp::loadInitFile: ERROR Could not open file!"
<< "MyApp::loadInitFile: ERROR Could not open file! --> creating dummy JohnDoe :)"
;
int newLocalID = wasabi->addEmotionalAttendee("JohnDoe");

This comment has been minimized.

Copy link
@Becker-Asano

Becker-Asano Jul 19, 2013

Author Member

With this change the application at least does not crash anymore, but it seems to be impossible to use it in any productive way. No AffectiveStates are present as can be seen in the PAD window. Also adding a new Attendee does not work properly.

return false; //could not open file;
}
return true;
Expand Down Expand Up @@ -1031,7 +1038,7 @@ void WASABIQtWindow::on_checkBoxSending_stateChanged(int arg1)

void WASABIQtWindow::actionAbout() {
QMessageBox* about;
about = new QMessageBox(QMessageBox::Information, "About WASABIQtGUI", QString("<p>Copyright (C) 2011 Christian Becker-Asano. <br>All rights reserved.<br>Contact: Christian Becker-Asano (christian@becker-asano.de)</p>This is version %0 of the Qt-based Graphical User Interface (GUI) WASABIQtGUI, which depends on the shared library WASABIEngine to run the WASABI Affect Simulation Architecture as described in the doctoral thesis of Christian Becker-Asano. It is licensed under the LGPL and its source can be obtained freely via GitHub.<p>For further information, please visit:<br> <a href='https://www.becker-asano.de/index.php/component/search/?searchword=WASABI'>https://www.becker-asano.de/index.php/component/search/?searchword=WASABI</a></p>").arg(CURRENT_VERSION), QMessageBox::Ok);
about = new QMessageBox(QMessageBox::Information, "About WASABIQtGUI", QString("<p>Copyright (C) 2011 Christian Becker-Asano. <br>All rights reserved.<br>Contact: Christian Becker-Asano (christian@becker-asano.de)</p>This is version %0 of the Qt5-based Graphical User Interface (GUI) WASABIQtGUI, which depends on the shared libraries WASABIEngine and qwt (included as submodules) to run the WASABI Affect Simulation Architecture as described in the doctoral thesis of Christian Becker-Asano. It is licensed under the LGPL and its source can be obtained freely via GitHub.<p>For further information, please visit:<br> <a href='https://www.becker-asano.de/index.php/component/search/?searchword=WASABI'>https://www.becker-asano.de/index.php/component/search/?searchword=WASABI</a></p>").arg(CURRENT_VERSION), QMessageBox::Ok);
about->setTextFormat(Qt::RichText);
about->show();
}
Expand Down
2 changes: 1 addition & 1 deletion wasabiqtwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</font>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabEmoMood">
<property name="sizePolicy">
Expand Down

0 comments on commit 8856baf

Please sign in to comment.