From 43ea93ffb4ac3ebb290bf5f67b6f86d21acd51a1 Mon Sep 17 00:00:00 2001 From: Bart K Date: Sun, 1 Apr 2012 02:41:50 -0400 Subject: [PATCH 1/5] Added Win32 Nullsoft Installer Script --- keyfinder.nsi | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 keyfinder.nsi diff --git a/keyfinder.nsi b/keyfinder.nsi new file mode 100644 index 0000000..05699b1 --- /dev/null +++ b/keyfinder.nsi @@ -0,0 +1,115 @@ +; keyfinder.nsi +; +; This script is based on example1.nsi, but it remember the directory, +; has uninstall support and (optionally) installs start menu shortcuts. +; +; It will install example2.nsi into a directory that the user selects, + +;-------------------------------- + +; The name of the installer +Name "KeyFinder" + +; The file to write +OutFile "KeyFinder-0.15.exe" + +; The default installation directory +InstallDir $PROGRAMFILES\KeyFinder + +; Registry key to check for directory (so if you install again, it will +; overwrite the old one automatically) +InstallDirRegKey HKLM "Software\KeyFinder" "Install_Dir" + +; Request application privileges for Windows Vista +RequestExecutionLevel admin + +;-------------------------------- + +; Pages + +Page components +Page directory +Page instfiles + +UninstPage uninstConfirm +UninstPage instfiles + +;-------------------------------- + +; The stuff to install +Section "KeyFinder (required)" + + SectionIn RO + + ; Set output path to the installation directory. + SetOutPath $INSTDIR + + ; Put file there + File "avcodec-53.dll" + File "avformat-53.dll" + File "avutil-51.dll" + File "COPYING.txt" + File "KeyFinder.exe" + File "keyfinder0.dll" + File "libfftw3-3.dll" + File "libgcc_s_dw2-1.dll" + File "libsamplerate-0.dll" + File "libtag.dll" + File "mingwm10.dll" + File "QtCore4.dll" + File "QtGui4.dll" + File "QtNetwork4.dll" + File "QtXmlPatterns4.dll" + File "vcredist_x86.exe" + + ExecWait '"$INSTDIR\vcredist_x86" /passive /norestart' + + ; Write the installation path into the registry + WriteRegStr HKLM SOFTWARE\KeyFinder "Install_Dir" "$INSTDIR" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\KeyFinder" "DisplayName" "KeyFinder" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\KeyFinder" "UninstallString" '"$INSTDIR\uninstall.exe"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\KeyFinder" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\KeyFinder" "NoRepair" 1 + WriteUninstaller "uninstall.exe" + +SectionEnd + +; Optional section (can be disabled by the user) +Section "Start Menu Shortcuts" + + CreateDirectory "$SMPROGRAMS\KeyFinder" + CreateShortCut "$SMPROGRAMS\KeyFinder\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 + CreateShortCut "$SMPROGRAMS\KeyFinder\KeyFinder.lnk" "$INSTDIR\KeyFinder.exe" "" "$INSTDIR\KeyFinder.exe" 0 + +SectionEnd + +; Optional section (can be disabled by the user) +Section "Desktop Shortcut" + + CreateShortCut "$DESKTOP\KeyFinder.lnk" "$INSTDIR\KeyFinder.exe" "" "$INSTDIR\KeyFinder.exe" 0 + +SectionEnd +;-------------------------------- + +; Uninstaller + +Section "Uninstall" + + ; Remove registry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\KeyFinder" + DeleteRegKey HKLM SOFTWARE\KeyFinder + + ; Remove files and uninstaller + Delete $INSTDIR\KeyFinder.exe + Delete $INSTDIR\uninstall.exe + + ; Remove shortcuts, if any + Delete "$SMPROGRAMS\KeyFinder\*.*" + + ; Remove directories used + RMDir "$SMPROGRAMS\KeyFinder" + RMDir "$INSTDIR" + +SectionEnd From 51bfd7a8bfb9534294c6056dd2aa7029a92f78bc Mon Sep 17 00:00:00 2001 From: Bart K Date: Sun, 1 Apr 2012 10:07:16 -0400 Subject: [PATCH 2/5] Fixed version # --- keyfinder.nsi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/keyfinder.nsi b/keyfinder.nsi index 05699b1..c38393a 100644 --- a/keyfinder.nsi +++ b/keyfinder.nsi @@ -1,9 +1,8 @@ ; keyfinder.nsi ; -; This script is based on example1.nsi, but it remember the directory, -; has uninstall support and (optionally) installs start menu shortcuts. +; This script installs KeyFinder in Program Files, remembers the directory, +; has uninstall support and (optionally) installs start menu & desktop shortcuts. ; -; It will install example2.nsi into a directory that the user selects, ;-------------------------------- @@ -11,7 +10,7 @@ Name "KeyFinder" ; The file to write -OutFile "KeyFinder-0.15.exe" +OutFile "KeyFinder-1.15.exe" ; The default installation directory InstallDir $PROGRAMFILES\KeyFinder From 508f7991931580dee10057a173b861b9a4af9304 Mon Sep 17 00:00:00 2001 From: Bart K Date: Sun, 1 Apr 2012 21:41:32 -0400 Subject: [PATCH 3/5] Modified/Removed deprecated libav calls --- decoderlibav.cpp | 2 +- main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/decoderlibav.cpp b/decoderlibav.cpp index 3790706..aff1cb8 100755 --- a/decoderlibav.cpp +++ b/decoderlibav.cpp @@ -49,7 +49,7 @@ KeyFinder::AudioData* LibAvDecoder::decodeFile(const QString& filePath){ throw KeyFinder::Exception(ss.str()); } - if(av_find_stream_info(fCtx) < 0){ + if(avformat_find_stream_info(fCtx,NULL) < 0){ throw KeyFinder::Exception("Could not find stream information"); } int audioStream = -1; diff --git a/main.cpp b/main.cpp index 322e16e..0fb586c 100644 --- a/main.cpp +++ b/main.cpp @@ -101,7 +101,7 @@ int main(int argc, char* argv[]){ QCoreApplication::setApplicationName("KeyFinder"); // libav setup - avcodec_init(); // is disraeli necessary? +// avcodec_init(); // is disraeli necessary? av_register_all(); av_log_set_level(AV_LOG_ERROR); From 262ff2b44deb72440b8a4b6b8d250cf1162c8918 Mon Sep 17 00:00:00 2001 From: Bart K Date: Sun, 1 Apr 2012 22:49:47 -0400 Subject: [PATCH 4/5] Fixed symlinks issue in Qtlibs 4.8+/Fixed title bar file count after deleting rows in table widget --- guibatch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guibatch.cpp b/guibatch.cpp index 4c2dc15..d8dc8b8 100644 --- a/guibatch.cpp +++ b/guibatch.cpp @@ -302,7 +302,7 @@ void BatchWindow::addDroppedFiles(){ // check for symlink (.isSymLink doesn't seem to work on Lion) if(fileInfo.isSymLink() || fileInfo.symLinkTarget() != ""){ - droppedFiles.push_back(QUrl(fileInfo.symLinkTarget())); + droppedFiles.push_back(QUrl::fromLocalFile(fileInfo.symLinkTarget())); continue; } @@ -637,6 +637,7 @@ void BatchWindow::deleteSelectedRows(){ } } setGuiDefaults(); + this->setWindowTitle("KeyFinder - Batch Analysis - " + QString::number(ui->tableWidget->rowCount()) + " files"); } void BatchWindow::copySelectedFromTableWidget(){ From 52ee8ad5575a97c81f80e56d045ae8b99e9a3016 Mon Sep 17 00:00:00 2001 From: Bart K Date: Mon, 2 Apr 2012 21:28:10 -0400 Subject: [PATCH 5/5] Moved versioning out of .nsi script into include file --- Version.txt | 1 + keyfinder.nsi | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Version.txt diff --git a/Version.txt b/Version.txt new file mode 100644 index 0000000..d4724bb --- /dev/null +++ b/Version.txt @@ -0,0 +1 @@ +!define Version "1.15" \ No newline at end of file diff --git a/keyfinder.nsi b/keyfinder.nsi index c38393a..baa727f 100644 --- a/keyfinder.nsi +++ b/keyfinder.nsi @@ -1,3 +1,5 @@ +!include "Version.txt" + ; keyfinder.nsi ; ; This script installs KeyFinder in Program Files, remembers the directory, @@ -7,10 +9,10 @@ ;-------------------------------- ; The name of the installer -Name "KeyFinder" +Name "KeyFinder ${VERSION}" ; The file to write -OutFile "KeyFinder-1.15.exe" +OutFile "KeyFinder-${VERSION}.exe" ; The default installation directory InstallDir $PROGRAMFILES\KeyFinder