[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r1335: Add support for translating win32 installer strings for the (trunk/pkg/win32)



Author: edmanm
Date: 2006-10-14 02:15:19 -0400 (Sat, 14 Oct 2006)
New Revision: 1335

Added:
   trunk/pkg/win32/vidalia-bundle.nsi
   trunk/pkg/win32/vidalia_en.nsh
Removed:
   trunk/pkg/win32/bundle.nsi
Modified:
   trunk/pkg/win32/vidalia.nsi
Log:
Add support for translating win32 installer strings for the individual and
bundle installers. I still need to move ygrek's Russian strings to this
format.


Deleted: trunk/pkg/win32/bundle.nsi
===================================================================
--- trunk/pkg/win32/bundle.nsi	2006-10-14 01:57:50 UTC (rev 1334)
+++ trunk/pkg/win32/bundle.nsi	2006-10-14 06:15:19 UTC (rev 1335)
@@ -1,372 +0,0 @@
-;---------------------------------
-; Vidalia/Tor/Privoxy Bundle Installer
-; See BUNDLE_LICENSE for licensing information
-
-;
-!include "MUI.nsh"
-
-;---------------------------------
-; Global Definitions
-!define VIDALIA_NAME "Vidalia"
-!define VIDALIA_EXEC "vidalia.exe"
-!define VIDALIA_UNINST "uninstall.exe"
-!define VIDALIA_VERSION "0.0.8"
-
-!define TOR_NAME "Tor"
-!define TOR_EXEC "tor.exe"
-!define TOR_UNINST "Uninstall.exe"
-!define TOR_VERSION "0.1.1.23"
-
-!define PRIVOXY_NAME "Privoxy"
-!define PRIVOXY_EXEC "privoxy.exe"
-!define PRIVOXY_UNINST "privoxy_uninstall.exe"
-!define PRIVOXY_VERSION "3.0.3"
-
-!define BUNDLE_REVISION "1"
-
-!define APPNAME "Vidalia Bundle"
-!define APPVERSION "${TOR_VERSION}-${VIDALIA_VERSION}"
-!define PRODVERSION "${VIDALIA_VERSION}.${BUNDLE_REVISION}" ; Product version must be x.x.x.x
-!define APPDESCRIPTION "${APPNAME} ${APPVERSION}"
-!define INSTALLFILE "vidalia-bundle-${APPVERSION}.exe"
-
-
-;--------------------------------
-; Basic Installer Information
-Name "Vidalia-Tor-Privoxy Bundle"
-Caption "Vidalia-Tor-Privoxy Bundle"
-BrandingText "${APPDESCRIPTION} (Rev. ${BUNDLE_REVISION})"
-OutFile "${INSTALLFILE}"
-CRCCheck on
-
-VIAddVersionKey "ProductName" "${APPNAME}"
-VIAddVersionKey "Comments" "${APPDESCRIPTION}"
-VIAddVersionKey "FileVersion" "${APPVERSION}"
-VIAddVersionKey "FileDescription" "${APPDESCRIPTION}"
-VIProductVersion "${PRODVERSION}"
-
-OutFile "${INSTALLFILE}"
-
-InstallDir "$PROGRAMFILES"
-
-SetCompressor /SOLID lzma
-SetOverWrite ifnewer
-AutoCloseWindow false
-ShowInstDetails show
-XPStyle on
-
-
-;--------------------------------
-; Install Types
-!ifndef NOINSTTYPES ; only if not defined
-  InstType "Full"
-  InstType "Base"
-  ;InstType /COMPONENTSONLYONCUSTOM
-!endif
-
-
-;--------------------------------
-; MUI Options
-!define MUI_WELCOMEPAGE_TITLE "Welcome to the ${APPNAME} Setup Wizard"
-!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of:\r\n\tVidalia\t${VIDALIA_VERSION}\r\n\tTor\t${TOR_VERSION}\r\n\tPrivoxy\t${PRIVOXY_VERSION}\r\n\r\nIf you have previously installed Vidalia, Tor, or Privoxy, please make sure they are not running before continuing this installation.\r\n\r\n$_CLICK"
-!define MUI_ABORTWARNING
-!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
-!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
-!define MUI_HEADERIMAGE
-!define MUI_FINISHPAGE_TEXT "Installation is complete.\r\n\r\nPlease see http://tor.eff.org/docs/tor-doc-win32.html to learn how to configure your applications to use Tor.\r\n"
-!define MUI_FINISHPAGE_RUN
-!define MUI_FINISHPAGE_RUN_FUNCTION CustomFinishFn
-!define MUI_FINISHPAGE_RUN_TEXT "Run installed components now"
-
-;--------------------------------
-; Pages
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_COMPONENTS
-!insertmacro MUI_PAGE_DIRECTORY
-!insertmacro MUI_PAGE_INSTFILES
-!insertmacro MUI_PAGE_FINISH
-
-!insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-; Tor
-Var configdir
-Var configfile
-var bInstallTor
-SectionGroup "!Tor ${TOR_VERSION}" TorGroup
-    Section "Tor" Tor
-    ;Files that have to be installed for tor to run and that the user
-    ;cannot choose not to install
-       SectionIn 1 2
-       SetOutPath "$INSTDIR\Tor"
-       File "tor\${TOR_VERSION}\tor.exe"
-       File "tor\${TOR_VERSION}\tor_resolve.exe"
-       File "tor\${TOR_VERSION}\${TOR_UNINST}"
-       WriteIniStr "$INSTDIR\Tor\Tor Website.url" "InternetShortcut" "URL" "http://tor.eff.org";
-
-       StrCpy $configfile "torrc"
-       StrCpy $configdir $APPDATA\Tor
-    ;   ;If $APPDATA isn't valid here (Early win95 releases with no updated
-    ;   ; shfolder.dll) then we put it in the program directory instead.
-    ;   StrCmp $APPDATA "" "" +2
-    ;      StrCpy $configdir $INSTDIR
-       SetOutPath $configdir
-       ;If there's already a torrc config file, ask if they want to
-       ;overwrite it with the new one.
-       IfFileExists "$configdir\torrc" "" endiftorrc
-          MessageBox MB_ICONQUESTION|MB_YESNO "You already have a Tor config file.$\r$\nDo you want to overwrite it with the default sample config file?" IDNO yesreplace
-          Delete $configdir\torrc
-          Goto endiftorrc
-         yesreplace:
-          StrCpy $configfile "torrc.sample"
-       endiftorrc:
-       File /oname=$configfile "tor\${TOR_VERSION}\torrc.sample"
-
-       ; Write the uninstall keys for Windows
-       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "DisplayName" "${TOR_NAME} ${TOR_VERSION}"
-       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "UninstallString" '"$INSTDIR\Tor\${TOR_UNINST}"'
-       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "NoModify" 1
-       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "NoRepair" 1
-       
-       IntOp $bInstallTor 0 + 1
-    SectionEnd
-
-    Section "OpenSSL 0.9.8a" TorOpenSSL
-       SectionIn 1 2
-       SetOutPath "$INSTDIR\Tor"
-       File "tor\${TOR_VERSION}\libeay32.dll"
-       File "tor\${TOR_VERSION}\ssleay32.dll"
-    SectionEnd
-
-    Section "Documentation" TorDocs
-       SectionIn 1 2
-       SetOutPath "$INSTDIR\Tor\Documents"
-       File "tor\${TOR_VERSION}\Documents\*.*"
-    SectionEnd
-
-    Section "Add to Start Menu" TorStartMenu
-      SectionIn 1
-        SetShellVarContext all ; (Add to "All Users" Start Menu if possible)
-        SetOutPath "$INSTDIR\Tor"
-        IfFileExists "$SMPROGRAMS\Tor\*.*" "" +2
-           RMDir /r "$SMPROGRAMS\Tor"
-        
-        CreateDirectory "$SMPROGRAMS\Tor"
-        CreateShortCut "$SMPROGRAMS\Tor\Tor.lnk" "$INSTDIR\Tor\tor.exe"
-        CreateShortCut "$SMPROGRAMS\Tor\Torrc.lnk" "Notepad.exe" "$configdir\torrc"
-        CreateShortCut "$SMPROGRAMS\Tor\Tor Website.lnk" "$INSTDIR\Tor\Tor Website.url"
-        CreateShortCut "$SMPROGRAMS\Tor\Uninstall.lnk" "$INSTDIR\Tor\${TOR_UNINST}"
-        
-        IfFileExists "$INSTDIR\Tor\Documents\*.*" "" endifdocs
-          CreateDirectory "$SMPROGRAMS\Tor\Documents"
-          CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Documentation.lnk" "$INSTDIR\Tor\Documents"
-          CreateShortCut "$SMPROGRAMS\Tor\Documents\Version Specification.lnk" "$INSTDIR\Tor\Documents\version-spec.txt"
-        endifdocs:
-    SectionEnd
-SectionGroupEnd
-
-
-;--------------------------------
-; Vidalia
-var bInstallVidalia
-SectionGroup "Vidalia ${VIDALIA_VERSION}" VidaliaGroup
-    Section "Vidalia" Vidalia
-      SectionIn 1 2
-
-      ; Set output path to the installation directory.
-      SetOutPath "$INSTDIR\Vidalia"
-      File "Vidalia\${VIDALIA_VERSION}\${VIDALIA_EXEC}"
-      File "Vidalia\${VIDALIA_VERSION}\${VIDALIA_UNINST}"
-      File "Vidalia\${VIDALIA_VERSION}\mingwm10.dll"
-      File "Vidalia\${VIDALIA_VERSION}\README"
-      File "Vidalia\${VIDALIA_VERSION}\CHANGELOG"
-      File "Vidalia\${VIDALIA_VERSION}\LICENSE"
-      File "Vidalia\${VIDALIA_VERSION}\COPYING"
-      File "Vidalia\${VIDALIA_VERSION}\AUTHORS"
-      File "BUNDLE_LICENSE"
-      
-      ; Tor gets installed to $INSTDIR\Tor, so let's remember it
-      ; But first, we have to replace all the '\'s with '\\'s in the $INSTDIR
-      ; Does NSIS make this easy by providing the ability to replace substrings? No.
-      Push $INSTDIR
-      Push "\"
-      Push "\\"
-      Call StrRep
-      Pop $R0 ; contains the modified version of $INSTDIR
-
-      SetShellVarContext current
-      IfFileExists "$APPDATA\Vidalia" EndIfConf
-        CreateDirectory "$APPDATA\Vidalia"
-      EndIfConf:
-      WriteINIStr "$APPDATA\Vidalia\vidalia.conf" Tor TorExecutable "$R0\\Tor\\${TOR_EXEC}"
-      SetShellVarContext all
-
-      ; Write the uninstall keys for Windows  
-      WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "DisplayName" "${VIDALIA_NAME} ${VIDALIA_VERSION}"
-      WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "UninstallString" '"$INSTDIR\Vidalia\${VIDALIA_UNINST}"'
-      WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "NoModify" 1
-      WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "NoRepair" 1
-      
-      IntOp $bInstallVidalia 0 + 1
-    SectionEnd
-
-    ;--------------------------------
-    ; Start Menu Shortcuts
-    ; Optional section (can be disabled by the user)
-    Section "Add to Start Menu" VidaliaShortcuts
-      SectionIn 1 2
-      SetShellVarContext all ; (Add to "All Users" Start Menu if possible)
-      CreateDirectory "$SMPROGRAMS\Vidalia"
-      CreateShortCut "$SMPROGRAMS\Vidalia\Uninstall.lnk" "$INSTDIR\Vidalia\uninstall.exe" "" "$INSTDIR\Vidalia\${VIDALIA_UNINST}" 0
-      CreateShortCut "$SMPROGRAMS\Vidalia\Vidalia.lnk" "$INSTDIR\Vidalia\${VIDALIA_EXEC}" "" "$INSTDIR\Vidalia\${VIDALIA_EXEC}" 0
-    SectionEnd
-
-    ;--------------------------------
-    ; Run At Startup
-    Section "Run At Startup" VidaliaRunAtStartup
-      SectionIn 1 2
-      WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${VIDALIA_NAME}" '"$INSTDIR\Vidalia\${VIDALIA_EXEC}"'
-    SectionEnd    
-SectionGroupEnd
-
-
-;--------------------------------
-; Privoxy
-var bInstallPrivoxy
-SectionGroup "Privoxy ${PRIVOXY_VERSION}" PrivoxyGroup
-    Section "Privoxy" Privoxy
-        SectionIn 1 2
-        ; add files / whatever that need to be installed here.
-        SetOutPath "$INSTDIR\Privoxy"
-        File /r Privoxy\${PRIVOXY_VERSION}\*.*
-
-        WriteRegStr HKEY_CLASSES_ROOT "PrivoxyActionFile\shell\open\command" "" 'Notepad.exe "%1"'
-        WriteRegStr HKEY_CLASSES_ROOT ".action" "" "PrivoxyActionFile"
-        WriteRegStr HKEY_CLASSES_ROOT "PrivoxyFilterFile\shell\open\command" "" 'Notepad.exe "%1"'
-        WriteRegStr HKEY_CLASSES_ROOT ".filter" "" "PrivoxyFilterFile"
-       
-        ; Write the installation path into the registry
-        WriteRegStr HKCU SOFTWARE\Privoxy "Install_Dir" "$INSTDIR"
-
-        ; Write the uninstall keys for Windows
-        WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "DisplayName" "${PRIVOXY_NAME} ${PRIVOXY_VERSION}"
-        WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "UninstallString" '"$INSTDIR\Privoxy\${PRIVOXY_UNINST}"'
-        WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "NoModify" 1
-        WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "NoRepair" 1
-               
-       
-        IntOp $bInstallPrivoxy 0 + 1
-    SectionEnd
-
-    Section "Add to Start Menu" PrivoxyStartMenu
-        SectionIn 1
-        SetShellVarContext all ; (Add to "All Users" Start Menu if possible)
-        RMDir /r "$SMPROGRAMS\Privoxy"
-        CreateDirectory "$SMPROGRAMS\Privoxy"
-        CreateShortCut "$SMPROGRAMS\Privoxy\Privoxy.lnk" "$INSTDIR\Privoxy\privoxy.exe"
-        WriteINIStr "$SMPROGRAMS\Privoxy\Web-based Configuration.url" "InternetShortcut" "URL" "http://config.privoxy.org/";
-        CreateShortCut "$SMPROGRAMS\Privoxy\Web-based Feedback.lnk" "$INSTDIR\Privoxy\doc\user-manual\contact.html"
-        CreateDirectory "$SMPROGRAMS\Privoxy\Edit Config"
-        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Main Configuration.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\config.txt"'
-        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Default Actions.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\default.action"'
-        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\User Actions.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\user.action"'
-        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Filters.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\default.filter"'
-        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Trust list.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\trust.txt"'
-        CreateDirectory "$SMPROGRAMS\Privoxy\Documentation"
-        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\User Manual.lnk" "$INSTDIR\Privoxy\doc\user-manual\index.html"
-        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\Frequently Asked Questions.lnk" "$INSTDIR\Privoxy\doc\faq\index.html"
-        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\Credits.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\AUTHORS.txt"'
-        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\License.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\LICENSE.txt"'
-        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\ReadMe file.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\README.txt"'
-        WriteINIStr "$SMPROGRAMS\Privoxy\Documentation\Web Site.url" "InternetShortcut" "URL" "http://privoxy.org/";
-        CreateShortCut "$SMPROGRAMS\Privoxy\Privoxy Uninstall.lnk" "$INSTDIR\Privoxy\${PRIVOXY_UNINST}"
-    SectionEnd
- 
-    ;--------------------------------
-    ; Run At Startup
-    Section "Run At Startup" PrivoxyRunAtStartup
-      SectionIn 1
-      CreateShortCut "$SMSTARTUP\Privoxy.lnk" "$INSTDIR\Privoxy\privoxy.exe" "" "" 0 SW_SHOWMINIMIZED
-    SectionEnd     
-SectionGroupEnd
-
-Function CustomFinishFn
-    IntCmp $bInstallVidalia 1 run_vidalia check_tor check_tor
-    run_vidalia:
-        Exec '"$INSTDIR\Vidalia\${VIDALIA_EXEC}"'
-        goto check_privoxy
-    
-    check_tor:
-    IntCmp $bInstallTor 1 run_tor check_privoxy check_privoxy
-    run_tor:
-        Exec '"$INSTDIR\Tor\${TOR_EXEC}"'
-    
-    check_privoxy:
-    IntCmp $bInstallPrivoxy 1 run_privoxy done done
-    run_privoxy:
-        Exec '"$INSTDIR\Privoxy\${PRIVOXY_EXEC}"'
-    done:
-FunctionEnd
-
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-  !insertmacro MUI_DESCRIPTION_TEXT ${Tor} "Install ${TOR_NAME} ${TOR_VERSION}"
-  !insertmacro MUI_DESCRIPTION_TEXT ${TorGroup} "Install ${TOR_NAME} ${TOR_VERSION}"
-  !insertmacro MUI_DESCRIPTION_TEXT ${TorDocs} "Install ${TOR_NAME} documentation"
-  !insertmacro MUI_DESCRIPTION_TEXT ${TorOpenSSL} "Install OpenSSL 0.9.7e"
-  !insertmacro MUI_DESCRIPTION_TEXT ${TorStartMenu} "Add ${TOR_NAME} to your Start menu"
-
-  !insertmacro MUI_DESCRIPTION_TEXT ${Vidalia} "Install ${VIDALIA_NAME} ${VIDALIA_VERSION}"
-  !insertmacro MUI_DESCRIPTION_TEXT ${VidaliaGroup} "Install ${VIDALIA_NAME} ${VIDALIA_VERSION}"
-  !insertmacro MUI_DESCRIPTION_TEXT ${VidaliaShortcuts} "Add ${VIDALIA_NAME} to your Start menu"
-  !insertmacro MUI_DESCRIPTION_TEXT ${VidaliaRunAtStartup} "Run ${VIDALIA_NAME} at startup"
-
-  !insertmacro MUI_DESCRIPTION_TEXT ${Privoxy} "Install ${PRIVOXY_NAME} ${PRIVOXY_VERSION}"
-  !insertmacro MUI_DESCRIPTION_TEXT ${PrivoxyGroup} "Install ${PRIVOXY_NAME} ${PRIVOXY_VERSION}"
-  !insertmacro MUI_DESCRIPTION_TEXT ${PrivoxyStartMenu} "Add ${PRIVOXY_NAME} to your Start menu"
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-Function StrRep
- 
-  ;Written by dirtydingus 2003-02-20 04:30:09 
-  ; USAGE
-  ;Push String to do replacement in (haystack)
-  ;Push String to replace (needle)
-  ;Push Replacement
-  ;Call StrRep
-  ;Pop $R0 result	
- 
-  Exch $R4 ; $R4 = Replacement String
-  Exch
-  Exch $R3 ; $R3 = String to replace (needle)
-  Exch 2
-  Exch $R1 ; $R1 = String to do replacement in (haystack)
-  Push $R2 ; Replaced haystack
-  Push $R5 ; Len (needle)
-  Push $R6 ; len (haystack)
-  Push $R7 ; Scratch reg
-  StrCpy $R2 ""
-  StrLen $R5 $R3
-  StrLen $R6 $R1
-loop:
-  StrCpy $R7 $R1 $R5
-  StrCmp $R7 $R3 found
-  StrCpy $R7 $R1 1 ; - optimization can be removed if U know len needle=1
-  StrCpy $R2 "$R2$R7"
-  StrCpy $R1 $R1 $R6 1
-  StrCmp $R1 "" done loop
-found:
-  StrCpy $R2 "$R2$R4"
-  StrCpy $R1 $R1 $R6 $R5
-  StrCmp $R1 "" done loop
-done:
-  StrCpy $R3 $R2
-  Pop $R7
-  Pop $R6
-  Pop $R5
-  Pop $R2
-  Pop $R1
-  Pop $R4
-  Exch $R3
-	
-FunctionEnd
-

Copied: trunk/pkg/win32/vidalia-bundle.nsi (from rev 1334, trunk/pkg/win32/bundle.nsi)
===================================================================
--- trunk/pkg/win32/vidalia-bundle.nsi	                        (rev 0)
+++ trunk/pkg/win32/vidalia-bundle.nsi	2006-10-14 06:15:19 UTC (rev 1335)
@@ -0,0 +1,398 @@
+;---------------------------------
+; $Id: $
+; 
+; Vidalia/Tor/Privoxy Bundle Installer
+; See BUNDLE_LICENSE for licensing information
+;---------------------------------
+!include "MUI.nsh"
+
+SetCompressor /SOLID lzma
+!packhdr header.dat "upx --best header.dat"
+
+;---------------------------------
+; Global definitions
+!define VIDALIA_NAME        "Vidalia"
+!define VIDALIA_EXEC        "vidalia.exe"
+!define VIDALIA_APPVERSION  "0.0.8"
+!define VIDALIA_DESC        "${VIDALIA_NAME} ${VIDALIA_APPVERSION}"
+!define VIDALIA_UNINST      "uninstall.exe"
+
+!define TOR_NAME            "Tor"
+!define TOR_EXEC            "tor.exe"
+!define TOR_APPVERSION      "0.1.1.23"
+!define TOR_DESC            "${TOR_NAME} ${TOR_APPVERSION}"
+!define TOR_UNINST          "Uninstall.exe"
+
+!define PRIVOXY_NAME        "Privoxy"
+!define PRIVOXY_EXEC        "privoxy.exe"
+!define PRIVOXY_APPVERSION  "3.0.3"
+!define PRIVOXY_DESC        "${PRIVOXY_NAME} ${PRIVOXY_APPVERSION}"
+!define PRIVOXY_UNINST      "privoxy_uninstall.exe"
+
+!define OPENSSL_NAME        "OpenSSL"
+!define OPENSSL_APPVERSION  "0.9.8a"
+!define OPENSSL_DESC        "${OPENSSL_NAME} ${OPENSSL_APPVERSION}"
+
+!define BUNDLE_NAME         "Vidalia Bundle"
+!define BUNDLE_APPVERSION   "${TOR_APPVERSION}-${VIDALIA_APPVERSION}"
+!define BUNDLE_REVISION     "1"
+!define BUNDLE_PRODVERSION  "${VIDALIA_APPVERSION}.${BUNDLE_REVISION}" ; Product version must be x.x.x.x
+!define BUNDLE_DESC         "${BUNDLE_NAME} ${BUNDLE_APPVERSION}"
+!define INSTALLFILE         "vidalia-bundle-${BUNDLE_APPVERSION}.exe"
+
+;--------------------------------
+; Installer file details
+VIAddVersionKey "ProductName"     "${BUNDLE_NAME}"
+VIAddVersionKey "Comments"        "${BUNDLE_DESC}"
+VIAddVersionKey "FileVersion"     "${BUNDLE_APPVERSION}"
+VIAddVersionKey "FileDescription" "${BUNDLE_DESC}"
+VIProductVersion "${BUNDLE_PRODVERSION}"
+
+;--------------------------------
+; Basic installer information
+Name            "${BUNDLE_NAME}"
+Caption         "$(BundleSetupCaption)"
+BrandingText    "${BUNDLE_DESC} (Rev. ${BUNDLE_REVISION})"
+OutFile         "${INSTALLFILE}"
+InstallDir      "$PROGRAMFILES"
+SetOverWrite    ifnewer
+AutoCloseWindow false
+ShowInstDetails show
+CRCCheck        on
+XPStyle         on
+
+;--------------------------------
+; MUI Options
+!define MUI_WELCOMEPAGE_TITLE "$(BundleWelcomeTitle)"
+!define MUI_WELCOMEPAGE_TEXT  "$(BundleWelcomeText)"
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
+!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
+!define MUI_HEADERIMAGE
+!define MUI_FINISHPAGE_TEXT "$(BundleFinishText)"
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_FUNCTION CustomFinishFn
+!define MUI_FINISHPAGE_RUN_TEXT "$(BundleRunNow)"
+!define MUI_FINISHPAGE_LINK "$(BundleLinkText)"
+!define MUI_FINISHPAGE_LINK_LOCATION  "http://tor.eff.org/docs/tor-doc-win32.html";
+
+;--------------------------------
+; Pages
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+
+;--------------------------------
+; Available languages
+!include "vidalia_en.nsh"
+!insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+; Install types
+!ifndef NOINSTTYPES ; only if not defined
+  InstType "Full"
+  InstType "Base"
+  ;InstType /COMPONENTSONLYONCUSTOM
+!endif
+
+;--------------------------------
+; Functions
+Function .onInit
+  !insertmacro MUI_LANGDLL_DISPLAY
+FunctionEnd
+
+;--------------------------------
+; Tor
+Var configdir
+Var configfile
+var bInstallTor
+SectionGroup "!${TOR_DESC}" TorGroup
+    ;--------------------------------
+    ; Tor application binaries
+    Section "${TOR_NAME}" Tor
+    ;Files that have to be installed for tor to run and that the user
+    ;cannot choose not to install
+       SectionIn 1 2
+       SetOutPath "$INSTDIR\Tor"
+       File "tor\${TOR_APPVERSION}\tor.exe"
+       File "tor\${TOR_APPVERSION}\tor_resolve.exe"
+       File "tor\${TOR_APPVERSION}\${TOR_UNINST}"
+       WriteIniStr "$INSTDIR\Tor\Tor Website.url" "InternetShortcut" "URL" "http://tor.eff.org";
+
+       StrCpy $configfile "torrc"
+       StrCpy $configdir $APPDATA\Tor
+       SetOutPath $configdir
+
+       ;If there's already a torrc config file, ask if they want to
+       ;overwrite it with the new one.
+       IfFileExists "$configdir\torrc" "" endiftorrc
+          MessageBox MB_ICONQUESTION|MB_YESNO "$(TorAskOverwriteTorrc)" IDNO yesreplace
+          Delete $configdir\torrc
+          Goto endiftorrc
+         yesreplace:
+          StrCpy $configfile "torrc.sample"
+       endiftorrc:
+       File /oname=$configfile "tor\${TOR_APPVERSION}\torrc.sample"
+
+       ; Write the uninstall keys for Windows
+       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "DisplayName" "${TOR_DESC}"
+       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "UninstallString" '"$INSTDIR\Tor\${TOR_UNINST}"'
+       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "NoModify" 1
+       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tor" "NoRepair" 1
+       
+       IntOp $bInstallTor 0 + 1
+    SectionEnd
+
+    ;--------------------------------
+    ; OpenSSL binaries
+    Section "$(TorOpenSSL)" TorOpenSSL
+       SectionIn 1 2
+       SetOutPath "$INSTDIR\Tor"
+       File "tor\${TOR_APPVERSION}\libeay32.dll"
+       File "tor\${TOR_APPVERSION}\ssleay32.dll"
+    SectionEnd
+
+    ;--------------------------------
+    ; Tor documentation
+    Section "$(TorDocumentation)" TorDocs
+       SectionIn 1
+       SetOutPath "$INSTDIR\Tor\Documents"
+       File "tor\${TOR_APPVERSION}\Documents\*.*"
+    SectionEnd
+
+    ;--------------------------------
+    ; Tor Start menu shortcuts
+    Section "$(TorShortcuts)" TorShortcuts
+      SectionIn 1
+        SetShellVarContext all ; (Add to "All Users" Start Menu if possible)
+        SetOutPath "$INSTDIR\Tor"
+        IfFileExists "$SMPROGRAMS\Tor\*.*" "" +2
+           RMDir /r "$SMPROGRAMS\Tor"
+        
+        CreateDirectory "$SMPROGRAMS\Tor"
+        CreateShortCut "$SMPROGRAMS\Tor\Tor.lnk" "$INSTDIR\Tor\tor.exe"
+        CreateShortCut "$SMPROGRAMS\Tor\Torrc.lnk" "Notepad.exe" "$configdir\torrc"
+        CreateShortCut "$SMPROGRAMS\Tor\Tor Website.lnk" "$INSTDIR\Tor\Tor Website.url"
+        CreateShortCut "$SMPROGRAMS\Tor\Uninstall.lnk" "$INSTDIR\Tor\${TOR_UNINST}"
+        
+        IfFileExists "$INSTDIR\Tor\Documents\*.*" "" endifdocs
+          CreateDirectory "$SMPROGRAMS\Tor\Documents"
+          CreateShortCut "$SMPROGRAMS\Tor\Documents\Tor Documentation.lnk" "$INSTDIR\Tor\Documents"
+          CreateShortCut "$SMPROGRAMS\Tor\Documents\Version Specification.lnk" "$INSTDIR\Tor\Documents\version-spec.txt"
+        endifdocs:
+    SectionEnd
+SectionGroupEnd
+
+
+;--------------------------------
+; Vidalia
+var bInstallVidalia
+SectionGroup "${VIDALIA_DESC}" VidaliaGroup
+    ;--------------------------------
+    ; Vidalia application binaries
+    Section "${VIDALIA_NAME}" Vidalia
+      SectionIn 1 2
+
+      ; Set output path to the installation directory.
+      SetOutPath "$INSTDIR\Vidalia"
+      File "Vidalia\${VIDALIA_APPVERSION}\${VIDALIA_EXEC}"
+      File "Vidalia\${VIDALIA_APPVERSION}\${VIDALIA_UNINST}"
+      File "Vidalia\${VIDALIA_APPVERSION}\mingwm10.dll"
+      File "Vidalia\${VIDALIA_APPVERSION}\README"
+      File "Vidalia\${VIDALIA_APPVERSION}\CHANGELOG"
+      File "Vidalia\${VIDALIA_APPVERSION}\LICENSE"
+      File "Vidalia\${VIDALIA_APPVERSION}\COPYING"
+      File "Vidalia\${VIDALIA_APPVERSION}\AUTHORS"
+      File "BUNDLE_LICENSE"
+      
+      ; Tor gets installed to $INSTDIR\Tor, so let's remember it
+      ; But first, we have to replace all the '\'s with '\\'s in the $INSTDIR
+      ; Does NSIS make this easy by providing the ability to replace substrings? No.
+      Push $INSTDIR
+      Push "\"
+      Push "\\"
+      Call StrRep
+      Pop $R0 ; contains the modified version of $INSTDIR
+
+      SetShellVarContext current
+      IfFileExists "$APPDATA\Vidalia" EndIfConf
+        CreateDirectory "$APPDATA\Vidalia"
+      EndIfConf:
+      WriteINIStr "$APPDATA\Vidalia\vidalia.conf" Tor TorExecutable "$R0\\Tor\\${TOR_EXEC}"
+      SetShellVarContext all
+
+      ; Write the uninstall keys for Windows  
+      WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "DisplayName" "${VIDALIA_DESC}"
+      WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "UninstallString" '"$INSTDIR\Vidalia\${VIDALIA_UNINST}"'
+      WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "NoModify" 1
+      WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vidalia" "NoRepair" 1
+      
+      IntOp $bInstallVidalia 0 + 1
+    SectionEnd
+
+    ;--------------------------------
+    ; Vidalia Start menu shortcuts
+    Section "$(VidaliaShortcuts)" VidaliaShortcuts
+      SectionIn 1
+      SetShellVarContext all ; (Add to "All Users" Start Menu if possible)
+      CreateDirectory "$SMPROGRAMS\Vidalia"
+      CreateShortCut "$SMPROGRAMS\Vidalia\Uninstall.lnk" "$INSTDIR\Vidalia\uninstall.exe" "" "$INSTDIR\Vidalia\${VIDALIA_UNINST}" 0
+      CreateShortCut "$SMPROGRAMS\Vidalia\Vidalia.lnk" "$INSTDIR\Vidalia\${VIDALIA_EXEC}" "" "$INSTDIR\Vidalia\${VIDALIA_EXEC}" 0
+    SectionEnd
+
+    ;--------------------------------
+    ; Run Vidalia at startup
+    Section "$(VidaliaStartup)" VidaliaStartup
+      SectionIn 1
+      WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${VIDALIA_NAME}" '"$INSTDIR\Vidalia\${VIDALIA_EXEC}"'
+    SectionEnd    
+SectionGroupEnd
+
+
+;--------------------------------
+; Privoxy
+var bInstallPrivoxy
+SectionGroup "${PRIVOXY_DESC}" PrivoxyGroup
+    ;--------------------------------
+    ; Privoxy application binaries
+    Section "${PRIVOXY_NAME}" Privoxy
+        SectionIn 1 2
+        ; add files / whatever that need to be installed here.
+        SetOutPath "$INSTDIR\Privoxy"
+        File /r Privoxy\${PRIVOXY_APPVERSION}\*.*
+
+        WriteRegStr HKEY_CLASSES_ROOT "PrivoxyActionFile\shell\open\command" "" 'Notepad.exe "%1"'
+        WriteRegStr HKEY_CLASSES_ROOT ".action" "" "PrivoxyActionFile"
+        WriteRegStr HKEY_CLASSES_ROOT "PrivoxyFilterFile\shell\open\command" "" 'Notepad.exe "%1"'
+        WriteRegStr HKEY_CLASSES_ROOT ".filter" "" "PrivoxyFilterFile"
+       
+        ; Write the installation path into the registry
+        WriteRegStr HKCU SOFTWARE\Privoxy "Install_Dir" "$INSTDIR"
+
+        ; Write the uninstall keys for Windows
+        WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "DisplayName" "${PRIVOXY_DESC}"
+        WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "UninstallString" '"$INSTDIR\Privoxy\${PRIVOXY_UNINST}"'
+        WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "NoModify" 1
+        WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Privoxy" "NoRepair" 1
+               
+       
+        IntOp $bInstallPrivoxy 0 + 1
+    SectionEnd
+
+    ;--------------------------------
+    ; Privoxy Start menu shortcuts
+    Section "$(PrivoxyShortcuts)" PrivoxyShortcuts
+        SectionIn 1
+        SetShellVarContext all ; (Add to "All Users" Start Menu if possible)
+        RMDir /r "$SMPROGRAMS\Privoxy"
+        CreateDirectory "$SMPROGRAMS\Privoxy"
+        CreateShortCut "$SMPROGRAMS\Privoxy\Privoxy.lnk" "$INSTDIR\Privoxy\privoxy.exe"
+        WriteINIStr "$SMPROGRAMS\Privoxy\Web-based Configuration.url" "InternetShortcut" "URL" "http://config.privoxy.org/";
+        CreateShortCut "$SMPROGRAMS\Privoxy\Web-based Feedback.lnk" "$INSTDIR\Privoxy\doc\user-manual\contact.html"
+        CreateDirectory "$SMPROGRAMS\Privoxy\Edit Config"
+        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Main Configuration.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\config.txt"'
+        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Default Actions.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\default.action"'
+        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\User Actions.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\user.action"'
+        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Filters.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\default.filter"'
+        CreateShortCut "$SMPROGRAMS\Privoxy\Edit Config\Trust list.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\trust.txt"'
+        CreateDirectory "$SMPROGRAMS\Privoxy\Documentation"
+        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\User Manual.lnk" "$INSTDIR\Privoxy\doc\user-manual\index.html"
+        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\Frequently Asked Questions.lnk" "$INSTDIR\Privoxy\doc\faq\index.html"
+        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\Credits.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\AUTHORS.txt"'
+        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\License.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\LICENSE.txt"'
+        CreateShortCut "$SMPROGRAMS\Privoxy\Documentation\ReadMe file.lnk" "Notepad.exe" '"$INSTDIR\Privoxy\README.txt"'
+        WriteINIStr "$SMPROGRAMS\Privoxy\Documentation\Web Site.url" "InternetShortcut" "URL" "http://privoxy.org/";
+        CreateShortCut "$SMPROGRAMS\Privoxy\Privoxy Uninstall.lnk" "$INSTDIR\Privoxy\${PRIVOXY_UNINST}"
+    SectionEnd
+ 
+    ;--------------------------------
+    ; Run Privoxy at startup
+    Section "$(PrivoxyStartup)" PrivoxyStartup
+      SectionIn 1
+      CreateShortCut "$SMSTARTUP\Privoxy.lnk" "$INSTDIR\Privoxy\privoxy.exe" "" "" 0 SW_SHOWMINIMIZED
+    SectionEnd     
+SectionGroupEnd
+
+Function CustomFinishFn
+    IntCmp $bInstallVidalia 1 run_vidalia check_tor check_tor
+    run_vidalia:
+        Exec '"$INSTDIR\Vidalia\${VIDALIA_EXEC}"'
+        goto check_privoxy
+    
+    check_tor:
+    IntCmp $bInstallTor 1 run_tor check_privoxy check_privoxy
+    run_tor:
+        Exec '"$INSTDIR\Tor\${TOR_EXEC}"'
+    
+    check_privoxy:
+    IntCmp $bInstallPrivoxy 1 run_privoxy done done
+    run_privoxy:
+        Exec '"$INSTDIR\Privoxy\${PRIVOXY_EXEC}"'
+    done:
+FunctionEnd
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+  !insertmacro MUI_DESCRIPTION_TEXT ${Tor} "$(TorAppDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${TorGroup} "$(TorGroupDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${TorOpenSSL} "$(TorOpenSSLDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${TorDocs} "$(TorDocumentationDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${TorShortcuts} "$(TorShortcutsDesc)"
+
+  !insertmacro MUI_DESCRIPTION_TEXT ${Vidalia} "$(VidaliaAppDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${VidaliaGroup} "$(VidaliaGroupDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${VidaliaStartup} "$(VidaliaStartupDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${VidaliaShortcuts} "$(VidaliaShortcutsDesc)"
+
+  !insertmacro MUI_DESCRIPTION_TEXT ${Privoxy} "$(PrivoxyAppDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${PrivoxyGroup} "$(PrivoxyGroupDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${PrivoxyStartup} "$(PrivoxyStartupDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${PrivoxyShortcuts} "$(PrivoxyShortcutsDesc)"
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+Function StrRep
+ 
+  ;Written by dirtydingus 2003-02-20 04:30:09 
+  ; USAGE
+  ;Push String to do replacement in (haystack)
+  ;Push String to replace (needle)
+  ;Push Replacement
+  ;Call StrRep
+  ;Pop $R0 result	
+ 
+  Exch $R4 ; $R4 = Replacement String
+  Exch
+  Exch $R3 ; $R3 = String to replace (needle)
+  Exch 2
+  Exch $R1 ; $R1 = String to do replacement in (haystack)
+  Push $R2 ; Replaced haystack
+  Push $R5 ; Len (needle)
+  Push $R6 ; len (haystack)
+  Push $R7 ; Scratch reg
+  StrCpy $R2 ""
+  StrLen $R5 $R3
+  StrLen $R6 $R1
+loop:
+  StrCpy $R7 $R1 $R5
+  StrCmp $R7 $R3 found
+  StrCpy $R7 $R1 1 ; - optimization can be removed if U know len needle=1
+  StrCpy $R2 "$R2$R7"
+  StrCpy $R1 $R1 $R6 1
+  StrCmp $R1 "" done loop
+found:
+  StrCpy $R2 "$R2$R4"
+  StrCpy $R1 $R1 $R6 $R5
+  StrCmp $R1 "" done loop
+done:
+  StrCpy $R3 $R2
+  Pop $R7
+  Pop $R6
+  Pop $R5
+  Pop $R2
+  Pop $R1
+  Pop $R4
+  Exch $R3
+	
+FunctionEnd
+

Modified: trunk/pkg/win32/vidalia.nsi
===================================================================
--- trunk/pkg/win32/vidalia.nsi	2006-10-14 01:57:50 UTC (rev 1334)
+++ trunk/pkg/win32/vidalia.nsi	2006-10-14 06:15:19 UTC (rev 1335)
@@ -1,77 +1,69 @@
 ;-------------------------------------------
-; vidalia.nsi
+; $Id: $
 ;
-;  Copyright (c) 2006, Matt Edman, Justin Hipple           
-;  See LICENSE for licensing information 
-;  + Russian translation
+; Copyright (c) 2006, Matt Edman, Justin Hipple           
+; See LICENSE for licensing information
 ;-------------------------------------------
 !include "MUI.nsh"
 
+SetCompressor /SOLID lzma
+!packhdr header.dat "upx --best header.dat"
+
 ;---------------------------------
-; Global Definitions
-!define APPVERSION "0.0.8"
-!define PRODVERSION "${APPVERSION}.0" ; Product version must be x.x.x.x
-!define APPNAME "Vidalia"
-!define APPEXEC "vidalia.exe"
-!define APPDESCRIPTION "${APPNAME} ${APPVERSION}"
-!define AUTHOR "Matt Edman, Justin Hipple"
-!define INSTALLFILE "vidalia-${APPVERSION}.exe"
+; Global definitions
+!define VIDALIA_NAME        "Vidalia"
+!define VIDALIA_EXEC        "vidalia.exe"
+!define VIDALIA_APPVERSION  "0.0.8"
+!define VIDALIA_PRODVERSION "${VIDALIA_APPVERSION}.0" ; Product version must be x.x.x.x
+!define VIDALIA_AUTHORS     "Matt Edman, Justin Hipple"
+!define VIDALIA_INSTALLFILE "vidalia-${VIDALIA_APPVERSION}.exe"
+!define VIDALIA_DESC "${VIDALIA_NAME} ${VIDALIA_APPVERSION}"
 
-
 ;--------------------------------
-; Basic Installer Information
-Name "${APPNAME}"
-Caption "$(LSetup)"
-BrandingText "${APPDESCRIPTION}"
-OutFile "${INSTALLFILE}"
-CRCCheck on
+; Installer file details
+VIAddVersionKey "ProductName"     "${VIDALIA_NAME}"
+VIAddVersionKey "Comments"        "${VIDALIA_DESC}"
+VIAddVersionKey "CompanyName"     "${VIDALIA_AUTHORS}"
+VIAddVersionKey "LegalTrademarks" "${VIDALIA_AUTHORS}"
+VIAddVersionKey "LegalCopyright"  "${VIDALIA_AUTHORS}"
+VIAddVersionKey "FileVersion"     "${VIDALIA_APPVERSION}"
+VIAddVersionKey "FileDescription" "${VIDALIA_DESC}"
+VIProductVersion "${VIDALIA_PRODVERSION}"
 
 ;--------------------------------
+; Basic installer information
+Name              "${VIDALIA_NAME}"
+Caption           "$(VidaliaSetupCaption)"
+BrandingText      "${VIDALIA_DESC}"
+OutFile           "${VIDALIA_INSTALLFILE}"
+InstallDir        "$PROGRAMFILES\${VIDALIA_NAME}"
+InstallDirRegKey  HKCU "Software" "${VIDALIA_NAME}"
+SetOverWrite      ifnewer
+AutoCloseWindow   false
+ShowInstDetails   show
+CRCCheck          on
+XPStyle           on
 
-VIAddVersionKey "ProductName" "${APPNAME}"
-VIAddVersionKey "Comments" "${APPDESCRIPTION}"
-VIAddVersionKey "CompanyName" "${AUTHOR}"
-VIAddVersionKey "LegalTrademarks" "${AUTHOR}"
-VIAddVersionKey "LegalCopyright" "é ${AUTHOR}"
-VIAddVersionKey "FileVersion" "${APPVERSION}"
-VIAddVersionKey "FileDescription" "${APPDESCRIPTION}"
-VIProductVersion "${PRODVERSION}"
-
-OutFile "${INSTALLFILE}"
-
-InstallDir "$PROGRAMFILES\${APPNAME}"
-InstallDirRegKey HKCU "Software" "${APPNAME}"
-
-SetOverWrite ifnewer
-AutoCloseWindow false
-ShowInstDetails show
-SetCompressor /SOLID lzma
-!packhdr header.dat "upx --best header.dat"
-XPStyle on
-
-;!insertmacro MUI_RESERVEFILE_LANGDLL
-
 ;--------------------------------
-; Install Types
+; Install types
 !ifndef NOINSTTYPES ; only if not defined
   InstType "Full"
   InstType "Base"
   ;InstType /COMPONENTSONLYONCUSTOM
 !endif
 
-
 ;--------------------------------
 ; MUI Options
-!define MUI_WELCOMEPAGE_TITLE "$(LWelcomeTitle)"
-!define MUI_WELCOMEPAGE_TEXT "$(LWelcomeText)"
+!define MUI_WELCOMEPAGE_TITLE "$(VidaliaWelcomeTitle)"
+!define MUI_WELCOMEPAGE_TEXT  "$(VidaliaWelcomeText)"
 !define MUI_ABORTWARNING
 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico"
 !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
 !define MUI_HEADERIMAGE
-!define MUI_FINISHPAGE_RUN "$INSTDIR\${APPEXEC}"
-!define MUI_FINISHPAGE_RUN_TEXT "$(LRunNowText)"
-!define MUI_FINISHPAGE_LINK "$(LProjectText)"
+!define MUI_FINISHPAGE_RUN "$INSTDIR\${VIDALIA_EXEC}"
+!define MUI_FINISHPAGE_RUN_TEXT "$(VidaliaRunNow)"
+!define MUI_FINISHPAGE_LINK "$(VidaliaLinkText)"
 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.vidalia-project.net";
 
 ;--------------------------------
@@ -87,58 +79,24 @@
 !insertmacro MUI_UNPAGE_FINISH
 
 ;--------------------------------
-; Languages
+; Available languages
+!include "vidalia_en.nsh"
 !insertmacro MUI_LANGUAGE "English"
-!insertmacro MUI_LANGUAGE "Russian"
 
-LangString LSetup ${LANG_ENGLISH} "${APPDESCRIPTION} Setup"
-LangString LSetup ${LANG_RUSSIAN} "Óñòàíîâêà ${APPDESCRIPTION}"
-
-LangString LWelcomeTitle ${LANG_ENGLISH} "Welcome to the ${APPNAME} Setup Wizard"
-LangString LWelcomeTitle ${LANG_RUSSIAN} "Âàñ ïðèâåòñòâóåò ìàñòåð óñòàíîâêè ${APPNAME}"
-
-LangString LWelcomeText ${LANG_ENGLISH} "This wizard will guide you through the installation of ${APPDESCRIPTION}.\r\n\r\n$_CLICK"
-LangString LWelcomeText ${LANG_RUSSIAN} "Ýòà ïðîãðàììà óñòàíîâèò ${APPDESCRIPTION} íà Âàø êîìïüþòåð.\r\n\r\n$_CLICK"
-
-LangString LRunNowText ${LANG_ENGLISH} "Run ${APPNAME} now"
-LangString LRunNowText ${LANG_RUSSIAN} "Çàïóñòèòü ${APPNAME} ñåé÷àñ"
-
-LangString LAppSec ${LANG_ENGLISH} "${APPNAME} (required)"
-LangString LAppSec ${LANG_RUSSIAN} "${APPNAME} (îáÿçàòåëüíî)"
-
-LangString LMainMenuSec ${LANG_ENGLISH} "Add to Start Menu"
-LangString LMainMenuSec ${LANG_RUSSIAN} "ßðëûêè â Ãëàâíîå ìåíþ"
-
-LangString LStartupSec ${LANG_ENGLISH} "Run At Startup"
-LangString LStartupSec ${LANG_RUSSIAN} "Àâòîçàïóñê"
-
-LangString LAppDesc ${LANG_ENGLISH} "${APPNAME} Executable"
-LangString LAppDesc ${LANG_RUSSIAN} "Èñïîëíÿåìûé ôàéë ${APPNAME}"
-
-LangString LMainMenuDesc ${LANG_ENGLISH} "Add ${APPNAME} to your Start Menu"
-LangString LMainMenuDesc ${LANG_RUSSIAN} "Äîáàâèòü ÿðëûêè â Ãëàâíîå Ìåíþ"
-
-LangString LStartupDesc ${LANG_ENGLISH} "Automatically start ${APPNAME} at startup"
-LangString LStartupDesc ${LANG_RUSSIAN} "Àâòîìàòè÷åñêè çàïóñêàòü ${APPNAME}  ïðè çàãðóçêå ñèñòåìû"
-
-LangString LProjectText ${LANG_ENGLISH} "{APPNAME} project site"
-LangString LProjectText ${LANG_RUSSIAN} "Ñàéò ïðîåêòà ${APPNAME}"
-
 ;--------------------------------
 ; Functions
-
 Function .onInit
   !insertmacro MUI_LANGDLL_DISPLAY
 FunctionEnd
 
 ;--------------------------------
 ; Required Components
-Section "$(LAppSec)" Vidalia
+Section "${VIDALIA_DESC}" Vidalia
   SectionIn RO
   
   ; Set output path to the installation directory.
   SetOutPath $INSTDIR    
-  File "..\..\release\${APPEXEC}"
+  File "..\..\release\${VIDALIA_EXEC}"
   File "..\..\release\mingwm10.dll"
   File "..\..\AUTHORS"
   File "..\..\CHANGELOG"
@@ -147,58 +105,59 @@
   File "..\..\README"
 
   ; Write the uninstall keys for Windows
-  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME} ${APPVERSION}"
-  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" '"$INSTDIR\uninstall.exe"'
-  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" 1
-  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" 1
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${VIDALIA_NAME}" "DisplayName" "${VIDALIA_DESC}"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${VIDALIA_NAME}" "UninstallString" '"$INSTDIR\uninstall.exe"'
+  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${VIDALIA_NAME}" "NoModify" 1
+  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${VIDALIA_NAME}" "NoRepair" 1
   WriteUninstaller "uninstall.exe" 
 SectionEnd
 
 ;--------------------------------
 ; Start Menu Shortcuts
 ; Optional section (can be disabled by the user)
-Section "$(LMainMenuSec)" Shortcuts
-  SectionIn 1 2
-  CreateDirectory "$SMPROGRAMS\${APPNAME}"
-  CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\${APPEXEC}" "" "$INSTDIR\${APPEXEC}" 0  
-  CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+Section "$(VidaliaShortcuts)" Shortcuts
+  SectionIn 1
+  CreateDirectory "$SMPROGRAMS\${VIDALIA_NAME}"
+  CreateShortCut  "$SMPROGRAMS\${VIDALIA_NAME}\${VIDALIA_NAME}.lnk" "$INSTDIR\${VIDALIA_EXEC}" "" "$INSTDIR\${VIDALIA_EXEC}" 0  
+  CreateShortCut  "$SMPROGRAMS\${VIDALIA_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
 SectionEnd
 
-
 ;--------------------------------
 ; Run At Startup
-Section "$(LStartupSec)" RunAtStartup
-  SectionIn 1 2
-  WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${APPNAME}" '"$INSTDIR\${APPEXEC}"'
+Section "$(VidaliaStartup)" RunAtStartup
+  SectionIn 1
+  WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${VIDALIA_NAME}" '"$INSTDIR\${VIDALIA_EXEC}"'
 SectionEnd
 
-
 ;--------------------------------
 ; Uninstaller
 Section "Uninstall"
   SetShellVarContext all
 
   ; Remove registry keys
-  DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run\" "${APPNAME}"
-  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
-  DeleteRegKey HKCU "Software\${APPNAME}"
+  DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run\" "${VIDALIA_NAME}"
+  DeleteRegKey   HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${VIDALIA_NAME}"
+  DeleteRegKey   HKCU "Software\${VIDALIA_NAME}"
 
   ; Remove files and uninstaller
   Delete $INSTDIR\uninstall.exe
 
   ; Remove shortcuts, if any
-  Delete "$SMPROGRAMS\${APPNAME}\*.*"
+  Delete "$SMPROGRAMS\${VIDALIA_NAME}\*.*"
 
   ; Remove directories used
-  RMDir "$SMPROGRAMS\${APPNAME}"
+  RMDir "$SMPROGRAMS\${VIDALIA_NAME}"
   RMDir /r "$INSTDIR"
+
+  SetShellVarContext current
   RMDir /r "$APPDATA\Vidalia"
 SectionEnd
 
 ;--------------------------------
 ; Descriptions
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-  !insertmacro MUI_DESCRIPTION_TEXT ${Vidalia} "$(LAppDesc)"
-  !insertmacro MUI_DESCRIPTION_TEXT ${Shortcuts} "$(LMainMenuDesc)"
-  !insertmacro MUI_DESCRIPTION_TEXT ${RunAtStartup} "$(LStartupDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${Vidalia} "$(VidaliaAppDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${Shortcuts} "$(VidaliaShortcutsDesc)"
+  !insertmacro MUI_DESCRIPTION_TEXT ${RunAtStartup} "$(VidaliaStartupDesc)"
 !insertmacro MUI_FUNCTION_DESCRIPTION_END
+

Added: trunk/pkg/win32/vidalia_en.nsh
===================================================================
--- trunk/pkg/win32/vidalia_en.nsh	                        (rev 0)
+++ trunk/pkg/win32/vidalia_en.nsh	2006-10-14 06:15:19 UTC (rev 1335)
@@ -0,0 +1,50 @@
+;; $Id: $
+;; 
+;; Vidalia installer and bundle English translation
+;; 
+;; All translations should be derived from this file.
+;;
+
+; Bundle
+LangString BundleSetupCaption         ${LANG_ENGLISH} "${BUNDLE_NAME} setup"
+LangString BundleWelcomeText          ${LANG_ENGLISH} "This wizard will guide you through the installation of:\r\n\tTor\t${TOR_APPVERSION}\r\n\tVidalia\t${VIDALIA_APPVERSION}\r\n\tPrivoxy\t${PRIVOXY_APPVERSION}\r\n\r\nIf you have previously installed Tor, Vidalia, or Privoxy, please make sure they are not running before continuing this installation.\r\n\r\n$_CLICK"
+LangString BundleWelcomeTitle         ${LANG_ENGLISH} "Welcome to the ${BUNDLE_NAME} Setup Wizard"
+LangString BundleLinkText             ${LANG_ENGLISH} "${TOR_NAME} installation documentation"
+LangString BundleFinishText           ${LANG_ENGLISH} "Installation is complete.\r\nPlease see http://tor.eff.org/docs/tor-doc-win32.html to learn how to  configure your applications to use Tor.\r\n"
+LangString BundleRunNow               ${LANG_ENGLISH} "Run installed components now"
+
+
+; Vidalia
+LangString VidaliaGroupDesc           ${LANG_ENGLISH} "Install ${VIDALIA_DESC}."
+LangString VidaliaSetupCaption        ${LANG_ENGLISH} "${VIDALIA_NAME} setup"
+LangString VidaliaWelcomeText         ${LANG_ENGLISH} "This wizard will guide you through the installation of ${VIDALIA_DESC}.\r\n\r\n$_CLICK"
+LangString VidaliaWelcomeTitle        ${LANG_ENGLISH} "Welcome to the ${VIDALIA_NAME} Setup Wizard"
+LangString VidaliaLinkText            ${LANG_ENGLISH} "${VIDALIA_NAME} homepage"
+LangString VidaliaAppDesc             ${LANG_ENGLISH} "Install ${VIDALIA_DESC}."
+LangString VidaliaStartup             ${LANG_ENGLISH} "Run At Startup"
+LangString VidaliaStartupDesc         ${LANG_ENGLISH} "Automatically run ${VIDALIA_NAME} at startup."
+LangString VidaliaShortcuts           ${LANG_ENGLISH} "Add to Start Menu"
+LangString VidaliaShortcutsDesc       ${LANG_ENGLISH} "Add ${VIDALIA_NAME} to your Start menu."
+LangString VidaliaRunNow              ${LANG_ENGLISH} "Run ${VIDALIA_NAME} now"
+
+
+; Tor
+LangString TorGroupDesc               ${LANG_ENGLISH} "Install ${TOR_DESC}."
+LangString TorAppDesc                 ${LANG_ENGLISH} "Install ${TOR_DESC}."
+LangString TorAskOverwriteTorrc       ${LANG_ENGLISH} "You already have a Tor configuration file.$\r$\nDo you want to overwrite it with the default sample configuration file?"
+LangString TorOpenSSL                 ${LANG_ENGLISH} "OpenSSL ${OPENSSL_APPVERSION}"
+LangString TorOpenSSLDesc             ${LANG_ENGLISH} "Install ${OPENSSL_DESC}."
+LangString TorDocumentation           ${LANG_ENGLISH} "Documentation"
+LangString TorDocumentationDesc       ${LANG_ENGLISH} "Install ${TOR_NAME} documentation."
+LangString TorShortcuts               ${LANG_ENGLISH} "Add to Start Menu"
+LangString TorShortcutsDesc           ${LANG_ENGLISH} "Add ${TOR_NAME} to your Start menu."
+
+
+; Privoxy
+LangString PrivoxyGroupDesc           ${LANG_ENGLISH} "Install ${PRIVOXY_DESC}"
+LangString PrivoxyAppDesc             ${LANG_ENGLISH} "Install ${PRIVOXY_DESC}."
+LangString PrivoxyShortcuts           ${LANG_ENGLISH} "Add to Start Menu"
+LangString PrivoxyShortcutsDesc       ${LANG_ENGLISH} "Add ${PRIVOXY_NAME} to your Start menu."
+LangString PrivoxyStartup             ${LANG_ENGLISH} "Run At Startup"
+LangString PrivoxyStartupDesc         ${LANG_ENGLISH} "Automatically run ${PRIVOXY_NAME} at startup."
+