Last Comment Bug 385377 - Provide optional installation for Debug QA and Palm Sync extensions on Windows.
: Provide optional installation for Debug QA and Palm Sync extensions on Windows.
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Installer (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Mark Banner (:standard8)
: installer
:
Mentors:
Depends on: 351917 381343
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-21 14:57 PDT by Mark Banner (:standard8)
Modified: 2007-07-30 11:01 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
The not-working-fix. (9.21 KB, patch)
2007-06-21 14:57 PDT, Mark Banner (:standard8)
no flags Details | Diff | Splinter Review
Patch v1 (22.38 KB, patch)
2007-07-16 15:01 PDT, Mark Banner (:standard8)
bugzilla: review+
Details | Diff | Splinter Review
Patch v2 (21.79 KB, patch)
2007-07-28 08:03 PDT, Mark Banner (:standard8)
bugzilla: review+
neil: superreview+
Details | Diff | Splinter Review

Description Mark Banner (:standard8) 2007-06-21 14:57:42 PDT
Created attachment 269289 [details] [diff] [review]
The not-working-fix.

Currently Palm Sync (if present in an installer build) will be installed by default by the Windows NSIS installer. As it requests to install a palm sync conduit on initial start, I'd prefer it if it was an optional install.

We're also going to be getting the DebugQA extension live soon (preferably as soon as this one is fixed). This should also be an optional install.

I think (and Robert agreed on irc) that both of these shouldn't be in the standard install, but available in the custom install.

The attached patch also fixes a bug with installation of DOMI into a fresh directory - currently if the DOMI directory doesn't exist, then DOMI won't get installed.

However the attached patch doesn't work. I'm not sure why, but it doesn't appear to give the options for palmsync or debugQA (mind you my build doesn't have debugQA in anyway so that is correct), but palmsync should appear. So any ideas why it doesn't work would be appreciated.
Comment 1 Mark Banner (:standard8) 2007-06-28 14:46:38 PDT
Just wanted to let folks know I've found the problem with this patch:

http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh&rev=1.15&mark=202-254#202

That common macro sets up the components page for the installer, I've fiddled about with it and got the options we need, but now I need to do a proper patch to extend it correctly for SeaMonkey (or possibly replace it as we'll want talkback at the bottom of our list of options).
Comment 2 Mark Banner (:standard8) 2007-07-16 15:01:21 PDT
Created attachment 272550 [details] [diff] [review]
Patch v1

This patch removes talkback from the installer - as we've picked up (or very soon will be) breakpad, there's not much point to keep this code any longer - and adds optional items for DebugQA and Palm Sync.

From the "Standard Installation" point of view, DOMI is the only item included in this. DebugQA & Palm Sync are not, as I see them as more additional items.

The common.nsi that toolkit provides which creates an ini file with DOMI & Talkback isn't very useful to us. Therefore I've now created a suite specific custom.nsi file that does macros for creating the ini file, and allows us to make re-ordering the display a lot easier when components are missing from the build (optionally not built/not available on tinderbox).

Any suggestions on improving the information text are welcome.
Comment 3 Robert Kaiser 2007-07-16 18:20:20 PDT
Umm, a bit unrelated but while we're unpackaging Talkback, could we ensure we package breakpad correctly (see also bug 388320)?
Comment 4 Mark Banner (:standard8) 2007-07-17 00:11:42 PDT
(In reply to comment #3)
> Umm, a bit unrelated but while we're unpackaging Talkback, could we ensure we
> package breakpad correctly (see also bug 388320)?

From the checkins/patch comparison, I think Ted's already done that for us.
Comment 5 Robert Kaiser 2007-07-17 03:46:36 PDT
uh, right, I missed that.
Comment 6 Frank Wein [:mcsmurf] 2007-07-26 13:48:20 PDT
Comment on attachment 272550 [details] [diff] [review]
Patch v1

>--- suite/installer/removed-files.in	8 Jul 2007 06:53:16 -0000	1.2
>+++ suite/installer/removed-files.in	16 Jul 2007 21:48:30 -0000
>@@ -1,2 +1,13 @@

Add extensions/talkback@mozilla.org/InstallDisabled to the list and stick a #ifdef XP_WIN around it.

>Index: suite/installer/windows/nsis/installer.nsi
>===================================================================
>RCS file: /cvsroot/mozilla/suite/installer/windows/nsis/installer.nsi,v
>retrieving revision 1.2
>diff -u -p -r1.2 installer.nsi
>--- suite/installer/windows/nsis/installer.nsi	29 May 2007 16:16:26 -0000	1.2
>+++ suite/installer/windows/nsis/installer.nsi	16 Jul 2007 21:48:30 -0000

I think you need to add ${If} $InstallType != 1 before this block :).

>+  ; Custom installs.
>+  ; If DOMi is installed and this install includes DOMi remove it from
>+  ; the installation directory. This will remove it if the user deselected
>+  ; DOMi on the components page.
>+  ${If} ${FileExists} "$INSTDIR\extensions\inspector@mozilla.org"
>+  ${AndIf} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
>+    RmDir /r "$INSTDIR\extensions\inspector@mozilla.org"
>+  ${EndIf}


>@@ -908,13 +886,33 @@ Function leaveComponents
>     SectionSetFlags 1 0 ; Disable install for DOMi
>   ${EndIf}
> 
>-  ${If} ${FileExists} "$EXEDIR\optional\extensions\talkback@mozilla.org"
>+  ${If} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org"
>     ${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field $R1" "State"
>     ; State will be 1 for checked and 0 for unchecked so we can use that to set
>     ; the section flags for installation.
>     SectionSetFlags 2 $R0
>+    IntOp $R1 $R1 + 1
>+  ${Else}
>+    SectionSetFlags 2 0 ; Disable install for debuQA
>+  ${EndIf}

s/debuQA/debugQA

>+  ${If} ${FileExists} "$EXEDIR\optional\extensions\p@m"
>+    ${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field $R1" "State"
>+    ; State will be 1 for checked and 0 for unchecked so we can use that to set
>+    ; the section flags for installation.
>+    SectionSetFlags 3 $R0
>+    IntOp $R1 $R1 + 1
>+  ${Else}
>+    SectionSetFlags 3 0 ; Disable install for debuQA

same as above

>+  ${EndIf}
>+
>+  ${If} ${FileExists} "$EXEDIR\optional\extensions\talkback@mozilla.org"
>+    ${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field $R1" "State"
>+    ; State will be 1 for checked and 0 for unchecked so we can use that to set
>+    ; the section flags for installation.
>+    SectionSetFlags 4 $R0
>   ${Else}
>-    SectionSetFlags 2 0 ; Disable install for TalkBack
>+    SectionSetFlags 4 0 ; Disable install for TalkBack
>   ${EndIf}
> FunctionEnd

r+ with the those things fixed.
Comment 7 Mark Banner (:standard8) 2007-07-28 08:03:08 PDT
Created attachment 274281 [details] [diff] [review]
Patch v2

Incorporates comments from review of v1 and removes a section about talkback that I'd previously missed.
Comment 8 neil@parkwaycc.co.uk 2007-07-29 14:23:02 PDT
Comment on attachment 274281 [details] [diff] [review]
Patch v2

>+!macro checkSuiteComponents
>+  ; If DOMi/Palm Sync/DebugQA aren't available skip the components page
>+  ${Unless} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
>+  ${AndUnless} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org"
>+  ${AndUnless} ${FileExists} "$EXEDIR\optional\extensions\p@m"
>+    Abort
>+  ${EndUnless}
>+!macroend
Bah, AndUnless is confusing. Which idiot invented that? :-\

>+  ${If} ${FileExists} "$EXEDIR\optional\extensions\p@m"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Type   "checkbox"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Text   "$(PALMSYNC_TITLE)"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Left   "15"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Right  "-1"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Top    "$R2"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Bottom "$R3"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" State  "1"
>+    WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Flags  "GROUP"
>+    ${GetSize} "$EXEDIR\optional\extensions\p@m" "/S=0K" $0 $8 $9
>+    SectionSetSize 3 $0
>+    IntOp $R1 $R1 + 1
>+    IntOp $R2 $R2 + $Separation
>+    IntOp $R3 $R3 + $R4
>+  ${Else}
>+    ; Hide debugQA in the components page if it isn't available.
Palm Sync, surely?

>+  ; If DOMi doesn't exist and talkback exists then debugQA will be Field 2
talkback exists?
Comment 9 Frank Wein [:mcsmurf] 2007-07-30 09:56:35 PDT
Comment on attachment 274281 [details] [diff] [review]
Patch v2

removed-files.in:
>+extensions/talkback@mozilla.org/install.rdf
>+extensions/talkback@mozilla.org/chrome.manifest
>+extensions/talkback@mozilla.org/components/qfaservices.dll
>+extensions/talkback@mozilla.org/components/qfaservices.xpt
>+extensions/talkback@mozilla.org/components/BrandRes.dll
>+extensions/talkback@mozilla.org/components/fullsoft.dll
>+extensions/talkback@mozilla.org/components/master.ini
>+extensions/talkback@mozilla.org/components/talkback-l10n.ini
>+extensions/talkback@mozilla.org/components/talkback.cnt
>+extensions/talkback@mozilla.org/components/talkback.exe
>+extensions/talkback@mozilla.org/components/talkback.hlp
>+#ifdef XP_WIN
>+extensions/talkback@mozilla.org/InstallDisabled
>+#endif

Oh sorry, I was not clear here. I meant #ifdef XP_WIN from extensions/talkback@mozilla.org/components/BrandRes.dll up to extensions/talkback@mozilla.org/InstallDisabled (including both files).

installer.nsi:
> Function leaveComponents
>   ; If DOMi exists then it will be Field 2.
>-  ; If DOMi doesn't exist and talkback exists then TalkBack will be Field 2 but
>-  ; if DOMi doesn't exist we won't display this page anyways.
>+  ; If DOMi doesn't exist and talkback exists then debugQA will be Field 2

s/and talkback exists//
Maybe also mention that when DOMi and debugQA do not exist, then palmsync will be Field 2.

>+  ${If} ${FileExists} "$EXEDIR\optional\extensions\p@m"
>+    ${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field $R1" "State"
>+    ; State will be 1 for checked and 0 for unchecked so we can use that to set
>+    ; the section flags for installation.
>+    SectionSetFlags 3 $R0
>+    IntOp $R1 $R1 + 1
>+  ${Else}
>+    SectionSetFlags 3 0 ; Disable install for debugQA

s/debugQA/palmsync

>   ${EndIf}
> FunctionEnd

r+ with that fixed.
Comment 10 Mark Banner (:standard8) 2007-07-30 11:01:37 PDT
Patch checked in with comments addressed -> fixed.

Note You need to log in before you can comment on or make changes to this bug.