[xiph-commits] r15213 - trunk/oggdsf/build/NSIS/Release

cristianadam at svn.xiph.org cristianadam at svn.xiph.org
Tue Aug 26 11:17:29 PDT 2008


Author: cristianadam
Date: 2008-08-26 11:17:29 -0700 (Tue, 26 Aug 2008)
New Revision: 15213

Modified:
   trunk/oggdsf/build/NSIS/Release/oggcodecs_release.nsi
Log:
Made various installer UI updates.

Modified: trunk/oggdsf/build/NSIS/Release/oggcodecs_release.nsi
===================================================================
--- trunk/oggdsf/build/NSIS/Release/oggcodecs_release.nsi	2008-08-26 18:15:18 UTC (rev 15212)
+++ trunk/oggdsf/build/NSIS/Release/oggcodecs_release.nsi	2008-08-26 18:17:29 UTC (rev 15213)
@@ -1,24 +1,13 @@
-; Script generated by the HM NIS Edit Script Wizard.
+; NSIS install script
 
 ; Location of Visual Studio runtime libraries on the compiling system
-
-; !define VS_RUNTIME_LOCATION "C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT"
-; !define VS_RUNTIME_PREFIX MSVC
-
-
-;  To use the unicows enabled versions, use these rebuilt crt's
-
 !define VS_RUNTIME_LOCATION "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\"
 !define VS_RUNTIME_PREFIX msvc
 ;   *****************************************************************************************************
 
-
-
-; HM NIS Edit Wizard helper defines
 !define PRODUCT_NAME "Ogg Codecs"
 
 ; Product version is setup in build.cmd
-
 !define PRODUCT_VERSION "$%PRODUCT_VERSION%"
 
 !ifndef PRODUCT_VERSION
@@ -31,6 +20,7 @@
 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
 !define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
+!define PRODUCT_SUPPORT "http://www.xiph.org/dshow/pmwiki.php/Main/ReportIssues"
 
 ; Path from .nsi to oggcodecs root
 !define OGGCODECS_ROOT_DIR "..\..\.."
@@ -71,11 +61,11 @@
 
 ; MUI Settings
 !define MUI_ABORTWARNING
-!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
-!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+!define MUI_ICON "${OGGCODECS_ROOT_DIR}\bin\xifish.ico"
+!define MUI_UNICON "${OGGCODECS_ROOT_DIR}\bin\xifish.ico"
 !define MUI_HEADERIMAGE
 !define MUI_HEADERIMAGE_BITMAP "extra\header.bmp"
-!define MUI_HEADERIMAGE_UNBITMAP "extra\header.bmp"
+!define MUI_HEADERIMAGE_UNBITMAP "extra\header_uninstall.bmp"
 
 VIProductVersion "${PRODUCT_VERSION}.0"
 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
@@ -118,23 +108,12 @@
 !insertmacro MUI_PAGE_FINISH
 
 ; Uninstaller pages
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.confirm
+!insertmacro MUI_UNPAGE_CONFIRM
 !insertmacro MUI_UNPAGE_INSTFILES
 
 ; Language files
-!insertmacro MUI_LANGUAGE "Czech"
-!insertmacro MUI_LANGUAGE "Dutch"
-!insertmacro MUI_LANGUAGE "English"
-!insertmacro MUI_LANGUAGE "French"
-!insertmacro MUI_LANGUAGE "German"
-!insertmacro MUI_LANGUAGE "Italian"
-!insertmacro MUI_LANGUAGE "Japanese"
-!insertmacro MUI_LANGUAGE "Korean"
-!insertmacro MUI_LANGUAGE "Polish"
-; !insertmacro MUI_LANGUAGE "Russian"
-!insertmacro MUI_LANGUAGE "SimpChinese"
-!insertmacro MUI_LANGUAGE "Spanish"
-!insertmacro MUI_LANGUAGE "TradChinese"
-!insertmacro MUI_LANGUAGE "Turkish"
+!insertmacro MUI_LANGUAGE "English" 
 
 
 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
@@ -235,9 +214,6 @@
   File "${VS_RUNTIME_LOCATION}\${VS_RUNTIME_PREFIX}p90.dll"
   File "${VS_RUNTIME_LOCATION}\Microsoft.VC90.CRT.manifest"
 
-  ; Unicows for old windows with no unicode - 1
-  ;File "${UNICOWS_BIN}\unicows.dll"
-
   ; ico files - 1 (One file contains all these packed)
   File "${OGGCODECS_ROOT_DIR}\bin\xifish.ico"
   ;File "${OGGCODECS_ROOT_DIR}\bin\xifish-16.ico"
@@ -794,8 +770,7 @@
 Section -AdditionalIcons
   !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
   CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
-  WriteIniStr "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
-  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
+  WriteIniStr "$SMPROGRAMS\$ICONS_GROUP\Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
   !insertmacro MUI_STARTMENU_WRITE_END
 SectionEnd
 
@@ -812,15 +787,19 @@
   File "$%TEMP%\uninst.exe"
 !endif  
 
-  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\OOOggDump.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\OOOggDump.exe"
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\OOOggDump.exe"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\xifish.ico"
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"  "HelpLink" "${PRODUCT_SUPPORT}"
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
+  
+  WriteRegDWORD ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "NoModify" "1"
+  WriteRegDWORD ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "NoRepair" "1"
 
-  SetDetailsPrint both
+SetDetailsPrint both
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 SectionEnd
@@ -831,8 +810,7 @@
 !insertmacro un.GetParameters
 
 ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-Function un.onInit
-  !insertmacro MUI_UNGETLANGUAGE
+Function un.confirm
   var /GLOBAL cmdLineParams
   Push $R0
 
@@ -845,24 +823,12 @@
   IfErrors +2 0
   StrCpy $option_runFromInstaller 	1
   Pop $R0
-    
-  IfSilent +4
-  StrCmp $option_runFromInstaller "0" 0 +3
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+
+  StrCmp $option_runFromInstaller "1" 0 +2
   Abort
 FunctionEnd
 
 ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-Function un.onUninstSuccess
-
-;  HideWindow
-  IfSilent +3
-  StrCmp $option_runFromInstaller "0" 0 +2
-  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
-FunctionEnd
-
-
-;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 !ifdef INNER
 Section Uninstall
 
@@ -1049,9 +1015,6 @@
   Delete "$INSTDIR\${VS_RUNTIME_PREFIX}p90.dll"
   Delete "$INSTDIR\Microsoft.VC90.CRT.manifest"
 
-  ; Delete unicows - 1
-  ;Delete "$INSTDIR\unicows.dll"
-
   ; Delete icons - 3
   Delete "$INSTDIR\xifish.ico"
   ;Delete "$INSTDIR\xifish-16.ico"
@@ -1060,8 +1023,7 @@
 
 
   ;Delete accesory files, links etc.
-  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
-  Delete "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.url"
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Website.url"
   Delete "$INSTDIR\uninst.exe"
 
   RMDir "$SMPROGRAMS\$ICONS_GROUP"



More information about the commits mailing list