Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 326 lines (221 sloc) 12.3 KB
###############################################################################
# #
# Copyright (C) 2011-2016 OpenMEAP, Inc. #
# Credits to Jonathan Schang & Rob Thacher #
# #
# Released under the LGPLv3 #
# #
# OpenMEAP is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Lesser General Public License as published #
# by the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# OpenMEAP is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# You should have received a copy of the GNU Lesser General Public License #
# along with OpenMEAP. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
Software Prerequisites
OpenMEAP was created in Xcode, WP8 and Eclipse using the IvyDE plugin. Please
visit our wiki.openmeap.com or youtube.com/OpenMEAP for installation help.
OpenMEAP command-line requires Apache Ant 1.8 or greater.
Download and install Ant from http://ant.apache.org/
OpenMEAP and Ant requires Java JDK 7 or greater.
Download and install Java
http://www.oracle.com/technetwork/java/javase/downloads/index.html
=================================================================================
Client Prerequisites
iOS Development
Intel-based computer with Mac OS X 10.9 and above
Download and install Xcode 6 or greater from Apple Developer Portal http://developer.apple.com
Apple iOS device (iPhone, iPad)
iOS developer program
Android Development
Windows 7 (32-bit and 64-bit) or Mac OS X 10.9 and above
Download and install Android SDK https://developer.android.com/sdk/
Android device
Windows Development
Windows 7 Pro (32-bit and 64-bit) and above
Download and install WP8 SDK http://developer.windowsphone.com
Windows device
BlackBerry Development
Windows 7 (32-bit and 64-bit) or Mac OS X 10.9 and above
BlackBerry 10 device
=================================================================================
Setup Your Path and Environment Variables - Windows
Set ANT_HOME
Open System Properties -> Advanced -> Environment Variables
Create a new system variable
Variable name: ANT_HOME
Variable value: e.g. C:\apache-ant
Set JAVA_HOME
Open System Properties -> Advanced -> Environment Variables
Create a new system variable
Variable name: JAVA_HOME
Variable value: e.g. C:\Program Files\Java\jdk1.7.0_02
Set OPENMEAP_HOME
Open System Properties -> Advanced -> Environment Variables
Create a new system variable
Variable name: OPENMEAP_HOME
Variable value: e.g. C:\OpenMEAP
Open System Properties -> Advanced -> Environment Variables
Under system variables, edit PATH
Add ;%ANT_HOME%\bin;%JAVA_HOME%\bin to the end of the PATH value
Verify that ANT and Java are installed
Open your command-line tool and type ant -v and Java -version
Setup Your Path & Environment Variables - Mac
Set OpenMEAP Home Path
export OPENMEAP_HOME=/PathTo/OpenMEAP
Add the new version of Ant to current terminal session
export PATH=/usr/local/apache-ant/bin:"$PATH"
Add the new version of Ant to future terminal sessions
echo 'export PATH=/usr/local/apache-ant/bin:"$PATH"' >> ~/.profile
Verify that ANT and Java are installed
Open your command-line tool and type ant -v and java -version
=================================================================================
Correct the environment variables in the setEnv file to match your environment
OpenMEAP/build-tools/scripts/setEnv.bat - Windows
OpenMEAP/build-tools/scripts/setEnv.sh - Mac
Building the web projects
$ cd OpenMEAP/build-tools
$ %OPENMEAP_HOME%/build-tools/scripts/setEnv.bat - Windows
$ . ~/OpenMEAP/build-tools/scripts/setEnv.sh - Mac
$ ant dist-all-web
$ ant publish-local-slic-core
The openmeap-admin-web.war and openmeap-services-web.war files will be located
in /build-tools/dist. These will need to be dropped in Apache Tomcat's webapps
directory if you plan to deploy the OpenMEAP server in QA or Production.
=================================================================================
Setup for creating and building clients
Create a slic folder
Copy the OpenMEAP/build-tools/template/client.properties file to the slic folder
Create an assets folder inside of the slic folder
Copy the OpenMEAP/samples/banking/banking-app/original/ contents to the assets folder
Edit the client.properties file to match your environment
From your slic folder, set the environment variable
$ %OPENMEAP_HOME%/build-tools/scripts/setEnv.bat - Windows
$ . ~/OpenMEAP/build-tools/scripts/setEnv.sh - Mac
Create and build your iOS project
$ om_ios.sh create-project -propertyfile client.properties - Mac
Create and build your android project
$ om_android.bat create-project -propertyfile client.properties - Windows
$ om_android.sh create-project -propertyfile client.properties - Mac
Create and build your windows phone project
Note: Please use the Windows project folder under clients/c/openmeap-slic-win to load
the Windows Phone Alpha Project.
$ om_win.bat create-project -propertyfile client.properties - Windows
Note: if you want to create multiple apps, in your client.properties file, change
the name at the end of the naming convention. For example, com.openmeap to com.newappname.
Once you have completed your changes to the client.properties file, save it as
client.properties.newappname. This way, when you want to build this client, you would
run these commands below to build for each platform.
Mac:
om_ios.sh create-project -propertyfile client.properties.newappname
om_android.sh create-project -propertyfile client.properties.newappname
Windows:
om_win.bat create-project -propertyfile client.properties.newappname
om_android.bat create-project -propertyfile client.properties.newappname
=================================================================================
Install Eclipse and Plugins
Download Eclipse IDE for Java EE Developers https://www.eclipse.org/downloads/
IvyDE Plugin for Eclipse
Open the Eclipse IDE
From the menu Select Help > Install New Software
Click the Add button
Name: <Leave Blank>
Location: http://www.apache.org/dist/ant/ivyde/updatesite
Make sure you select show all version and select the non beta version.
Check the box next to the IvyDE plugin
Click Next until Finish
ADT Plugin for Eclipse
Open the Eclipse IDE
From the menu Select Help > Install New Software
Click the Add button
Name: <Leave Blank>
Location: https://dl-ssl.google.com/android/eclipse/
Check the box next to the Developer Tools and select the ADT plugin
Click Next until Finish
BlackBerry Plug-in for Android Development Tools
Open the Eclipse IDE
From the menu Select Help > Install New Software
Click the Add button
Name: <Leave Blank>
Location: http://developer.blackberry.com/android/downloads/eclipseplugin/
Click Next until Finish
Google API's
Go to Android SDK Manager
Check Android 2.2 (API 8)
Check SDK Platform and Google APIs
Click Install Package
=================================================================================
Import OpenMEAP projects into Eclipse
Disable to build automatically
Open workspace preferences, expand general, select workspace
De-select to build automatically
Import "build-tools" and configure the Ivy, Ant and Server settings for workshop
Adding Ivy setting paths
Open Eclipse "Preferences", expand Ivy, then Settings
For "Ivy settings path", Click "Workspace..." and select ivysettings.xml under build-tools
For "Property files", Click "Workspace..." and select ant.properties under build-tools
Setup the Ant properties
Open workspace preferences, expand "Ant", select "Runtime"
Click the "Properties" tab
Add an "openmeap.home" property entry pointing to where you have the OpenMEAP source package unzipped.
Add an "android.sdk.home" property entry pointing to where you have the Android SDK installed.
Build the build-tools
Right click the build-tools folder and select build
Import and build the projects in groups in the order below
openmeap-shared, openmeap-shared-serverside, openmeap-shared-jdk5
openmeap-admin-web, openmeap-services-web
openmeap-slic-core, openmeap-slic-android
=================================================================================
Installing and Deploying OpenMEAP Admin to the Tomcat Server
Download and extract Tomcat http://tomcat.apache.org/download-70.cgi
Edit the users file at /tomcat7/tomcat-users.xml
Add the line '<role rolename="openmeap-admin"/>'
Add the line '<user name="user"password roles="openmeap-admin"/>' Update the user and password values.
You will also need to restart Tomcat.
In eclipse, add a new server.
Select the openmeap-admin-web, openmeap-services-web and banking-web projects
Click finish
Create A tmp folder in the root directory before you start the server
Start Server
login to http://localhost:8080/openmeap-admin-web/interface/ and setup the server
Deploy the Welcome.zip app located in samples for your first mobile application
=================================================================================
Importing and building your iOS builds in Xcode
For your iOS build, do the following:
Browse to the slic folder
Select your iOS SLIC directory
Open the .xcodeproj
Add your icons and build
Press run to see in the simulator
Importing and building your Android project
For Android, do the following:
Right-click on the "Package Explorer" pane,
Select Import, then "Import Existing Android Project"
In "Select root directory" browse to the slic folder you created
Select the directory for the SLIC client you created
Click finish and clean and build in Eclipse
Click run as or debug as Android to run in simulator
Importing and building your Windows Phone builds in WP8 SDK
For your Windows Phone build, do the following:
Browse to the slic folder
Select your Win Phone SLIC directory
Open the .csproj
Add your icons and build
Press run to see in the simulator
Converting and repackaging your Android project to BlackBerry 10
For BlackBerry 10, do the following:
In the Package Explorer navigation window, right-click your Android project. Click BlackBerry Tools > Add BlackBerry Nature to Project.
In the Package Explorer navigation window, right-click your Android project. Click on either Run As > Run Configurations or Debug As > Debug Configurations.
In the Run Configurations or Debug Configurations window, in the left side navigation window, under BlackBerry Android Application, select your application.
Modify the configuration based on your requirements. Make sure to select the correct target device under the Target tab.
Click either Run or Debug as BlackBerry to run in simulator.
For more info on the process, please visit http://developer.blackberry.com/android/tools/ for more info.
Exporting your apps to Google Play, Apple App Store, Microsoft App Store or BlackBerry App Store
Follow the normal steps in Eclipse, Xcode and Windows 8 SDK for Enterprise or App Store distribution