diff --git a/SparrowBot.pro b/SparrowBot.pro index fe921d4..e4399a3 100644 --- a/SparrowBot.pro +++ b/SparrowBot.pro @@ -7,3 +7,9 @@ SUBDIRS = ircbot \ app.depends = ircbot +#copy res +copydata.commands = $(COPY_DIR) $$PWD/res $$OUT_PWD +first.depends = $(first) copydata +export(first.depends) +export(copydata.commands) +QMAKE_EXTRA_TARGETS += first copydata diff --git a/app/app.pro b/app/app.pro index 5958ecc..6bc8b0c 100644 --- a/app/app.pro +++ b/app/app.pro @@ -1,12 +1,12 @@ QT += core gui network widgets -DESTDIR = $$bin_dir +DESTDIR = $$relative_path($$bin_dir) TARGET = SparrowBot TEMPLATE = app CONFIG += c++11 -LIBS += $$lib_dir/libircbot.a +LIBS += $$relative_path($$lib_dir/libircbot.a) INCLUDEPATH += ../ircbot SOURCES = main.cpp \ diff --git a/app/vocab.cpp b/app/vocab.cpp index 960e227..f120289 100644 --- a/app/vocab.cpp +++ b/app/vocab.cpp @@ -19,7 +19,7 @@ void Vocab::load(QString filename) { QFile file(filename); if(!file.exists()) - std::cerr << "can't find " << filename << std::endl; + std::cerr << "can't find " << filename.toStdString() << std::endl; else if(file.open(QIODevice::ReadOnly | QIODevice::Text)) { std::cerr << "file is open" << std::endl; diff --git a/autolaunch.sh b/autolaunch.sh index 56f16b8..87cbafe 100644 --- a/autolaunch.sh +++ b/autolaunch.sh @@ -9,7 +9,7 @@ do cd build qmake-qt5 ../SparrowBot.pro make - cd ../bin + cd bin ./SparrowBot -nogui nick=SparrowBot chan=epicsparrow server=irc.freenode.net port=6667 - cd .. + cd ../.. done diff --git a/ircbot/ircbot.pro b/ircbot/ircbot.pro index 5d94d22..342c8c6 100644 --- a/ircbot/ircbot.pro +++ b/ircbot/ircbot.pro @@ -1,6 +1,6 @@ QT += core gui network widgets -DESTDIR = $$lib_dir +DESTDIR = $$relative_path($$lib_dir) TARGET = ircbot diff --git a/lib/libircbot.a b/lib/libircbot.a deleted file mode 100644 index 22b8e63..0000000 Binary files a/lib/libircbot.a and /dev/null differ