2013-09-22 00:08:40 +02:00
|
|
|
F-Droid Client
|
|
|
|
==============
|
|
|
|
|
|
|
|
Client for [F-Droid](https://fdroid.org), the Free Software repository system
|
|
|
|
for Android.
|
|
|
|
|
|
|
|
|
|
|
|
Building from source
|
|
|
|
--------------------
|
|
|
|
|
2014-09-30 16:08:43 +04:00
|
|
|
The only required tools are the [Android SDK](http://developer.android.com/sdk/index.html) and Apache Ant.
|
2013-09-22 00:08:40 +02:00
|
|
|
|
2014-03-17 13:35:35 +01:00
|
|
|
Once you have checked out the version you wish to build, run:
|
|
|
|
|
2013-09-22 00:49:00 +02:00
|
|
|
```
|
2013-09-23 20:32:55 +02:00
|
|
|
git submodule update --init
|
2014-12-16 11:15:59 +01:00
|
|
|
cd F-Droid
|
2014-01-09 12:35:38 +01:00
|
|
|
./ant-prepare.sh # This runs 'android update' on the libs and the main project
|
2013-09-22 00:49:00 +02:00
|
|
|
ant clean release
|
|
|
|
```
|
2013-09-22 00:08:40 +02:00
|
|
|
|
2014-01-19 20:50:11 +01:00
|
|
|
The project itself supports Gradle, but some of the libraries it uses don't.
|
|
|
|
Hence it is currently not possible to build F-Droid with Gradle in a clean way
|
|
|
|
without manual interaction.
|
|
|
|
|
2013-09-22 00:08:40 +02:00
|
|
|
Direct download
|
|
|
|
---------------
|
|
|
|
|
2013-09-22 00:43:31 +02:00
|
|
|
You can [download the application](https://f-droid.org/FDroid.apk) directly
|
2014-02-10 09:37:03 +01:00
|
|
|
from our site or [browse it in the
|
|
|
|
repo](https://f-droid.org/app/org.fdroid.fdroid).
|
2013-09-22 00:08:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
Contributing
|
|
|
|
------------
|
|
|
|
|
|
|
|
You are welcome to submit Merge Requests via the Gitorious web interface. You
|
|
|
|
can also follow our [Issue tracker](https://f-droid.org/repository/issues/)
|
|
|
|
and our [Forums](https://f-droid.org/forums/).
|
|
|
|
|
|
|
|
|
2013-10-25 21:11:40 +02:00
|
|
|
Translating
|
|
|
|
-----------
|
|
|
|
|
2014-02-10 09:37:03 +01:00
|
|
|
The `res/values-*` dirs are kept up to date automatically via [MediaWiki's
|
|
|
|
Translate Extension](http://www.mediawiki.org/wiki/Extension:Translate). See
|
|
|
|
[our translation page](https://f-droid.org/wiki/page/Special:Translate) if you
|
|
|
|
would like to contribute.
|
2013-10-25 21:11:40 +02:00
|
|
|
|
2014-02-13 23:28:31 -05:00
|
|
|
|
|
|
|
Running the test suite
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
FDroid client includes a embedded Android Test Project for running tests. It
|
|
|
|
is in the `test/` subfolder. To run the tests from the command line, do:
|
|
|
|
|
|
|
|
```
|
|
|
|
git submodule update --init
|
|
|
|
./ant-prepare.sh # This runs 'android update' on the libs and the main project
|
|
|
|
ant clean emma debug install test
|
|
|
|
```
|
|
|
|
|
|
|
|
You can also run the tests in Eclipse. Here's how:
|
|
|
|
|
|
|
|
1. Choose *File* -> *Import* -> *Android* -> *Existing Android Code Into Workspace* for the `fdroidclient/` directory.
|
|
|
|
2. Choose *File* -> *Import* -> *Android* -> *Existing Android Code Into Workspace* for the `fdroidclient/test/` directory
|
|
|
|
3. If **fdroid-test** has errors, right-click on it, select *Properties*, the
|
|
|
|
*Java Build Path*, then click on the *Projects* tab.
|
|
|
|
4. Click on the *Add...* button and select `fdroidclient/`
|
|
|
|
5. Right-click on the **fdroid-test** project, then *Run As...* -> *Android JUnit Test*
|
|
|
|
|
|
|
|
|
2014-04-26 07:52:18 +09:30
|
|
|
Troubleshooting
|
|
|
|
---------------
|
|
|
|
|
|
|
|
When building F-Droid, the following error may occur:
|
|
|
|
|
|
|
|
> Invalid file: extern/UniversalImageLoader/library/build.xml
|
|
|
|
|
2014-04-26 00:33:21 +02:00
|
|
|
Check the output of the ./ant-prepare.sh command. This error is often
|
|
|
|
accompanied by the following message:
|
2014-04-26 07:52:18 +09:30
|
|
|
|
|
|
|
> Error: The project either has no target set or the target is invalid.
|
|
|
|
> Please provide a --target to the 'android update' command.
|
|
|
|
|
2014-04-26 00:33:21 +02:00
|
|
|
The most likely cause of this is that your installed Android SDK is missing
|
|
|
|
the target version specified by one of the dependencies. For example, at the
|
|
|
|
time of writing this, UniversalImageLoader uses the "android-16" target API,
|
|
|
|
however the default install of the Android SDK will usually only install the
|
2014-10-01 22:11:54 +04:00
|
|
|
latest version ("android-20" as of writing). So you will have to install
|
|
|
|
missings "android-xx" targets via the SDK manager. To get a list of already
|
|
|
|
installed SDK targets, run:
|
2014-09-30 16:08:43 +04:00
|
|
|
|
2014-10-01 22:11:54 +04:00
|
|
|
```
|
|
|
|
$ android list targets
|
|
|
|
```
|
|
|
|
|
|
|
|
To get a list of targets used by fdroidclient libs, run:
|
|
|
|
|
|
|
|
```
|
2014-12-16 11:15:59 +01:00
|
|
|
$ for i in $(grep "android.library.reference" project.properties | cut -f2 -d'='); do
|
2014-10-01 22:11:54 +04:00
|
|
|
grep ^target $i/project.properties | cut -f2 -d'=';
|
|
|
|
done | sort | uniq | paste -s -d',' -
|
|
|
|
```
|
|
|
|
to install missing or all needed targets, for example "android-16" and "android-7" run:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ android update sdk -u -t "android-16,android-7"
|
|
|
|
```
|
2014-04-26 00:33:21 +02:00
|
|
|
|
|
|
|
NOTE: While it may be tempting to add "--target=android-19" to the
|
|
|
|
ant-prepare.sh script, it is not the correct solution. Although it may work,
|
|
|
|
it can cause strange bugs at runtime.
|
2014-04-26 07:52:18 +09:30
|
|
|
|
|
|
|
|
2013-09-22 00:08:40 +02:00
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
This program is Free Software: You can use, study share and improve it at your
|
|
|
|
will. Specifically you can redistribute and/or modify it under the terms of the
|
|
|
|
[GNU General Public License](https://www.gnu.org/licenses/gpl.html) as
|
|
|
|
published by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|