Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

create app in separate source directory outside Gaia profile #14

Closed
mykmelez opened this issue Oct 8, 2012 · 1 comment
Closed

create app in separate source directory outside Gaia profile #14

mykmelez opened this issue Oct 8, 2012 · 1 comment

Comments

@mykmelez
Copy link
Contributor

mykmelez commented Oct 8, 2012

r2d2b2g's nascent "Create App" function creates an app in a webapps/{UUID}/ subdirectory of its Gaia profile directory, which it uses to store both source files and install files. This is problematic for several reasons:

  1. the files will be deleted when the user updates the addon, since the addon currently completely deletes and replaces its Gaia profile on update;
  2. the files are located in an obscure location, so users will have difficult finding them outside of an Open File Location function within the addon;
  3. there's the potential for source and install files to conflict;
  4. developers can't choose the location of the source files.

Instead of creating the app in a subdirectory of the profile, the Create App function should create it in a subdirectory of a common location (like the user's default Documents directory) or let the user pick a location. One might combine these two with code that uses the file picker to prompt the user for a name while suggesting both a name ("My App") and a location (using Services.dirsvc from Services.jsm to get the location via the platform-specific definitions in nsDirectoryServiceDefs.h).

Once the source files are in a reasonable, potentially user-specified directory, the rest of the code, refactored, can behave much the same way: installation consists of packaging the files into a ZIP archive, installing the package into a webapps/{UUID}/ subdirectory of the Gaia profile directory, and adding an app record to webapps/webapps.json.

@digitarald
Copy link
Contributor

With #44 this should be fixed, as all locally stored apps are now re-installed on update. I'd close it for now, as its not in the spec.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants