Installer script to make setup.exe.

git-svn-id: file:///svn/unbound/trunk@1513 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2009-03-09 16:16:39 +00:00
parent 157c7cde0d
commit 80ef8e2f7e
8 changed files with 5392 additions and 6669 deletions
+4 -6
View File
@@ -396,11 +396,9 @@
/* in_port_t */
#undef in_port_t
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
#undef inline
#endif
/* Define to `short' if <sys/types.h> does not define. */
#undef int16_t
@@ -417,7 +415,7 @@
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
/* Define to `long int' if <sys/types.h> does not define. */
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
/* Define to `int' if <sys/types.h> does not define. */
@@ -426,7 +424,7 @@
/* Define to 'int' if not defined */
#undef rlim_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* Define to 'int' if not defined */
Vendored
+5219 -6660
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -1,3 +1,6 @@
9 March 2009: Wouter
- Nullsoft NSIS installer creation script.
5 March 2009: Wouter
- fixup memory leak introduced on 18feb in mesh reentrant fix.
+20 -2
View File
@@ -163,6 +163,7 @@ if [ "$DOWIN" = "yes" ]; then
rm -r autom4te* || echo "ignored"
fi
# procedure for making unbound installer on mingw.
info "Creating windows dist unbound $version"
info "Calling configure"
echo './configure --enable-debug --enable-static-exe "--with-conf-file=C:\Program Files\Unbound\service.conf" --with-run-dir="" '"$*"
@@ -179,15 +180,32 @@ if [ "$DOWIN" = "yes" ]; then
rm -f $file
info "Creating $file"
mkdir tmp.$$
strip unbound.exe
strip unbound-control.exe
strip unbound-host.exe
strip unbound-checkconf.exe
strip unbound-service-install.exe
strip unbound-service-remove.exe
cd tmp.$$
cp ../doc/example.conf example.conf
cp ../unbound.exe ../unbound-host.exe ../unbound-control.exe ../unbound-checkconf.exe ../unbound-service-install.exe ../unbound-service-remove.exe ../LICENSE ../winrc/unbound-website.url ../winrc/service.conf .
strip *.exe
# zipfile
zip ../$file LICENSE unbound.exe unbound-host.exe unbound-control.exe unbound-checkconf.exe unbound-service-install.exe unbound-service-remove.exe example.conf service.conf unbound-website.url
info "Testing $file"
(cd .. ; zip -T $file )
# installer
info "Creating installer"
quadversion=`cat ../config.h | grep RSRC_PACKAGE_VERSION | sed -e 's/#define RSRC_PACKAGE_VERSION //' -e 's/,/\\./g'`
echo $quadversion
cat ../winrc/setup.nsi | sed -e 's/define VERSION.*$/define VERSION "'$version'"/' -e 's/define QUADVERSION.*$/define QUADVERSION "'$quadversion'"/' > ../winrc/setup_ed.nsi
# get tool from http://nsis.sf.net
c:/Program\ Files/NSIS/makensis.exe ../winrc/setup_ed.nsi
info "Created installer"
cd ..
rm -rf tmp.$$
zip -T $file
mv winrc/unbound_setup_$version.exe .
ls -lG unbound_setup_$version.exe
ls -lG unbound-$version.zip
info "Done"
exit 0
fi
+4 -1
View File
@@ -1,5 +1,8 @@
# Unbound configuration file on windows.
# See example.conf for more settings and syntax
server:
directory: "@UNBOUND_RUN_DIR@"
# if you want to log to a file use
logfile: "unbound.log"
# verbosity level 0-4 of logging
#verbosity: 1
+142
View File
@@ -0,0 +1,142 @@
# The NSIS (http://nsis.sourceforge.net) install script.
# This script is BSD licensed.
!include LogicLib.nsh
!include MUI2.nsh
!define VERSION "0.0.0"
!define QUADVERSION "0.0.0.0"
outFile "unbound_setup_${VERSION}.exe"
Name "Unbound"
# default install directory
installDir "$PROGRAMFILES\Unbound"
installDirRegKey HKLM "Software\Unbound" "InstallLocation"
RequestExecutionLevel admin
SetCompressor /solid /final lzma
#give credits to Nullsoft: BrandingText ""
VIAddVersionKey "ProductName" "Unbound"
VIAddVersionKey "CompanyName" "NLnet Labs"
VIAddVersionKey "FileDescription" "(un)install the unbound DNS resolver"
VIAddVersionKey "LegalCopyright" "Copyright 2009, NLnet Labs"
VIAddVersionKey "FileVersion" "${QUADVERSION}"
VIAddVersionKey "ProductVersion" "${QUADVERSION}"
VIProductVersion "${QUADVERSION}"
# Global Variables
Var StartMenuFolder
# user interface pages to show
# for the plain UI (using MUI2 now)
#Page license
#Page directory
#Page instfiles
#UninstPage uninstConfirm
#UninstPage instfiles
# use ReserveFile for files required before actual installation
# makes the installer start faster
ReserveFile "..\LICENSE"
#!define MUI_ICON "combined.ico"
#!define MUI_UNICON "combined.ico"
!define MUI_ICON "${NSISDIR}\contrib\graphics\icons\orange-install-nsis.ico"
!define MUI_UNICON "${NSISDIR}\contrib\graphics\icons\orange-uninstall-nsis.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADERIMAGE_BITMAP "setup_top.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "setup_left.bmp"
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\LICENSE"
#!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Unbound"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Unbound"
!insertmacro MUI_PAGE_STARTMENU UnboundStartMenu $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
# default section, one per component, we have one component.
section "Unbound section"
# copy files
setOutPath $INSTDIR
File "..\LICENSE"
File "..\unbound.exe"
File "..\unbound-checkconf.exe"
File "..\unbound-control.exe"
File "..\unbound-host.exe"
File "..\unbound-service-install.exe"
File "..\unbound-service-remove.exe"
File "unbound-website.url"
File "service.conf"
File "..\doc\example.conf"
# store installation folder
WriteRegStr HKLM "Software\Unbound" "InstallLocation" $INSTDIR
# uninstaller
WriteUninstaller "uninst.exe"
# register uninstaller
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound" "DisplayName" "Unbound"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound" "UninstallString" "$\"$INSTDIR\uninst.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound" "QuietUninstallString" "$\"$INSTDIR\uninst.exe$\" /S"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound" "NoModify" "1"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound" "NoRepair" "1"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound" "URLInfoAbout" "http://unbound.net"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound" "Publisher" "NLnet Labs"
# start menu items
!insertmacro MUI_STARTMENU_WRITE_BEGIN UnboundStartMenu
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\unbound.net website.lnk" "$INSTDIR\unbound-website.url" "" "$INSTDIR\unbound.exe" "" "" "" "Visit the unbound website"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\uninst.exe" "" "" "" "" "" "Uninstall unbound"
!insertmacro MUI_STARTMENU_WRITE_END
# install service entry
ExecWait '"$INSTDIR\unbound-service-install.exe"'
sectionEnd
# uninstaller section
section "un.Unbound section"
# uninstall service entry
ExecWait '"$INSTDIR\unbound-service-remove.exe"'
# deregister uninstall
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Unbound"
Delete "$INSTDIR\uninst.exe" # delete self
Delete "$INSTDIR\LICENSE"
Delete "$INSTDIR\unbound.exe"
Delete "$INSTDIR\unbound-checkconf.exe"
Delete "$INSTDIR\unbound-control.exe"
Delete "$INSTDIR\unbound-host.exe"
Delete "$INSTDIR\unbound-service-install.exe"
Delete "$INSTDIR\unbound-service-remove.exe"
Delete "$INSTDIR\unbound-website.url"
Delete "$INSTDIR\service.conf"
Delete "$INSTDIR\example.conf"
RmDir "$INSTDIR"
# start menu items
!insertmacro MUI_STARTMENU_GETFOLDER UnboundStartMenu $StartMenuFolder
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\unbound.net website.lnk"
RMDir "$SMPROGRAMS\$StartMenuFolder"
DeleteRegKey /ifempty HKLM "Software\Unbound"
sectionEnd
Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB