author | Felipe Gomes <felipc@gmail.com> |
Thu, 19 Apr 2012 18:47:54 -0700 | |
changeset 91970 | ebec7bc561e1905612befb1d07292903e702472c |
parent 91969 | ac6e651207d3fe55b8f168c28c9568b00a6c8306 |
child 91971 | 22bfdebf5cae295b3aa946406d7654c356b55801 |
push id | 22495 |
push user | felipc@gmail.com |
push date | Fri, 20 Apr 2012 01:49:42 +0000 |
treeherder | mozilla-central@22bfdebf5cae [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | timA, desktop-only |
bugs | 747205 |
milestone | 14.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
browser/modules/WebappsInstaller.jsm | file | annotate | diff | comparison | revisions | |
webapprt/win/webapp-uninstaller.nsi.in | file | annotate | diff | comparison | revisions |
--- a/browser/modules/WebappsInstaller.jsm +++ b/browser/modules/WebappsInstaller.jsm @@ -121,19 +121,20 @@ function NativeApp(aData) { * * %APPDATA%/${FolderName} * - webapp.ini * - webapp.json * - ${AppName}.exe * - ${AppName}.lnk * / uninstall * - webapp-uninstaller.exe - * - shortcut_logs.ini + * - shortcuts_log.ini + * - uninstall.log * / chrome/icons/default/ - * - topwindow.ico + * - default.ico * * After the app runs for the first time, a profiles/ folder will also be * created which will host the user profile for this app. */ /** * Constructor for the Windows native app shell * @@ -187,24 +188,24 @@ WinNativeApp.prototype = { this.installDir = Services.dirsvc.get("AppData", Ci.nsIFile); this.installDir.append(this.launchURI.host + ";" + this.launchURI.scheme + ";" + this.launchURI.port); this.uninstallDir = this.installDir.clone(); this.uninstallDir.append("uninstall"); - this.uninstallerFile = this.installDir.clone(); + this.uninstallerFile = this.uninstallDir.clone(); this.uninstallerFile.append("webapp-uninstaller.exe"); this.iconFile = this.installDir.clone(); this.iconFile.append("chrome"); this.iconFile.append("icons"); this.iconFile.append("default"); - this.iconFile.append("topwindow.ico"); + this.iconFile.append("default.ico"); this.processFolder = Services.dirsvc.get("CurProcD", Ci.nsIFile); this.desktopShortcut = Services.dirsvc.get("Desk", Ci.nsILocalFile); this.desktopShortcut.append(this.appNameAsFilename + ".lnk"); this.desktopShortcut.followLinks = false; this.startMenuShortcut = Services.dirsvc.get("Progs", Ci.nsILocalFile); @@ -300,40 +301,39 @@ WinNativeApp.prototype = { webappINI.append("webapp.ini"); let factory = Cc["@mozilla.org/xpcom/ini-processor-factory;1"] .getService(Ci.nsIINIParserFactory); let writer = factory.createINIParser(webappINI).QueryInterface(Ci.nsIINIParserWriter); writer.setString("Webapp", "Name", this.appName); writer.setString("Webapp", "Profile", this.installDir.leafName); - writer.setString("Webapp", "Executable", this.appNameAsFilename + ".exe"); + writer.setString("Webapp", "Executable", this.appNameAsFilename); writer.setString("WebappRT", "InstallDir", this.processFolder.path); - writer.setString("Branding", "BrandFullName", this.appName); - writer.setString("Branding", "BrandShortName", this.appName); writer.writeFile(); - // ${UninstallDir}/shortcut_logs.ini + // ${UninstallDir}/shortcuts_log.ini let shortcutLogsINI = this.uninstallDir.clone().QueryInterface(Ci.nsILocalFile); - shortcutLogsINI.append("shortcut_logs.ini"); + shortcutLogsINI.append("shortcuts_log.ini"); writer = factory.createINIParser(shortcutLogsINI).QueryInterface(Ci.nsIINIParserWriter); - writer.setString("STARTMENU", "Shortcut", this.appNameAsFilename + ".lnk"); - writer.setString("DESKTOP", "Shortcut", this.appNameAsFilename + ".lnk"); + writer.setString("STARTMENU", "Shortcut0", this.appNameAsFilename + ".lnk"); + writer.setString("DESKTOP", "Shortcut0", this.appNameAsFilename + ".lnk"); writer.setString("TASKBAR", "Migrated", "true"); + writer.writeFile(); writer = null; factory = null; // ${UninstallDir}/uninstall.log let uninstallContent = "File: \\webapp.ini\r\n" + "File: \\webapp.json\r\n" + "File: \\webapprt.old\r\n" + - "File: \\chrome\\icons\\default\\topwindow.ico"; + "File: \\chrome\\icons\\default\\default.ico"; let uninstallLog = this.uninstallDir.clone(); uninstallLog.append("uninstall.log"); writeToFile(uninstallLog, uninstallContent, function() {}); }, /** * Writes the keys to the system registry that are necessary for the app operation * and uninstall process. @@ -390,16 +390,19 @@ WinNativeApp.prototype = { shortcut.setShortcut(target, this.installDir.clone(), null, this.shortDescription, this.iconFile, 0); let desktop = Services.dirsvc.get("Desk", Ci.nsILocalFile); let startMenu = Services.dirsvc.get("Progs", Ci.nsILocalFile); shortcut.copyTo(desktop, this.appNameAsFilename + ".lnk"); shortcut.copyTo(startMenu, this.appNameAsFilename + ".lnk"); + + shortcut.followLinks = false; + shortcut.remove(false); }, /** * This variable specifies if the icon retrieval process should * use a temporary file in the system or a binary stream. This * is accessed by a common function in WebappsIconHelpers.js and * is different for each platform. */ @@ -552,18 +555,16 @@ MacNativeApp.prototype = { applicationINI.append("webapp.ini"); let factory = Cc["@mozilla.org/xpcom/ini-processor-factory;1"] .getService(Ci.nsIINIParserFactory); let writer = factory.createINIParser(applicationINI).QueryInterface(Ci.nsIINIParserWriter); writer.setString("Webapp", "Name", this.appName); writer.setString("Webapp", "Profile", this.appProfileDir.leafName); - writer.setString("Branding", "BrandFullName", this.appName); - writer.setString("Branding", "BrandShortName", this.appName); writer.writeFile(); let infoPListContent = '<?xml version="1.0" encoding="UTF-8"?>\n\ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n\ <plist version="1.0">\n\ <dict>\n\ <key>CFBundleDevelopmentRegion</key>\n\ <string>English</string>\n\
--- a/webapprt/win/webapp-uninstaller.nsi.in +++ b/webapprt/win/webapp-uninstaller.nsi.in @@ -146,17 +146,17 @@ Function .onInit FunctionEnd Function un.onInit StrCpy $LANGUAGE 0 ${un.GetParent} "$INSTDIR" $INSTDIR ${un.GetLongPath} "$INSTDIR" $INSTDIR - ReadINIStr $AppFilename "$INSTDIR\webapp.ini" "WebappRT" "Executable" + ReadINIStr $AppFilename "$INSTDIR\webapp.ini" "Webapp" "Executable" ReadINIStr $AppName "$INSTDIR\webapp.ini" "Webapp" "Name" ${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}" Abort ${EndUnless} StrCpy $AppRTTempDir "$TEMP\moz_webapprt" RmDir /r "$AppRTTempDir"