summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-03-03 17:01:45 -0500
committerOz Linden <oz@lindenlab.com>2014-03-03 17:01:45 -0500
commit3e5fb8a2741677eb08409dc018b5fef686df2e6b (patch)
treedf353d6d06804aa4d4fbdd5ea8b7aaa8878b3b14
parentfbdbea1b180a8dbee24ec0909979f1a25844b5e0 (diff)
parent556506278ab870f5ac190d25a991511b74074325 (diff)
merge changes for codesign workaround
-rwxr-xr-xindra/newview/viewer_manifest.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 96b4c7268c..fe0774b409 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -622,7 +622,22 @@ class Windows_i686_Manifest(ViewerManifest):
NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
if not os.path.exists(NSIS_path):
NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
- self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
+ installer_created=False
+ nsis_attempts=3
+ nsis_retry_wait=15
+ while (not installer_created) and (nsis_attempts > 0):
+ try:
+ nsis_attempts-=1;
+ self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
+ installer_created=True # if no exception was raised, the codesign worked
+ except ManifestError, err:
+ if nsis_attempts:
+ print >> sys.stderr, "nsis failed, waiting %d seconds before retrying" % nsis_retry_wait
+ time.sleep(nsis_retry_wait)
+ nsis_retry_wait*=2
+ else:
+ print >> sys.stderr, "Maximum nsis attempts exceeded; giving up"
+ raise
# self.remove(self.dst_path_of(tempfile))
# If we're on a build machine, sign the code using our Authenticode certificate. JC
sign_py = os.path.expandvars("${SIGN}")