
Instructions
============

This project is (initially) generated by eliom-distillery as the mobile
project "%%%PROJECT_NAME%%%".

This template need to have phonegap installed on your environnement.
It does work with phonegap version 3.0.0-0.14.1

Generally, you can compile it and run ocsigenserver on it by
  $ make test.byte (or test.opt)
See below for other useful targets for make.


Mobile files
------------

 - static/index.html or mobile/index.html
   This is the starting file to your mobile application.

 - mobile/
   This is the directory where you get your package application
   after compilation.

 - mobile/%%%PROJECT_NAME%%%.config.xml.in
   This is the configuration file to your mobile app.
   But some basic information are configurable Makefile.options.

 - mobile/config.xml
   This is the configuration file for phonegap generated from
   mobile/%%%PROJECT_NAME%%%.config.xml.in,
   do not edit or remove it.

 - static/res and static/spec
   This is directory for phonegap, do not remove it.

 - static/js/%%%PROJECT_NAME%%%.js
   This is the javascript of your application, do not remove it.


Mobile rules
------------

Currently only android, blackberry and ios are available.

Only android environnement was check.
Fill you free to contact us to any issue.

 - $ make <platform>-build
   To build your application on target platform

 - $ make <platform>-install
   To install your application on target platform

 - $ make <platform>-run
   To build and install your application on target platform

 - $ make <platform>-remove
   To remove your application for target platform

 - $ make build
   To build your application on platforms listed in Makefile.options


Generated files
---------------

The following files in this directory have been generated by
eliom-distillery:

 - %%%PROJECT_NAME%%%.eliom
   This is your initial source file.
%%%ifdef OCAML4%%%
   All Eliom files (*.eliom, *.eliomi) in this directory are
   automatically considered.  To add a .ml/.mli file to your project,
   append it to the variable SERVER_FILES or CLIENT_FILES.
%%%endif%%%
%%%ifdef OCAML3%%%
   To add more source files (.ml,.mli,.eliom,.eliomi) to your project,
   add it to the variables SERVER_FILES and/or CLIENT_FILES.
%%%endif%%%

 - static/
   The content of this folder is statically served. Put your CSS or
   additional JavaScript files here!

 - Makefile.options
   Configure your project here!

 - %%%PROJECT_NAME%%%.conf.in
   This file is a template for the configuration file for
   ocsigenserver. You will rarely have to edit itself - it takes its
   variables from the Makefile.options. This way, the installation
   rules and the configuration files are synchronized with respect to
   the different folders.

 - Makefile
   This contains all rules necessary to build, test, and run your
   Eliom application. You better don't touch it ;) See below for the
   relevant targets.

 - README
   Not completely describable here.


Makefile targets
----------------

Here's some help on how to work with this basic distillery project:

 - Test your application by compiling it and running ocsigenserver locally
     $ make test.byte (or test.opt)

 - Compile it only
     $ make all (or byte or opt)

 - Deploy your project on your system
     $ sudo make install (or install.byte or install.opt)

 - Run the server on the deployed project
     $ sudo make run.byte (or run.opt)

   If WWWUSER in the Makefile.options is you, you don't need the
   `sudo'. If Eliom isn't installed globally, however, you need to
   re-export some environment variables to make this work:
     $ sudo PATH=$PATH OCAMLPATH=$OCAMLPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH make run.byte/run.opt

 - If you need a findlib package in your project, add it to the
   variables SERVER_PACKAGES and/or CLIENT_PACKAGES. The configuration
   file will be automatically updated.
