diff --git a/application/main.cpp b/application/main.cpp index b41b5c4..648ea7e 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -8,6 +8,7 @@ #endif #include +#include #include @@ -41,10 +42,7 @@ int main(int argc, char *argv[]) cout << "Unable to parse arguments. " << ex.what() << "\nSee --help for available commands." << endl; } // set meta info for application - QCoreApplication::setOrganizationName(QStringLiteral("Martchus")); - QCoreApplication::setOrganizationDomain(QStringLiteral("http://martchus.netai.net/")); - QCoreApplication::setApplicationName(QStringLiteral("Video Downloader")); - QCoreApplication::setApplicationVersion(QStringLiteral("1.0.7")); + SET_APPLICATION_INFO; if(qtConfigArgs.areQtGuiArgsPresent()) { return QtGui::runWidgetsGui(argc, argv); } diff --git a/general.pri b/general.pri index 81b63cd..89889a6 100644 --- a/general.pri +++ b/general.pri @@ -22,6 +22,12 @@ CONFIG(debug, debug|release) { } else { TARGET = $${targetprefix}$${projectname} } +# add defines +DEFINES += "'PROJECT_NAME=\"$${projectname}\"'" +DEFINES += "'APP_NAME=\"$${appname}\"'" +DEFINES += "'APP_AUTHOR=\"$${appauthor}\"'" +DEFINES += "'APP_URL=\"$${appurl}\"'" +DEFINES += "'APP_VERSION=\"$${VERSION}\"'" # variables to check target architecture win32-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch win32-g++-32:QMAKE_TARGET.arch = x86 diff --git a/videodownloader.pro b/videodownloader.pro index 9faa9d0..2881613 100644 --- a/videodownloader.pro +++ b/videodownloader.pro @@ -1,4 +1,7 @@ projectname = videodownloader +appname = "Video Downloader" +appauthor = Martchus +appurl = "https://github.com/$${appauthor}/$${projectname}" VERSION = 1.0.7 # include ../../common.pri when building as part of a subdirs project; otherwise include general.pri