You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
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:
the files will be deleted when the user updates the addon, since the addon currently completely deletes and replaces its Gaia profile on update;
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;
there's the potential for source and install files to conflict;
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.
The text was updated successfully, but these errors were encountered:
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:
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.
The text was updated successfully, but these errors were encountered: