forked from PDF417/pdf417-phonegap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
initDemoApp.sh
executable file
·40 lines (29 loc) · 1.09 KB
/
initDemoApp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
APP_NAME="PDF417Demo"
# position to a relative path
HERE="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")"
pushd $HERE >> /dev/null
# remove any existing code
rm -rf $APP_NAME
# create a sample application
cordova create $APP_NAME mobi.pdf417.demo $APP_NAME
# enter into demo project folder
cd $APP_NAME
# add the PDF417 plugin
cordova plugin add ../Pdf417 --variable CAMERA_USAGE_DESCRIPTION="Camera permission is required for automated scanning"
# add ios, android and wp8 support to the project
cordova platform add android
cordova platform add ios
cordova platform add wp8
# copy index.html, index.js and usdl_keys.js
cp -f ../index.html www/index.html
cp -f ../index.js www/js/index.js
cp -f ../usdl_keys.js www/js/usdl_keys.js
# add logo
cp -f ../logo.png www/img/logo.png
# build app
cordova build
# how to run
echo "To run iOS demo application open Xcode project $APP_NAME.xcodeproj"
echo "To run Android demo application, position to $APP_NAME folder and type: cordova run android"
echo "To run Windows Phone demo application open Visual Studio solution $APP_NAME.sln"