When installing an archive, a "source.properties" file is saved
in the directory that contains all the information from the
source (Source URL, package attributes, archive attributes.)
When loading local packages, these properties are used to
recreate the local package attributes if present. This is
also used to indentify local extra packages.
- Always unzip the archives first and get their root zip dir.
- Try to reusing an existing addon folder first.
- Or the root zip dir.
- Or come up with a better name for the addon folder.
Note that the setting operates on every source by converting
the https:// links into http:// before fetching the sources
or the archives.
This also reorganize some things: the RepoSourceAdapter now
takes the UpdaterData as parameter (so both Adapters work the
same) and the label/contentProviders are nested classes instead
of static classes. Cleanup some stuff that was no longer useful
such as the RepoSources.TaskFactory (it's in UpdaterData already).
With this change I can install from the dl site over http at home!
There is not any longer any logic in the SettingsPage,
it is handled now by a "SettingsControllers" which is
available via UpdaterData. The page only takes care of
notifying the controller via a callback when settings
have changed in the UI.
- Change Archive to have a "isLocal" mode.
- In local mode, Archive.getLocalOsPath gives the install folder.
- In remote mode, Archive.getUrl gives the download URL.
- Implement delete on local archive.
- Started refreshing all sources. Need to revamp the progress
dialog to share it accross methods first.
Fix for detecting MacOS platforms correctly.
Fix to account for new archives with a root folder
(the root folder is ignored).
Display why archives are not compatible (print
which OS was not compatible.)
The add-on use the "revision" property of the manifest (if it does not
exists, it looks for the old deprecated "version" property).
The platform uses the ro.build.version.incremental which is only an integer
for builds from the build servers.
Local builds contain <buildtype>.<username>.<date>.<time>. For those will
use the date.
This adds the following:
- unzip archives
- if dest dir already exists (typicaly update case),
unzips in a temp dir then swap dirs then delete
the old install. In case of error, the old archive
has not been lost.
- computes stats for download: percentage, speed, time left.
- compute percent for install, on top of progress bar.
The install code will need to move somewhere
out of the window. I think I'll put in the Archive
itself with the window just looping on all archives
and doing some progress bar bookeeping.