diff --git a/CMakeLists.txt b/CMakeLists.txt index d04702239..14bd6181a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,12 +189,11 @@ configure_file ( ) # Define some useful DEBUG for, ehrm, debug build. -string(TOLOWER CMAKE_BUILD_TYPE CMAKE_BUILD_TYPE) -if(CMAKE_BUILD_TYPE STREQUAL "release") +if(CMAKE_BUILD_TYPE STREQUAL "release" OR CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RELEASE") message(STATUS "[${APP_LOW_NAME}] A release build (non-debug) is chosen. Debugging outputs are silently ignored.") set(CMAKE_BUILD_TYPE MinSizeRel) message(STATUS "[${APP_LOW_NAME}] Output executable file is optimized for minimum size.") -else(CMAKE_BUILD_TYPE STREQUAL "release") +else(CMAKE_BUILD_TYPE STREQUAL "release" OR CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RELEASE") message(STATUS "[${APP_LOW_NAME}] A debug build is chosen.") add_definitions(-DDEBUG) set(CMAKE_BUILD_TYPE Debug) @@ -208,7 +207,7 @@ endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) # Verbose compiling outputs. set(CMAKE_VERBOSE_MAKEFILE ON) -endif(CMAKE_BUILD_TYPE STREQUAL "release") +endif(CMAKE_BUILD_TYPE STREQUAL "release" OR CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RELEASE") # Force Qt to use string builders. add_definitions(-DQT_USE_QSTRINGBUILDER) @@ -519,6 +518,9 @@ if(WIN32) resources/binaries/windows/deployment/qt4-msvc2010/QtWebKit4.dll resources/binaries/windows/deployment/qt4-msvc2010/QtXml4.dll resources/binaries/windows/deployment/qt4-msvc2010/ssleay32.dll + resources/binaries/windows/deployment/qt4-msvc2010/libintl.dll + resources/binaries/windows/deployment/qt4-msvc2010/libmysql.dll + resources/binaries/windows/deployment/qt4-msvc2010/libpq.dll ) set(APP_DLLS_QT4_MSVC2010_IMAGEFORMATS @@ -530,6 +532,12 @@ if(WIN32) resources/binaries/windows/deployment/qt4-msvc2010/imageformats/qtga4.dll resources/binaries/windows/deployment/qt4-msvc2010/imageformats/qtiff4.dll ) + + set(APP_DLLS_QT4_MSVC2010_SQLDRIVERS + resources/binaries/windows/deployment/qt4-msvc2010/sqldrivers/qsqlite4.dll + resources/binaries/windows/deployment/qt4-msvc2010/sqldrivers/qsqlmysql4.dll + resources/binaries/windows/deployment/qt4-msvc2010/sqldrivers/qsqlpsql4.dll + ) endif(WIN32) # Setup source & header files for "rssguard_updater". @@ -694,6 +702,8 @@ if(WIN32 OR OS2) DESTINATION ./) install(FILES ${APP_DLLS_QT4_MSVC2010_IMAGEFORMATS} DESTINATION ./imageformats) + install(FILES ${APP_DLLS_QT4_MSVC2010_SQLDRIVERS} + DESTINATION ./sqldrivers) install(FILES ${APP_DLLS_QT4_MSVC2010} DESTINATION ./${UPDATER_SUBFOLDER}) diff --git a/resources/binaries/windows/deployment/qt4-msvc2010/QtCore4.dll b/resources/binaries/windows/deployment/qt4-msvc2010/QtCore4.dll index 56077683e..6837718cd 100755 Binary files a/resources/binaries/windows/deployment/qt4-msvc2010/QtCore4.dll and b/resources/binaries/windows/deployment/qt4-msvc2010/QtCore4.dll differ diff --git a/resources/binaries/windows/deployment/qt4-msvc2010/QtGui4.dll b/resources/binaries/windows/deployment/qt4-msvc2010/QtGui4.dll index 21b125553..ec4c78400 100755 Binary files a/resources/binaries/windows/deployment/qt4-msvc2010/QtGui4.dll and b/resources/binaries/windows/deployment/qt4-msvc2010/QtGui4.dll differ diff --git a/resources/binaries/windows/deployment/qt4-msvc2010/QtNetwork4.dll b/resources/binaries/windows/deployment/qt4-msvc2010/QtNetwork4.dll index 3d4ba3e33..cfda99325 100755 Binary files a/resources/binaries/windows/deployment/qt4-msvc2010/QtNetwork4.dll and b/resources/binaries/windows/deployment/qt4-msvc2010/QtNetwork4.dll differ diff --git a/resources/binaries/windows/deployment/qt4-msvc2010/QtSql4.dll b/resources/binaries/windows/deployment/qt4-msvc2010/QtSql4.dll index 83b86239a..f1a4ac642 100755 Binary files a/resources/binaries/windows/deployment/qt4-msvc2010/QtSql4.dll and b/resources/binaries/windows/deployment/qt4-msvc2010/QtSql4.dll differ diff --git a/resources/binaries/windows/deployment/qt4-msvc2010/QtWebKit4.dll b/resources/binaries/windows/deployment/qt4-msvc2010/QtWebKit4.dll index 160aadf2e..52857e709 100755 Binary files a/resources/binaries/windows/deployment/qt4-msvc2010/QtWebKit4.dll and b/resources/binaries/windows/deployment/qt4-msvc2010/QtWebKit4.dll differ diff --git a/resources/binaries/windows/deployment/qt4-msvc2010/QtXml4.dll b/resources/binaries/windows/deployment/qt4-msvc2010/QtXml4.dll index 90b35da81..674a10b3d 100755 Binary files a/resources/binaries/windows/deployment/qt4-msvc2010/QtXml4.dll and b/resources/binaries/windows/deployment/qt4-msvc2010/QtXml4.dll differ diff --git a/src/gui/formupdate.cpp b/src/gui/formupdate.cpp index 9042cd281..60f8f04a6 100755 --- a/src/gui/formupdate.cpp +++ b/src/gui/formupdate.cpp @@ -89,7 +89,7 @@ void FormUpdate::checkForUpdates() { m_ui->m_lblAvailableRelease->setText(update.first.m_availableVersion); m_ui->m_txtChanges->setText(update.first.m_changes); - if (update.first.m_availableVersion > APP_VERSION) { + if (update.first.m_availableVersion != APP_VERSION) { m_ui->m_lblStatus->setStatus(WidgetWithStatus::Ok, tr("New release available."), tr("This is new version which can be\ndownloaded and installed.")); @@ -140,7 +140,7 @@ void FormUpdate::saveUpdateFile(const QByteArray &file_contents) { if (output_file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { qDebug("Storing update file to temporary location '%s'.", - qPrintable(output_file_name)); + qPrintable(QDir::toNativeSeparators(output_file.fileName()))); output_file.write(file_contents); output_file.flush(); diff --git a/src/miscellaneous/iconfactory.cpp b/src/miscellaneous/iconfactory.cpp index b24deb64d..aae749562 100644 --- a/src/miscellaneous/iconfactory.cpp +++ b/src/miscellaneous/iconfactory.cpp @@ -68,8 +68,9 @@ IconFactory *IconFactory::instance() { void IconFactory::setupSearchPaths() { QIcon::setThemeSearchPaths(QStringList() << APP_THEME_PATH); qDebug("Available icon theme paths: %s.", - qPrintable(QIcon::themeSearchPaths().replaceInStrings(QRegExp("^|$"), - "\'").join(", "))); + qPrintable(QIcon::themeSearchPaths() + .replaceInStrings(QRegExp("^|$"), "\'") + .replaceInStrings(QRegExp("/"), QDir::separator()).join(", "))); } void IconFactory::setCurrentIconTheme(const QString &theme_name) { diff --git a/src/miscellaneous/iofactory.cpp b/src/miscellaneous/iofactory.cpp index 7f448825a..95cac144f 100755 --- a/src/miscellaneous/iofactory.cpp +++ b/src/miscellaneous/iofactory.cpp @@ -26,8 +26,8 @@ IOFactory::IOFactory() { } bool IOFactory::removeDirectory(const QString& directory_name, - const QStringList& exception_file_list, - const QStringList& exception_folder_list) { + const QStringList& exception_file_list, + const QStringList& exception_folder_list) { bool result = true; QDir dir(directory_name); @@ -37,34 +37,48 @@ bool IOFactory::removeDirectory(const QString& directory_name, QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst)) { if (info.isDir()) { if (!exception_folder_list.contains(info.fileName())) { - result &= removeDirectory(info.absoluteFilePath(), exception_file_list); + result &= removeDirectory(info.absoluteFilePath(), exception_file_list, exception_folder_list); } } else if (!exception_file_list.contains(info.fileName())) { - result &= QFile::remove(info.absoluteFilePath()); + if (!QFile::remove(info.absoluteFilePath())) { + result &= false; + qDebug("Failed to remove file \'%s\'.", qPrintable(QDir::toNativeSeparators(info.absoluteFilePath()))); + } + else { + result &= true; + } } } - result &= dir.rmdir(directory_name); + if (dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files).isEmpty()) { + result &= dir.rmdir(directory_name); + } } return result; } bool IOFactory::copyDirectory(QString source, QString destination) { - QDir dir(source); + QDir dir_source(source); - if (!dir.exists()) { + if (!dir_source.exists()) { return false; } - foreach (QString d, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { + QDir dir_destination(destination); + + if (!dir_destination.exists()) { + dir_destination.mkpath(destination); + } + + foreach (QString d, dir_source.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { QString dst_path = destination + QDir::separator() + d; - dir.mkpath(dst_path); + dir_source.mkpath(dst_path); copyDirectory(source + QDir::separator() + d, dst_path); } - foreach (QString f, dir.entryList(QDir::Files)) { + foreach (QString f, dir_source.entryList(QDir::Files)) { QString original_file = source + QDir::separator() + f; QString destination_file = destination + QDir::separator() + f;