diff --git a/mail/installer/windows/basemail-win b/mail/installer/windows/basemail-win index bb774276f589..12429cd9a653 100644 --- a/mail/installer/windows/basemail-win +++ b/mail/installer/windows/basemail-win @@ -51,6 +51,18 @@ thunderbird\defaults\pref\inspector.js thunderbird\res\inspector\viewer-registry.rdf thunderbird\res\inspector\search-registry.rdf +; Optional Talkback +[talkback] +thunderbird\components\qfaservices.dll +thunderbird\components\qfaservices.xpt +thunderbird\components\BrandRes.dll +thunderbird\components\fullsoft.dll +thunderbird\components\master.ini +thunderbird\components\talkback-l10n.ini +thunderbird\components\talkback.cnt +thunderbird\components\talkback.exe +thunderbird\components\talkback.hlp + [mail] thunderbird\xpicleanup.exe diff --git a/mail/installer/windows/config.it b/mail/installer/windows/config.it index edbe6210e352..cbfebaa16f9b 100644 --- a/mail/installer/windows/config.it +++ b/mail/installer/windows/config.it @@ -237,7 +237,7 @@ C4=Component En US lang pack C5=Component US region pack ; Make sure Component QFA is LAST so 3rd party developers who might not want ; this component can easily remove it. -; C6=Component QFA +C6=Component QFA [Setup Type1] ;*** LOCALIZE ME BABY *** @@ -258,7 +258,7 @@ C6=Component Offline C7=Component ADT ; Make sure Component QFA is LAST so 3rd party developers who might not want ; this component can easily remove it. -; C8=Component QFA +C8=Component QFA [Dialog Select Components] Show Dialog=TRUE @@ -727,17 +727,17 @@ Attributes=SELECTED|INVISIBLE|FORCE_UPGRADE Force Upgrade File0=[SETUP PATH]\chrome\US.jar FileCount=$FileCount$ -;[Component QFA] -;Description Short=Quality Feedback Agent +[Component QFA] +Description Short=Quality Feedback Agent ;*** LOCALIZE ME BABY *** -;Description Long=for reporting $ProductName$ crash information -;Archive=talkback.xpi -;Install Size=870 -;Install Size System=1 -;Install Size Archive=248 -;Attributes=SELECTED|FORCE_UPGRADE -;Force Upgrade File0=[SETUP PATH]\components\fullsoft.dll -;FileCount=$FileCount$ +Description Long=for reporting $ProductName$ crash information +Archive=talkback.xpi +$InstallSize$:talkback +$InstallSizeSystem$ +$InstallSizeArchive$:talkbck.xpi +Attributes=SELECTED|FORCE_UPGRADE +Force Upgrade File0=[SETUP PATH]\components\fullsoft.dll +FileCount=$FileCount$ ; This is to randomly set the default checkbox for this component. ; This particular value will set the checkbox checked [number]% of the time. diff --git a/mail/installer/windows/installer.cfg b/mail/installer/windows/installer.cfg index ad8fee4ce63f..54b1b6664c0b 100644 --- a/mail/installer/windows/installer.cfg +++ b/mail/installer/windows/installer.cfg @@ -10,5 +10,5 @@ FileMainEXE = thunderbird.exe FileUninstall = UninstallThunderbird.exe FileUninstallZIP = UninstallThunderbird.zip FileInstallerNETRoot = ThunderbirdNetSetup -ComponentList = xpcom,mail,deflenus,langenus,regus,offline,adt +ComponentList = xpcom,mail,talkback,deflenus,langenus,regus,offline,adt LicenseFile = mail/LICENSE.txt diff --git a/mail/installer/windows/talkback.jst b/mail/installer/windows/talkback.jst new file mode 100644 index 000000000000..81a928c04111 --- /dev/null +++ b/mail/installer/windows/talkback.jst @@ -0,0 +1,127 @@ +// this function verifies disk space in kilobytes +function verifyDiskSpace(dirPath, spaceRequired) +{ + var spaceAvailable; + + // Get the available disk space on the given path + spaceAvailable = fileGetDiskSpaceAvailable(dirPath); + + // Convert the available disk space into kilobytes + spaceAvailable = parseInt(spaceAvailable / 1024); + + // do the verification + if(spaceAvailable < spaceRequired) + { + logComment("Insufficient disk space: " + dirPath); + logComment(" required : " + spaceRequired + " K"); + logComment(" available: " + spaceAvailable + " K"); + return(false); + } + + return(true); +} + +// this function deletes a file if it exists +function deleteThisFile(dirKey, file) +{ + var fFileToDelete; + + fFileToDelete = getFolder(dirKey, file); + logComment("File to delete: " + fFileToDelete); + if(File.isFile(fFileToDelete)) + { + File.remove(fFileToDelete); + return(true); + } + else + return(false); +} + +// this function deletes a folder if it exists +function deleteThisFolder(dirKey, folder, recursiveDelete) +{ + var fToDelete; + + if(typeof recursiveDelete == "undefined") + recursiveDelete = true; + + fToDelete = getFolder(dirKey, folder); + logComment("Folder to delete: " + fToDelete); + if(File.isDirectory(fToDelete)) + { + File.dirRemove(fToDelete, recursiveDelete); + return(true); + } + else + return(false); +} + +// OS type detection +// which platform? +function getPlatform() +{ + var platformStr; + var platformNode; + + if('platform' in Install) + { + platformStr = new String(Install.platform); + + if (!platformStr.search(/^Macintosh/)) + platformNode = 'mac'; + else if (!platformStr.search(/^Win/)) + platformNode = 'win'; + else + platformNode = 'unix'; + } + else + { + var fOSMac = getFolder("Mac System"); + var fOSWin = getFolder("Win System"); + + logComment("fOSMac: " + fOSMac); + logComment("fOSWin: " + fOSWin); + + if(fOSMac != null) + platformNode = 'mac'; + else if(fOSWin != null) + platformNode = 'win'; + else + platformNode = 'unix'; + } + + return platformNode; +} + +var srDest = $SpaceRequired$; + +var err = initInstall("Quality Feedback Agent", "Quality Feedback Agent", "$Version$"); +logComment("initInstall: " + err); + +var communicatorFolder = getFolder("Program"); +logComment("communicatorFolder: " + communicatorFolder); + +if (verifyDiskSpace(communicatorFolder, srDest)) +{ + err = addDirectory("Program", + "$Version$", + "thunderbird", // jar source folder + communicatorFolder, // target folder + "", // target subdir + true ); // force flag + + logComment("addDirectory() returned: " + err); + + if (err==SUCCESS) + { + err = performInstall(); + logComment("performInstall() returned: " + err); + } + else + { + cancelInstall(err); + logComment("cancelInstall() returned: " + err); + } +} +else + cancelInstall(INSUFFICIENT_DISK_SPACE);