From 587c29a4da1d191c1ebf2656b8ce8a497675adf5 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Fri, 29 Apr 2016 17:51:20 +0200 Subject: [PATCH] Some installer tweaks. --- HISTORY.txt | 5 +++-- etc/setup/language/en.nsh | 1 + etc/setup/setup.nsi | 33 +++++++++++++++++++++++++-------- src/version.h | 6 +++--- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/HISTORY.txt b/HISTORY.txt index 57d27f0..4747b2f 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -2,8 +2,9 @@ Simple x264/x265 Launcher version history ----------------------------------------- -Version 2.69 [2016-04-28] -* Fixed a VapourSynth error, when Avisynth is *not* installed +Version 2.70 [2016-04-29] +* Fixed potential VapourSynth error, when Avisynth is *not* installed +* Some installer improvements Version 2.69 [2016-04-23] * Updated x264 to revision 2692 diff --git a/etc/setup/language/en.nsh b/etc/setup/language/en.nsh index 8da260a..7c1731a 100644 --- a/etc/setup/language/en.nsh +++ b/etc/setup/language/en.nsh @@ -41,3 +41,4 @@ LangString X264_LANG_LINK_UNINSTALL ${LANG_ENGLISH} "Uninstall" LangString X264_LANG_LINK_FAQ ${LANG_ENGLISH} "Frequently Asked Questions" LangString X264_LANG_LINK_MANUAL ${LANG_ENGLISH} "User Manual (Readme)" LangString X264_LANG_PRERELEASE_WARNING ${LANG_ENGLISH} "You are about to install a Demo (pre-release) version of Simple x264 Launcher!" +LangString X264_LANG_UNINST_UPDATE_MODE ${LANG_ENGLISH} "Your existing installation will be updated!" diff --git a/etc/setup/setup.nsi b/etc/setup/setup.nsi index bdbf022..c0dc496 100644 --- a/etc/setup/setup.nsi +++ b/etc/setup/setup.nsi @@ -114,6 +114,7 @@ ReserveFile "${NSISDIR}\Plugins\UserInfo.dll" ;-------------------------------- Var StartMenuFolder +Var UpdateNotificationShown ;-------------------------------- @@ -473,6 +474,19 @@ FunctionEnd RMDir /r ${options} `$INSTDIR\sources` !macroend +!macro SetControlEnabled item_id enable + FindWindow $R0 "#32770" "" $HWNDPARENT + ${IfNot} $R0 == 0 + GetDlgItem $R1 $R0 ${item_id} + EnableWindow $R1 ${enable} + ${EndIf} +!macroend + +!macro SkipToNextPage + GetDlgItem $R0 $HWNDPARENT 1 + System::Call "User32::PostMessage(i $HWNDPARENT, i ${WM_COMMAND}, i 1, i $R0)" +!macroend + ;-------------------------------- ;Install Files @@ -666,16 +680,19 @@ Function CheckForUpdate ${If} "$INSTDIR" == "" ${OrIf} "$INSTDIR" == "$EXEDIR" ${OrIfNot} ${FileExists} "$INSTDIR\x264_launcher.exe" + StrCpy $UpdateNotificationShown FALSE + !insertmacro SetControlEnabled 1019 1 + !insertmacro SetControlEnabled 1001 1 Return + ${Else} + !insertmacro SetControlEnabled 1019 0 + !insertmacro SetControlEnabled 1001 0 + ${If} "$UpdateNotificationShown" != TRUE + StrCpy $UpdateNotificationShown TRUE + MessageBox MB_ICONINFORMATION|MB_TOPMOST "$(X264_LANG_UNINST_UPDATE_MODE)" + !insertmacro SkipToNextPage + ${EndIf} ${EndIf} - - FindWindow $R0 "#32770" "" $HWNDPARENT - GetDlgItem $R1 $R0 1019 - EnableWindow $R1 0 - - FindWindow $R0 "#32770" "" $HWNDPARENT - GetDlgItem $R1 $R0 1001 - EnableWindow $R1 0 FunctionEnd Function un.CheckForcedUninstall diff --git a/src/version.h b/src/version.h index fe13c9a..e55ab3a 100644 --- a/src/version.h +++ b/src/version.h @@ -24,9 +24,9 @@ #endif #define VER_X264_MAJOR 2 -#define VER_X264_MINOR 6 -#define VER_X264_PATCH 9 -#define VER_X264_BUILD 1025 +#define VER_X264_MINOR 7 +#define VER_X264_PATCH 0 +#define VER_X264_BUILD 1026 #define VER_X264_PORTABLE_EDITION (0)