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

[vidalia-svn] r3092: Backport the Firefox warning page .nsi changes (we'll do the (vidalia/branches/vidalia-0.1/pkg/win32)



Author: edmanm
Date: 2008-09-14 15:19:54 -0400 (Sun, 14 Sep 2008)
New Revision: 3092

Added:
   vidalia/branches/vidalia-0.1/pkg/win32/firefox-warning.ini
Modified:
   vidalia/branches/vidalia-0.1/pkg/win32/vidalia-bundle.nsi.in
Log:
Backport the Firefox warning page .nsi changes (we'll do the huge pile of .po
goo separately).


Copied: vidalia/branches/vidalia-0.1/pkg/win32/firefox-warning.ini (from rev 3070, vidalia/trunk/pkg/win32/firefox-warning.ini)
===================================================================
--- vidalia/branches/vidalia-0.1/pkg/win32/firefox-warning.ini	                        (rev 0)
+++ vidalia/branches/vidalia-0.1/pkg/win32/firefox-warning.ini	2008-09-14 19:19:54 UTC (rev 3092)
@@ -0,0 +1,34 @@
+[Settings]
+NumFields=3
+Title=Firefox is not installed
+CancelEnabled=1
+CancelShow=1
+BackEnabled=1
+CancelButtonText=
+NextButtonText=
+BackButtonText=
+
+[Field 1]
+Type=Label
+Left=12
+Top=6
+Right=286
+Bottom=65
+Text=The Mozilla Firefox Web browser is not installed on your computer. \r\nTor will work with other browsers, such as Internet Explorer, but\r\nis easier to use with Firefox, which also does a better job of \r\nprotecting your anonymity. \r\n\r\nIf you would like to install Firefox, please press Cancel, then go \r\nto the Firefox download page at
+
+[Field 2]
+Type=Link
+Left=64
+Top=65
+Right=171
+Bottom=74
+Text=http://www.mozilla.com/firefox/
+State=http://www.mozilla.com/firefox/
+
+[Field 3]
+Type=Label
+Left=12
+Top=78
+Right=286
+Bottom=127
+Text="When you are done installing Firefox, you can once again run the \r\nTor installer.\r\n\r\nOr, if you would prefer to install Tor without Firefox, simply \r\npress Continue. "

Modified: vidalia/branches/vidalia-0.1/pkg/win32/vidalia-bundle.nsi.in
===================================================================
--- vidalia/branches/vidalia-0.1/pkg/win32/vidalia-bundle.nsi.in	2008-09-14 15:59:04 UTC (rev 3091)
+++ vidalia/branches/vidalia-0.1/pkg/win32/vidalia-bundle.nsi.in	2008-09-14 19:19:54 UTC (rev 3092)
@@ -87,6 +87,7 @@
 ;--------------------------------
 ; Pages
 !insertmacro MUI_PAGE_WELCOME
+Page custom FirefoxWarningPage
 !insertmacro MUI_PAGE_COMPONENTS
 !insertmacro MUI_PAGE_DIRECTORY
 !insertmacro MUI_PAGE_INSTFILES
@@ -424,6 +425,22 @@
 ; Functions
 Function .onInit
   !insertmacro MUI_LANGDLL_DISPLAY
+  !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "@Vidalia_SOURCE_DIR@\pkg\win32\firefox-warning.ini" "firefox-warning.ini"
+
+  ReadRegStr $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe" ""
+  StrCmp $1 "" FirefoxNotFound FirefoxFound
+
+  FirefoxNotFound:
+    ; Uncheck the Torbutton options
+    SectionGetFlags ${Torbutton} $0
+    IntOp $0 $0 & ${SECTION_OFF}
+    SectionSetFlags ${Torbutton} $0
+
+    SectionGetFlags ${TorbuttonAddToFirefox} $0
+    IntOp $0 $0 & ${SECTION_OFF}
+    SectionSetFlags ${TorbuttonAddToFirefox} $0
+ 
+  FirefoxFound:
 FunctionEnd
 
 Function .onSelChange
@@ -443,6 +460,20 @@
   Pop $0
 FunctionEnd
 
+Function FirefoxWarningPage
+  ReadRegStr $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe" ""
+  StrCmp $1 "" FirefoxNotFound FirefoxFound
+
+  FirefoxNotFound:
+    !insertmacro MUI_INSTALLOPTIONS_WRITE "firefox-warning.ini" "Settings" "Title" "$(FirefoxWarningPageTitle)"
+    !insertmacro MUI_INSTALLOPTIONS_WRITE "firefox-warning.ini" "Field 1" "Text" "$(FirefoxWarningPageUpperText)"
+    !insertmacro MUI_INSTALLOPTIONS_WRITE "firefox-warning.ini" "Field 3" "Text" "$(FirefoxWarningPageLowerText)"
+    !insertmacro MUI_HEADER_TEXT "$(FirefoxWarningPageTitle)" "$(FirefoxWarningPageSubtitle)" 
+    !insertmacro MUI_INSTALLOPTIONS_DISPLAY "firefox-warning.ini"
+
+  FirefoxFound:
+FunctionEnd
+
 Function CustomFinishFn
     IntCmp $bInstallVidalia 1 run_vidalia check_tor check_tor
     run_vidalia: