DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
// main
var srDest;
var err;
var fDesktop;
var szFolderDesktop;

srDest = $SpaceRequired$;
err    = initInstall("Firefox Installer", "/mozilla.org/Firefox Installer", "$Version$"); 
logComment("initInstall: " + err);

// Find the current user's desktop
winreg = getWinRegistry();
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
valname             = "Desktop";
szFolderDesktop     = winreg.getValueString(subkey, valname);

fDesktop = getFolder("file:///", szFolderDesktop);
logComment("Desktop location: " + fDesktop);

if(verifyDiskSpace(fDesktop, srDest))
{
  setPackageFolder(fDesktop);

  err =  addFile("",
                 "",
                 "FirefoxNetSetup.exe", // dir name in jar to extract 
                 fDesktop,             // Where to put this file (Returned from getFolder) 
                 "");                  // subdir name to create relative to fProgram

  logComment("addFile() returned: " + err);

  err = execute("FirefoxNetSetup.exe", "", false);
  logComment("execute() returned: " + err);

  // check return value
  if(err==SUCCESS)
  {
    err = performInstall(); 
    logComment("performInstall() returned: " + err);
  }
  else
    cancelInstall(err);
}
else
  cancelInstall(INSUFFICIENT_DISK_SPACE);

// end main