DesktopForAppInstallData
This document describes the procedure of auto-make of .desktop files for Mozilla extensions, which will be added automatically to app-install-data branch. Those .desktop files are needed to present extension packages in Add/Remove programs.
Finding extensions
Extensions can be found the way they are found in check-extensions script.
Keeping info about available .desktop files
A list of existing .desktop files can be kept in a list file. To determine whether an extensions needs a .desktop file, or not we would search for package name through the list. If it is found, then .desktop file for that extensions already exists. If it is not found, new .desktop file is generated, and package name is added to the list.
Suggested format:
all-in-one-sidebar adblock-plus mozilla-noscript ...
The list can be kept in autoupdater.data branch, which will be used in MozillaTeam/Extensions/LargeScaleMaintenance process.
.desktop file format
Generic .desktop file:
[Desktop Entry] Encoding=UTF-8 Name=$name Comment=$short_description GenericName=$xpi_install_dir extension Type=Application Icon=$icon Categories=Application;Network; MimeType=application/x-debian-xul-extension-$depends StartupNotify=true X-AppInstall-Package=$package_name X-AppInstall-Popcon=0 X-AppInstall-Section=main
All of the required fields can be found in the debian/control, debian/rules or install.rdf, located inside the package.
$name is located in install.rdf in node Description.em:name.
$short_description is located in debian/control in Description field
$xpi_install_dir is located in debian/rules if default value is not used. Default value is thunderbird firefox firefox-addons, which means the package is available for Thunderbird, Firefox 2 and Firefox 3. Based on install dir a comment for .desktop file can be generated.
$icon, if present, can be found in install.rdf in node Description.em:iconURL. It is in chrome form, so some decoding based on iconURL and information found in chrome.manifest is needed.
application/x-debian-xul-extension-$depends is directly related to the Depends field of the package. Possible values are application/x-debian-xul-extension-{firefox,firefox-2,thunderbird}. We need to check if the package depends on firefox or firefox-3.0, firefox-2, and/or thunderbird package, and set the value based on that.
$package_name is located in debian/control in Package field.
Adding .desktop file to the branch
A branch with all .desktop files should reside in ~mozilla-extensions-dev team. Its name should be consistent with original branch name. Suggested name is app-install-data-ubuntu/ubuntu.mozilla-extensions.
Script which generates new .desktop file can be manually or automatically run. If new .desktop files need to be generated, these steps should be performed:
- Merge our branch with ~ubuntu-core-dev/app-install-data-ubuntu/ubuntu.
- If an error occurs, report it so it can be sorted out. This shouldn't happen, if script works ok... but just in case.
- Generate new .desktop file, and add it to the branch. .desktop files for Mozilla extensions are in menu-data-xul-extensions/ directory. Add package name to the list in autoupdater.data branch.
- Add .desktop file and push with useful commit message, for example "Added $extensions.desktop to menu-data-xul-extensions/"
- Repeat previous two steps for all extensions.
- Commit list to the autoupdater.data branch (in order not to generate too many commits). Example commit message: "Added extensions: $extension1, $extension2, ... to the .desktop files list."
- Push the changes, if everything is ok. Alternatively, report the process and wait for sign-off.
- Propose for merge with ~ubuntu-core-dev/app-install-data-ubuntu/ubuntu branch.
MozillaTeam/Extensions/DesktopForAppInstallData (last edited 2008-08-06 17:00:34 by localhost)