Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Add support for PortableFirefox
Browse files Browse the repository at this point in the history
Adds a 4th param to windows-keygen.js to take the PortableFirefox install
location.
  • Loading branch information
tresf committed Nov 4, 2015
1 parent c718925 commit 93838ed
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ant/windows/windows-keygen.js.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
* keytool.exe (distributed with jre: http://java.com) *
* *
* Usage: *
* cscript //NoLogo ${windows.keygen.name} "C:\Program Files\QZ Tray" install [hostname] *
* cscript //NoLogo ${windows.keygen.name} "C:\Program Files\QZ Tray" uninstall [hostname] *
* cscript //NoLogo ${windows.keygen.name} *
* "C:\Program Files\QZ Tray" install [hostname] [portable_firefox] *
* *
* cscript //NoLogo ${windows.keygen.name} *
* "C:\Program Files\QZ Tray" uninstall [hostname] [portable_firefox] *
* *
**********************************************************************************************/

Expand All @@ -39,6 +42,7 @@ var newLine = "\r\n";
var qzInstall = getArg(0, getRegValue("HKLM\\Software\\${socket.name}\\"));
var installMode = getArg(1, "install");
var cn = getArg(2, "${jks.cn}");
var firefoxPortable = getArg(3, null);

if (installMode == "install") {
var javaKey, jreHome, keyTool, keyStore, password, derCert, firefoxInstall;
Expand Down Expand Up @@ -285,6 +289,12 @@ function installWindowsXPCertificate() {
* Gets the Firefox installation path, stores it a global variable "firefoxInstall"
*/
function getFirefoxInstall() {
// Use provided install directory, if supplied
if (firefoxPortable) {
firefoxInstall = firefoxPortable + "\\App\\Firefox\\firefox.exe";
return firefoxInstall;
}

// Determine if Firefox is installed
var firefoxKey = "HKLM\\Software\\Mozilla\\Mozilla Firefox";
var firefoxVer = getRegValue(firefoxKey + "\\");
Expand Down

0 comments on commit 93838ed

Please sign in to comment.