Merge #7603: Build System: Use PACKAGE_TARNAME in NSIS script

0528e30 Remove wxwidgets references from NSIS script. (JeremyRand)
26880c3 build: Use PACKAGE_TARNAME and new bin names in NSIS script. (JeremyRand)
0dbf6e4 build: define base filenames for use elsewhere in the buildsystem (Cory Fields)
This commit is contained in:
Wladimir J. van der Laan 2016-04-15 16:43:38 +02:00 committed by Alexander Block
parent 6c7d133801
commit 9bd55b1bfc
3 changed files with 24 additions and 19 deletions

View File

@ -10,9 +10,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libdashconsensus.pc pkgconfig_DATA = libdashconsensus.pc
endif endif
BITCOIND_BIN=$(top_builddir)/src/dashd$(EXEEXT) BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
BITCOIN_QT_BIN=$(top_builddir)/src/qt/dash-qt$(EXEEXT) BITCOIN_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT)
BITCOIN_CLI_BIN=$(top_builddir)/src/dash-cli$(EXEEXT) BITCOIN_CLI_BIN=$(top_builddir)/src/$(BITCOIN_CLI_NAME)$(EXEEXT)
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
empty := empty :=

View File

@ -14,6 +14,11 @@ AC_CONFIG_HEADERS([src/config/dash-config.h])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4]) AC_CONFIG_MACRO_DIR([build-aux/m4])
BITCOIN_DAEMON_NAME=bitcoind
BITCOIN_GUI_NAME=bitcoin-qt
BITCOIN_CLI_NAME=bitcoin-cli
BITCOIN_TX_NAME=bitcoin-tx
AC_CANONICAL_HOST AC_CANONICAL_HOST
AH_TOP([#ifndef DASH_CONFIG_H]) AH_TOP([#ifndef DASH_CONFIG_H])
@ -1055,6 +1060,10 @@ AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS") AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS")
AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION") AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION")
AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL") AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL")
AC_SUBST(BITCOIN_DAEMON_NAME)
AC_SUBST(BITCOIN_GUI_NAME)
AC_SUBST(BITCOIN_CLI_NAME)
AC_SUBST(BITCOIN_TX_NAME)
AC_SUBST(RELDFLAGS) AC_SUBST(RELDFLAGS)
AC_SUBST(HARDENED_CXXFLAGS) AC_SUBST(HARDENED_CXXFLAGS)

View File

@ -20,7 +20,7 @@ SetCompressor /SOLID lzma
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY} !define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "@PACKAGE_NAME@" !define MUI_STARTMENUPAGE_DEFAULTFOLDER "@PACKAGE_NAME@"
!define MUI_FINISHPAGE_RUN $INSTDIR\dash-qt.exe !define MUI_FINISHPAGE_RUN $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp" !define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE
@ -48,7 +48,7 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English !insertmacro MUI_LANGUAGE English
# Installer attributes # Installer attributes
OutFile @abs_top_srcdir@/dashcore-${VERSION}-win@WINDOWS_BITS@-setup.exe OutFile @abs_top_srcdir@/@PACKAGE_TARNAME@-${VERSION}-win@WINDOWS_BITS@-setup.exe
!if "@WINDOWS_BITS@" == "64" !if "@WINDOWS_BITS@" == "64"
InstallDir $PROGRAMFILES64\DashCore InstallDir $PROGRAMFILES64\DashCore
!else !else
@ -73,20 +73,16 @@ ShowUninstDetails show
Section -Main SEC0000 Section -Main SEC0000
SetOutPath $INSTDIR SetOutPath $INSTDIR
SetOverwrite on SetOverwrite on
File @abs_top_srcdir@/release/dash-qt.exe File @abs_top_srcdir@/release/@BITCOIN_GUI_NAME@@EXEEXT@
File /oname=COPYING.txt @abs_top_srcdir@/COPYING File /oname=COPYING.txt @abs_top_srcdir@/COPYING
File /oname=readme.txt @abs_top_srcdir@/doc/README_windows.txt File /oname=readme.txt @abs_top_srcdir@/doc/README_windows.txt
SetOutPath $INSTDIR\daemon SetOutPath $INSTDIR\daemon
File @abs_top_srcdir@/release/dashd.exe File @abs_top_srcdir@/release/@BITCOIN_DAEMON_NAME@@EXEEXT@
File @abs_top_srcdir@/release/dash-cli.exe File @abs_top_srcdir@/release/@BITCOIN_CLI_NAME@@EXEEXT@
SetOutPath $INSTDIR\doc SetOutPath $INSTDIR\doc
File /r @abs_top_srcdir@/doc\*.* File /r @abs_top_srcdir@/doc\*.*
SetOutPath $INSTDIR SetOutPath $INSTDIR
WriteRegStr HKCU "${REGKEY}\Components" Main 1 WriteRegStr HKCU "${REGKEY}\Components" Main 1
# Remove old wxwidgets-based-dash executable and locales:
Delete /REBOOTOK $INSTDIR\dash.exe
RMDir /r /REBOOTOK $INSTDIR\locale
SectionEnd SectionEnd
Section -post SEC0001 Section -post SEC0001
@ -95,7 +91,7 @@ Section -post SEC0001
WriteUninstaller $INSTDIR\uninstall.exe WriteUninstaller $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory $SMPROGRAMS\$StartMenuGroup CreateDirectory $SMPROGRAMS\$StartMenuGroup
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\dash-qt.exe CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END !insertmacro MUI_STARTMENU_WRITE_END
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
@ -106,10 +102,10 @@ Section -post SEC0001
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $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)" NoModify 1
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
WriteRegStr HKCR "dash" "URL Protocol" "" WriteRegStr HKCR "@PACKAGE_TARNAME@" "URL Protocol" ""
WriteRegStr HKCR "dash" "" "URL:Dash" WriteRegStr HKCR "@PACKAGE_TARNAME@" "" "URL:Dash"
WriteRegStr HKCR "dash\DefaultIcon" "" $INSTDIR\dash-qt.exe WriteRegStr HKCR "@PACKAGE_TARNAME@\DefaultIcon" "" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
WriteRegStr HKCR "dash\shell\open\command" "" '"$INSTDIR\dash-qt.exe" "%1"' WriteRegStr HKCR "@PACKAGE_TARNAME@\shell\open\command" "" '"$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" "%1"'
SectionEnd SectionEnd
# Macro for selecting uninstaller sections # Macro for selecting uninstaller sections
@ -127,7 +123,7 @@ done${UNSECTION_ID}:
# Uninstaller sections # Uninstaller sections
Section /o -un.Main UNSEC0000 Section /o -un.Main UNSEC0000
Delete /REBOOTOK $INSTDIR\dash-qt.exe Delete /REBOOTOK $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
Delete /REBOOTOK $INSTDIR\COPYING.txt Delete /REBOOTOK $INSTDIR\COPYING.txt
Delete /REBOOTOK $INSTDIR\readme.txt Delete /REBOOTOK $INSTDIR\readme.txt
RMDir /r /REBOOTOK $INSTDIR\daemon RMDir /r /REBOOTOK $INSTDIR\daemon
@ -147,7 +143,7 @@ Section -un.post UNSEC0001
DeleteRegValue HKCU "${REGKEY}" Path DeleteRegValue HKCU "${REGKEY}" Path
DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components" DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"
DeleteRegKey /IfEmpty HKCU "${REGKEY}" DeleteRegKey /IfEmpty HKCU "${REGKEY}"
DeleteRegKey HKCR "dash" DeleteRegKey HKCR "@PACKAGE_TARNAME@"
RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
RmDir /REBOOTOK $INSTDIR RmDir /REBOOTOK $INSTDIR
Push $R0 Push $R0