1. GNOME Archive Integration
1.1. Google Summer of Code 2013 project page
http://www.google-melange.com/gsoc/project/google/gsoc2013/lantw44/22001
1.2. Google Summer of Code 2013 final report
https://wiki.gnome.org/TingweiLan/GSoC2013Final
1.3. About the project
Archives are usually a convenient and efficient way to transfer folders over the Internet. If we have to transfer a lot of files, creating and extracting archives are our routine tasks, which can be simplified. The goal of the project is to add automatic archives creation and extraction support to regular GNOME applications.
1.4. Details
- Shared library
gnome-autoar: It is a tiny library which uses libarchive and GIO as the backend to automatically create and extract archives and use GSettings as the backend to store and retrieve user preferences. It also uses some standard unix functions if available because some functions are not provided by GIO. It will be dynamically linked to applications to prevent incompatibility in GSettings. A pc file (pkg-config) is also privided.
Epiphany, Evolution, and Empathy
- Archives will be automatically extracted after downloading is completed. Folders will be automatically compressed as an archive before uploading is started.
- Users can decide whether they wants this feature. Users can find the settings in the preferences dialog of each applications.
1.5. Code
My code are available on my personal sites and GitHub. All new codes are in the "archive-integration" branch expect for gnome-autoar because it is a new library. However, there are some conflict in master branch and archive-integration branch in Epiphany, so I resolve the conflict and rebase all my works from master branch, creating another branch called archive-integration-rebase.
Note: Code on my personal sites and GitHub may be not up-to-date after GSoC. New patches will be available on GNOME Bugzilla and GNOME Git. In fact, some code are rewritten and it is not easy to push changes into existing branch.
Epiphany (branch: archive-integration-rebase)
Evolution (branch: archive-integration-review)
Empathy (branch: archive-integration)
gnome-autoar (branch: master)
1.6. Testing
Build gnome-autoar first.
git clone git://git.gnome.org/gnome-autoar gnome-autoar cd gnome-autoar ./autogen.sh --enable-gtk-doc; make; make install
Then, you can build Epiphany with archive support.
git clone http://www.tfcis.org/~lantw44/git-fast/gsoc2013-epiphany epiphany -b archive-integration-rebase cd epiphany ./autogen.sh; make; make install
You can also build Evolution with archive support.
git clone http://www.tfcis.org/~lantw44/git-fast/gsoc2013-evolution evolution -b archive-integration-review cd evolution ./autogen.sh; make; make install
You can build Empathy with archive support.
git clone http://www.tfcis.org/~lantw44/git-fast/gsoc2013-empathy empathy -b archive-integration cd empathy ./autogen.sh; make; make install
You can run Epiphany, Evolution, or Empathy now!
Dump archive preferences.
dconf dump /org/gnome/desktop/archives/
1.7. Progress
autoarchive is located in Epiphany source tree, but it does not depend on Epiphany except configure.ac.
autoarchive has been renamed to gnome-autoar! All code in the autoarchive directory has been moved to a separate repository. gnome-autoar use its own configure and Makefile to build itself.
- Archives creation (done)
- Support Multiple directories and files as sources (done)
- Resolve hard links (done)
- Archives extraction (partly done)
- Check whether the archive contains a single top-level directory, so it will neither mess the download directory nor create extra directories. (done)
- Remove absolute path names. (done)
- Sanitize bad path names containing "..", so no files will be extracted to the location which is outside the destination. (done)
- Ignore unneeded files when extracting. File name patterns can be configured using glob-style patterns. (done)
- Provide asynchronous functions so it will not block UI. (done)
- Handle files which is compressed by only a filter, such as gzip, bzip2, and xz without tar or cpio. (done)
- Extraction should be cancellable. (done)
POSIX ACL support. (not started, optional)
- Preferences (done)
- GSettings reading and writing support. (done)
- Formats and Filters (done)
- Generate MIME types from formats and filters. (done)
- Get file types description using GIO. (done)
Shared user interfaces (not completed)
- A list for users to choose default archives creation format. (done)
A list for users to edit the unneeded file names pattern. (not started, optional)
A list for users to edit the file types should be considered as archives. (not started, optional)
1.8. Screenshot
1.8.1. <<< gnome-autoar >>>
gnome-autoar provides some common widgets to integrate archives support into applications.
Simple archive format chooser shows most-used archive formats.
Click "Other format" will activate the advanced archive format chooser to provide all available options.
1.8.2. <<< Epiphany >>>
Epiphany has new options in preferences dialog now!
Download panel (downloading)
Download panel (checking the archive before extracting)
Download panel (extracting)
Download panel (extraction finished)
Upload dialog. Only single file is allowed in this web page, but we still can select multiple file because we can automatically create an archive for them!
Upload progress and Cancellable. The "Stop Archiving" item only showed when there is an archiving work.
1.8.3. <<< Evolution >>>
Evolution has new options in attachment saving dialog!
Users can change set preferred file format when uploading directories!
Attachment bar (creating an archive for the directory)
Attachment bar (An archive is successfully created for the directory)
1.8.4. <<< Empathy >>>
Empathy will automatically create an archive if you want to send a directory.
Empathy will send the archive after it is created.
Empathy is going to receive file
Empathy is extracting files from the received archive
Nautilus
Both nautilus and file-roller are considered as advanced tools to manage files and archives.
gnome-autoar will be used as a convenient backend for simple archives creation and extraction, and the original file-roller backend will be improved to support more complex operations.