summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-17 11:37:33 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-17 11:37:33 -0500
commit8a119434ac94d18b888550bea1b125aba1ad446e (patch)
tree52b0e3bb47f74253f3f97f5f7f9e297edd4dc335
parent050cfdc4cabb50df1a3f0005e967359dc800131e (diff)
parent170b82c2e254d3aa9b4e5f31f26dc89283a472a6 (diff)
downloadUXP-8a119434ac94d18b888550bea1b125aba1ad446e.tar
UXP-8a119434ac94d18b888550bea1b125aba1ad446e.tar.gz
UXP-8a119434ac94d18b888550bea1b125aba1ad446e.tar.lz
UXP-8a119434ac94d18b888550bea1b125aba1ad446e.tar.xz
UXP-8a119434ac94d18b888550bea1b125aba1ad446e.zip
Merge branch 'stub-branding-cc'
-rw-r--r--browser/branding/official/bgintro.bmpbin682144 -> 0 bytes
-rw-r--r--browser/branding/official/clock.bmpbin8982 -> 0 bytes
-rw-r--r--browser/branding/official/moz.build52
-rw-r--r--browser/branding/official/particles.bmpbin8982 -> 0 bytes
-rw-r--r--browser/branding/official/pencil-rtl.bmpbin8982 -> 0 bytes
-rw-r--r--browser/branding/official/pencil.bmpbin8982 -> 0 bytes
-rw-r--r--browser/branding/official/pref/firefox-branding.js72
-rw-r--r--browser/branding/shared/branding.mozbuild (renamed from browser/branding/branding-common.mozbuild)24
-rw-r--r--browser/branding/shared/dsstore (renamed from browser/branding/official/dsstore)bin12292 -> 12292 bytes
-rw-r--r--browser/branding/shared/newtab.ico (renamed from browser/branding/official/newtab.ico)bin6518 -> 6518 bytes
-rw-r--r--browser/branding/shared/newwindow.ico (renamed from browser/branding/official/newwindow.ico)bin6518 -> 6518 bytes
-rw-r--r--browser/branding/shared/pbmode.ico (renamed from browser/branding/official/pbmode.ico)bin6518 -> 6518 bytes
-rw-r--r--browser/branding/shared/preferences.inc33
-rw-r--r--browser/branding/shared/uaoverrides.inc38
-rw-r--r--browser/branding/unofficial/basilisk.VisualElementsManifest.xml (renamed from browser/branding/unofficial/firefox.VisualElementsManifest.xml)0
-rw-r--r--browser/branding/unofficial/bgintro.bmpbin682144 -> 0 bytes
-rw-r--r--browser/branding/unofficial/clock.bmpbin124214 -> 0 bytes
-rw-r--r--browser/branding/unofficial/moz.build4
-rw-r--r--browser/branding/unofficial/newtab.icobin6518 -> 0 bytes
-rw-r--r--browser/branding/unofficial/newwindow.icobin6518 -> 0 bytes
-rw-r--r--browser/branding/unofficial/particles.bmpbin124216 -> 0 bytes
-rw-r--r--browser/branding/unofficial/pbmode.icobin6518 -> 0 bytes
-rw-r--r--browser/branding/unofficial/pencil-rtl.bmpbin124214 -> 0 bytes
-rw-r--r--browser/branding/unofficial/pencil.bmpbin124214 -> 0 bytes
-rw-r--r--browser/branding/unofficial/pref/firefox-branding.js47
-rw-r--r--browser/installer/windows/Makefile.in7
-rw-r--r--browser/installer/windows/app.tag2
-rw-r--r--browser/installer/windows/nsis/defines.nsi.in14
-rw-r--r--browser/installer/windows/nsis/stub.nsi2093
-rw-r--r--browser/installer/windows/stub.tag4
-rw-r--r--old-configure.in4
-rw-r--r--python/mozbuild/mozbuild/mach_commands.py18
-rw-r--r--toolkit/locales/l10n.mk4
-rw-r--r--toolkit/mozapps/installer/package-name.mk15
-rw-r--r--toolkit/mozapps/installer/packager.mk13
-rw-r--r--toolkit/mozapps/installer/upload-files.mk7
-rw-r--r--toolkit/mozapps/installer/windows/nsis/makensis.mk16
37 files changed, 173 insertions, 2294 deletions
diff --git a/browser/branding/official/bgintro.bmp b/browser/branding/official/bgintro.bmp
deleted file mode 100644
index 9c2fc80cf..000000000
--- a/browser/branding/official/bgintro.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/official/clock.bmp b/browser/branding/official/clock.bmp
deleted file mode 100644
index 7da034d3b..000000000
--- a/browser/branding/official/clock.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/official/moz.build b/browser/branding/official/moz.build
index f1a839c9d..e3b7fd1ab 100644
--- a/browser/branding/official/moz.build
+++ b/browser/branding/official/moz.build
@@ -9,53 +9,5 @@ DIRS += ['content', 'locales']
DIST_SUBDIR = 'browser'
export('DIST_SUBDIR')
-JS_PREFERENCE_FILES += [
- 'pref/firefox-branding.js',
-]
-
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
- FINAL_TARGET_FILES['..'] += [
- 'basilisk.VisualElementsManifest.xml',
- ]
- FINAL_TARGET_FILES.VisualElements += [
- 'VisualElements_150.png',
- 'VisualElements_70.png',
- ]
- BRANDING_FILES += [
- 'appname.bmp',
- 'bgintro.bmp',
- 'branding.nsi',
- 'clock.bmp',
- 'document.ico',
- 'firefox.ico',
- 'newtab.ico',
- 'newwindow.ico',
- 'particles.bmp',
- 'pbmode.ico',
- 'pencil-rtl.bmp',
- 'pencil.bmp',
- 'wizHeader.bmp',
- 'wizHeaderRTL.bmp',
- 'wizWatermark.bmp',
- ]
-elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
- BRANDING_FILES += [
- 'background.png',
- 'disk.icns',
- 'document.icns',
- 'dsstore',
- 'firefox.icns',
- ]
-elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
- BRANDING_FILES += [
- 'default16.png',
- 'default32.png',
- 'default48.png',
- 'mozicon128.png',
- ]
- FINAL_TARGET_FILES.icons += ['mozicon128.png']
- FINAL_TARGET_FILES.chrome.icons.default += [
- 'default16.png',
- 'default32.png',
- 'default48.png',
- ]
+include('../shared/branding.mozbuild')
+ApplicationBranding() \ No newline at end of file
diff --git a/browser/branding/official/particles.bmp b/browser/branding/official/particles.bmp
deleted file mode 100644
index d523606c2..000000000
--- a/browser/branding/official/particles.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/official/pencil-rtl.bmp b/browser/branding/official/pencil-rtl.bmp
deleted file mode 100644
index 67d2fe5d2..000000000
--- a/browser/branding/official/pencil-rtl.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/official/pencil.bmp b/browser/branding/official/pencil.bmp
deleted file mode 100644
index 7dd55741f..000000000
--- a/browser/branding/official/pencil.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/official/pref/firefox-branding.js b/browser/branding/official/pref/firefox-branding.js
index a3d6927bb..eb2bf489b 100644
--- a/browser/branding/official/pref/firefox-branding.js
+++ b/browser/branding/official/pref/firefox-branding.js
@@ -2,55 +2,43 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-pref("startup.homepage_override_url", "https://www.basilisk-browser.org/releasenotes.shtml");
-pref("startup.homepage_welcome_url", "http://www.basilisk-browser.org/firstrun/");
+#filter substitution
+#filter emptyLines
+
+// Set defines to construct URLs
+#define BRANDING_BASEURL basilisk-browser.org
+#define BRANDING_SITEURL www.@BRANDING_BASEURL@
+#define BRANDING_RELNOTESPATH releasenotes.shtml
+#define BRANDING_FIRSTRUNPATH firstrun/
+#define BRANDING_APPUPDATEURL aus.@BRANDING_BASEURL@
+#define BRANDING_APPUPDATEPATH ?application=%PRODUCT%&version=%VERSION%&arch=%BUILD_TARGET%&buildid=%BUILD_ID%&channel=%CHANNEL%
+
+// Shared Branding Preferences
+// XXX: These should REALLY go back to application preferences
+#include ../../shared/preferences.inc
+
+// Branding Specific Preferences
+pref("startup.homepage_override_url", "https://@BRANDING_SITEURL@/@BRANDING_RELNOTESPATH@");
+pref("startup.homepage_welcome_url", "http://@BRANDING_SITEURL@/@BRANDING_FIRSTRUNPATH@");
pref("startup.homepage_welcome_url.additional", "");
-pref("app.update.url", "https://aus.basilisk-browser.org/?application=%PRODUCT%&version=%VERSION%&arch=%BUILD_TARGET%&buildid=%BUILD_ID%&channel=%CHANNEL%");
-// Interval: Time between checks for a new version (in seconds)
-pref("app.update.interval", 86400); // 1 day
-// The time interval between the downloading of mar file chunks in the
-// background (in seconds)
-// 0 means "download everything at once"
-pref("app.update.download.backgroundInterval", 0);
-// Give the user x seconds to react before showing the big UI. default=192 hours
-pref("app.update.promptWaitTime", 691200);
+// Version release notes
+pref("app.releaseNotesURL", "http://@BRANDING_SITEURL@/@BRANDING_RELNOTESPATH@");
+
+// Vendor home page
+pref("app.vendorURL", "http://@BRANDING_SITEURL@/");
+
+pref("app.update.url", "https://@BRANDING_APPUPDATEURL@/@BRANDING_APPUPDATEPATH@");
+
// URL user can browse to manually if for some reason all update installation
// attempts fail.
-pref("app.update.url.manual", "https://www.basilisk-browser.org/");
+pref("app.update.url.manual", "https://@BRANDING_SITEURL@/");
// A default value for the "More information about this update" link
// supplied in the "An update is available" page of the update wizard.
-pref("app.update.url.details", "https://www.basilisk-browser.org/releasenotes.shtml");
+pref("app.update.url.details", "https://@BRANDING_SITEURL@/@BRANDING_RELNOTESPATH@");
// Switch Application Updates off for now
pref("app.update.enabled", false);
-// Version release notes
-pref("app.releaseNotesURL", "http://www.basilisk-browser.org/releasenotes.shtml");
-// Vendor home page
-pref("app.vendorURL", "http://www.basilisk-browser.org/");
-
-// The number of days a binary is permitted to be old
-// without checking for an update. This assumes that
-// app.update.checkInstallTime is true.
-pref("app.update.checkInstallTime.days", 14);
-
-// Give the user x seconds to reboot before showing a badge on the hamburger
-// button. default=immediately
-pref("app.update.badgeWaitTime", 0);
-
-// Number of usages of the web console or scratchpad.
-// If this is less than 5, then pasting code into the web console or scratchpad is disabled
-pref("devtools.selfxss.count", 100);
-
-// Disable Google Safebrowsing by default. Without an API key, this won't work.
-pref("browser.safebrowsing.phishing.enabled", false);
-pref("browser.safebrowsing.malware.enabled", false);
-pref("browser.safebrowsing.downloads.enabled", false);
-pref("browser.safebrowsing.downloads.remote.enabled", false);
-// Disable the UI controls for it as well for Basilisk-official.
-pref("browser.safebrowsing.UI.enabled", false);
-
-// FxA override
-pref("general.useragent.override.accounts.firefox.com", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Goanna/4.0 Basilisk/55.0.0");
-
+// Shared User Agent Overrides
+#include ../../shared/uaoverrides.inc
diff --git a/browser/branding/branding-common.mozbuild b/browser/branding/shared/branding.mozbuild
index f74724f4a..29d25094f 100644
--- a/browser/branding/branding-common.mozbuild
+++ b/browser/branding/shared/branding.mozbuild
@@ -5,42 +5,37 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
@template
-def FirefoxBranding():
- JS_PREFERENCE_FILES += [
+def ApplicationBranding():
+ JS_PREFERENCE_PP_FILES += [
'pref/firefox-branding.js',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
FINAL_TARGET_FILES['..'] += [
- 'firefox.VisualElementsManifest.xml',
+ 'basilisk.VisualElementsManifest.xml',
]
FINAL_TARGET_FILES.VisualElements += [
'VisualElements_150.png',
'VisualElements_70.png',
]
BRANDING_FILES += [
+ '../shared/newtab.ico',
+ '../shared/newwindow.ico',
+ '../shared/pbmode.ico',
'appname.bmp',
- 'bgintro.bmp',
'branding.nsi',
- 'clock.bmp',
'document.ico',
'firefox.ico',
- 'newtab.ico',
- 'newwindow.ico',
- 'particles.bmp',
- 'pbmode.ico',
- 'pencil-rtl.bmp',
- 'pencil.bmp',
'wizHeader.bmp',
'wizHeaderRTL.bmp',
'wizWatermark.bmp',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
BRANDING_FILES += [
- 'background.png',
+ '../shared/dsstore',
'disk.icns',
'document.icns',
- 'dsstore',
+ 'background.png',
'firefox.icns',
]
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
@@ -56,3 +51,6 @@ def FirefoxBranding():
'default32.png',
'default48.png',
]
+ DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
+ DEFINES['MOZ_BRANDING_DIRECTORY'] = CONFIG['MOZ_BRANDING_DIRECTORY']
+ DEFINES['MOZILLA_UAVERSION_U'] = CONFIG['MOZILLA_UAVERSION_U'] \ No newline at end of file
diff --git a/browser/branding/official/dsstore b/browser/branding/shared/dsstore
index 8ea703674..8ea703674 100644
--- a/browser/branding/official/dsstore
+++ b/browser/branding/shared/dsstore
Binary files differ
diff --git a/browser/branding/official/newtab.ico b/browser/branding/shared/newtab.ico
index a9b37c08c..a9b37c08c 100644
--- a/browser/branding/official/newtab.ico
+++ b/browser/branding/shared/newtab.ico
Binary files differ
diff --git a/browser/branding/official/newwindow.ico b/browser/branding/shared/newwindow.ico
index 553720771..553720771 100644
--- a/browser/branding/official/newwindow.ico
+++ b/browser/branding/shared/newwindow.ico
Binary files differ
diff --git a/browser/branding/official/pbmode.ico b/browser/branding/shared/pbmode.ico
index 47677c13f..47677c13f 100644
--- a/browser/branding/official/pbmode.ico
+++ b/browser/branding/shared/pbmode.ico
Binary files differ
diff --git a/browser/branding/shared/preferences.inc b/browser/branding/shared/preferences.inc
new file mode 100644
index 000000000..08f6c950b
--- /dev/null
+++ b/browser/branding/shared/preferences.inc
@@ -0,0 +1,33 @@
+// Interval: Time between checks for a new version (in seconds)
+pref("app.update.interval", 86400); // 1 day
+
+// The time interval between the downloading of mar file chunks in the
+// background (in seconds)
+// 0 means "download everything at once"
+pref("app.update.download.backgroundInterval", 0);
+
+// Give the user x seconds to react before showing the big UI. default=192 hours
+pref("app.update.promptWaitTime", 691200);
+
+// The number of days a binary is permitted to be old
+// without checking for an update. This assumes that
+// app.update.checkInstallTime is true.
+pref("app.update.checkInstallTime.days", 14);
+
+// Give the user x seconds to reboot before showing a badge on the hamburger
+// button. default=immediately
+pref("app.update.badgeWaitTime", 0);
+
+// Number of usages of the web console or scratchpad.
+// If this is less than 5, then pasting code into the web console or scratchpad is disabled
+pref("devtools.selfxss.count", 100);
+
+// Disable Google Safebrowsing by default. Without an API key, this won't work.
+pref("browser.safebrowsing.phishing.enabled", false);
+pref("browser.safebrowsing.malware.enabled", false);
+pref("browser.safebrowsing.downloads.enabled", false);
+pref("browser.safebrowsing.downloads.remote.enabled", false);
+
+// Disable the UI controls for it as well for Basilisk-official.
+pref("browser.safebrowsing.UI.enabled", false);
+
diff --git a/browser/branding/shared/uaoverrides.inc b/browser/branding/shared/uaoverrides.inc
new file mode 100644
index 000000000..13a89ed7f
--- /dev/null
+++ b/browser/branding/shared/uaoverrides.inc
@@ -0,0 +1,38 @@
+#define GUAO_PREF general.useragent.override
+
+#define GRE_VERSION @MOZILLA_UAVERSION_U@
+#define GRE_VERSION_SLICE Goanna/@GRE_VERSION@
+#define GRE_DATE_SLICE Goanna/20170101
+#define APP_SLICE Basilisk/@MOZ_APP_VERSION@
+
+#define GK_VERSION 52.0
+#define GK_SLICE Gecko/20100101
+#define FX_SLICE Firefox/@GK_VERSION@
+
+#ifdef XP_UNIX
+#ifndef XP_MACOSX
+#define OS_SLICE X11; Linux x86_64;
+#else
+#define OS_SLICE Macintosh; Intel Mac OS X 10.11;
+#endif
+#else
+#define OS_SLICE Windows NT 6.1; WOW64;
+#endif
+
+// FxA override
+pref("@GUAO_PREF@.accounts.firefox.com", "Mozilla/5.0 (@OS_SLICE@ rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@");
+
+// Required for domains that have proven unresponsive to requests from users
+
+// The never-ending Facebook debacle...
+
+// UA-Sniffing domains below are pending responses from their operators - temp workaround
+
+// The following requires native mode. Or it blocks.. "too old firefox", breakage, etc.
+
+// UA-Sniffing domains below have indicated no interest in supporting Pale Moon (BOO!)
+
+// UA-sniffing domains that are "app/vendor-specific" and do not like Pale Moon
+
+// The following domains do not like the Goanna slice
+
diff --git a/browser/branding/unofficial/firefox.VisualElementsManifest.xml b/browser/branding/unofficial/basilisk.VisualElementsManifest.xml
index 7654e0ab7..7654e0ab7 100644
--- a/browser/branding/unofficial/firefox.VisualElementsManifest.xml
+++ b/browser/branding/unofficial/basilisk.VisualElementsManifest.xml
diff --git a/browser/branding/unofficial/bgintro.bmp b/browser/branding/unofficial/bgintro.bmp
deleted file mode 100644
index 9f2a0a6e0..000000000
--- a/browser/branding/unofficial/bgintro.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/clock.bmp b/browser/branding/unofficial/clock.bmp
deleted file mode 100644
index c74398edb..000000000
--- a/browser/branding/unofficial/clock.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/moz.build b/browser/branding/unofficial/moz.build
index 9045cee11..0d829fa5e 100644
--- a/browser/branding/unofficial/moz.build
+++ b/browser/branding/unofficial/moz.build
@@ -9,5 +9,5 @@ DIRS += ['content', 'locales']
DIST_SUBDIR = 'browser'
export('DIST_SUBDIR')
-include('../branding-common.mozbuild')
-FirefoxBranding()
+include('../shared/branding.mozbuild')
+ApplicationBranding()
diff --git a/browser/branding/unofficial/newtab.ico b/browser/branding/unofficial/newtab.ico
deleted file mode 100644
index a9b37c08c..000000000
--- a/browser/branding/unofficial/newtab.ico
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/newwindow.ico b/browser/branding/unofficial/newwindow.ico
deleted file mode 100644
index 553720771..000000000
--- a/browser/branding/unofficial/newwindow.ico
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/particles.bmp b/browser/branding/unofficial/particles.bmp
deleted file mode 100644
index ab74ce047..000000000
--- a/browser/branding/unofficial/particles.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/pbmode.ico b/browser/branding/unofficial/pbmode.ico
deleted file mode 100644
index 47677c13f..000000000
--- a/browser/branding/unofficial/pbmode.ico
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/pencil-rtl.bmp b/browser/branding/unofficial/pencil-rtl.bmp
deleted file mode 100644
index e50d92db7..000000000
--- a/browser/branding/unofficial/pencil-rtl.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/pencil.bmp b/browser/branding/unofficial/pencil.bmp
deleted file mode 100644
index 252c10f41..000000000
--- a/browser/branding/unofficial/pencil.bmp
+++ /dev/null
Binary files differ
diff --git a/browser/branding/unofficial/pref/firefox-branding.js b/browser/branding/unofficial/pref/firefox-branding.js
index b20a3a309..a5b617a53 100644
--- a/browser/branding/unofficial/pref/firefox-branding.js
+++ b/browser/branding/unofficial/pref/firefox-branding.js
@@ -2,32 +2,39 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#filter substitution
+#filter emptyLines
+
+// Set defines to construct URLs
+#define BRANDING_BASEURL basilisk-browser.org
+#define BRANDING_SITEURL www.@BRANDING_BASEURL@
+
+// Shared Branding Preferences
+// XXX: These should REALLY go back to application preferences
+#include ../../shared/preferences.inc
+
+// Branding Specific Preferences
pref("startup.homepage_override_url", "");
pref("startup.homepage_welcome_url", "");
pref("startup.homepage_welcome_url.additional", "");
-// The time interval between checks for a new version (in seconds)
-pref("app.update.interval", 86400); // 24 hours
-// The time interval between the downloading of mar file chunks in the
-// background (in seconds)
-pref("app.update.download.backgroundInterval", 60);
-// Give the user x seconds to react before showing the big UI. default=24 hours
-pref("app.update.promptWaitTime", 86400);
+
+// Version release notes
+pref("app.releaseNotesURL", "about:blank");
+
+// Vendor home page
+pref("app.vendorURL", "about:");
+
+pref("app.update.url", "");
+
// URL user can browse to manually if for some reason all update installation
// attempts fail.
-pref("app.update.url.manual", "https://nightly.mozilla.org");
+pref("app.update.url.manual", "about:");
// A default value for the "More information about this update" link
// supplied in the "An update is available" page of the update wizard.
-pref("app.update.url.details", "https://nightly.mozilla.org");
-
-// The number of days a binary is permitted to be old
-// without checking for an update. This assumes that
-// app.update.checkInstallTime is true.
-pref("app.update.checkInstallTime.days", 2);
+pref("app.update.url.details", "about:");
-// Give the user x seconds to reboot before showing a badge on the hamburger
-// button. default=immediately
-pref("app.update.badgeWaitTime", 0);
+// Switch Application Updates off for unofficial branding
+pref("app.update.enabled", false);
-// Number of usages of the web console or scratchpad.
-// If this is less than 5, then pasting code into the web console or scratchpad is disabled
-pref("devtools.selfxss.count", 0);
+// Shared User Agent Overrides
+#include ../../shared/uaoverrides.inc
diff --git a/browser/installer/windows/Makefile.in b/browser/installer/windows/Makefile.in
index fa6fd5ba9..ee672e921 100644
--- a/browser/installer/windows/Makefile.in
+++ b/browser/installer/windows/Makefile.in
@@ -11,9 +11,7 @@ INSTALLER_FILES = \
app.tag \
nsis/installer.nsi \
nsis/uninstaller.nsi \
- nsis/stub.nsi \
nsis/shared.nsh \
- stub.tag \
$(NULL)
ifdef MOZ_MAINTENANCE_SERVICE
@@ -25,11 +23,6 @@ endif
BRANDING_FILES = \
branding.nsi \
appname.bmp \
- bgintro.bmp \
- clock.bmp \
- particles.bmp \
- pencil.bmp \
- pencil-rtl.bmp \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
diff --git a/browser/installer/windows/app.tag b/browser/installer/windows/app.tag
index 479d9f714..7be6d2e42 100644
--- a/browser/installer/windows/app.tag
+++ b/browser/installer/windows/app.tag
@@ -1,4 +1,4 @@
;!@Install@!UTF-8!
-Title="Mozilla Firefox"
+Title="Basilisk"
RunProgram="setup.exe"
;!@InstallEnd@! \ No newline at end of file
diff --git a/browser/installer/windows/nsis/defines.nsi.in b/browser/installer/windows/nsis/defines.nsi.in
index ffb23ff1c..015ad6620 100644
--- a/browser/installer/windows/nsis/defines.nsi.in
+++ b/browser/installer/windows/nsis/defines.nsi.in
@@ -55,14 +55,6 @@
!define UpdateChannel "@MOZ_UPDATE_CHANNEL@"
!endif
-# Due to official and beta using the same branding this is needed to
-# differentiante between the url used by the stub for downloading.
-!if "@MOZ_UPDATE_CHANNEL@" == "beta"
-!define BETA_UPDATE_CHANNEL
-!endif
-
-!define BaseURLStubPing "http://download-stats.mozilla.org/stub"
-
# ARCH is used when it is necessary to differentiate the x64 registry keys from
# the x86 registry keys (e.g. the uninstall registry key).
#ifdef HAVE_64BIT_BUILD
@@ -93,12 +85,6 @@ VIAddVersionKey "ProductVersion" "${AppVersion}"
# Comments is not used but left below commented out for future reference
# VIAddVersionKey "Comments" "Comments"
-# It isn't possible to get the size of the installation prior to downloading
-# so the stub installer uses an estimate. The size is derived from the size of
-# the complete installer, the size of the extracted complete installer, and at
-# least 15 MB additional for working room.
-!define APPROXIMATE_REQUIRED_SPACE_MB "145"
-
# Control positions in Dialog Units so they are placed correctly with
# non-default DPI settings
!define OPTIONS_ITEM_EDGE_DU 90u
diff --git a/browser/installer/windows/nsis/stub.nsi b/browser/installer/windows/nsis/stub.nsi
deleted file mode 100644
index 5c19c10fe..000000000
--- a/browser/installer/windows/nsis/stub.nsi
+++ /dev/null
@@ -1,2093 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# Required Plugins:
-# AppAssocReg
-# CertCheck
-# InetBgDL
-# ShellLink
-# UAC
-
-; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs
-!verbose 3
-
-SetDatablockOptimize on
-SetCompress off
-CRCCheck on
-
-RequestExecutionLevel user
-
-; The commands inside this ifdef require NSIS 3.0a2 or greater so the ifdef can
-; be removed after we require NSIS 3.0a2 or greater.
-!ifdef NSIS_PACKEDVERSION
- Unicode true
- ManifestSupportedOS all
- ManifestDPIAware true
-!endif
-
-!addplugindir ./
-
-Var Dialog
-Var Progressbar
-Var ProgressbarMarqueeIntervalMS
-Var LabelDownloading
-Var LabelInstalling
-Var LabelFreeSpace
-Var CheckboxSetAsDefault
-Var CheckboxShortcutOnBar ; Used for Quicklaunch or Taskbar as appropriate
-Var CheckboxShortcutInStartMenu
-Var CheckboxShortcutOnDesktop
-Var CheckboxSendPing
-Var CheckboxInstallMaintSvc
-Var DirRequest
-Var ButtonBrowse
-Var LabelBlurb1
-Var LabelBlurb2
-Var LabelBlurb3
-Var BitmapBlurb1
-Var BitmapBlurb2
-Var BitmapBlurb3
-Var HwndBitmapBlurb1
-Var HwndBitmapBlurb2
-Var HWndBitmapBlurb3
-
-Var FontNormal
-Var FontItalic
-Var FontBlurb
-
-Var WasOptionsButtonClicked
-Var CanWriteToInstallDir
-Var HasRequiredSpaceAvailable
-Var IsDownloadFinished
-Var DownloadSizeBytes
-Var HalfOfDownload
-Var DownloadReset
-Var ExistingTopDir
-Var SpaceAvailableBytes
-Var InitialInstallDir
-Var HandleDownload
-Var CanSetAsDefault
-Var InstallCounterStep
-Var InstallStepSize
-Var InstallTotalSteps
-Var ProgressCompleted
-Var ProgressTotal
-Var TmpVal
-
-Var ExitCode
-Var BasiliskLaunchCode
-
-; The first three tick counts are for the start of a phase and equate equate to
-; the display of individual installer pages.
-Var StartIntroPhaseTickCount
-Var StartOptionsPhaseTickCount
-Var StartDownloadPhaseTickCount
-; Since the Intro and Options pages can be displayed multiple times the total
-; seconds spent on each of these pages is reported.
-Var IntroPhaseSeconds
-Var OptionsPhaseSeconds
-; The tick count for the last download.
-Var StartLastDownloadTickCount
-; The number of seconds from the start of the download phase until the first
-; bytes are received. This is only recorded for first request so it is possible
-; to determine connection issues for the first request.
-Var DownloadFirstTransferSeconds
-; The last four tick counts are for the end of a phase in the installation page.
-Var EndDownloadPhaseTickCount
-Var EndPreInstallPhaseTickCount
-Var EndInstallPhaseTickCount
-Var EndFinishPhaseTickCount
-
-Var InitialInstallRequirementsCode
-Var ExistingProfile
-Var ExistingVersion
-Var ExistingBuildID
-Var DownloadedBytes
-Var DownloadRetryCount
-Var OpenedDownloadPage
-Var DownloadServerIP
-Var PostSigningData
-
-Var ControlHeightPX
-Var ControlRightPX
-
-; Uncomment the following to prevent pinging the metrics server when testing
-; the stub installer
-;!define STUB_DEBUG
-
-!define StubURLVersion "v7"
-
-; Successful install exit code
-!define ERR_SUCCESS 0
-
-/**
- * The following errors prefixed with ERR_DOWNLOAD apply to the download phase.
- */
-; The download was cancelled by the user
-!define ERR_DOWNLOAD_CANCEL 10
-
-; Too many attempts to download. The maximum attempts is defined in
-; DownloadMaxRetries.
-!define ERR_DOWNLOAD_TOO_MANY_RETRIES 11
-
-/**
- * The following errors prefixed with ERR_PREINSTALL apply to the pre-install
- * check phase.
- */
-; Unable to acquire a file handle to the downloaded file
-!define ERR_PREINSTALL_INVALID_HANDLE 20
-
-; The downloaded file's certificate is not trusted by the certificate store.
-!define ERR_PREINSTALL_CERT_UNTRUSTED 21
-
-; The downloaded file's certificate attribute values were incorrect.
-!define ERR_PREINSTALL_CERT_ATTRIBUTES 22
-
-; The downloaded file's certificate is not trusted by the certificate store and
-; certificate attribute values were incorrect.
-!define ERR_PREINSTALL_CERT_UNTRUSTED_AND_ATTRIBUTES 23
-
-/**
- * The following errors prefixed with ERR_INSTALL apply to the install phase.
- */
-; The installation timed out. The installation timeout is defined by the number
-; of progress steps defined in InstallTotalSteps and the install timer
-; interval defined in InstallIntervalMS
-!define ERR_INSTALL_TIMEOUT 30
-
-; Maximum times to retry the download before displaying an error
-!define DownloadMaxRetries 9
-
-; Minimum size expected to download in bytes
-!define DownloadMinSizeBytes 15728640 ; 15 MB
-
-; Maximum size expected to download in bytes
-!define DownloadMaxSizeBytes 73400320 ; 70 MB
-
-; Interval before retrying to download. 3 seconds is used along with 10
-; attempted downloads (the first attempt along with 9 retries) to give a
-; minimum of 30 seconds or retrying before giving up.
-!define DownloadRetryIntervalMS 3000
-
-; Interval for the download timer
-!define DownloadIntervalMS 200
-
-; Interval for the install timer
-!define InstallIntervalMS 100
-
-; The first step for the install progress bar. By starting with a large step
-; immediate feedback is given to the user.
-!define InstallProgressFirstStep 20
-
-; The finish step size to quickly increment the progress bar after the
-; installation has finished.
-!define InstallProgressFinishStep 40
-
-; Number of steps for the install progress.
-; This might not be enough when installing on a slow network drive so it will
-; fallback to downloading the full installer if it reaches this number. The size
-; of the install progress step is increased when the full installer finishes
-; instead of waiting.
-
-; Approximately 150 seconds with a 100 millisecond timer and a first step of 20
-; as defined by InstallProgressFirstStep.
-!define /math InstallCleanTotalSteps ${InstallProgressFirstStep} + 1500
-
-; Approximately 165 seconds (minus 0.2 seconds for each file that is removed)
-; with a 100 millisecond timer and a first step of 20 as defined by
-; InstallProgressFirstStep .
-!define /math InstallPaveOverTotalSteps ${InstallProgressFirstStep} + 1800
-
-; On Vista and above attempt to elevate Standard Users in addition to users that
-; are a member of the Administrators group.
-!define NONADMIN_ELEVATE
-
-!define CONFIG_INI "config.ini"
-
-!ifndef FILE_SHARE_READ
- !define FILE_SHARE_READ 1
-!endif
-!ifndef GENERIC_READ
- !define GENERIC_READ 0x80000000
-!endif
-!ifndef OPEN_EXISTING
- !define OPEN_EXISTING 3
-!endif
-!ifndef INVALID_HANDLE_VALUE
- !define INVALID_HANDLE_VALUE -1
-!endif
-
-!include "nsDialogs.nsh"
-!include "LogicLib.nsh"
-!include "FileFunc.nsh"
-!include "TextFunc.nsh"
-!include "WinVer.nsh"
-!include "WordFunc.nsh"
-
-!insertmacro GetParameters
-!insertmacro GetOptions
-!insertmacro LineFind
-!insertmacro StrFilter
-
-!include "locales.nsi"
-!include "branding.nsi"
-
-!include "defines.nsi"
-
-; Must be included after defines.nsi
-!include "locale-fonts.nsh"
-
-; The OFFICIAL define is a workaround to support different urls for Release and
-; Beta since they share the same branding when building with other branches that
-; set the update channel to beta.
-!ifdef OFFICIAL
-!ifdef BETA_UPDATE_CHANNEL
-!undef URLStubDownload
-!define URLStubDownload "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-beta-latest"
-!undef URLManualDownload
-!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=beta&installer_lang=${AB_CD}"
-!undef Channel
-!define Channel "beta"
-!endif
-!endif
-
-!include "common.nsh"
-
-!insertmacro ElevateUAC
-!insertmacro GetLongPath
-!insertmacro GetPathFromString
-!insertmacro GetParent
-!insertmacro GetSingleInstallPath
-!insertmacro GetTextWidthHeight
-!insertmacro IsUserAdmin
-!insertmacro RemovePrecompleteEntries
-!insertmacro SetBrandNameVars
-!insertmacro ITBL3Create
-!insertmacro UnloadUAC
-
-VIAddVersionKey "FileDescription" "${BrandShortName} Stub Installer"
-VIAddVersionKey "OriginalFilename" "setup-stub.exe"
-
-Name "$BrandFullName"
-OutFile "setup-stub.exe"
-icon "setup.ico"
-XPStyle on
-BrandingText " "
-ChangeUI all "nsisui.exe"
-!ifdef HAVE_64BIT_BUILD
- InstallDir "$PROGRAMFILES64\${BrandFullName}\"
-!else
- InstallDir "$PROGRAMFILES32\${BrandFullName}\"
-!endif
-
-!ifdef ${AB_CD}_rtl
- LoadLanguageFile "locale-rtl.nlf"
-!else
- LoadLanguageFile "locale.nlf"
-!endif
-
-!include "nsisstrings.nlf"
-
-!if "${AB_CD}" == "en-US"
- ; Custom strings for en-US. This is done here so they aren't translated.
- !include oneoff_en-US.nsh
-!else
- !define INTRO_BLURB "$(INTRO_BLURB1)"
- !define INSTALL_BLURB1 "$(INSTALL_BLURB1)"
- !define INSTALL_BLURB2 "$(INSTALL_BLURB2)"
- !define INSTALL_BLURB3 "$(INSTALL_BLURB3)"
-!endif
-
-Caption "$(WIN_CAPTION)"
-
-Page custom createDummy ; Needed to enable the Intro page's back button
-Page custom createIntro leaveIntro ; Introduction page
-Page custom createOptions leaveOptions ; Options page
-Page custom createInstall ; Download / Installation page
-
-Function .onInit
- ; Remove the current exe directory from the search order.
- ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
- System::Call 'kernel32::SetDllDirectoryW(w "")'
-
- StrCpy $LANGUAGE 0
- ; This macro is used to set the brand name variables but the ini file method
- ; isn't supported for the stub installer.
- ${SetBrandNameVars} "$PLUGINSDIR\ignored.ini"
-
- ; Don't install on systems that don't support SSE2. The parameter value of
- ; 10 is for PF_XMMI64_INSTRUCTIONS_AVAILABLE which will check whether the
- ; SSE2 instruction set is available.
- System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
-
-!ifdef HAVE_64BIT_BUILD
- ; Restrict x64 builds from being installed on x86 and pre Win7
- ${Unless} ${RunningX64}
- ${OrUnless} ${AtLeastWin7}
- ${If} "$R7" == "0"
- strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
- ${Else}
- strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
- ${EndIf}
- MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
- ExecShell "open" "${URLSystemRequirements}"
- Quit
- ${EndUnless}
-
- SetRegView 64
-!else
- StrCpy $R8 "0"
- ${If} ${AtMostWin2000}
- StrCpy $R8 "1"
- ${EndIf}
-
- ${If} ${IsWinXP}
- ${AndIf} ${AtMostServicePack} 1
- StrCpy $R8 "1"
- ${EndIf}
-
- ${If} $R8 == "1"
- ; XXX-rstrong - some systems failed the AtLeastWin2000 test that we
- ; used to use for an unknown reason and likely fail the AtMostWin2000
- ; and possibly the IsWinXP test as well. To work around this also
- ; check if the Windows NT registry Key exists and if it does if the
- ; first char in CurrentVersion is equal to 3 (Windows NT 3.5 and
- ; 3.5.1), 4 (Windows NT 4), or 5 (Windows 2000 and Windows XP).
- StrCpy $R8 ""
- ClearErrors
- ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
- StrCpy $R8 "$R8" 1
- ${If} ${Errors}
- ${OrIf} "$R8" == "3"
- ${OrIf} "$R8" == "4"
- ${OrIf} "$R8" == "5"
- ${If} "$R7" == "0"
- strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
- ${Else}
- strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
- ${EndIf}
- MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
- ExecShell "open" "${URLSystemRequirements}"
- Quit
- ${EndIf}
- ${EndUnless}
-!endif
-
- ${If} "$R7" == "0"
- MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_CPU_MSG)" IDCANCEL +2
- ExecShell "open" "${URLSystemRequirements}"
- Quit
- ${EndIf}
-
- ; Require elevation if the user can elevate
- ${ElevateUAC}
-
-; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be
-; removed after we require NSIS 3.0a2 or greater.
-!ifndef NSIS_PACKEDVERSION
- ${If} ${AtLeastWinVista}
- System::Call 'user32::SetProcessDPIAware()'
- ${EndIf}
-!endif
-
- SetShellVarContext all ; Set SHCTX to HKLM
- ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
-
- ${If} "$R9" == "false"
- SetShellVarContext current ; Set SHCTX to HKCU
- ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
-
- ${If} ${RunningX64}
- ; In HKCU there is no WOW64 redirection, which means we may have gotten
- ; the path to a 32-bit install even though we're 64-bit, or vice-versa.
- ; In that case, just use the default path instead of offering an upgrade.
- ; But only do that override if the existing install is in Program Files,
- ; because that's the only place we can be sure is specific
- ; to either 32 or 64 bit applications.
- ; The WordFind syntax below searches for the first occurence of the
- ; "delimiter" (the Program Files path) in the install path and returns
- ; anything that appears before that. If nothing appears before that,
- ; then the install is under Program Files (32 or 64).
-!ifdef HAVE_64BIT_BUILD
- ${WordFind} $R9 $PROGRAMFILES32 "+1{" $0
-!else
- ${WordFind} $R9 $PROGRAMFILES64 "+1{" $0
-!endif
- ${If} $0 == ""
- StrCpy $R9 "false"
- ${EndIf}
- ${EndIf}
- ${EndIf}
-
- ${If} "$R9" != "false"
- StrCpy $INSTDIR "$R9"
- ${EndIf}
-
- ; Used to determine if the default installation directory was used.
- StrCpy $InitialInstallDir "$INSTDIR"
-
- ClearErrors
- WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
- "Write Test"
-
- ; Only display set as default when there is write access to HKLM and on Win7
- ; and below.
- ${If} ${Errors}
- ${OrIf} ${AtLeastWin8}
- StrCpy $CanSetAsDefault "false"
- StrCpy $CheckboxSetAsDefault "0"
- ${Else}
- DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
- StrCpy $CanSetAsDefault "true"
- ${EndIf}
-
- ; The interval in MS used for the progress bars set as marquee.
- ${If} ${AtLeastWinVista}
- StrCpy $ProgressbarMarqueeIntervalMS "10"
- ${Else}
- StrCpy $ProgressbarMarqueeIntervalMS "50"
- ${EndIf}
-
- ; Initialize the majority of variables except those that need to be reset
- ; when a page is displayed.
- StrCpy $IntroPhaseSeconds "0"
- StrCpy $OptionsPhaseSeconds "0"
- StrCpy $EndPreInstallPhaseTickCount "0"
- StrCpy $EndInstallPhaseTickCount "0"
- StrCpy $InitialInstallRequirementsCode ""
- StrCpy $IsDownloadFinished ""
- StrCpy $BasiliskLaunchCode "0"
- StrCpy $CheckboxShortcutOnBar "1"
- StrCpy $CheckboxShortcutInStartMenu "1"
- StrCpy $CheckboxShortcutOnDesktop "1"
- StrCpy $CheckboxSendPing "1"
-!ifdef MOZ_MAINTENANCE_SERVICE
- StrCpy $CheckboxInstallMaintSvc "1"
-!else
- StrCpy $CheckboxInstallMaintSvc "0"
-!endif
- StrCpy $WasOptionsButtonClicked "0"
-
- StrCpy $0 ""
-!ifdef FONT_FILE1
- ${If} ${FileExists} "$FONTS\${FONT_FILE1}"
- StrCpy $0 "${FONT_NAME1}"
- ${EndIf}
-!endif
-
-!ifdef FONT_FILE2
- ${If} $0 == ""
- ${AndIf} ${FileExists} "$FONTS\${FONT_FILE2}"
- StrCpy $0 "${FONT_NAME2}"
- ${EndIf}
-!endif
-
- ${If} $0 == ""
- StrCpy $0 "$(^Font)"
- ${EndIf}
-
- CreateFont $FontBlurb "$0" "12" "500"
- CreateFont $FontNormal "$0" "11" "500"
- CreateFont $FontItalic "$0" "11" "500" /ITALIC
-
- InitPluginsDir
- File /oname=$PLUGINSDIR\bgintro.bmp "bgintro.bmp"
- File /oname=$PLUGINSDIR\appname.bmp "appname.bmp"
- File /oname=$PLUGINSDIR\clock.bmp "clock.bmp"
- File /oname=$PLUGINSDIR\particles.bmp "particles.bmp"
-!ifdef ${AB_CD}_rtl
- ; The horizontally flipped pencil looks better in RTL
- File /oname=$PLUGINSDIR\pencil.bmp "pencil-rtl.bmp"
-!else
- File /oname=$PLUGINSDIR\pencil.bmp "pencil.bmp"
-!endif
-FunctionEnd
-
-; .onGUIInit isn't needed except for RTL locales
-!ifdef ${AB_CD}_rtl
-Function .onGUIInit
- ; Since NSIS RTL support doesn't mirror progress bars use Windows mirroring.
- ${NSD_AddExStyle} $HWNDPARENT ${WS_EX_LAYOUTRTL}
- ${RemoveExStyle} $HWNDPARENT ${WS_EX_RTLREADING}
- ${RemoveExStyle} $HWNDPARENT ${WS_EX_RIGHT}
- ${NSD_AddExStyle} $HWNDPARENT ${WS_EX_LEFT}|${WS_EX_LTRREADING}
-FunctionEnd
-!endif
-
-Function .onGUIEnd
- Delete "$PLUGINSDIR\_temp"
- Delete "$PLUGINSDIR\download.exe"
- Delete "$PLUGINSDIR\${CONFIG_INI}"
-
- ${UnloadUAC}
-FunctionEnd
-
-Function .onUserAbort
- ${NSD_KillTimer} StartDownload
- ${NSD_KillTimer} OnDownload
- ${NSD_KillTimer} CheckInstall
- ${NSD_KillTimer} FinishInstall
- ${NSD_KillTimer} FinishProgressBar
- ${NSD_KillTimer} DisplayDownloadError
-
- ${If} "$IsDownloadFinished" != ""
- Call DisplayDownloadError
- ; Aborting the abort will allow SendPing which is called by
- ; DisplayDownloadError to hide the installer window and close the installer
- ; after it sends the metrics ping.
- Abort
- ${EndIf}
-FunctionEnd
-
-Function SendPing
- HideWindow
- ; Try to send a ping if a download was attempted
- ${If} $CheckboxSendPing == 1
- ${AndIf} $IsDownloadFinished != ""
- ; Get the tick count for the completion of all phases.
- System::Call "kernel32::GetTickCount()l .s"
- Pop $EndFinishPhaseTickCount
-
- ; When the value of $IsDownloadFinished is false the download was started
- ; but didn't finish. In this case the tick count stored in
- ; $EndFinishPhaseTickCount is used to determine how long the download was
- ; in progress.
- ${If} "$IsDownloadFinished" == "false"
- ${OrIf} "$EndDownloadPhaseTickCount" == ""
- StrCpy $EndDownloadPhaseTickCount "$EndFinishPhaseTickCount"
- ; Cancel the download in progress
- InetBgDL::Get /RESET /END
- ${EndIf}
-
-
- ; When $DownloadFirstTransferSeconds equals an empty string the download
- ; never successfully started so set the value to 0. It will be possible to
- ; determine that the download didn't successfully start from the seconds for
- ; the last download.
- ${If} "$DownloadFirstTransferSeconds" == ""
- StrCpy $DownloadFirstTransferSeconds "0"
- ${EndIf}
-
- ; When $StartLastDownloadTickCount equals an empty string the download never
- ; successfully started so set the value to $EndDownloadPhaseTickCount to
- ; compute the correct value.
- ${If} $StartLastDownloadTickCount == ""
- ; This could happen if the download never successfully starts
- StrCpy $StartLastDownloadTickCount "$EndDownloadPhaseTickCount"
- ${EndIf}
-
- ; When $EndPreInstallPhaseTickCount equals 0 the installation phase was
- ; never completed so set its value to $EndFinishPhaseTickCount to compute
- ; the correct value.
- ${If} "$EndPreInstallPhaseTickCount" == "0"
- StrCpy $EndPreInstallPhaseTickCount "$EndFinishPhaseTickCount"
- ${EndIf}
-
- ; When $EndInstallPhaseTickCount equals 0 the installation phase was never
- ; completed so set its value to $EndFinishPhaseTickCount to compute the
- ; correct value.
- ${If} "$EndInstallPhaseTickCount" == "0"
- StrCpy $EndInstallPhaseTickCount "$EndFinishPhaseTickCount"
- ${EndIf}
-
- ; Get the seconds elapsed from the start of the download phase to the end of
- ; the download phase.
- ${GetSecondsElapsed} "$StartDownloadPhaseTickCount" "$EndDownloadPhaseTickCount" $0
-
- ; Get the seconds elapsed from the start of the last download to the end of
- ; the last download.
- ${GetSecondsElapsed} "$StartLastDownloadTickCount" "$EndDownloadPhaseTickCount" $1
-
- ; Get the seconds elapsed from the end of the download phase to the
- ; completion of the pre-installation check phase.
- ${GetSecondsElapsed} "$EndDownloadPhaseTickCount" "$EndPreInstallPhaseTickCount" $2
-
- ; Get the seconds elapsed from the end of the pre-installation check phase
- ; to the completion of the installation phase.
- ${GetSecondsElapsed} "$EndPreInstallPhaseTickCount" "$EndInstallPhaseTickCount" $3
-
- ; Get the seconds elapsed from the end of the installation phase to the
- ; completion of all phases.
- ${GetSecondsElapsed} "$EndInstallPhaseTickCount" "$EndFinishPhaseTickCount" $4
-
-!ifdef HAVE_64BIT_BUILD
- StrCpy $R0 "1"
-!else
- StrCpy $R0 "0"
-!endif
-
- ${If} ${RunningX64}
- StrCpy $R1 "1"
- ${Else}
- StrCpy $R1 "0"
- ${EndIf}
-
- ; Though these values are sometimes incorrect due to bug 444664 it happens
- ; so rarely it isn't worth working around it by reading the registry values.
- ${WinVerGetMajor} $5
- ${WinVerGetMinor} $6
- ${WinVerGetBuild} $7
- ${WinVerGetServicePackLevel} $8
- ${If} ${IsServerOS}
- StrCpy $9 "1"
- ${Else}
- StrCpy $9 "0"
- ${EndIf}
-
- ${If} "$ExitCode" == "${ERR_SUCCESS}"
- ReadINIStr $R5 "$INSTDIR\application.ini" "App" "Version"
- ReadINIStr $R6 "$INSTDIR\application.ini" "App" "BuildID"
- ${Else}
- StrCpy $R5 "0"
- StrCpy $R6 "0"
- ${EndIf}
-
- ; Whether installed into the default installation directory
- ${GetLongPath} "$INSTDIR" $R7
- ${GetLongPath} "$InitialInstallDir" $R8
- ${If} "$R7" == "$R8"
- StrCpy $R7 "1"
- ${Else}
- StrCpy $R7 "0"
- ${EndIf}
-
- ClearErrors
- WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
- "Write Test"
- ${If} ${Errors}
- StrCpy $R8 "0"
- ${Else}
- DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
- StrCpy $R8 "1"
- ${EndIf}
-
- ${If} "$DownloadServerIP" == ""
- StrCpy $DownloadServerIP "Unknown"
- ${EndIf}
-
- StrCpy $R2 ""
- SetShellVarContext current ; Set SHCTX to the current user
- ReadRegStr $R2 HKCU "Software\Classes\http\shell\open\command" ""
- ${If} $R2 != ""
- ${GetPathFromString} "$R2" $R2
- ${GetParent} "$R2" $R3
- ${GetLongPath} "$R3" $R3
- ${If} $R3 == $INSTDIR
- StrCpy $R2 "1" ; This Basilisk install is set as default.
- ${Else}
- StrCpy $R2 "$R2" "" -11 # length of firefox.exe
- ${If} "$R2" == "${FileMainEXE}"
- StrCpy $R2 "2" ; Another Basilisk install is set as default.
- ${Else}
- StrCpy $R2 "0"
- ${EndIf}
- ${EndIf}
- ${Else}
- StrCpy $R2 "0" ; Basilisk is not set as default.
- ${EndIf}
-
- ${If} "$R2" == "0"
- ${AndIf} ${AtLeastWinVista}
- ; Check to see if this install location is currently set as the default
- ; browser by Default Programs which is only available on Vista and above.
- ClearErrors
- ReadRegStr $R3 HKLM "Software\RegisteredApplications" "${AppRegName}"
- ${Unless} ${Errors}
- AppAssocReg::QueryAppIsDefaultAll "${AppRegName}" "effective"
- Pop $R3
- ${If} $R3 == "1"
- StrCpy $R3 ""
- ReadRegStr $R2 HKLM "Software\Classes\http\shell\open\command" ""
- ${If} $R2 != ""
- ${GetPathFromString} "$R2" $R2
- ${GetParent} "$R2" $R3
- ${GetLongPath} "$R3" $R3
- ${If} $R3 == $INSTDIR
- StrCpy $R2 "1" ; This Basilisk install is set as default.
- ${Else}
- StrCpy $R2 "$R2" "" -11 # length of firefox.exe
- ${If} "$R2" == "${FileMainEXE}"
- StrCpy $R2 "2" ; Another Basilisk install is set as default.
- ${Else}
- StrCpy $R2 "0"
- ${EndIf}
- ${EndIf}
- ${Else}
- StrCpy $R2 "0" ; Basilisk is not set as default.
- ${EndIf}
- ${EndIf}
- ${EndUnless}
- ${EndIf}
-
- ${If} $CanSetAsDefault == "true"
- ${If} $CheckboxSetAsDefault == "1"
- StrCpy $R3 "2"
- ${Else}
- StrCpy $R3 "3"
- ${EndIf}
- ${Else}
- ${If} ${AtLeastWin8}
- StrCpy $R3 "1"
- ${Else}
- StrCpy $R3 "0"
- ${EndIf}
- ${EndIf}
-
-!ifdef STUB_DEBUG
- MessageBox MB_OK "${BaseURLStubPing} \
- $\nStub URL Version = ${StubURLVersion}${StubURLVersionAppend} \
- $\nBuild Channel = ${Channel} \
- $\nUpdate Channel = ${UpdateChannel} \
- $\nLocale = ${AB_CD} \
- $\nBasilisk x64 = $R0 \
- $\nRunning x64 Windows = $R1 \
- $\nMajor = $5 \
- $\nMinor = $6 \
- $\nBuild = $7 \
- $\nServicePack = $8 \
- $\nIsServer = $9 \
- $\nExit Code = $ExitCode \
- $\nBasilisk Launch Code = $BasiliskLaunchCode \
- $\nDownload Retry Count = $DownloadRetryCount \
- $\nDownloaded Bytes = $DownloadedBytes \
- $\nDownload Size Bytes = $DownloadSizeBytes \
- $\nIntroduction Phase Seconds = $IntroPhaseSeconds \
- $\nOptions Phase Seconds = $OptionsPhaseSeconds \
- $\nDownload Phase Seconds = $0 \
- $\nLast Download Seconds = $1 \
- $\nDownload First Transfer Seconds = $DownloadFirstTransferSeconds \
- $\nPreinstall Phase Seconds = $2 \
- $\nInstall Phase Seconds = $3 \
- $\nFinish Phase Seconds = $4 \
- $\nInitial Install Requirements Code = $InitialInstallRequirementsCode \
- $\nOpened Download Page = $OpenedDownloadPage \
- $\nExisting Profile = $ExistingProfile \
- $\nExisting Version = $ExistingVersion \
- $\nExisting Build ID = $ExistingBuildID \
- $\nNew Version = $R5 \
- $\nNew Build ID = $R6 \
- $\nDefault Install Dir = $R7 \
- $\nHas Admin = $R8 \
- $\nDefault Status = $R2 \
- $\nSet As Sefault Status = $R3 \
- $\nDownload Server IP = $DownloadServerIP \
- $\nPost-Signing Data = $PostSigningData"
- ; The following will exit the installer
- SetAutoClose true
- StrCpy $R9 "2"
- Call RelativeGotoPage
-!else
- ${NSD_CreateTimer} OnPing ${DownloadIntervalMS}
- InetBgDL::Get "${BaseURLStubPing}/${StubURLVersion}${StubURLVersionAppend}/${Channel}/${UpdateChannel}/${AB_CD}/$R0/$R1/$5/$6/$7/$8/$9/$ExitCode/$BasiliskLaunchCode/$DownloadRetryCount/$DownloadedBytes/$DownloadSizeBytes/$IntroPhaseSeconds/$OptionsPhaseSeconds/$0/$1/$DownloadFirstTransferSeconds/$2/$3/$4/$InitialInstallRequirementsCode/$OpenedDownloadPage/$ExistingProfile/$ExistingVersion/$ExistingBuildID/$R5/$R6/$R7/$R8/$R2/$R3/$DownloadServerIP/$PostSigningData" \
- "$PLUGINSDIR\_temp" /END
-!endif
- ${Else}
- ${If} "$IsDownloadFinished" == "false"
- ; Cancel the download in progress
- InetBgDL::Get /RESET /END
- ${EndIf}
- ; The following will exit the installer
- SetAutoClose true
- StrCpy $R9 "2"
- Call RelativeGotoPage
- ${EndIf}
-FunctionEnd
-
-Function createDummy
-FunctionEnd
-
-Function createIntro
- nsDialogs::Create /NOUNLOAD 1018
- Pop $Dialog
-
- GetFunctionAddress $0 OnBack
- nsDialogs::OnBack /NOUNLOAD $0
-
-!ifdef ${AB_CD}_rtl
- ; For RTL align the text with the top of the F in the Basilisk bitmap
- StrCpy $0 "${INTRO_BLURB_RTL_TOP_DU}"
-!else
- ; For LTR align the text with the top of the x in the Basilisk bitmap
- StrCpy $0 "${INTRO_BLURB_LTR_TOP_DU}"
-!endif
- ${NSD_CreateLabel} ${INTRO_BLURB_EDGE_DU} $0 ${INTRO_BLURB_WIDTH_DU} 76u "${INTRO_BLURB}"
- Pop $0
- SendMessage $0 ${WM_SETFONT} $FontBlurb 0
- SetCtlColors $0 ${INTRO_BLURB_TEXT_COLOR} transparent
-
- SetCtlColors $HWNDPARENT ${FOOTER_CONTROL_TEXT_COLOR_NORMAL} ${FOOTER_BKGRD_COLOR}
- GetDlgItem $0 $HWNDPARENT 10 ; Default browser checkbox
- ${If} "$CanSetAsDefault" == "true"
- ; The uxtheme must be disabled on checkboxes in order to override the
- ; system font color.
- System::Call 'uxtheme::SetWindowTheme(i $0 , w " ", w " ")'
- SendMessage $0 ${WM_SETFONT} $FontNormal 0
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(MAKE_DEFAULT)"
- SendMessage $0 ${BM_SETCHECK} 1 0
- SetCtlColors $0 ${FOOTER_CONTROL_TEXT_COLOR_NORMAL} ${FOOTER_BKGRD_COLOR}
- ${Else}
- ShowWindow $0 ${SW_HIDE}
- ${EndIf}
- GetDlgItem $0 $HWNDPARENT 11
- ShowWindow $0 ${SW_HIDE}
-
- ${NSD_CreateBitmap} ${APPNAME_BMP_EDGE_DU} ${APPNAME_BMP_TOP_DU} \
- ${APPNAME_BMP_WIDTH_DU} ${APPNAME_BMP_HEIGHT_DU} ""
- Pop $2
- ${SetStretchedTransparentImage} $2 $PLUGINSDIR\appname.bmp $0
-
- ${NSD_CreateBitmap} 0 0 100% 100% ""
- Pop $2
- ${NSD_SetStretchedImage} $2 $PLUGINSDIR\bgintro.bmp $1
-
- GetDlgItem $0 $HWNDPARENT 1 ; Install button
- ${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(UPGRADE_BUTTON)"
- ${Else}
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(INSTALL_BUTTON)"
- ${EndIf}
- ${NSD_SetFocus} $0
-
- GetDlgItem $0 $HWNDPARENT 2 ; Cancel button
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(CANCEL_BUTTON)"
-
- GetDlgItem $0 $HWNDPARENT 3 ; Back button used for Options
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(OPTIONS_BUTTON)"
-
- System::Call "kernel32::GetTickCount()l .s"
- Pop $StartIntroPhaseTickCount
-
- LockWindow off
- nsDialogs::Show
-
- ${NSD_FreeImage} $0
- ${NSD_FreeImage} $1
-FunctionEnd
-
-Function leaveIntro
- LockWindow on
-
- System::Call "kernel32::GetTickCount()l .s"
- Pop $0
- ${GetSecondsElapsed} "$StartIntroPhaseTickCount" "$0" $IntroPhaseSeconds
- ; It is possible for this value to be 0 if the user clicks fast enough so
- ; increment the value by 1 if it is 0.
- ${If} $IntroPhaseSeconds == 0
- IntOp $IntroPhaseSeconds $IntroPhaseSeconds + 1
- ${EndIf}
-
- SetShellVarContext all ; Set SHCTX to All Users
- ; If the user doesn't have write access to the installation directory set
- ; the installation directory to a subdirectory of the All Users application
- ; directory and if the user can't write to that location set the installation
- ; directory to a subdirectory of the users local application directory
- ; (e.g. non-roaming).
- Call CanWrite
- ${If} "$CanWriteToInstallDir" == "false"
- StrCpy $INSTDIR "$APPDATA\${BrandFullName}\"
- Call CanWrite
- ${If} "$CanWriteToInstallDir" == "false"
- ; This should never happen but just in case.
- StrCpy $CanWriteToInstallDir "false"
- ${Else}
- StrCpy $INSTDIR "$LOCALAPPDATA\${BrandFullName}\"
- Call CanWrite
- ${EndIf}
- ${EndIf}
-
- Call CheckSpace
-
- ${If} ${FileExists} "$INSTDIR"
- ; Always display the long path if the path exists.
- ${GetLongPath} "$INSTDIR" $INSTDIR
- ${EndIf}
-
-FunctionEnd
-
-Function createOptions
- ; Check whether the install requirements are satisfied using the default
- ; values for metrics.
- ${If} "$InitialInstallRequirementsCode" == ""
- ${If} "$CanWriteToInstallDir" != "true"
- ${AndIf} "$HasRequiredSpaceAvailable" != "true"
- StrCpy $InitialInstallRequirementsCode "1"
- ${ElseIf} "$CanWriteToInstallDir" != "true"
- StrCpy $InitialInstallRequirementsCode "2"
- ${ElseIf} "$HasRequiredSpaceAvailable" != "true"
- StrCpy $InitialInstallRequirementsCode "3"
- ${Else}
- StrCpy $InitialInstallRequirementsCode "0"
- ${EndIf}
- ${EndIf}
-
- ; Skip the options page unless the Options button was clicked as long as the
- ; installation directory can be written to and there is the minimum required
- ; space available.
- ${If} "$WasOptionsButtonClicked" != "1"
- ${If} "$CanWriteToInstallDir" == "true"
- ${AndIf} "$HasRequiredSpaceAvailable" == "true"
- Abort ; Skip the options page
- ${EndIf}
- ${EndIf}
-
- StrCpy $ExistingTopDir ""
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $Dialog
- ; Since the text color for controls is set in this Dialog the foreground and
- ; background colors of the Dialog must also be hardcoded.
- SetCtlColors $Dialog ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
-
- ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 18u ${OPTIONS_ITEM_WIDTH_DU} \
- 12u "$(CREATE_SHORTCUTS)"
- Pop $0
- SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $0 ${WM_SETFONT} $FontNormal 0
-
- ${If} ${AtLeastWin7}
- StrCpy $0 "$(ADD_SC_TASKBAR)"
- ${Else}
- StrCpy $0 "$(ADD_SC_QUICKLAUNCHBAR)"
- ${EndIf}
- ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 38u \
- ${OPTIONS_SUBITEM_WIDTH_DU} 12u "$0"
- Pop $CheckboxShortcutOnBar
- ; The uxtheme must be disabled on checkboxes in order to override the system
- ; font color.
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutOnBar, w " ", w " ")'
- SetCtlColors $CheckboxShortcutOnBar ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxShortcutOnBar ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxShortcutOnBar
-
- ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 54u ${OPTIONS_SUBITEM_WIDTH_DU} \
- 12u "$(ADD_CheckboxShortcutInStartMenu)"
- Pop $CheckboxShortcutInStartMenu
- ; The uxtheme must be disabled on checkboxes in order to override the system
- ; font color.
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutInStartMenu, w " ", w " ")'
- SetCtlColors $CheckboxShortcutInStartMenu ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxShortcutInStartMenu ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxShortcutInStartMenu
-
- ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 70u ${OPTIONS_SUBITEM_WIDTH_DU} \
- 12u "$(ADD_CheckboxShortcutOnDesktop)"
- Pop $CheckboxShortcutOnDesktop
- ; The uxtheme must be disabled on checkboxes in order to override the system
- ; font color.
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutOnDesktop, w " ", w " ")'
- SetCtlColors $CheckboxShortcutOnDesktop ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxShortcutOnDesktop ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxShortcutOnDesktop
-
- ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 100u ${OPTIONS_ITEM_WIDTH_DU} \
- 12u "$(DEST_FOLDER)"
- Pop $0
- SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $0 ${WM_SETFONT} $FontNormal 0
-
- ${NSD_CreateDirRequest} ${OPTIONS_SUBITEM_EDGE_DU} 116u 159u 14u "$INSTDIR"
- Pop $DirRequest
- SetCtlColors $DirRequest ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $DirRequest ${WM_SETFONT} $FontNormal 0
- System::Call shlwapi::SHAutoComplete(i $DirRequest, i ${SHACF_FILESYSTEM})
- ${NSD_OnChange} $DirRequest OnChange_DirRequest
-
-!ifdef ${AB_CD}_rtl
- ; Remove the RTL styling from the directory request text box
- ${RemoveStyle} $DirRequest ${SS_RIGHT}
- ${RemoveExStyle} $DirRequest ${WS_EX_RIGHT}
- ${RemoveExStyle} $DirRequest ${WS_EX_RTLREADING}
- ${NSD_AddStyle} $DirRequest ${SS_LEFT}
- ${NSD_AddExStyle} $DirRequest ${WS_EX_LTRREADING}|${WS_EX_LEFT}
-!endif
-
- ${NSD_CreateBrowseButton} 280u 116u 50u 14u "$(BROWSE_BUTTON)"
- Pop $ButtonBrowse
- SetCtlColors $ButtonBrowse "" ${COMMON_BKGRD_COLOR}
- ${NSD_OnClick} $ButtonBrowse OnClick_ButtonBrowse
-
- ; Get the number of pixels from the left of the Dialog to the right side of
- ; the "Space Required:" and "Space Available:" labels prior to setting RTL so
- ; the correct position of the controls can be set by NSIS for RTL locales.
-
- ; Get the width and height of both labels and use the tallest for the height
- ; and the widest to calculate where to place the labels after these labels.
- ${GetTextExtent} "$(SPACE_REQUIRED)" $FontItalic $0 $1
- ${GetTextExtent} "$(SPACE_AVAILABLE)" $FontItalic $2 $3
- ${If} $1 > $3
- StrCpy $ControlHeightPX "$1"
- ${Else}
- StrCpy $ControlHeightPX "$3"
- ${EndIf}
-
- IntOp $0 $0 + 8 ; Add padding to the control's width
- ; Make both controls the same width as the widest control
- ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 134u $0 $ControlHeightPX "$(SPACE_REQUIRED)"
- Pop $5
- SetCtlColors $5 ${COMMON_TEXT_COLOR_FADED} ${COMMON_BKGRD_COLOR}
- SendMessage $5 ${WM_SETFONT} $FontItalic 0
-
- IntOp $2 $2 + 8 ; Add padding to the control's width
- ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 145u $2 $ControlHeightPX "$(SPACE_AVAILABLE)"
- Pop $6
- SetCtlColors $6 ${COMMON_TEXT_COLOR_FADED} ${COMMON_BKGRD_COLOR}
- SendMessage $6 ${WM_SETFONT} $FontItalic 0
-
- ; Use the widest label for aligning the labels next to them
- ${If} $0 > $2
- StrCpy $6 "$5"
- ${EndIf}
- FindWindow $1 "#32770" "" $HWNDPARENT
- ${GetDlgItemEndPX} $6 $ControlRightPX
-
- IntOp $ControlRightPX $ControlRightPX + 6
-
- ${NSD_CreateLabel} $ControlRightPX 134u 100% $ControlHeightPX \
- "${APPROXIMATE_REQUIRED_SPACE_MB} $(MEGA)$(BYTE)"
- Pop $7
- SetCtlColors $7 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $7 ${WM_SETFONT} $FontNormal 0
-
- ; Create the free space label with an empty string and update it by calling
- ; UpdateFreeSpaceLabel
- ${NSD_CreateLabel} $ControlRightPX 145u 100% $ControlHeightPX " "
- Pop $LabelFreeSpace
- SetCtlColors $LabelFreeSpace ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $LabelFreeSpace ${WM_SETFONT} $FontNormal 0
-
- Call UpdateFreeSpaceLabel
-
- ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 168u ${OPTIONS_SUBITEM_WIDTH_DU} \
- 12u "$(SEND_PING)"
- Pop $CheckboxSendPing
- ; The uxtheme must be disabled on checkboxes in order to override the system
- ; font color.
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxSendPing, w " ", w " ")'
- SetCtlColors $CheckboxSendPing ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxSendPing ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxSendPing
-
-!ifdef MOZ_MAINTENANCE_SERVICE
- ; We can only install the maintenance service if the user is an admin.
- Call IsUserAdmin
- Pop $0
-
- ; Only show the maintenance service checkbox if we're on XP SP3 or higher;
- ; we don't ever want to install it on XP without at least SP3 installed.
- ${If} $0 == "true"
- ${AndIf} ${IsWinXP}
- ${AndIf} ${AtMostServicePack} 2
- StrCpy $0 "false"
- ${EndIf}
-
- ; Only show the maintenance service checkbox if we have write access to HKLM
- ClearErrors
- WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
- "Write Test"
- ${If} ${Errors}
- ${OrIf} $0 != "true"
- StrCpy $CheckboxInstallMaintSvc "0"
- ${Else}
- DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
- ; Read the registry instead of using ServicesHelper::IsInstalled so the
- ; plugin isn't included in the stub installer to lessen its size.
- ClearErrors
- ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\services\MozillaMaintenance" "ImagePath"
- ${If} ${Errors}
- ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 184u ${OPTIONS_ITEM_WIDTH_DU} \
- 12u "$(INSTALL_MAINT_SERVICE)"
- Pop $CheckboxInstallMaintSvc
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxInstallMaintSvc, w " ", w " ")'
- SetCtlColors $CheckboxInstallMaintSvc ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxInstallMaintSvc ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxInstallMaintSvc
- ${EndIf}
- ${EndIf}
-!endif
-
- GetDlgItem $0 $HWNDPARENT 1 ; Install button
- ${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(UPGRADE_BUTTON)"
- ${Else}
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(INSTALL_BUTTON)"
- ${EndIf}
- ${NSD_SetFocus} $0
-
- GetDlgItem $0 $HWNDPARENT 2 ; Cancel button
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(CANCEL_BUTTON)"
-
- GetDlgItem $0 $HWNDPARENT 3 ; Back button used for Options
- EnableWindow $0 0
- ShowWindow $0 ${SW_HIDE}
-
- ; If the option button was not clicked display the reason for what needs to be
- ; resolved to continue the installation.
- ${If} "$WasOptionsButtonClicked" != "1"
- ${If} "$CanWriteToInstallDir" == "false"
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(WARN_WRITE_ACCESS)"
- ${ElseIf} "$HasRequiredSpaceAvailable" == "false"
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(WARN_DISK_SPACE)"
- ${EndIf}
- ${EndIf}
-
- System::Call "kernel32::GetTickCount()l .s"
- Pop $StartOptionsPhaseTickCount
-
- LockWindow off
- nsDialogs::Show
-FunctionEnd
-
-Function leaveOptions
- LockWindow on
-
- ${GetRoot} "$INSTDIR" $0
- ${GetLongPath} "$INSTDIR" $INSTDIR
- ${GetLongPath} "$0" $0
- ${If} "$INSTDIR" == "$0"
- LockWindow off
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(WARN_ROOT_INSTALL)"
- Abort ; Stay on the page
- ${EndIf}
-
- Call CanWrite
- ${If} "$CanWriteToInstallDir" == "false"
- LockWindow off
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(WARN_WRITE_ACCESS)"
- Abort ; Stay on the page
- ${EndIf}
-
- Call CheckSpace
- ${If} "$HasRequiredSpaceAvailable" == "false"
- LockWindow off
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(WARN_DISK_SPACE)"
- Abort ; Stay on the page
- ${EndIf}
-
- System::Call "kernel32::GetTickCount()l .s"
- Pop $0
- ${GetSecondsElapsed} "$StartOptionsPhaseTickCount" "$0" $OptionsPhaseSeconds
- ; It is possible for this value to be 0 if the user clicks fast enough so
- ; increment the value by 1 if it is 0.
- ${If} $OptionsPhaseSeconds == 0
- IntOp $OptionsPhaseSeconds $OptionsPhaseSeconds + 1
- ${EndIf}
-
- ${NSD_GetState} $CheckboxShortcutOnBar $CheckboxShortcutOnBar
- ${NSD_GetState} $CheckboxShortcutInStartMenu $CheckboxShortcutInStartMenu
- ${NSD_GetState} $CheckboxShortcutOnDesktop $CheckboxShortcutOnDesktop
- ${NSD_GetState} $CheckboxSendPing $CheckboxSendPing
-!ifdef MOZ_MAINTENANCE_SERVICE
- ${NSD_GetState} $CheckboxInstallMaintSvc $CheckboxInstallMaintSvc
-!endif
-
-FunctionEnd
-
-Function createInstall
- nsDialogs::Create /NOUNLOAD 1018
- Pop $Dialog
- ; Since the text color for controls is set in this Dialog the foreground and
- ; background colors of the Dialog must also be hardcoded.
- SetCtlColors $Dialog ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
-
- ${NSD_CreateLabel} 0 0 49u 64u ""
- Pop $0
- ${GetDlgItemWidthHeight} $0 $1 $2
- System::Call 'user32::DestroyWindow(i r0)'
-
- ${NSD_CreateLabel} 0 0 11u 16u ""
- Pop $0
- ${GetDlgItemWidthHeight} $0 $3 $4
- System::Call 'user32::DestroyWindow(i r0)'
-
- FindWindow $7 "#32770" "" $HWNDPARENT
- ${GetDlgItemWidthHeight} $7 $8 $9
-
- ; Allow a maximum text width of half of the Dialog's width
- IntOp $R0 $8 / 2
-
- ${GetTextWidthHeight} "${INSTALL_BLURB1}" $FontBlurb $R0 $5 $6
- IntOp $R1 $1 + $3
- IntOp $R1 $R1 + $5
- IntOp $R1 $8 - $R1
- IntOp $R1 $R1 / 2
- ${NSD_CreateBitmap} $R1 ${INSTALL_BLURB_TOP_DU} 49u 64u ""
- Pop $BitmapBlurb1
- ${SetStretchedTransparentImage} $BitmapBlurb1 $PLUGINSDIR\clock.bmp $HwndBitmapBlurb1
- IntOp $R1 $R1 + $1
- IntOp $R1 $R1 + $3
- ${NSD_CreateLabel} $R1 ${INSTALL_BLURB_TOP_DU} $5 $6 "${INSTALL_BLURB1}"
- Pop $LabelBlurb1
- SendMessage $LabelBlurb1 ${WM_SETFONT} $FontBlurb 0
- SetCtlColors $LabelBlurb1 ${INSTALL_BLURB_TEXT_COLOR} transparent
-
- ${GetTextWidthHeight} "${INSTALL_BLURB2}" $FontBlurb $R0 $5 $6
- IntOp $R1 $1 + $3
- IntOp $R1 $R1 + $5
- IntOp $R1 $8 - $R1
- IntOp $R1 $R1 / 2
- ${NSD_CreateBitmap} $R1 ${INSTALL_BLURB_TOP_DU} 49u 64u ""
- Pop $BitmapBlurb2
- ${SetStretchedTransparentImage} $BitmapBlurb2 $PLUGINSDIR\particles.bmp $HwndBitmapBlurb2
- IntOp $R1 $R1 + $1
- IntOp $R1 $R1 + $3
- ${NSD_CreateLabel} $R1 ${INSTALL_BLURB_TOP_DU} $5 $6 "${INSTALL_BLURB2}"
- Pop $LabelBlurb2
- SendMessage $LabelBlurb2 ${WM_SETFONT} $FontBlurb 0
- SetCtlColors $LabelBlurb2 ${INSTALL_BLURB_TEXT_COLOR} transparent
- ShowWindow $BitmapBlurb2 ${SW_HIDE}
- ShowWindow $LabelBlurb2 ${SW_HIDE}
-
- ${GetTextWidthHeight} "${INSTALL_BLURB3}" $FontBlurb $R0 $5 $6
- IntOp $R1 $1 + $3
- IntOp $R1 $R1 + $5
- IntOp $R1 $8 - $R1
- IntOp $R1 $R1 / 2
- ${NSD_CreateBitmap} $R1 ${INSTALL_BLURB_TOP_DU} 49u 64u ""
- Pop $BitmapBlurb3
- ${SetStretchedTransparentImage} $BitmapBlurb3 $PLUGINSDIR\pencil.bmp $HWndBitmapBlurb3
- IntOp $R1 $R1 + $1
- IntOp $R1 $R1 + $3
- ${NSD_CreateLabel} $R1 ${INSTALL_BLURB_TOP_DU} $5 $6 "${INSTALL_BLURB3}"
- Pop $LabelBlurb3
- SendMessage $LabelBlurb3 ${WM_SETFONT} $FontBlurb 0
- SetCtlColors $LabelBlurb3 ${INSTALL_BLURB_TEXT_COLOR} transparent
- ShowWindow $BitmapBlurb3 ${SW_HIDE}
- ShowWindow $LabelBlurb3 ${SW_HIDE}
-
- ${NSD_CreateProgressBar} 103u 166u 241u 9u ""
- Pop $Progressbar
- ${NSD_AddStyle} $Progressbar ${PBS_MARQUEE}
- SendMessage $Progressbar ${PBM_SETMARQUEE} 1 \
- $ProgressbarMarqueeIntervalMS ; start=1|stop=0 interval(ms)=+N
-
- ${NSD_CreateLabelCenter} 103u 180u 241u 20u "$(DOWNLOADING_LABEL)"
- Pop $LabelDownloading
- SendMessage $LabelDownloading ${WM_SETFONT} $FontNormal 0
- SetCtlColors $LabelDownloading ${INSTALL_PROGRESS_TEXT_COLOR_NORMAL} transparent
-
- ${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
- ${NSD_CreateLabelCenter} 103u 180u 241u 20u "$(UPGRADING_LABEL)"
- ${Else}
- ${NSD_CreateLabelCenter} 103u 180u 241u 20u "$(INSTALLING_LABEL)"
- ${EndIf}
- Pop $LabelInstalling
- SendMessage $LabelInstalling ${WM_SETFONT} $FontNormal 0
- SetCtlColors $LabelInstalling ${INSTALL_PROGRESS_TEXT_COLOR_NORMAL} transparent
- ShowWindow $LabelInstalling ${SW_HIDE}
-
- ${NSD_CreateBitmap} ${APPNAME_BMP_EDGE_DU} ${APPNAME_BMP_TOP_DU} \
- ${APPNAME_BMP_WIDTH_DU} ${APPNAME_BMP_HEIGHT_DU} ""
- Pop $2
- ${SetStretchedTransparentImage} $2 $PLUGINSDIR\appname.bmp $0
-
- GetDlgItem $0 $HWNDPARENT 1 ; Install button
- EnableWindow $0 0
- ShowWindow $0 ${SW_HIDE}
-
- GetDlgItem $0 $HWNDPARENT 3 ; Back button used for Options
- EnableWindow $0 0
- ShowWindow $0 ${SW_HIDE}
-
- GetDlgItem $0 $HWNDPARENT 2 ; Cancel button
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(CANCEL_BUTTON)"
- ; Focus the Cancel button otherwise it isn't possible to tab to it since it is
- ; the only control that can be tabbed to.
- ${NSD_SetFocus} $0
- ; Kill the Cancel button's focus so pressing enter won't cancel the install.
- SendMessage $0 ${WM_KILLFOCUS} 0 0
-
- ${If} "$CanSetAsDefault" == "true"
- GetDlgItem $0 $HWNDPARENT 10 ; Default browser checkbox
- SendMessage $0 ${BM_GETCHECK} 0 0 $CheckboxSetAsDefault
- EnableWindow $0 0
- ShowWindow $0 ${SW_HIDE}
- ${EndIf}
-
- GetDlgItem $0 $HWNDPARENT 11
- ${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(ONE_MOMENT_UPGRADE)"
- ${Else}
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(ONE_MOMENT_INSTALL)"
- ${EndIf}
- SendMessage $0 ${WM_SETFONT} $FontNormal 0
- SetCtlColors $0 ${FOOTER_CONTROL_TEXT_COLOR_FADED} ${FOOTER_BKGRD_COLOR}
- ShowWindow $0 ${SW_SHOW}
-
- ; Set $DownloadReset to true so the first download tick count is measured.
- StrCpy $DownloadReset "true"
- StrCpy $IsDownloadFinished "false"
- StrCpy $DownloadRetryCount "0"
- StrCpy $DownloadedBytes "0"
- StrCpy $StartLastDownloadTickCount ""
- StrCpy $EndDownloadPhaseTickCount ""
- StrCpy $DownloadFirstTransferSeconds ""
- StrCpy $ExitCode "${ERR_DOWNLOAD_CANCEL}"
- StrCpy $OpenedDownloadPage "0"
-
- ClearErrors
- ReadINIStr $ExistingVersion "$INSTDIR\application.ini" "App" "Version"
- ${If} ${Errors}
- StrCpy $ExistingVersion "0"
- ${EndIf}
-
- ClearErrors
- ReadINIStr $ExistingBuildID "$INSTDIR\application.ini" "App" "BuildID"
- ${If} ${Errors}
- StrCpy $ExistingBuildID "0"
- ${EndIf}
-
- ${If} ${FileExists} "$LOCALAPPDATA\Mozilla\Basilisk"
- StrCpy $ExistingProfile "1"
- ${Else}
- StrCpy $ExistingProfile "0"
- ${EndIf}
-
- StrCpy $DownloadServerIP ""
-
- System::Call "kernel32::GetTickCount()l .s"
- Pop $StartDownloadPhaseTickCount
-
- ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.log"
- StrCpy $InstallTotalSteps ${InstallPaveOverTotalSteps}
- ${Else}
- StrCpy $InstallTotalSteps ${InstallCleanTotalSteps}
- ${EndIf}
-
- ${ITBL3Create}
- ${ITBL3SetProgressState} "${TBPF_INDETERMINATE}"
-
- ${NSD_CreateTimer} StartDownload ${DownloadIntervalMS}
-
- LockWindow off
- nsDialogs::Show
-
- ${NSD_FreeImage} $0
- ${NSD_FreeImage} $HwndBitmapBlurb1
- ${NSD_FreeImage} $HwndBitmapBlurb2
- ${NSD_FreeImage} $HWndBitmapBlurb3
-FunctionEnd
-
-Function StartDownload
- ${NSD_KillTimer} StartDownload
- InetBgDL::Get "${URLStubDownload}${URLStubDownloadAppend}" "$PLUGINSDIR\download.exe" \
- /CONNECTTIMEOUT 120 /RECEIVETIMEOUT 120 /END
- StrCpy $4 ""
- ${NSD_CreateTimer} OnDownload ${DownloadIntervalMS}
- ${If} ${FileExists} "$INSTDIR\${TO_BE_DELETED}"
- RmDir /r "$INSTDIR\${TO_BE_DELETED}"
- ${EndIf}
-FunctionEnd
-
-Function SetProgressBars
- SendMessage $Progressbar ${PBM_SETPOS} $ProgressCompleted 0
- ${ITBL3SetProgressValue} "$ProgressCompleted" "$ProgressTotal"
-FunctionEnd
-
-Function RemoveFileProgressCallback
- IntOp $InstallCounterStep $InstallCounterStep + 2
- System::Int64Op $ProgressCompleted + $InstallStepSize
- Pop $ProgressCompleted
- Call SetProgressBars
- System::Int64Op $ProgressCompleted + $InstallStepSize
- Pop $ProgressCompleted
- Call SetProgressBars
-FunctionEnd
-
-Function OnDownload
- InetBgDL::GetStats
- # $0 = HTTP status code, 0=Completed
- # $1 = Completed files
- # $2 = Remaining files
- # $3 = Number of downloaded bytes for the current file
- # $4 = Size of current file (Empty string if the size is unknown)
- # /RESET must be used if status $0 > 299 (e.g. failure)
- # When status is $0 =< 299 it is handled by InetBgDL
- StrCpy $DownloadServerIP "$5"
- ${If} $0 > 299
- ${NSD_KillTimer} OnDownload
- IntOp $DownloadRetryCount $DownloadRetryCount + 1
- ${If} "$DownloadReset" != "true"
- StrCpy $DownloadedBytes "0"
- ${NSD_AddStyle} $Progressbar ${PBS_MARQUEE}
- SendMessage $Progressbar ${PBM_SETMARQUEE} 1 \
- $ProgressbarMarqueeIntervalMS ; start=1|stop=0 interval(ms)=+N
- ${ITBL3SetProgressState} "${TBPF_INDETERMINATE}"
- ${EndIf}
- InetBgDL::Get /RESET /END
- StrCpy $DownloadSizeBytes ""
- StrCpy $DownloadReset "true"
-
- ${If} $DownloadRetryCount >= ${DownloadMaxRetries}
- StrCpy $ExitCode "${ERR_DOWNLOAD_TOO_MANY_RETRIES}"
- ; Use a timer so the UI has a chance to update
- ${NSD_CreateTimer} DisplayDownloadError ${InstallIntervalMS}
- ${Else}
- ${NSD_CreateTimer} StartDownload ${DownloadRetryIntervalMS}
- ${EndIf}
- Return
- ${EndIf}
-
- ${If} "$DownloadReset" == "true"
- System::Call "kernel32::GetTickCount()l .s"
- Pop $StartLastDownloadTickCount
- StrCpy $DownloadReset "false"
- ; The seconds elapsed from the start of the download phase until the first
- ; bytes are received are only recorded for the first request so it is
- ; possible to determine connection issues for the first request.
- ${If} "$DownloadFirstTransferSeconds" == ""
- ; Get the seconds elapsed from the start of the download phase until the
- ; first bytes are received.
- ${GetSecondsElapsed} "$StartDownloadPhaseTickCount" "$StartLastDownloadTickCount" $DownloadFirstTransferSeconds
- ${EndIf}
- ${EndIf}
-
- ${If} "$DownloadSizeBytes" == ""
- ${AndIf} "$4" != ""
- ; Handle the case where the size of the file to be downloaded is less than
- ; the minimum expected size or greater than the maximum expected size at the
- ; beginning of the download.
- ${If} $4 < ${DownloadMinSizeBytes}
- ${OrIf} $4 > ${DownloadMaxSizeBytes}
- ${NSD_KillTimer} OnDownload
- InetBgDL::Get /RESET /END
- StrCpy $DownloadReset "true"
-
- ${If} $DownloadRetryCount >= ${DownloadMaxRetries}
- ; Use a timer so the UI has a chance to update
- ${NSD_CreateTimer} DisplayDownloadError ${InstallIntervalMS}
- ${Else}
- ${NSD_CreateTimer} StartDownload ${DownloadIntervalMS}
- ${EndIf}
- Return
- ${EndIf}
-
- StrCpy $DownloadSizeBytes "$4"
- System::Int64Op $4 / 2
- Pop $HalfOfDownload
- System::Int64Op $HalfOfDownload / $InstallTotalSteps
- Pop $InstallStepSize
- SendMessage $Progressbar ${PBM_SETMARQUEE} 0 0 ; start=1|stop=0 interval(ms)=+N
- ${RemoveStyle} $Progressbar ${PBS_MARQUEE}
- System::Int64Op $HalfOfDownload + $DownloadSizeBytes
- Pop $ProgressTotal
- StrCpy $ProgressCompleted 0
- SendMessage $Progressbar ${PBM_SETRANGE32} $ProgressCompleted $ProgressTotal
- ${EndIf}
-
- ; Don't update the status until after the download starts
- ${If} $2 != 0
- ${AndIf} "$4" == ""
- Return
- ${EndIf}
-
- ; Handle the case where the downloaded size is greater than the maximum
- ; expected size during the download.
- ${If} $DownloadedBytes > ${DownloadMaxSizeBytes}
- InetBgDL::Get /RESET /END
- StrCpy $DownloadReset "true"
-
- ${If} $DownloadRetryCount >= ${DownloadMaxRetries}
- ; Use a timer so the UI has a chance to update
- ${NSD_CreateTimer} DisplayDownloadError ${InstallIntervalMS}
- ${Else}
- ${NSD_CreateTimer} StartDownload ${DownloadIntervalMS}
- ${EndIf}
- Return
- ${EndIf}
-
- ${If} $IsDownloadFinished != "true"
- ${If} $2 == 0
- ${NSD_KillTimer} OnDownload
- StrCpy $IsDownloadFinished "true"
- ; The first step of the install progress bar is determined by the
- ; InstallProgressFirstStep define and provides the user with immediate
- ; feedback.
- StrCpy $InstallCounterStep "${InstallProgressFirstStep}"
- System::Call "kernel32::GetTickCount()l .s"
- Pop $EndDownloadPhaseTickCount
-
- StrCpy $DownloadedBytes "$DownloadSizeBytes"
-
- ; When a download has finished handle the case where the downloaded size
- ; is less than the minimum expected size or greater than the maximum
- ; expected size during the download.
- ${If} $DownloadedBytes < ${DownloadMinSizeBytes}
- ${OrIf} $DownloadedBytes > ${DownloadMaxSizeBytes}
- InetBgDL::Get /RESET /END
- StrCpy $DownloadReset "true"
-
- ${If} $DownloadRetryCount >= ${DownloadMaxRetries}
- ; Use a timer so the UI has a chance to update
- ${NSD_CreateTimer} DisplayDownloadError ${InstallIntervalMS}
- ${Else}
- ${NSD_CreateTimer} StartDownload ${DownloadIntervalMS}
- ${EndIf}
- Return
- ${EndIf}
-
- LockWindow on
- ; Update the progress bars first in the UI change so they take affect
- ; before other UI changes.
- StrCpy $ProgressCompleted "$DownloadSizeBytes"
- Call SetProgressBars
- System::Int64Op $InstallStepSize * ${InstallProgressFirstStep}
- Pop $R9
- System::Int64Op $ProgressCompleted + $R9
- Pop $ProgressCompleted
- Call SetProgressBars
- ShowWindow $LabelDownloading ${SW_HIDE}
- ShowWindow $LabelInstalling ${SW_SHOW}
- ShowWindow $LabelBlurb2 ${SW_HIDE}
- ShowWindow $BitmapBlurb2 ${SW_HIDE}
- ShowWindow $LabelBlurb3 ${SW_SHOW}
- ShowWindow $BitmapBlurb3 ${SW_SHOW}
- ; Disable the Cancel button during the install
- GetDlgItem $5 $HWNDPARENT 2
- EnableWindow $5 0
- LockWindow off
-
- ; Open a handle to prevent modification of the full installer
- StrCpy $R9 "${INVALID_HANDLE_VALUE}"
- System::Call 'kernel32::CreateFileW(w "$PLUGINSDIR\download.exe", \
- i ${GENERIC_READ}, \
- i ${FILE_SHARE_READ}, i 0, \
- i ${OPEN_EXISTING}, i 0, i 0) i .R9'
- StrCpy $HandleDownload "$R9"
-
- ${If} $HandleDownload == ${INVALID_HANDLE_VALUE}
- StrCpy $ExitCode "${ERR_PREINSTALL_INVALID_HANDLE}"
- StrCpy $0 "0"
- StrCpy $1 "0"
- ${Else}
- CertCheck::VerifyCertTrust "$PLUGINSDIR\download.exe"
- Pop $0
- CertCheck::VerifyCertNameIssuer "$PLUGINSDIR\download.exe" \
- "${CertNameDownload}" "${CertIssuerDownload}"
- Pop $1
- ${If} $0 == 0
- ${AndIf} $1 == 0
- StrCpy $ExitCode "${ERR_PREINSTALL_CERT_UNTRUSTED_AND_ATTRIBUTES}"
- ${ElseIf} $0 == 0
- StrCpy $ExitCode "${ERR_PREINSTALL_CERT_UNTRUSTED}"
- ${ElseIf} $1 == 0
- StrCpy $ExitCode "${ERR_PREINSTALL_CERT_ATTRIBUTES}"
- ${EndIf}
- ${EndIf}
-
- System::Call "kernel32::GetTickCount()l .s"
- Pop $EndPreInstallPhaseTickCount
-
- ${If} $0 == 0
- ${OrIf} $1 == 0
- ; Use a timer so the UI has a chance to update
- ${NSD_CreateTimer} DisplayDownloadError ${InstallIntervalMS}
- Return
- ${EndIf}
-
- ; Instead of extracting the files we use the downloaded installer to
- ; install in case it needs to perform operations that the stub doesn't
- ; know about.
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "InstallDirectoryPath" "$INSTDIR"
- ; Don't create the QuickLaunch or Taskbar shortcut from the launched installer
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "QuickLaunchShortcut" "false"
-
- ; Either avoid or force adding a taskbar pin based on the checkbox value:
- ${If} $CheckboxShortcutOnBar == 0
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "TaskbarShortcut" "false"
- ${Else}
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "TaskbarShortcut" "true"
- ${EndIf}
-
- ${If} $CheckboxShortcutOnDesktop == 1
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "true"
- ${Else}
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "false"
- ${EndIf}
-
- ${If} $CheckboxShortcutInStartMenu == 1
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "true"
- ${Else}
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "false"
- ${EndIf}
-
-!ifdef MOZ_MAINTENANCE_SERVICE
- ${If} $CheckboxInstallMaintSvc == 1
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "MaintenanceService" "true"
- ${Else}
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "MaintenanceService" "false"
- ${EndIf}
-!else
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "MaintenanceService" "false"
-!endif
-
- ; Delete the taskbar shortcut history to ensure we do the right thing based on
- ; the config file above.
- ${GetShortcutsLogPath} $0
- Delete "$0"
-
- GetFunctionAddress $0 RemoveFileProgressCallback
- ${RemovePrecompleteEntries} $0
-
- ; Delete the install.log and let the full installer create it. When the
- ; installer closes it we can detect that it has completed.
- Delete "$INSTDIR\install.log"
-
- ; Delete firefox.exe.moz-upgrade and firefox.exe.moz-delete if it exists
- ; since it being present will require an OS restart for the full
- ; installer.
- Delete "$INSTDIR\${FileMainEXE}.moz-upgrade"
- Delete "$INSTDIR\${FileMainEXE}.moz-delete"
-
- System::Call "kernel32::GetTickCount()l .s"
- Pop $EndPreInstallPhaseTickCount
-
- Exec "$\"$PLUGINSDIR\download.exe$\" /INI=$PLUGINSDIR\${CONFIG_INI}"
- ${NSD_CreateTimer} CheckInstall ${InstallIntervalMS}
- ${Else}
- ${If} $HalfOfDownload != "true"
- ${AndIf} $3 > $HalfOfDownload
- StrCpy $HalfOfDownload "true"
- LockWindow on
- ShowWindow $LabelBlurb1 ${SW_HIDE}
- ShowWindow $BitmapBlurb1 ${SW_HIDE}
- ShowWindow $LabelBlurb2 ${SW_SHOW}
- ShowWindow $BitmapBlurb2 ${SW_SHOW}
- LockWindow off
- ${EndIf}
- StrCpy $DownloadedBytes "$3"
- StrCpy $ProgressCompleted "$DownloadedBytes"
- Call SetProgressBars
- ${EndIf}
- ${EndIf}
-FunctionEnd
-
-Function OnPing
- InetBgDL::GetStats
- # $0 = HTTP status code, 0=Completed
- # $1 = Completed files
- # $2 = Remaining files
- # $3 = Number of downloaded bytes for the current file
- # $4 = Size of current file (Empty string if the size is unknown)
- # /RESET must be used if status $0 > 299 (e.g. failure)
- # When status is $0 =< 299 it is handled by InetBgDL
- ${If} $2 == 0
- ${OrIf} $0 > 299
- ${NSD_KillTimer} OnPing
- ${If} $0 > 299
- InetBgDL::Get /RESET /END
- ${EndIf}
- ; The following will exit the installer
- SetAutoClose true
- StrCpy $R9 "2"
- Call RelativeGotoPage
- ${EndIf}
-FunctionEnd
-
-Function CheckInstall
- IntOp $InstallCounterStep $InstallCounterStep + 1
- ${If} $InstallCounterStep >= $InstallTotalSteps
- ${NSD_KillTimer} CheckInstall
- ; Close the handle that prevents modification of the full installer
- System::Call 'kernel32::CloseHandle(i $HandleDownload)'
- StrCpy $ExitCode "${ERR_INSTALL_TIMEOUT}"
- ; Use a timer so the UI has a chance to update
- ${NSD_CreateTimer} DisplayDownloadError ${InstallIntervalMS}
- Return
- ${EndIf}
-
- System::Int64Op $ProgressCompleted + $InstallStepSize
- Pop $ProgressCompleted
- Call SetProgressBars
-
- ${If} ${FileExists} "$INSTDIR\install.log"
- Delete "$INSTDIR\install.tmp"
- CopyFiles /SILENT "$INSTDIR\install.log" "$INSTDIR\install.tmp"
-
- ; The unfocus and refocus that happens approximately here is caused by the
- ; installer calling SHChangeNotify to refresh the shortcut icons.
-
- ; When the full installer completes the installation the install.log will no
- ; longer be in use.
- ClearErrors
- Delete "$INSTDIR\install.log"
- ${Unless} ${Errors}
- ${NSD_KillTimer} CheckInstall
- ; Close the handle that prevents modification of the full installer
- System::Call 'kernel32::CloseHandle(i $HandleDownload)'
- Rename "$INSTDIR\install.tmp" "$INSTDIR\install.log"
- Delete "$PLUGINSDIR\download.exe"
- Delete "$PLUGINSDIR\${CONFIG_INI}"
- System::Call "kernel32::GetTickCount()l .s"
- Pop $EndInstallPhaseTickCount
- System::Int64Op $InstallStepSize * ${InstallProgressFinishStep}
- Pop $InstallStepSize
- ${NSD_CreateTimer} FinishInstall ${InstallIntervalMS}
- ${EndUnless}
- ${EndIf}
-FunctionEnd
-
-Function FinishInstall
- ; The full installer has completed but the progress bar still needs to finish
- ; so increase the size of the step.
- IntOp $InstallCounterStep $InstallCounterStep + ${InstallProgressFinishStep}
- ${If} $InstallTotalSteps < $InstallCounterStep
- StrCpy $InstallCounterStep "$InstallTotalSteps"
- ${EndIf}
-
- ${If} $InstallTotalSteps != $InstallCounterStep
- System::Int64Op $ProgressCompleted + $InstallStepSize
- Pop $ProgressCompleted
- Call SetProgressBars
- Return
- ${EndIf}
-
- ${NSD_KillTimer} FinishInstall
-
- StrCpy $ProgressCompleted "$ProgressTotal"
- Call SetProgressBars
-
- ${If} "$CheckboxSetAsDefault" == "1"
- ; NB: this code is duplicated in installer.nsi. Please keep in sync.
- ; For data migration in the app, we want to know what the default browser
- ; value was before we changed it. To do so, we read it here and store it
- ; in our own registry key.
- StrCpy $0 ""
- ${If} ${AtLeastWinVista}
- AppAssocReg::QueryCurrentDefault "http" "protocol" "effective"
- Pop $1
- ; If the method hasn't failed, $1 will contain the progid. Check:
- ${If} "$1" != "method failed"
- ${AndIf} "$1" != "method not available"
- ; Read the actual command from the progid
- ReadRegStr $0 HKCR "$1\shell\open\command" ""
- ${EndIf}
- ${EndIf}
- ; If using the App Association Registry didn't happen or failed, fall back
- ; to the effective http default:
- ${If} "$0" == ""
- ReadRegStr $0 HKCR "http\shell\open\command" ""
- ${EndIf}
- ; If we have something other than empty string now, write the value.
- ${If} "$0" != ""
- ClearErrors
- WriteRegStr HKCU "Software\Mozilla\Basilisk" "OldDefaultBrowserCommand" "$0"
- ${EndIf}
-
- ${GetParameters} $0
- ClearErrors
- ${GetOptions} "$0" "/UAC:" $0
- ${If} ${Errors} ; Not elevated
- Call ExecSetAsDefaultAppUser
- ${Else} ; Elevated - execute the function in the unelevated process
- GetFunctionAddress $0 ExecSetAsDefaultAppUser
- UAC::ExecCodeSegment $0
- ${EndIf}
- ${EndIf}
-
- ${If} $CheckboxShortcutOnBar == 1
- ${If} ${AtMostWinVista}
- ClearErrors
- ${GetParameters} $0
- ClearErrors
- ${GetOptions} "$0" "/UAC:" $0
- ${If} ${Errors}
- Call AddQuickLaunchShortcut
- ${Else}
- GetFunctionAddress $0 AddQuickLaunchShortcut
- UAC::ExecCodeSegment $0
- ${EndIf}
- ${EndIf}
- ${EndIf}
-
- ${If} ${FileExists} "$INSTDIR\${FileMainEXE}.moz-upgrade"
- Delete "$INSTDIR\${FileMainEXE}"
- Rename "$INSTDIR\${FileMainEXE}.moz-upgrade" "$INSTDIR\${FileMainEXE}"
- ${EndIf}
-
- StrCpy $ExitCode "${ERR_SUCCESS}"
-
- StrCpy $InstallCounterStep 0
- ${NSD_CreateTimer} FinishProgressBar ${InstallIntervalMS}
-FunctionEnd
-
-Function FinishProgressBar
- IntOp $InstallCounterStep $InstallCounterStep + 1
-
- ${If} $InstallCounterStep < 10
- Return
- ${EndIf}
-
- ${NSD_KillTimer} FinishProgressBar
-
- Call CopyPostSigningData
- Call LaunchApp
- Call SendPing
-FunctionEnd
-
-Function OnBack
- StrCpy $WasOptionsButtonClicked "1"
- StrCpy $R9 "1" ; Goto the next page
- Call RelativeGotoPage
- ; The call to Abort prevents NSIS from trying to move to the previous or the
- ; next page.
- Abort
-FunctionEnd
-
-Function RelativeGotoPage
- IntCmp $R9 0 0 Move Move
- StrCmp $R9 "X" 0 Move
- StrCpy $R9 "120"
-
- Move:
- SendMessage $HWNDPARENT "0x408" "$R9" ""
-FunctionEnd
-
-Function UpdateFreeSpaceLabel
- ; Only update when $ExistingTopDir isn't set
- ${If} "$ExistingTopDir" != ""
- StrLen $5 "$ExistingTopDir"
- StrLen $6 "$INSTDIR"
- ${If} $5 <= $6
- StrCpy $7 "$INSTDIR" $5
- ${If} "$7" == "$ExistingTopDir"
- Return
- ${EndIf}
- ${EndIf}
- ${EndIf}
-
- Call CheckSpace
-
- StrCpy $0 "$SpaceAvailableBytes"
-
- StrCpy $1 "$(BYTE)"
-
- ${If} $0 > 1024
- ${OrIf} $0 < 0
- System::Int64Op $0 / 1024
- Pop $0
- StrCpy $1 "$(KILO)$(BYTE)"
- ${If} $0 > 1024
- ${OrIf} $0 < 0
- System::Int64Op $0 / 1024
- Pop $0
- StrCpy $1 "$(MEGA)$(BYTE)"
- ${If} $0 > 1024
- ${OrIf} $0 < 0
- System::Int64Op $0 / 1024
- Pop $0
- StrCpy $1 "$(GIGA)$(BYTE)"
- ${EndIf}
- ${EndIf}
- ${EndIf}
-
- SendMessage $LabelFreeSpace ${WM_SETTEXT} 0 "STR:$0 $1"
-FunctionEnd
-
-Function OnChange_DirRequest
- Pop $0
- System::Call 'user32::GetWindowTextW(i $DirRequest, w .r0, i ${NSIS_MAX_STRLEN})'
- StrCpy $1 "$0" 1 ; the first character
- ${If} "$1" == "$\""
- StrCpy $1 "$0" "" -1 ; the last character
- ${If} "$1" == "$\""
- StrCpy $0 "$0" "" 1 ; all but the first character
- StrCpy $0 "$0" -1 ; all but the last character
- ${EndIf}
- ${EndIf}
-
- StrCpy $INSTDIR "$0"
- Call UpdateFreeSpaceLabel
-
- GetDlgItem $0 $HWNDPARENT 1 ; Install button
- ${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(UPGRADE_BUTTON)"
- ${Else}
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(INSTALL_BUTTON)"
- ${EndIf}
-FunctionEnd
-
-Function OnClick_ButtonBrowse
- StrCpy $0 "$INSTDIR"
- nsDialogs::SelectFolderDialog /NOUNLOAD "$(SELECT_FOLDER_TEXT)" $0
- Pop $0
- ${If} $0 == "error" ; returns 'error' if 'cancel' was pressed?
- Return
- ${EndIf}
-
- ${If} $0 != ""
- StrCpy $INSTDIR "$0"
- System::Call 'user32::SetWindowTextW(i $DirRequest, w "$INSTDIR")'
- ${EndIf}
-FunctionEnd
-
-Function CheckSpace
- ${If} "$ExistingTopDir" != ""
- StrLen $0 "$ExistingTopDir"
- StrLen $1 "$INSTDIR"
- ${If} $0 <= $1
- StrCpy $2 "$INSTDIR" $3
- ${If} "$2" == "$ExistingTopDir"
- Return
- ${EndIf}
- ${EndIf}
- ${EndIf}
-
- StrCpy $ExistingTopDir "$INSTDIR"
- ${DoUntil} ${FileExists} "$ExistingTopDir"
- ${GetParent} "$ExistingTopDir" $ExistingTopDir
- ${If} "$ExistingTopDir" == ""
- StrCpy $SpaceAvailableBytes "0"
- StrCpy $HasRequiredSpaceAvailable "false"
- Return
- ${EndIf}
- ${Loop}
-
- ${GetLongPath} "$ExistingTopDir" $ExistingTopDir
-
- ; GetDiskFreeSpaceExW requires a backslash.
- StrCpy $0 "$ExistingTopDir" "" -1 ; the last character
- ${If} "$0" != "\"
- StrCpy $0 "\"
- ${Else}
- StrCpy $0 ""
- ${EndIf}
-
- System::Call 'kernel32::GetDiskFreeSpaceExW(w, *l, *l, *l) i("$ExistingTopDir$0", .r1, .r2, .r3) .'
- StrCpy $SpaceAvailableBytes "$1"
-
- System::Int64Op $SpaceAvailableBytes / 1048576
- Pop $1
- System::Int64Op $1 > ${APPROXIMATE_REQUIRED_SPACE_MB}
- Pop $1
- ${If} $1 == 1
- StrCpy $HasRequiredSpaceAvailable "true"
- ${Else}
- StrCpy $HasRequiredSpaceAvailable "false"
- ${EndIf}
-FunctionEnd
-
-Function CanWrite
- StrCpy $CanWriteToInstallDir "false"
-
- StrCpy $0 "$INSTDIR"
- ; Use the existing directory when it exists
- ${Unless} ${FileExists} "$INSTDIR"
- ; Get the topmost directory that exists for new installs
- ${DoUntil} ${FileExists} "$0"
- ${GetParent} "$0" $0
- ${If} "$0" == ""
- Return
- ${EndIf}
- ${Loop}
- ${EndUnless}
-
- GetTempFileName $2 "$0"
- Delete $2
- CreateDirectory "$2"
- ${If} ${FileExists} "$2"
- ${If} ${FileExists} "$INSTDIR"
- GetTempFileName $3 "$INSTDIR"
- ${Else}
- GetTempFileName $3 "$2"
- ${EndIf}
- ${If} ${FileExists} "$3"
- Delete "$3"
- StrCpy $CanWriteToInstallDir "true"
- ${EndIf}
- RmDir "$2"
- ${EndIf}
-FunctionEnd
-
-Function AddQuickLaunchShortcut
- CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}"
- ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk"
- ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" \
- "$INSTDIR"
- ${EndIf}
-FunctionEnd
-
-Function ExecSetAsDefaultAppUser
- ; Using the helper.exe lessens the stub installer size.
- ; This could ask for elevatation when the user doesn't install as admin.
- Exec "$\"$INSTDIR\uninstall\helper.exe$\" /SetAsDefaultAppUser"
-FunctionEnd
-
-Function LaunchApp
-!ifndef DEV_EDITION
- FindWindow $0 "${WindowClass}"
- ${If} $0 <> 0 ; integer comparison
- StrCpy $BasiliskLaunchCode "1"
- MessageBox MB_OK|MB_ICONQUESTION "$(WARN_MANUALLY_CLOSE_APP_LAUNCH)"
- Return
- ${EndIf}
-!endif
-
- StrCpy $BasiliskLaunchCode "2"
-
- ; Set the current working directory to the installation directory
- SetOutPath "$INSTDIR"
- ClearErrors
- ${GetParameters} $0
- ${GetOptions} "$0" "/UAC:" $1
- ${If} ${Errors}
- Exec "$\"$INSTDIR\${FileMainEXE}$\""
- ${Else}
- GetFunctionAddress $0 LaunchAppFromElevatedProcess
- UAC::ExecCodeSegment $0
- ${EndIf}
-FunctionEnd
-
-Function LaunchAppFromElevatedProcess
- ; Find the installation directory when launching using GetFunctionAddress
- ; from an elevated installer since $INSTDIR will not be set in this installer
- ${StrFilter} "${FileMainEXE}" "+" "" "" $R9
- ReadRegStr $0 HKLM "Software\Clients\StartMenuInternet\$R9\DefaultIcon" ""
- ${GetPathFromString} "$0" $0
- ; Set the current working directory to the installation directory
- ${GetParent} "$0" $1
- SetOutPath "$1"
- Exec "$\"$0$\""
-FunctionEnd
-
-Function CopyPostSigningData
- ${LineRead} "$EXEDIR\postSigningData" "1" $PostSigningData
- ${If} ${Errors}
- ClearErrors
- StrCpy $PostSigningData "0"
- ${Else}
- CreateDirectory "$LOCALAPPDATA\Mozilla\Basilisk"
- CopyFiles /SILENT "$EXEDIR\postSigningData" "$LOCALAPPDATA\Mozilla\Basilisk"
- ${Endif}
-FunctionEnd
-
-Function DisplayDownloadError
- ${NSD_KillTimer} DisplayDownloadError
- ; To better display the error state on the taskbar set the progress completed
- ; value to the total value.
- ${ITBL3SetProgressValue} "100" "100"
- ${ITBL3SetProgressState} "${TBPF_ERROR}"
- MessageBox MB_OKCANCEL|MB_ICONSTOP "$(ERROR_DOWNLOAD)" IDCANCEL +2 IDOK +1
- StrCpy $OpenedDownloadPage "1" ; Already initialized to 0
-
- ${If} "$OpenedDownloadPage" == "1"
- ClearErrors
- ${GetParameters} $0
- ${GetOptions} "$0" "/UAC:" $1
- ${If} ${Errors}
- Call OpenManualDownloadURL
- ${Else}
- GetFunctionAddress $0 OpenManualDownloadURL
- UAC::ExecCodeSegment $0
- ${EndIf}
- ${EndIf}
-
- Call SendPing
-FunctionEnd
-
-Function OpenManualDownloadURL
- ExecShell "open" "${URLManualDownload}${URLManualDownloadAppend}"
-FunctionEnd
-
-Section
-SectionEnd
diff --git a/browser/installer/windows/stub.tag b/browser/installer/windows/stub.tag
deleted file mode 100644
index f32bef36e..000000000
--- a/browser/installer/windows/stub.tag
+++ /dev/null
@@ -1,4 +0,0 @@
-;!@Install@!UTF-8!
-Title="Mozilla Firefox"
-RunProgram="setup-stub.exe"
-;!@InstallEnd@! \ No newline at end of file
diff --git a/old-configure.in b/old-configure.in
index 76f9d3a4d..045257cd8 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -842,7 +842,10 @@ fi
AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
AC_DEFINE_UNQUOTED(MOZILLA_VERSION_U,$MOZILLA_VERSION)
AC_DEFINE_UNQUOTED(MOZILLA_UAVERSION,"$MOZILLA_UAVERSION")
+AC_DEFINE_UNQUOTED(MOZILLA_UAVERSION_U,$MOZILLA_UAVERSION)
AC_SUBST(MOZILLA_SYMBOLVERSION)
+AC_SUBST(MOZILLA_UAVERSION)
+AC_SUBST(MOZILLA_UAVERSION_U)
MOZ_DOING_LTO(lto_is_enabled)
@@ -5285,7 +5288,6 @@ AC_SUBST(MOZ_ANDROID_ANR_REPORTER)
AC_SUBST(MOZ_CRASHREPORTER)
AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)
AC_SUBST(MOZ_MAINTENANCE_SERVICE)
-AC_SUBST(MOZ_STUB_INSTALLER)
AC_SUBST(MOZ_VERIFY_MAR_SIGNATURE)
AC_SUBST(MOZ_ENABLE_SIGNMAR)
AC_SUBST(MOZ_UPDATER)
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
index b6802a47c..ae71d0868 100644
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1076,6 +1076,24 @@ class Package(MachCommandBase):
return ret
@CommandProvider
+class Installer(MachCommandBase):
+ """Create the windows installer for the built product."""
+
+ @Command('installer', category='post-build',
+ description='Create the installer for the built product for distribution.')
+ def installer(self):
+ return self._run_make(directory=".", target='installer', ensure_exit_code=False)
+
+@CommandProvider
+class Mar(MachCommandBase):
+ """Create the mar file for the built product."""
+
+ @Command('mar', category='post-build',
+ description='Create the mar file for the built product for distribution.')
+ def mar(self):
+ return self._run_make(directory="./tools/update-packaging/", target='', ensure_exit_code=False)
+
+@CommandProvider
class Install(MachCommandBase):
"""Install a package."""
diff --git a/toolkit/locales/l10n.mk b/toolkit/locales/l10n.mk
index c3d47d163..34d78d33c 100644
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -112,10 +112,6 @@ repackage-zip: UNPACKAGE='$(ZIP_IN)'
repackage-zip: libs-$(AB_CD)
# call a hook for apps to put their uninstall helper.exe into the package
$(UNINSTALLER_PACKAGE_HOOK)
-# call a hook for apps to build the stub installer
-ifdef MOZ_STUB_INSTALLER
- $(STUB_HOOK)
-endif
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/l10n-repack.py $(STAGEDIST) $(DIST)/xpi-stage/locale-$(AB_CD) \
$(MOZ_PKG_EXTRAL10N) \
$(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES)))
diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk
index b1ac9a588..a2caff914 100644
--- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk
@@ -12,8 +12,12 @@ ifndef PACKAGE_NAME_MK_INCLUDED
PACKAGE_NAME_MK_INCLUDED := 1
ifndef MOZ_PKG_VERSION
+ifdef MC_BASILISK
+MOZ_PKG_VERSION = $(BUILDID)
+else
MOZ_PKG_VERSION = $(MOZ_APP_VERSION)
endif
+endif
ifndef MOZ_PKG_PLATFORM
MOZ_PKG_PLATFORM := $(TARGET_OS)-$(TARGET_CPU)
@@ -61,17 +65,17 @@ endif
ifdef MOZ_SIMPLE_PACKAGE_NAME
PKG_BASENAME := $(MOZ_SIMPLE_PACKAGE_NAME)
else
-PKG_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
+PKG_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(MOZ_PKG_PLATFORM)
endif
PKG_PATH =
SDK_PATH =
PKG_INST_BASENAME = $(PKG_BASENAME).installer
PKG_STUB_BASENAME = $(PKG_BASENAME).installer-stub
-PKG_INST_PATH = install/sea/
+PKG_INST_PATH = $(PKG_PATH)
PKG_UPDATE_BASENAME = $(PKG_BASENAME)
CHECKSUMS_FILE_BASENAME = $(PKG_BASENAME)
MOZ_INFO_BASENAME = $(PKG_BASENAME)
-PKG_UPDATE_PATH = update/
+PKG_UPDATE_PATH = $(PKG_PATH)
COMPLETE_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).complete.mar
# PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
PARTIAL_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).partial.*.mar
@@ -132,9 +136,6 @@ SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols
# Code coverage package naming
CODE_COVERAGE_ARCHIVE_BASENAME = $(PKG_BASENAME).code-coverage-gcno
-# Mozharness naming
-MOZHARNESS_PACKAGE = mozharness.zip
-
# Test package naming
TEST_PACKAGE = $(PKG_BASENAME).common.tests.zip
CPP_TEST_PACKAGE = $(PKG_BASENAME).cppunittest.tests.zip
@@ -153,8 +154,6 @@ endif
MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt
MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json
-MOZ_BUILDID_INFO_TXT_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME)_info.txt
-MOZ_MOZINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).mozinfo.json
MOZ_TEST_PACKAGES_FILE = $(DIST)/$(PKG_PATH)/$(PKG_BASENAME).test_packages.json
# JavaScript Shell
diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk
index 80e87a1ec..68247e7df 100644
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -55,12 +55,6 @@ stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_MANIFEST_DEPS)
$(MOZ_PKG_MANIFEST) $(DIST) $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(if $(MOZ_PKG_MANIFEST),,$(_BINPATH)) \
$(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES)))
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/find-dupes.py $(DEFINES) $(ACDEFINES) $(MOZ_PKG_DUPEFLAGS) $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)
-ifndef MOZ_THUNDERBIRD
- # Package mozharness
- $(call py_action,test_archive, \
- mozharness \
- $(ABS_DIST)/$(PKG_PATH)$(MOZHARNESS_PACKAGE))
-endif # MOZ_THUNDERBIRD
ifdef MOZ_PACKAGE_JSSHELL
# Package JavaScript Shell
@echo 'Packaging JavaScript Shell...'
@@ -89,7 +83,7 @@ endif # Darwin
prepare-package: stage-package
-make-package-internal: prepare-package make-sourcestamp-file make-buildinfo-file make-mozinfo-file
+make-package-internal: prepare-package make-sourcestamp-file make-buildinfo-file
@echo 'Compressing...'
cd $(DIST) && $(MAKE_PACKAGE)
@@ -114,11 +108,6 @@ make-buildinfo-file:
$(addprefix MOZ_SOURCE_REPO=,MOZ_SOURCE_REPO=$(shell awk '$$2 == "MOZ_SOURCE_REPO" {print $$3}' $(DEPTH)/source-repo.h)) \
MOZ_SOURCE_STAMP=$(shell awk '$$2 == "MOZ_SOURCE_STAMP" {print $$3}' $(DEPTH)/source-repo.h) \
MOZ_PKG_PLATFORM=$(MOZ_PKG_PLATFORM)
- echo "buildID=$(BUILDID)" > $(MOZ_BUILDID_INFO_TXT_FILE)
-
-.PHONY: make-mozinfo-file
-make-mozinfo-file:
- cp $(DEPTH)/mozinfo.json $(MOZ_MOZINFO_FILE)
# The install target will install the application to prefix/lib/appname-version
# In addition if INSTALL_SDK is set, it will install the development headers,
diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk
index 516331782..9abfd855a 100644
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -444,7 +444,6 @@ UPLOAD_FILES= \
$(call QUOTED_WILDCARD,$(DIST)/$(COMPLETE_MAR)) \
$(call QUOTED_WILDCARD,$(DIST)/$(LANGPACK)) \
$(call QUOTED_WILDCARD,$(wildcard $(DIST)/$(PARTIAL_MAR))) \
- $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOZHARNESS_PACKAGE)) \
$(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)) \
$(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CPP_TEST_PACKAGE)) \
$(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(XPC_TEST_PACKAGE)) \
@@ -458,8 +457,6 @@ UPLOAD_FILES= \
$(call QUOTED_WILDCARD,$(DIST)/$(SDK).asc) \
$(call QUOTED_WILDCARD,$(MOZ_SOURCESTAMP_FILE)) \
$(call QUOTED_WILDCARD,$(MOZ_BUILDINFO_FILE)) \
- $(call QUOTED_WILDCARD,$(MOZ_BUILDID_INFO_TXT_FILE)) \
- $(call QUOTED_WILDCARD,$(MOZ_MOZINFO_FILE)) \
$(call QUOTED_WILDCARD,$(MOZ_TEST_PACKAGES_FILE)) \
$(call QUOTED_WILDCARD,$(PKG_JSSHELL)) \
$(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip) \
@@ -490,10 +487,6 @@ ifdef MOZ_SIGN_CMD
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PACKAGE).asc)
endif
-ifdef MOZ_STUB_INSTALLER
- UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe)
-endif
-
ifndef MOZ_PKG_SRCDIR
MOZ_PKG_SRCDIR = $(topsrcdir)
endif
diff --git a/toolkit/mozapps/installer/windows/nsis/makensis.mk b/toolkit/mozapps/installer/windows/nsis/makensis.mk
index 97608e0ce..aff6d29e9 100644
--- a/toolkit/mozapps/installer/windows/nsis/makensis.mk
+++ b/toolkit/mozapps/installer/windows/nsis/makensis.mk
@@ -45,18 +45,6 @@ $(CONFIG_DIR)/setup.exe::
$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/,$(CUSTOM_UI)) $(CONFIG_DIR)
cd $(CONFIG_DIR) && $(MAKENSISU) installer.nsi
-ifdef MOZ_STUB_INSTALLER
- cd $(CONFIG_DIR) && $(MAKENSISU) stub.nsi
-ifdef MOZ_EXTERNAL_SIGNING_FORMAT
- $(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) $(CONFIG_DIR)/setup-stub.exe
-endif
- $(MAKE) $(CONFIG_DIR)/7zSD.sfx
- cd $(CONFIG_DIR) && $(CYGWIN_WRAPPER) 7z a -t7z $(ABS_CONFIG_DIR)/stub.7z setup-stub.exe -mx -m0=BCJ2 -m1=LZMA:d21 -m2=LZMA:d17 -m3=LZMA:d17 -mb0:1 -mb0s1:2 -mb0s2:3
- cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/stub.tag $(CONFIG_DIR)/stub.7z > "$(CONFIG_DIR)/stub.exe"
-ifdef MOZ_EXTERNAL_SIGNING_FORMAT_STUB
- $(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT_STUB),-f $(f)) $(CONFIG_DIR)/stub.exe
-endif
-endif
# Support for building the uninstaller when repackaging locales
ifeq ($(CONFIG_DIR),l10ngen)
cd $(CONFIG_DIR) && $(MAKENSISU) uninstaller.nsi
@@ -75,10 +63,6 @@ installer::
$(NSINSTALL) -D $(DIST)/$(PKG_INST_PATH)
cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
chmod 0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
-ifdef MOZ_STUB_INSTALLER
- cp $(CONFIG_DIR)/stub.exe "$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"
- chmod 0755 "$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"
-endif
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
endif