зеркало из https://github.com/mozilla/gecko-dev.git
Bug 747205. Webapps installer follow-ups. r=timA a=desktop-only
This commit is contained in:
Родитель
05752764fb
Коммит
c2a9a5b53b
|
@ -126,9 +126,10 @@ function NativeApp(aData) {
|
|||
* - ${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.
|
||||
|
@ -192,14 +193,14 @@ WinNativeApp.prototype = {
|
|||
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);
|
||||
|
||||
|
@ -305,20 +306,19 @@ WinNativeApp.prototype = {
|
|||
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;
|
||||
|
@ -328,7 +328,7 @@ WinNativeApp.prototype = {
|
|||
"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() {});
|
||||
|
@ -395,6 +395,9 @@ WinNativeApp.prototype = {
|
|||
|
||||
shortcut.copyTo(desktop, this.appNameAsFilename + ".lnk");
|
||||
shortcut.copyTo(startMenu, this.appNameAsFilename + ".lnk");
|
||||
|
||||
shortcut.followLinks = false;
|
||||
shortcut.remove(false);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -557,8 +560,6 @@ MacNativeApp.prototype = {
|
|||
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\
|
||||
|
|
|
@ -151,7 +151,7 @@ Function un.onInit
|
|||
${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}"
|
||||
|
|
Загрузка…
Ссылка в новой задаче