Even though we havn't had any problems with the NSIS 2.0b3 based windows installation package, I thought it would look a little more professional to use a non-beta version of the Nullsoft Installation System for the final OpenVPN 2.0 release.

So, here's a patch against openvpn.nsi from OpenVPN 2.0-rc13 that makes it compatible with NSIS 2.0, tested with the latest release NSIS 2.05.

I also made the installtion package use the OpenVPN icon, and added the version number to "Un-install information", as Vlada Macek suggested a few months ago.

Cheers - Mathias
--- openvpn.nsi.orig    Fri Feb 11 03:09:22 2005
+++ openvpn.nsi Mon Feb 14 15:42:56 2005
@@ -16,8 +16,8 @@
 !define HOME "c:\src\openvpn"

 !define BIN "${HOME}\bin"

 

-!define MUI_PRODUCT "OpenVPN"

-!define MUI_VERSION "2.0_rc13" # AUTO_VERSION

+!define PRODUCT_NAME "OpenVPN"

+!define VERSION "2.0_rc13" # AUTO_VERSION

 

 !define TAP "tap0801"

 !define TAPDRV "${TAP}.sys"

@@ -41,7 +41,7 @@
 

   ;General

 

-  OutFile "openvpn-${MUI_VERSION}${OUTFILE_LABEL}-install.exe"

+  OutFile "openvpn-${VERSION}${OUTFILE_LABEL}-install.exe"

 

   SetCompressor bzip2

 

@@ -49,12 +49,12 @@
   ShowUninstDetails show

 

   ;Folder selection page

-  InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"

+  InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"

   

   ;Remember install folder

-  InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""

+  InstallDirRegKey HKCU "Software\${PRODUCT_NAME}" ""

 

-  !define SOURCE_ZIP_DEST "openvpn-${MUI_VERSION}.zip"

+  !define SOURCE_ZIP_DEST "openvpn-${VERSION}.zip"

   !define SOURCE_ZIP_SRC "${MASTER}\${SOURCE_ZIP_DEST}"

 

 # For testing only

@@ -63,32 +63,36 @@
 ;--------------------------------

 ;Modern UI Configuration

 

-  !define MUI_NAME "${MUI_PRODUCT} ${MUI_VERSION} ${TITLE_LABEL}"

+  Name "${PRODUCT_NAME} ${TITLE_LABEL}"

+

+  !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the 
installation of OpenVPN, an Open Source VPN package by James Yonan.\r\n\r\nNote 
that the Windows version of OpenVPN will only run on Win 2000, XP, or 
higher.\r\n\r\n\r\n"

+

+  !define MUI_COMPONENTSPAGE_TEXT_TOP "Select the components to 
install/upgrade.  Stop any OpenVPN processes or the OpenVPN service if it is 
running.  All DLLs are installed locally."

 

-  !define MUI_WELCOMEPAGE

-  !define MUI_LICENSEPAGE

-  !define MUI_COMPONENTSPAGE

   !define MUI_COMPONENTSPAGE_SMALLDESC

-  !define MUI_DIRECTORYPAGE

-  !define MUI_FINISHPAGE

   !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\INSTALL-win32.txt"

   !define MUI_FINISHPAGE_NOAUTOCLOSE

   !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED

-  

   !define MUI_ABORTWARNING

+  !define MUI_ICON "${HOME}\install-win32\openvpn.ico"

+  !define MUI_UNICON "${HOME}\install-win32\openvpn.ico"

+  !define MUI_HEADERIMAGE

+  !define MUI_HEADERIMAGE_BITMAP "${HOME}\install-win32\install-whirl.bmp"

+

+  !insertmacro MUI_PAGE_WELCOME

+  !insertmacro MUI_PAGE_LICENSE "${HOME}\install-win32\license.txt"

+  !insertmacro MUI_PAGE_COMPONENTS

+  !insertmacro MUI_PAGE_DIRECTORY

+  !insertmacro MUI_PAGE_INSTFILES

+  !insertmacro MUI_PAGE_FINISH

   

-  !define MUI_UNINSTALLER

-  !define MUI_UNCONFIRMPAGE

-  

-  !define MUI_HEADERBITMAP "${HOME}\install-win32\install-whirl.bmp"

-  

+  !insertmacro MUI_UNPAGE_CONFIRM

+  !insertmacro MUI_UNPAGE_INSTFILES  

+  !insertmacro MUI_UNPAGE_FINISH

+

 ;--------------------------------

 ;Languages

  

-  !define MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the 
installation of OpenVPN, an Open Source VPN package by James Yonan.\r\n\r\nNote 
that the Windows version of OpenVPN will only run on Win 2000, XP, or 
higher.\r\n\r\n\r\n"

-

-  !define MUI_INNERTEXT_COMPONENTS_TOP "Select the components to 
install/upgrade.  Stop any OpenVPN processes or the OpenVPN service if it is 
running.  All DLLs are installed locally."

-

   !insertmacro MUI_LANGUAGE "English"

   

 ;--------------------------------

@@ -115,11 +119,6 @@
   LangString DESC_SecFileAssociation ${LANG_ENGLISH} "Register OpenVPN config 
file association (*.${SERV_CONFIG_EXT})"

 

 ;--------------------------------

-;Data

-  

-  LicenseData "${HOME}\install-win32\license.txt"

-

-;--------------------------------

 ;Reserve Files

   

   ;Things that need to be extracted on first (keep these lines before any File 
command!)

@@ -477,22 +476,20 @@
   WriteUninstaller "$INSTDIR\Uninstall.exe"

 

   ; Show up in Add/Remove programs

-  WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN" "DisplayName" 
"OpenVPN ${MUI_VERSION}"

-  WriteRegExpandStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN" "UninstallString" 
"$INSTDIR\Uninstall.exe"

+  WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 
"DisplayName" "${PRODUCT_NAME} ${VERSION}"

+  WriteRegExpandStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 
"UninstallString" "$INSTDIR\Uninstall.exe"

+  WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 
"DisplayIcon" "$INSTDIR\openvpn.ico"

+  WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 
"DisplayVersion" "${VERSION}"

 

   ; Advise a reboot

   ;Messagebox MB_OK "IMPORTANT: Rebooting the system is advised in order to 
finalize TAP-Win32 driver installation/upgrade (this is an informational 
message only, pressing OK will not reboot)."

 

 SectionEnd

 

-;Display the Finish header

-;Insert this macro after the sections if you are not using a finish page

-!insertmacro MUI_SECTIONS_FINISHHEADER

-

 ;--------------------------------

 ;Descriptions

 

-!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN

+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN

   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNUserSpace} 
$(DESC_SecOpenVPNUserSpace)

   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNEasyRSA} 
$(DESC_SecOpenVPNEasyRSA)

   !insertmacro MUI_DESCRIPTION_TEXT ${SecTAP} $(DESC_SecTAP)

@@ -503,7 +500,7 @@
   !insertmacro MUI_DESCRIPTION_TEXT ${SecAddShortcuts} $(DESC_SecAddShortcuts)

   !insertmacro MUI_DESCRIPTION_TEXT ${SecService} $(DESC_SecService)

   !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssociation} 
$(DESC_SecFileAssociation)

-!insertmacro MUI_FUNCTIONS_DESCRIPTION_END

+!insertmacro MUI_FUNCTION_DESCRIPTION_END

 

 ;--------------------------------

 ;Uninstaller Section

@@ -587,12 +584,9 @@
   !insertmacro DelRegKeyIfUnchanged HKCR ".${SERV_CONFIG_EXT}" "OpenVPNFile"

   DeleteRegKey HKCR "OpenVPNFile"

   DeleteRegKey HKLM SOFTWARE\OpenVPN

-  DeleteRegKey HKCU "Software\${MUI_PRODUCT}"

+  DeleteRegKey HKCU "Software\${PRODUCT_NAME}"

   DeleteRegKey HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN"

 

   ;Messagebox MB_OK "IMPORTANT: If you intend on reinstalling OpenVPN after 
this uninstall, and you are running Win2K, you are strongly urged to reboot 
before reinstalling (this is an informational message only, pressing OK will 
not reboot)."

-

-  ;Display the Finish header

-  !insertmacro MUI_UNFINISHHEADER

 

 SectionEnd

Reply via email to