diff --git a/etc/NSIS/setup.nsi b/etc/NSIS/setup.nsi index af5f55f7..1d089a87 100644 --- a/etc/NSIS/setup.nsi +++ b/etc/NSIS/setup.nsi @@ -701,11 +701,12 @@ Section "Uninstall" ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName" ${IfThen} "$R0" == "" ${|} StrCpy $R0 "LameXP.exe" ${|} + ExecWait '"$INSTDIR\$R0" --uninstall' Delete /REBOOTOK "$INSTDIR\$R0" !insertmacro CleanUpFiles /REBOOTOK RMDir "$INSTDIR" - + ; -------------- ; Registry ; -------------- diff --git a/src/Config.h b/src/Config.h index 5e6dd31f..7adcdfef 100644 --- a/src/Config.h +++ b/src/Config.h @@ -35,7 +35,7 @@ #define VER_LAMEXP_MINOR_LO 2 #define VER_LAMEXP_TYPE RC #define VER_LAMEXP_PATCH 4 -#define VER_LAMEXP_BUILD 1812 +#define VER_LAMEXP_BUILD 1815 #define VER_LAMEXP_CONFG 1700 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Main.cpp b/src/Main.cpp index 2e81ccc7..4f87b2da 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -31,6 +31,7 @@ #include "Model_FileList.h" #include "Model_AudioFile.h" #include "Encoder_Abstract.h" +#include "ShellIntegration.h" //MUitls #include @@ -196,6 +197,14 @@ static int lamexp_main(int &argc, char **argv) qDebug(" "); } + //Uninstall? + if(arguments.contains("uninstall")) + { + qWarning("Un-install: Removing LameXP shell integration..."); + ShellIntegration::remove(false); + return EXIT_SUCCESS; + } + //Detect CPU capabilities const MUtils::CPUFetaures::cpu_info_t cpuFeatures = MUtils::CPUFetaures::detect(); qDebug(" CPU vendor id : %s (Intel=%s)", cpuFeatures.vendor, MUTILS_BOOL2STR(cpuFeatures.intel)); @@ -234,12 +243,9 @@ static int lamexp_main(int &argc, char **argv) } //Kill application? - for(int i = 0; i < argc; i++) + if(arguments.contains("kill") || arguments.contains("force-kill")) { - if(arguments.contains("kill") || arguments.contains("force-kill")) - { - return EXIT_SUCCESS; - } + return EXIT_SUCCESS; } //Self-test