diff --git a/doc/Changelog.html b/doc/Changelog.html index 3553b166..a493a643 100644 --- a/doc/Changelog.html +++ b/doc/Changelog.html @@ -24,7 +24,7 @@ a:visited { color: #0000EE; }
  • Added a button to modify the current output folder path in an edit box
  • Updated Qt runtime libraries to v4.8.0 (2011-12-15), compiled with MSVC 10.0
  • Updated LAME encoder to v3.99.5 Final (2012-02-28), compiled with ICL 12.1.7 and MSVC 10.0 (details) -
  • Updated MediaInfo to v0.7.54 (2012-03-13), compiled with ICL 12.1.7 and MSVC 10.0 +
  • Updated MediaInfo to v0.7.55 (2012-04-05), compiled with ICL 12.1.7 and MSVC 10.0
  • Updated SoX to to v14.4.0 (2012-03-04), compiled with ICL 12.1.7 and MSVC 10.0
  • Updated mpg123 decoder to v1.13.6 (2011-03-11), compiled with GCC 4.6.1
  • Updated Monkey's Audio binary to v4.11 (2011-04-20) diff --git a/res/Icons.qrc b/res/Icons.qrc index 4eebdc4e..d8320fef 100644 --- a/res/Icons.qrc +++ b/res/Icons.qrc @@ -63,6 +63,7 @@ icons/folder_table.png icons/font.png icons/group.png + icons/heart.png icons/house.png icons/hourglass.png icons/information.png diff --git a/res/tools/mediainfo.i386.exe b/res/tools/mediainfo.i386.exe index 1b1ff97b..3236d55b 100644 Binary files a/res/tools/mediainfo.i386.exe and b/res/tools/mediainfo.i386.exe differ diff --git a/res/tools/mediainfo.x64.exe b/res/tools/mediainfo.x64.exe index a8d33dce..0104a8e9 100644 Binary files a/res/tools/mediainfo.x64.exe and b/res/tools/mediainfo.x64.exe differ diff --git a/src/Config.h b/src/Config.h index 71a2fbba..7a71d6ae 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 14 -#define VER_LAMEXP_BUILD 958 +#define VER_LAMEXP_BUILD 965 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Dialog_SplashScreen.cpp b/src/Dialog_SplashScreen.cpp index 9620cc47..42bb0633 100644 --- a/src/Dialog_SplashScreen.cpp +++ b/src/Dialog_SplashScreen.cpp @@ -30,8 +30,10 @@ #include "WinSevenTaskbar.h" -#define FADE_DELAY 4 -#define THREAD_RUNNING(THRD) (((THRD)->isRunning()) ? (!((THRD)->wait(16))) : false) +#define FADE_DELAY 16 +#define OPACITY_DELTA 0.02 + +#define THREAD_RUNNING(THRD) (((THRD)->isRunning()) ? (!((THRD)->wait(50))) : false) //////////////////////////////////////////////////////////// // Constructor @@ -76,7 +78,8 @@ SplashScreen::~SplashScreen(void) void SplashScreen::showSplash(QThread *thread) { - double opacity = 0.0; + double opacity = OPACITY_DELTA; + const int opacitySteps = qRound(1.0 / OPACITY_DELTA); SplashScreen *splashScreen = new SplashScreen(); //Show splash @@ -85,9 +88,9 @@ void SplashScreen::showSplash(QThread *thread) splashScreen->show(); //Wait for window to show - QApplication::processEvents(); - Sleep(100); - QApplication::processEvents(); + QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); + splashScreen->repaint(); + QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); //Setup the event loop QEventLoop *loop = new QEventLoop(splashScreen); @@ -99,17 +102,17 @@ void SplashScreen::showSplash(QThread *thread) connect(timer, SIGNAL(timeout()), loop, SLOT(quit())); //Start thread - QApplication::processEvents(); + QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); thread->start(); - QApplication::processEvents(); + QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); //Init taskbar WinSevenTaskbar::setTaskbarState(splashScreen, WinSevenTaskbar::WinSevenTaskbarIndeterminateState); //Fade in - for(int i = 0; i <= 100; i++) + for(int i = 1; i <= opacitySteps; i++) { - opacity = 0.01 * static_cast(i); + opacity = OPACITY_DELTA * static_cast(i); splashScreen->setWindowOpacity(opacity); QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, FADE_DELAY); Sleep(FADE_DELAY); @@ -135,9 +138,9 @@ void SplashScreen::showSplash(QThread *thread) timer->stop(); //Fade out - for(int i = 100; i >= 0; i--) + for(int i = opacitySteps; i >= 0; i--) { - opacity = 0.01 * static_cast(i); + opacity = OPACITY_DELTA * static_cast(i); splashScreen->setWindowOpacity(opacity); QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, FADE_DELAY); Sleep(FADE_DELAY); diff --git a/src/Global.cpp b/src/Global.cpp index 8912334f..ba1f0734 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -133,9 +133,9 @@ static bool g_lamexp_console_attached = false; #if (__INTEL_COMPILER >= 1200) static const char *g_lamexp_version_compiler = "ICL 12.x"; #elif (__INTEL_COMPILER >= 1100) - static const char *g_lamexp_version_compiler = = "ICL 11.x"; + static const char *g_lamexp_version_compiler = "ICL 11.x"; #elif (__INTEL_COMPILER >= 1000) - static const char *g_lamexp_version_compiler = = "ICL 10.x"; + static const char *g_lamexp_version_compiler = "ICL 10.x"; #else #error Compiler is not supported! #endif diff --git a/src/Global.h b/src/Global.h index 2306f440..cef0932d 100644 --- a/src/Global.h +++ b/src/Global.h @@ -180,7 +180,7 @@ SIZE_T lamexp_dbg_private_bytes(void); #endif //Memory check -#if defined(_DEBUG) +#if LAMEXP_DEBUG #define LAMEXP_MEMORY_CHECK(FUNC, RETV, ...) \ { \ SIZE_T _privateBytesBefore = lamexp_dbg_private_bytes(); \ @@ -188,17 +188,16 @@ SIZE_T lamexp_dbg_private_bytes(void); SIZE_T _privateBytesLeak = (lamexp_dbg_private_bytes() - _privateBytesBefore) / 1024; \ if(_privateBytesLeak > 0) { \ char _buffer[128]; \ - qWarning("LameXP Memory Leak: Lost %u KiloBytes.", _privateBytesLeak); \ - _snprintf_s(_buffer, 128, _TRUNCATE, "Memory leak: Lost %u KiloBytes.\n", _privateBytesLeak); \ + _snprintf_s(_buffer, 128, _TRUNCATE, "Memory leak: Lost %u KiloBytes of PrivateUsage memory.\n", _privateBytesLeak); \ OutputDebugStringA("----------\n"); \ OutputDebugStringA(_buffer); \ OutputDebugStringA("----------\n"); \ } \ } #else -#define LAMEXP_MEMORY_CHECK(FUNC, RETV, ...) \ +#define LAMEXP_MEMORY_CHECK(FUNC, RETV, ...) \ { \ - RETV = FUNC(__VA_ARGS__); \ + RETV = __noop(__VA_ARGS__); \ } #endif diff --git a/src/Main.cpp b/src/Main.cpp index 0b58ac91..f40b6ce6 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -205,7 +205,7 @@ static int _main(int argc, char* argv[]) { int iResult = -1; qInstallMsgHandler(lamexp_message_handler); - LAMEXP_MEMORY_CHECK(lamexp_main, iResult, argc, argv); + iResult = lamexp_main(argc, argv); lamexp_finalization(); return iResult; } @@ -250,7 +250,9 @@ int main(int argc, char* argv[]) { if(LAMEXP_DEBUG) { - return _main(argc, argv); + int exit_code = -1; + LAMEXP_MEMORY_CHECK(_main, exit_code, argc, argv); + return exit_code; } else { diff --git a/src/Model_FileSystem.cpp b/src/Model_FileSystem.cpp index 507967e5..3c71e7d8 100644 --- a/src/Model_FileSystem.cpp +++ b/src/Model_FileSystem.cpp @@ -55,6 +55,7 @@ private: const QIcon m_musicIcon; const QIcon m_moviesIcon; const QIcon m_picturesIcon; + const QIcon m_heartIcon; const QIcon m_emptyIcon; const QString m_folderType; const QString m_emptyType; @@ -63,6 +64,7 @@ private: const QString m_musicDir; const QString m_moviesDir; const QString m_picturesDir; + const QString m_installDir; }; QFileIconProviderEx::QFileIconProviderEx() @@ -77,11 +79,13 @@ QFileIconProviderEx::QFileIconProviderEx() m_musicIcon(":/icons/music.png"), m_moviesIcon(":/icons/film.png"), m_picturesIcon(":/icons/picture.png"), + m_heartIcon(":/icons/heart.png"), m_homeDir(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::HomeLocation))), m_desktopDir(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation))), m_musicDir(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MusicLocation))), m_moviesDir(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation))), m_picturesDir(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::PicturesLocation))), + m_installDir(QDir::fromNativeSeparators(qApp->applicationDirPath())), m_folderType("Folder") { /* Nothing to do! */ @@ -111,29 +115,37 @@ QIcon QFileIconProviderEx::icon(const QFileInfo &info) const break; } } - else if(!info.filePath().compare(m_homeDir, Qt::CaseInsensitive)) - { - return m_homeIcon; - } - else if(!info.filePath().compare(m_desktopDir, Qt::CaseInsensitive)) - { - return m_desktopIcon; - } - else if(!info.filePath().compare(m_musicDir, Qt::CaseInsensitive)) - { - return m_musicIcon; - } - else if(!info.filePath().compare(m_moviesDir, Qt::CaseInsensitive)) - { - return m_moviesIcon; - } - else if(!info.filePath().compare(m_picturesDir, Qt::CaseInsensitive)) - { - return m_picturesIcon; - } else { - return m_folderIcon; + const QString filePath = info.filePath(); + if(m_homeDir.compare(filePath, Qt::CaseInsensitive) == 0) + { + return m_homeIcon; + } + else if(m_desktopDir.compare(filePath, Qt::CaseInsensitive) == 0) + { + return m_desktopIcon; + } + else if(m_musicDir.compare(filePath, Qt::CaseInsensitive) == 0) + { + return m_musicIcon; + } + else if(m_moviesDir.compare(filePath, Qt::CaseInsensitive) == 0) + { + return m_moviesIcon; + } + else if(m_picturesDir.compare(filePath, Qt::CaseInsensitive) == 0) + { + return m_picturesIcon; + } + else if(m_installDir.compare(filePath, Qt::CaseInsensitive) == 0) + { + return m_heartIcon; + } + else + { + return m_folderIcon; + } } } diff --git a/src/Thread_Initialization.cpp b/src/Thread_Initialization.cpp index fe91df70..bda7be99 100644 --- a/src/Thread_Initialization.cpp +++ b/src/Thread_Initialization.cpp @@ -160,7 +160,7 @@ void InitializationThread::run() else { qDebug("Extracting file: %s -> %s", toolName.toLatin1().constData(), toolShortName.toLatin1().constData()); - LockedFile *lockedFile = new LockedFile(QString(":/tools/%1").arg(toolName), QString("%1/tool_%2").arg(lamexp_temp_folder2(), toolShortName), toolHash); + LockedFile *lockedFile = new LockedFile(QString(":/tools/%1").arg(toolName), QString("%1/lamexp_%2").arg(lamexp_temp_folder2(), toolShortName), toolHash); lamexp_register_tool(toolShortName, lockedFile, toolVersion); } } diff --git a/src/Tools.h b/src/Tools.h index 9e740c40..8c41c6b8 100644 --- a/src/Tools.h +++ b/src/Tools.h @@ -65,8 +65,8 @@ g_lamexp_tools[] = {"3fd15a6b5b0120794650f1dcd0c35f147cc21576e78f17425288bfacbad0b14696186739", CPU_TYPE_ALL_GEN, "lame.i386.exe", 3995}, {"069a79d843939a65d8578f51b6acd09de95d44362c6a9c74e92a6e73ba40aea07916f7c4", CPU_TYPE_ALL_SSE, "lame.sse2.exe", 3995}, {"d4d806fc3d0a36ef357ea43b870c7e46de9c18be9920f451314d72d02ba0fe4f7c867d9c", CPU_TYPE_ALL_ALL, "mac.exe", 411}, - {"0b50589bc45d28d14c1fa1d0ef10865279e7654eac2fbd1567d0433d218bb488c0b1bd2e", CPU_TYPE_X86_ALL, "mediainfo.i386.exe", 754}, - {"645ed56d2ac7b05340b29355f6574defcaffcf420ae00d756414ef7c9fe4bb16933f3a52", CPU_TYPE_X64_ALL, "mediainfo.x64.exe", 754}, + {"99d7dcb6e89679475d7c706c351af4c5646fa6a9d25ec131f57edeefa702a076f77c6f36", CPU_TYPE_X86_ALL, "mediainfo.i386.exe", 755}, + {"12ac3b9192aceec26377055a05d8092d8d4d17d41d0c1c515d91d3a75377b6a8de9d8f29", CPU_TYPE_X64_ALL, "mediainfo.x64.exe", 755}, {"ed49bfeb5113e8eca4f2f5c5c9359f6edeecf457cff8511178902c7d792380eaa578d9bc", CPU_TYPE_ALL_ALL, "mpcdec.exe", 475}, {"92270272726faa229c48b12e3b45b7fa8083c720cf18997254cf0154935902ab5b76a7d3", CPU_TYPE_ALL_ALL, "mpg123.exe", 1136}, {"0c781805dda931c529bd16069215f616a7a4c5e5c2dfb6b75fe85d52b20511830693e528", CPU_TYPE_ALL_ALL, "oggdec.exe", UINT_MAX},