Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Latest commit

 

History

History
121 lines (84 loc) · 4.62 KB

BUILD.md

File metadata and controls

121 lines (84 loc) · 4.62 KB

Building the project

These steps project lead you to the required steps to build the www folder that contains the web application.

Requirements

  • Ruby (for Windows)
  • Compass: gem install compass
  • Node.js (including NPM)
  • Gulp npm install -g gulp (maybe with sudo)
  • Bower npm install -g bower (maybe with sudo)

Installation

  1. Checkout PPnet 2.0 Repository git clone https://github.com/pixelpark/ppnet
  2. Switch into ppnet folder cd ppnet
  3. Install required NPM Packages npm install
  4. Install Bower dependencies bower install
    • If you have to decide between different angular versions, use angular version 1.3.14.
  5. Run Gulp gulp

Build the Phonegap/Cordova App

Requirements

  • NodeJS
  • Java JDK
    • JRE is not sufficient
    • Win7/64bit: jdk-7u51-windows-x64.exe
  • Ant
  • Android SDK / Xcode
  • Phonegap

The project must be build.

Steps

We use gulp for building an optimized version of the app-folder. The output is saved to the www-folder.

Important: since the app needs Chromium as the default engine, only KitKat (Android >= 4.4.2) is supported. You can, however, also use the Chrome browser on any Android.

  1. cd /PATH/TO/ppnet/

  2. Add Android as a platform to cordova (I don't think you need to do that?):

    cordova platform add android
    cordova platform add ios
    
  3. Add Plugins

    phonegap local plugin add org.apache.cordova.device-orientation
    phonegap local plugin add org.apache.cordova.file
    phonegap local plugin add org.apache.cordova.file-transfer
    phonegap local plugin add org.apache.cordova.device
    phonegap local plugin add org.apache.cordova.camera
    phonegap local plugin add org.apache.cordova.statusbar
    phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
    
  4. Build Android APK

    phonegap build android
    

    Or build Android APK and deploy to device

    phonegap run android
    

Install Java/Ant on Windows

  • Create the environment variable JAVA_HOME and set it to your JDK directory. This should look similar to: "C:\Program Files\Java\jdk1.7.0_51"
  • Add %JAVA_HOME%\bin to the environment variable PATH.

If everything worked out you can type java -version in a terminal and it should return the version number without errors.

  • Install ANT http://ant.apache.org/manual/install.html (Kudos to Tobias Seckinger)
  • Move the content of the zip file to c:\ant.
  • Add c:\ant\bin to the environment variable PATH:
  • Create the environment variable ANT_HOME and set it to C:\ant.
  • Create the environment variable ANT_OPTS and set it to -Xmx256M.

If everything worked out you can type ant -version in a terminal and it should return the version number without errors.

  • Install Android SDK http://developer.android.com/sdk/
  • Move the installation to C:\android.
  • Create the environment variable ANDROID_HOME and set it to c:\android\sdk.

If everything worked out you can type android -h in a terminal and it should return the help text without errors.

Install Java/Ant on Ubuntu

On Ubuntu you can do it with this script (old version here ).

Setting up CouchDB

First, you need to install it (this is not mandatory, but additionally you might want to install these enhancements. Once you did that, you can access the administration interface on http://yourip.com:5984 where you need to enable CORS.

You do that by editing these values:

httpd enable_cors  true
cors credentials   true	
cors headers       accept, authorization, content-type, origin, Cookie	
cors methods       GET, PUT, POST, HEAD, DELETE	
cors origins       *

If your CouchDB is not on a local machine, you need to edit the configfile (usually at /usr/local/etc/couchdb) and edit this line:

[httpd]
bind_address = 0.0.0.0

To connect the web app to your own database, you only need to change the remoteentry in config file located in the www-folder.

Once you did that, you are good to go.