Skip to content

Commit

Permalink
nsis : skip choosing directory when updating or reinstalling
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharindam committed May 22, 2022
1 parent e7c1b56 commit a56926a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QDebug>

#define PROG_NAME "PhotoQuick"
#define PROG_VERSION "4.12.0"
#define PROG_VERSION "4.12.1"
#define COPYRIGHT_YEAR "2017-2021"
#define AUTHOR_NAME "Arindam Chaudhuri"
#define AUTHOR_EMAIL "ksharindam@gmail.com"
Expand Down
11 changes: 10 additions & 1 deletion windows/PhotoQuick.nsi
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; HM NIS Edit Wizard helper defines
!define PROG_NAME "PhotoQuick"
!define PROG_VERSION "4.12.0"
!define PROG_VERSION "4.12.1"
!define PROG_PUBLISHER "Arindamsoft"
!define PROG_ICON "photoquick.ico"
!define PROG_EXEC "photoquick.exe"
Expand Down Expand Up @@ -31,11 +31,20 @@ SetCompressor lzma
; MUI pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\LICENSE.txt"
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipDirectoryPage
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\${PROG_EXEC}"
!insertmacro MUI_PAGE_FINISH

; Skip choosing directory when updating older version
Function SkipDirectoryPage
ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" ""
${IF} $0 != ""
Abort
${EndIf}
FunctionEnd

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
Expand Down

0 comments on commit a56926a

Please sign in to comment.