mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
512aba9d58
8563341714a1ec452dd3304a39dd880face49c84 Bugfix: NSIS: Exclude Makefile* from docs (Luke Dashjr) Pull request description: Otherwise, the generated Makefile is included in the NSIS-installed documentation, which can lead to non-determinism (eg, if gawk is installed on some build VMs, but others only have mawk) (gawk is part of the standard Ubuntu bionic server install, but for some reason missing on many other developers' build VMs.) (Branch is safe to merge cleanly into 0.14-0.17 branches also) Testing requested. I have a separate `fix_nsis_makefile` branch directly on the `v0.17.0rc1` tag, which produces for me (with gawk installed): ``` f2f0e81e053f6bb59f3007a182e3e8b5cc4ccd374cfee29c80861d00c508a798 bitcoin-0.17.0-win-unsigned.tar.gz 935d4ef25e9602352833bbd594003a7b07ef9e2281fa9a2258c0f71167bdaaca bitcoin-0.17.0-win32-debug.zip 37a789993f4fef6007633a988614f8008389463ded6807c1beaaf3c04212d5f9 bitcoin-0.17.0-win32-setup-unsigned.exe 8b04d4d7de3d4308bff5f2e61bb771926dd66fa815fcea1eadc8d627f0f8970a bitcoin-0.17.0-win32.zip 8883dad775c2b97085b2217175e9916a9aa894ff97fbdc9b7ca74b4e8206298d bitcoin-0.17.0-win64-debug.zip cd30d3eb2b739f6e4956c768ea4fb0230fb23e01dcad094d2fbf4efa6c7dad52 bitcoin-0.17.0-win64-setup-unsigned.exe 817d5b9df4cc3f7fd323e134ed8670787aa9cafc921e883bbbb9cdfb439b03da bitcoin-0.17.0-win64.zip e3ed7f2d4a5993e4c343e967cfa838c6314fa98900c43519572a31b96d3e00ca src/bitcoin-0.17.0.tar.gz 38d2f92cf2c9823ea3c52aaa9c42f7cb38a87a12896a89379bfc4315a04d2e92 bitcoin-win-0.17-res.yml ``` Tree-SHA512: dda68a765e3e682f7b4352a8ec6942559eb6a29c740d6bd1008c788e3e50f44fd2d157100616cc7aaffc2568640ec6a74fb063a29645cd02ba14a0828ab6f01c
179 lines
6.9 KiB
Plaintext
179 lines
6.9 KiB
Plaintext
Name "@PACKAGE_NAME@ (@WINDOWS_BITS@-bit)"
|
|
|
|
RequestExecutionLevel highest
|
|
SetCompressor /SOLID lzma
|
|
|
|
# General Symbol Definitions
|
|
!define REGKEY "SOFTWARE\$(^Name)"
|
|
!define VERSION @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@
|
|
!define COMPANY "@PACKAGE_NAME@ project"
|
|
!define URL @PACKAGE_URL@
|
|
|
|
# MUI Symbol Definitions
|
|
!define MUI_ICON "@abs_top_srcdir@/share/pixmaps/bitcoin.ico"
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
|
|
!define MUI_HEADERIMAGE
|
|
!define MUI_HEADERIMAGE_RIGHT
|
|
!define MUI_HEADERIMAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-header.bmp"
|
|
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
|
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
|
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
|
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "@PACKAGE_NAME@"
|
|
!define MUI_FINISHPAGE_RUN "$WINDIR\explorer.exe"
|
|
!define MUI_FINISHPAGE_RUN_PARAMETERS $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
|
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
|
|
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
|
|
|
# Included files
|
|
!include Sections.nsh
|
|
!include MUI2.nsh
|
|
!if "@WINDOWS_BITS@" == "64"
|
|
!include x64.nsh
|
|
!endif
|
|
|
|
# Variables
|
|
Var StartMenuGroup
|
|
|
|
# Installer pages
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
!insertmacro MUI_PAGE_FINISH
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
# Installer languages
|
|
!insertmacro MUI_LANGUAGE English
|
|
|
|
# Installer attributes
|
|
OutFile @abs_top_srcdir@/@PACKAGE_TARNAME@-${VERSION}-win@WINDOWS_BITS@-setup.exe
|
|
!if "@WINDOWS_BITS@" == "64"
|
|
InstallDir $PROGRAMFILES64\DashCore
|
|
!else
|
|
InstallDir $PROGRAMFILES\DashCore
|
|
!endif
|
|
CRCCheck on
|
|
XPStyle on
|
|
BrandingText " "
|
|
ShowInstDetails show
|
|
VIProductVersion ${VERSION}.@CLIENT_VERSION_BUILD@
|
|
VIAddVersionKey ProductName "@PACKAGE_NAME@"
|
|
VIAddVersionKey ProductVersion "${VERSION}"
|
|
VIAddVersionKey CompanyName "${COMPANY}"
|
|
VIAddVersionKey CompanyWebsite "${URL}"
|
|
VIAddVersionKey FileVersion "${VERSION}"
|
|
VIAddVersionKey FileDescription ""
|
|
VIAddVersionKey LegalCopyright ""
|
|
InstallDirRegKey HKCU "${REGKEY}" Path
|
|
ShowUninstDetails show
|
|
|
|
# Installer sections
|
|
Section -Main SEC0000
|
|
SetOutPath $INSTDIR
|
|
SetOverwrite on
|
|
File @abs_top_srcdir@/release/@BITCOIN_GUI_NAME@@EXEEXT@
|
|
File /oname=COPYING.txt @abs_top_srcdir@/COPYING
|
|
File /oname=readme.txt @abs_top_srcdir@/doc/README_windows.txt
|
|
SetOutPath $INSTDIR\daemon
|
|
File @abs_top_srcdir@/release/@BITCOIN_DAEMON_NAME@@EXEEXT@
|
|
File @abs_top_srcdir@/release/@BITCOIN_CLI_NAME@@EXEEXT@
|
|
SetOutPath $INSTDIR\doc
|
|
File /r /x Makefile* @abs_top_srcdir@/doc\*.*
|
|
SetOutPath $INSTDIR
|
|
WriteRegStr HKCU "${REGKEY}\Components" Main 1
|
|
SectionEnd
|
|
|
|
Section -post SEC0001
|
|
WriteRegStr HKCU "${REGKEY}" Path $INSTDIR
|
|
SetOutPath $INSTDIR
|
|
WriteUninstaller $INSTDIR\uninstall.exe
|
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
CreateDirectory $SMPROGRAMS\$StartMenuGroup
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\@PACKAGE_NAME@ (testnet, @WINDOWS_BITS@-bit).lnk" "$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" "-testnet" "$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" 1
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
|
|
!insertmacro MUI_STARTMENU_WRITE_END
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
|
|
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
|
|
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
|
|
WriteRegStr HKCR "@PACKAGE_TARNAME@" "URL Protocol" ""
|
|
WriteRegStr HKCR "@PACKAGE_TARNAME@" "" "URL:Dash"
|
|
WriteRegStr HKCR "@PACKAGE_TARNAME@\DefaultIcon" "" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
|
|
WriteRegStr HKCR "@PACKAGE_TARNAME@\shell\open\command" "" '"$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" "%1"'
|
|
SectionEnd
|
|
|
|
# Macro for selecting uninstaller sections
|
|
!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
|
|
Push $R0
|
|
ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}"
|
|
StrCmp $R0 1 0 next${UNSECTION_ID}
|
|
!insertmacro SelectSection "${UNSECTION_ID}"
|
|
GoTo done${UNSECTION_ID}
|
|
next${UNSECTION_ID}:
|
|
!insertmacro UnselectSection "${UNSECTION_ID}"
|
|
done${UNSECTION_ID}:
|
|
Pop $R0
|
|
!macroend
|
|
|
|
# Uninstaller sections
|
|
Section /o -un.Main UNSEC0000
|
|
Delete /REBOOTOK $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
|
|
Delete /REBOOTOK $INSTDIR\COPYING.txt
|
|
Delete /REBOOTOK $INSTDIR\readme.txt
|
|
RMDir /r /REBOOTOK $INSTDIR\daemon
|
|
RMDir /r /REBOOTOK $INSTDIR\doc
|
|
DeleteRegValue HKCU "${REGKEY}\Components" Main
|
|
SectionEnd
|
|
|
|
Section -un.post UNSEC0001
|
|
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk"
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\@PACKAGE_NAME@ (testnet, @WINDOWS_BITS@-bit).lnk"
|
|
Delete /REBOOTOK "$SMSTARTUP\Dash.lnk"
|
|
Delete /REBOOTOK $INSTDIR\uninstall.exe
|
|
Delete /REBOOTOK $INSTDIR\debug.log
|
|
Delete /REBOOTOK $INSTDIR\db.log
|
|
DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
|
|
DeleteRegValue HKCU "${REGKEY}" Path
|
|
DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"
|
|
DeleteRegKey /IfEmpty HKCU "${REGKEY}"
|
|
DeleteRegKey HKCR "@PACKAGE_TARNAME@"
|
|
RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
|
|
RmDir /REBOOTOK $INSTDIR
|
|
Push $R0
|
|
StrCpy $R0 $StartMenuGroup 1
|
|
StrCmp $R0 ">" no_smgroup
|
|
no_smgroup:
|
|
Pop $R0
|
|
SectionEnd
|
|
|
|
# Installer functions
|
|
Function .onInit
|
|
InitPluginsDir
|
|
!if "@WINDOWS_BITS@" == "64"
|
|
${If} ${RunningX64}
|
|
; disable registry redirection (enable access to 64-bit portion of registry)
|
|
SetRegView 64
|
|
${Else}
|
|
MessageBox MB_OK|MB_ICONSTOP "Cannot install 64-bit version on a 32-bit system."
|
|
Abort
|
|
${EndIf}
|
|
!endif
|
|
FunctionEnd
|
|
|
|
# Uninstaller functions
|
|
Function un.onInit
|
|
ReadRegStr $INSTDIR HKCU "${REGKEY}" Path
|
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
|
|
!insertmacro SELECT_UNSECTION Main ${UNSEC0000}
|
|
FunctionEnd
|