Skip to content

Commit 2547cc1

Browse files
Merge pull request #347 from g-maxime/sign
Export uninstaller for signing
2 parents 0cda544 + 027bea8 commit 2547cc1

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

Source/Install/BWF_MetaEdit_GUI_Windows_i386.nsi

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ SetCompressor /FINAL /SOLID lzma
2525
!define MUI_ABORTWARNING
2626
!define MUI_ICON "..\..\Source\Resource\Image\Logo\Logo.ico"
2727

28+
; Uninstaller signing
29+
!ifdef EXPORT_UNINST
30+
!uninstfinalize 'copy /Y "%1" "../../Release/BWFMetaEdit_GUI_${PRODUCT_VERSION}_Windows_i386-uninst.exe"'
31+
!endif
32+
2833
; Language Selection Dialog Settings
2934
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
3035
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
@@ -105,7 +110,11 @@ Section "SectionPrincipale" SEC01
105110
SectionEnd
106111

107112
Section -Post
108-
WriteUninstaller "$INSTDIR\uninst.exe"
113+
!if /FileExists "..\..\Release\BWFMetaEdit_GUI_${PRODUCT_VERSION}_Windows_i386-uninst.exe"
114+
File "/oname=$INSTDIR\uninst.exe" "..\..\Release\BWFMetaEdit_GUI_${PRODUCT_VERSION}_Windows_i386-uninst.exe"
115+
!else
116+
WriteUninstaller "$INSTDIR\uninst.exe"
117+
!endif
109118
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\${PRODUCT_NAME_EXE}"
110119
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
111120
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"

Source/Install/BWF_MetaEdit_GUI_Windows_x64.nsi

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ SetCompressor /FINAL /SOLID lzma
2525
!define MUI_ABORTWARNING
2626
!define MUI_ICON "..\..\Source\Resource\Image\Logo\Logo.ico"
2727

28+
; Uninstaller signing
29+
!ifdef EXPORT_UNINST
30+
!uninstfinalize 'copy /Y "%1" "../../Release/BWFMetaEdit_GUI_${PRODUCT_VERSION}_Windows_x64-uninst.exe"'
31+
!endif
32+
2833
; Language Selection Dialog Settings
2934
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
3035
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
@@ -104,7 +109,11 @@ Section "SectionPrincipale" SEC01
104109
SectionEnd
105110

106111
Section -Post
107-
WriteUninstaller "$INSTDIR\uninst.exe"
112+
!if /FileExists "..\..\Release\BWFMetaEdit_GUI_${PRODUCT_VERSION}_Windows_x64-uninst.exe"
113+
File "/oname=$INSTDIR\uninst.exe" "..\..\Release\BWFMetaEdit_GUI_${PRODUCT_VERSION}_Windows_x64-uninst.exe"
114+
!else
115+
WriteUninstaller "$INSTDIR\uninst.exe"
116+
!endif
108117
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\${PRODUCT_NAME_EXE}"
109118
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
110119
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"

0 commit comments

Comments
 (0)