From b21dc578bc2d22d05af1020471f029d3fa096eb5 Mon Sep 17 00:00:00 2001 From: Romain Bertozzi <romain.bertozzi@savoirfairelinux.com> Date: Tue, 29 Mar 2016 15:36:40 -0400 Subject: [PATCH] add Android distribution This patch allows the user to build an APK from the Ring Project Metaproject. The steps to achieve this are written in the README.me, which has been modified to integrate the Android platform. Change-Id: I3af4637528f3258869011c197dca11600cd8259d Tuleap: #510 --- README.md | 54 ++++++++++++++++++++++++++-------------------------- make-ring.py | 9 ++++++++- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 9cbc62f0..5ccb85c5 100644 --- a/README.md +++ b/README.md @@ -10,64 +10,64 @@ Synchronization via submodules of the repositories of <https://ring.cx/> to stat Ring installer uses python3. Please make sure it is installed before running it. -## Using make-ring.py +## On Linux -Build and install all the dependencies: +#### Build and install all the dependencies: ./make-ring.py --dependencies -#### Linux - Your distro package manager will be used. +Your distro package manager will be used. -#### OSX - You need to setup Homebrew (http://brew.sh/) since their is no built-in package manager on OSX. - -Build and install locally under this repository: +#### Build and install locally under this repository: ./make-ring.py --install -Run daemon and client that were installed locally: - - ./make-ring.py --run +#### Run daemon and client that were installed locally: + ./make-ring.py --run You can then stop the processes with CTRL-C. -_On Linux_ You can also run them in the background with the `--background` argument and then use the `--stop` command to stop them. -Stdout and stderr go to `daemon.log` and `client-gnome.log`. +You can also run them in the background with the --background argument and then use the --stop command to stop them. Stdout and stderr go to daemon.log and client-gnome.log. -Install globally for all users instead: +#### Install globally for all users instead: ./make-ring.py --install --global-install -Run global install: +#### Run global install: gnome-ring This already starts the daemon automatically for us. -Uninstall the global install: +#### Uninstall the global install: ./make-ring.py --uninstall -## Outputs +## On OSX -#### Linux +You need to setup Homebrew (<http://brew.sh/>) since their is no built-in package manager on OSX. -#### OSX +#### Build and install all the dependencies: + + ./make-ring.py --dependencies -You can find the .app file in the ./install/client-macosx folder. +#### Build and install locally under this repository: -## Ubuntu 15.10 host Android device + ./make-ring.py --install + +#### Output + +You can find the .app file in the ./install/client-macosx folder. -This script does not automate the installation of any Android development tools. +## On Android -First ensure that you can build and install a minimal Android App on your device, e.g. <https://github.com/cirosantilli/android-cheat/tree/214fab34bb0e1627ac73e43b72dee7d1f8db7bfb/min> +Please make sure you have the Android SDK and NDK installed, and that their paths are properly set. For further information, please visit <https://github.com/savoirfairelinux/ring-client-android> -This will at least require installing the SDK. +#### Build and install locally under this repository: -All executables used must be in your `PATH`, e.g. `adb`. + ./make-ring.py --install --distribution=Android -Then build and install on all connected devices with: +#### Output - ./scripts/ubuntu-15.10-android-install-all-devices.sh +You can find the .apk file in the ./client-android/ring-android/app/build/outputs diff --git a/make-ring.py b/make-ring.py index 4946b4a0..673cd9ad 100755 --- a/make-ring.py +++ b/make-ring.py @@ -123,6 +123,10 @@ def run_dependencies(args): {"packages": ' '.join(OSX_DEPENDENCIES)} ) + elif args.distribution == "Android": + print("The Android version does not need more dependencies.\nPlease continue with the --install instruction.") + sys.exit(1) + else: print("Not yet implemented for current distribution (%s)" % args.distribution) sys.exit(1) @@ -140,6 +144,9 @@ def run_install(args): os.environ['CMAKE_PREFIX_PATH'] = str(qt5dir.decode('ascii')) install_args += " -c client-macosx" execute_script(["CONFIGURE_FLAGS='--without-dbus' ./scripts/install.sh " + install_args]) + elif args.distribution == "Android": + os.chdir("./client-android") + execute_script(["./compile.sh"]) else: install_args += ' -c client-gnome' execute_script(["./scripts/install.sh " + install_args]) @@ -237,7 +244,7 @@ def validate_args(parsed_args): """Validate the args values, exit if error is found""" # Check arg values - supported_distros = ['Ubuntu', 'Debian', 'OSX', 'Fedora', 'Automatic'] + supported_distros = ['Android', 'Ubuntu', 'Debian', 'OSX', 'Fedora', 'Automatic'] if parsed_args.distribution not in supported_distros: print('Distribution not supported.\nChoose one of: %s' \ % ', '.join(supported_distros), -- GitLab