From d10233bc1c387d12f835aa8ce61173ac2cd40ef5 Mon Sep 17 00:00:00 2001 From: David Meza Date: Fri, 21 Oct 2016 16:44:49 -0500 Subject: [PATCH] MM-42 README setup instructions for linux (#75) --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 386e4adb0..3abecf180 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,44 @@ It's written in JavaScript using React Native. # Installing Dependencies Follow the [React Native Getting Started Guide](https://facebook.github.io/react-native/docs/getting-started.html) for detailed instructions on setting up your local machine for development. + +# Detailed configuration: + +## Linux: + +- General requiriments: + + - JDK 7 or greater + - Android SDK + - Virtualbox + - An Android emulator: Genymotion or Android emulator. If using genymotion ensure that it uses existing adb tools (Settings: "Use custom Android SDK Tools") + - Install watchman (do this globally): + $ git clone https://github.com/facebook/watchman.git + $ cd watchman + $ git checkout master + $ ./autogen.sh + $ ./configure make + $ sudo make install + Configure your kernel to accept a lot of file watches, using a command like: + $ sudo sysctl -w fs.inotify.max_user_watches=1048576 + +- Clone repository and configure: + $ git clone git@github.com:mattermost/mattermost-mobile.git + $ cd mattermost-mobile + $ npm install + $ npm install -g react-native-cli + + - Add or edit file `src/config/config.secret.json` and add the url to the Mattermost server that you will use to develop: + `{ + "DefaultServerUrl": "https://pre-release.mattermost.com" + }` + + To use a local Mattermost server you will need to configure the "DefaultServerUrl" depending on the emulator you will use: + IOs: "DefaultServerUrl": "http://localhost:8065" + Android: "DefaultServerUrl": "http://10.0.2.2:3000" + Genymotion: "DefaultServerUrl": "http://10.0.3.2:8065" + +- Run application + - Start emulator + - Start react packager: `$ react-native start` + - Run in emulator: `$ react-native run-android`