Skip to content

Commit

Permalink
Bug 1316136 - Support post-signing/attribution data in full installer…
Browse files Browse the repository at this point in the history
…. r=mhowell

This reuses some logic from the stub installer, moved into common.nsh.

Differential Revision: https://phabricator.services.mozilla.com/D72078

UltraBlame original commit: 7690541a2c14907acc3103d66a96d0d618a64c87
  • Loading branch information
marco-c committed Apr 28, 2020
1 parent 7019c0a commit d32214b
Show file tree
Hide file tree
Showing 3 changed files with 391 additions and 57 deletions.
191 changes: 191 additions & 0 deletions browser/installer/windows/nsis/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ Var
InstallResult
Var
LaunchedNewApp
Var
PostSigningData
;
By
defining
Expand Down Expand Up @@ -541,6 +543,9 @@ insertmacro
CopyFilesFromDir
!
insertmacro
CopyPostSigningData
!
insertmacro
CreateRegKey
!
insertmacro
Expand Down Expand Up @@ -4980,6 +4985,104 @@ STATUS_CLEANUP
"
SetDetailsPrint
none
;
Maybe
copy
the
post
-
signing
data
?
StrCpy
PostSigningData
"
"
{
GetParameters
}
0
ClearErrors
;
We
don
'
t
get
post
-
signing
data
from
the
MSI
.
{
GetOptions
}
0
"
/
LaunchedFromMSI
"
1
{
If
}
{
Errors
}
;
The
stub
will
handle
copying
the
data
if
it
ran
us
.
ClearErrors
{
GetOptions
}
0
"
/
LaunchedFromStub
"
1
{
If
}
{
Errors
}
;
We
'
re
being
run
standalone
copy
the
data
.
{
CopyPostSigningData
}
Pop
PostSigningData
{
EndIf
}
{
EndIf
}
{
Unless
}
Expand Down Expand Up @@ -8144,6 +8247,94 @@ value
{
EndIf
}
;
PostSigningData
should
only
be
empty
if
we
didn
'
t
try
to
copy
the
;
postSigningData
file
at
all
.
If
we
did
try
and
the
file
was
missing
;
or
empty
this
will
be
"
0
"
and
for
consistency
with
the
stub
we
will
;
still
submit
it
.
{
If
}
PostSigningData
!
=
"
"
nsJSON
:
:
Quote
/
always
PostSigningData
Pop
0
nsJSON
:
:
Set
/
tree
ping
"
Data
"
"
attribution
"
/
value
0
{
EndIf
}
nsJSON
:
:
Expand Down
64 changes: 7 additions & 57 deletions browser/installer/windows/nsis/stub.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,9 @@ nsh
"
!
insertmacro
CopyPostSigningData
!
insertmacro
ElevateUAC
!
insertmacro
Expand Down Expand Up @@ -7492,8 +7495,11 @@ ExitCode
ERR_SUCCESS
}
"
Call
{
CopyPostSigningData
}
Pop
PostSigningData
Call
LaunchApp
FunctionEnd
Expand Down Expand Up @@ -8231,62 +8237,6 @@ EndIf
}
FunctionEnd
Function
CopyPostSigningData
{
LineRead
}
"
EXEDIR
\
postSigningData
"
"
1
"
PostSigningData
{
If
}
{
Errors
}
ClearErrors
StrCpy
PostSigningData
"
0
"
{
Else
}
CreateDirectory
"
LOCALAPPDATA
\
Mozilla
\
Firefox
"
CopyFiles
/
SILENT
"
EXEDIR
\
postSigningData
"
"
LOCALAPPDATA
\
Mozilla
\
Firefox
"
{
Endif
}
FunctionEnd
Function
DisplayDownloadError
WebBrowser
:
Expand Down
Loading

0 comments on commit d32214b

Please sign in to comment.