BOSSoNe0013 / track-o-bot

The friendly Hearthstone Tracker (Linux port)
https://trackobot.com
GNU Lesser General Public License v2.1
39 stars 6 forks source link

Fixed compiling the code in Ubuntu 14.04 #8

Closed fasmat closed 9 years ago

fasmat commented 9 years ago

Apparently Ubuntu 14.04 still runs Qt 5.2 instead of Qt 5.4, so some parts of the code had to be altered to make it be able to be compiled.

Strangely enough, it still doesn't work and I can't find the issue why. The changes I made should not break anything for other systems, but now track-o-bot can be compiled using qmake-qt4.

Also some functionality isn't present in Ubuntu. For instance notifications don't work.

BOSSoNe0013 commented 9 years ago

Hi, thanks for your contribution, i'll test (i don't see any problem for now) and merge it ;) Can you tell me more about what's not working ? Have you symlink output_log.txt and log.config in ~/.Hearthstone/ ? Cheers

fasmat commented 9 years ago

Hi,

glad if I can contribute. If I try to compile it with Qt5 instead of Qt4 I get errors like these during compilation:

src/Main.cpp:1:24: fatal error: QApplication: file or directory not found
 #include <QApplication>

Maybe this can be fixed with some parameter tweaking in the pro file.

Additionally I saw in the code that Track-o-Bot is supposed to show notifications e.g. Window.cpp:200 But looking at it again it seems to only occur at the first start which was a while ago for me so never mind. =)

BOSSoNe0013 commented 9 years ago

The QApplication not found error come when the Qt module "widgets" is not called (eg: qmake QT += widgets). There's only two notifications types :

fasmat commented 9 years ago

If I try to qmake with widgets i get a different error of the same kind:

In file included from src/Window.cpp:8:0:
tmp/ui_Window.h:13:25: fatal error: QtGui/QAction: Datei oder Verzeichnis nicht gefunden
 #include <QtGui/QAction>

EDIT: alternatively if i change line 96 in track-o-bot.pro to greaterThan 4 it still works with qmake-qt4 but with qmake (qt5) I get a lot of errors of this kind:

src/Window.cpp: In member function ‘void SettingsTab::ExportAccount()’:
src/Window.cpp:39:22: error: ‘QFileDialog’ has not been declared
   QString fileName = QFileDialog::getSaveFileName( this,
BOSSoNe0013 commented 9 years ago

Have you done a make clean ?

fasmat commented 9 years ago

I found the issue. You'll find the fix in my most recent commit. It compiles without errors or warnings with qmake and qmake-qt4 but with the former the App does not show up in the notification area after I start it (it's running according to ps -A).