From f0a05d01524f3c73098d720740ace33873d595ef Mon Sep 17 00:00:00 2001 From: sebdelsol Date: Wed, 27 Mar 2024 15:17:45 +0100 Subject: [PATCH] v1.4.12.44 - Fix minor bugs --- README.md | 8 +++---- build/changelog.md | 3 ++- build/update_x64.json | 6 +++--- build/update_x86.json | 6 +++--- dev/tools/nsis/template.nsi | 42 +++++++++++++++++++++++-------------- 5 files changed, 38 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 90ee145b..c677e3cb 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ [^1]: External EPG doesn't work with **local** m3u accounts. # Downloads -[](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.43/Install.Sfvip.All.1.4.12.43.x64.exe) -_by MS Defender • 1.1.24020.9 • 1.407.706.0_ +[](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.44/Install.Sfvip.All.1.4.12.44.x64.exe) +_by MS Defender • 1.1.24020.9 • 1.407.748.0_ -[](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.43/Install.Sfvip.All.1.4.12.43.x86.exe) -_by MS Defender • 1.1.24020.9 • 1.407.706.0_ +[](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.44/Install.Sfvip.All.1.4.12.44.x86.exe) +_by MS Defender • 1.1.24020.9 • 1.407.748.0_ []() diff --git a/build/changelog.md b/build/changelog.md index 106fa013..fffff308 100644 --- a/build/changelog.md +++ b/build/changelog.md @@ -1,5 +1,6 @@ ## 1.4.12.44 -* Fix minor bugs. +* Fix UI minor bug when launching several _Sfvip All_. +* Fix uninstall old version if the installation folder differs. ## 1.4.12.43 * Option to modify _Sfvip All_ install directory. diff --git a/build/update_x64.json b/build/update_x64.json index 1491c70a..cb232be4 100644 --- a/build/update_x64.json +++ b/build/update_x64.json @@ -1,5 +1,5 @@ { - "url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.43/Install.Sfvip.All.1.4.12.43.x64.exe", - "md5": "9eec25d2ee8cb6f9916143981315f85b", - "version": "1.4.12.43" + "url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.44/Install.Sfvip.All.1.4.12.44.x64.exe", + "md5": "b1b3429b82409cb7c5a427701ff0c63c", + "version": "1.4.12.44" } \ No newline at end of file diff --git a/build/update_x86.json b/build/update_x86.json index 81fd5d92..6b394156 100644 --- a/build/update_x86.json +++ b/build/update_x86.json @@ -1,5 +1,5 @@ { - "url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.43/Install.Sfvip.All.1.4.12.43.x86.exe", - "md5": "4e228bc56c4bf5b10d0d7739ae0b4fee", - "version": "1.4.12.43" + "url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.44/Install.Sfvip.All.1.4.12.44.x86.exe", + "md5": "9e35983493bc1a5247b1ba5db3d8bb00", + "version": "1.4.12.44" } \ No newline at end of file diff --git a/dev/tools/nsis/template.nsi b/dev/tools/nsis/template.nsi index df7111eb..dc339ce1 100644 --- a/dev/tools/nsis/template.nsi +++ b/dev/tools/nsis/template.nsi @@ -29,6 +29,7 @@ ShowUninstDetails hide ; install pages ; ------------- !define MUI_PAGE_CUSTOMFUNCTION_PRE "UninstallOldVersionIfNeeded" +Page Custom old.AppRunningPage old.AppRunningPageFinalize Page Custom AppRunningPage AppRunningPageFinalize !insertmacro MUI_PAGE_INSTFILES @@ -105,12 +106,18 @@ FunctionEnd {% endif %} !define PowerShell "$Windir\${System}\WindowsPowerShell\v1.0\powershell.exe" !define GetProcess "Get-Process '{{name}}' -ErrorAction SilentlyContinue" -!define CheckPath "Where-Object {$_.Path -eq '$InstDir\{{dist}}\{{name}}.exe'}" var NbAppRunning +var OldInstDir -!macro GetNbAppRunning - nsExec::ExecToStack "${PowerShell} exit (${GetProcess} | ${CheckPath}).Count" +!macro GetNbAppRunning old + ; MessageBox MB_OK "old=`${old}`" + !if `${old}` == "old." + StrCpy $0 "Where-Object {$_.Path -eq '$OldInstDir\{{dist}}\{{name}}.exe'}" + !else + StrCpy $0 "Where-Object {$_.Path -eq '$InstDir\{{dist}}\{{name}}.exe'}" + !endif + nsExec::ExecToStack "${PowerShell} exit (${GetProcess} | $0).Count" Pop $0 StrCpy $NbAppRunning $0 !macroend @@ -129,9 +136,9 @@ var NextButton EnableWindow $NextButton ${enable} !macroend -!macro AppRunningPageMacro un - Function ${un}AppRunningPage - !insertmacro GetNbAppRunning +!macro AppRunningPageMacro un old + Function ${un}${old}AppRunningPage + !insertmacro GetNbAppRunning `${old}` ${If} $NbAppRunning > 0 nsDialogs::Create 1018 ; next button @@ -150,28 +157,29 @@ var NextButton ${EndIf} FunctionEnd - Function ${un}AppRunningPageFinalize - ${NSD_CreateTimer} ${un}FlashAlreadyRunningBegin 1 - !insertmacro GetNbAppRunning + Function ${un}${old}AppRunningPageFinalize + ${NSD_CreateTimer} ${un}${old}FlashAlreadyRunningBegin 1 + !insertmacro GetNbAppRunning `${old}` ${If} $NbAppRunning > 0 Abort ; stay on the page if running ${EndIf} FunctionEnd - Function ${un}FlashAlreadyRunningBegin - ${NSD_KillTimer} ${un}FlashAlreadyRunningBegin + Function ${un}${old}FlashAlreadyRunningBegin + ${NSD_KillTimer} ${un}${old}FlashAlreadyRunningBegin !insertmacro AlreadyRunningAndNext ${LABEL_COLOR_FLASH} 0 - ${NSD_CreateTimer} ${un}FlashAlreadyRunningEnd ${FLASH_DELAY} + ${NSD_CreateTimer} ${un}${old}FlashAlreadyRunningEnd ${FLASH_DELAY} FunctionEnd - Function ${un}FlashAlreadyRunningEnd - ${NSD_KillTimer} ${un}FlashAlreadyRunningEnd + Function ${un}${old}FlashAlreadyRunningEnd + ${NSD_KillTimer} ${un}${old}FlashAlreadyRunningEnd !insertmacro AlreadyRunningAndNext ${LABEL_COLOR} 1 FunctionEnd !macroend -!insertmacro AppRunningPageMacro "" -!insertmacro AppRunningPageMacro "un." +!insertmacro AppRunningPageMacro "" "old." +!insertmacro AppRunningPageMacro "" "" +!insertmacro AppRunningPageMacro "un." "" ; ------------ ; Install Page @@ -229,6 +237,8 @@ Function SetInstDir ${Else} StrCpy $InstDir $0 ${Endif} + ; save $InstDir + StrCpy $OldInstDir $InstDir ; no directory page if /AUTOINSTDIR=yes ${GetParameters} $0 ${GetOptions} $0 "/AUTOINSTDIR=" $1