mirror of https://github.com/BTCPrivate/copay.git
Initial fixes for wp8
This commit is contained in:
parent
5dffcf79c9
commit
c15f5ea9dc
26
Gruntfile.js
26
Gruntfile.js
|
@ -25,19 +25,11 @@ module.exports = function(grunt) {
|
|||
}
|
||||
}
|
||||
},
|
||||
shell: {
|
||||
exec: {
|
||||
prod: {
|
||||
options: {
|
||||
stdout: false,
|
||||
stderr: false
|
||||
},
|
||||
command: 'node ./util/build.js'
|
||||
command: 'ls'
|
||||
},
|
||||
dev: {
|
||||
options: {
|
||||
stdout: true,
|
||||
stderr: true
|
||||
},
|
||||
command: 'node ./util/build.js -d'
|
||||
}
|
||||
},
|
||||
|
@ -242,25 +234,25 @@ module.exports = function(grunt) {
|
|||
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'shell:dev', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors'
|
||||
'exec:dev', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors'
|
||||
]);
|
||||
grunt.registerTask('mobile', [
|
||||
'shell:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors'
|
||||
'exec:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors'
|
||||
]);
|
||||
grunt.registerTask('dist', [
|
||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify', 'copy:dist'
|
||||
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify', 'copy:dist'
|
||||
]);
|
||||
grunt.registerTask('dist-dbg', [
|
||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'copy:dist'
|
||||
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'copy:dist'
|
||||
]);
|
||||
grunt.registerTask('dist-mobile', [
|
||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'uglify', 'copy:dist'
|
||||
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'uglify', 'copy:dist'
|
||||
]);
|
||||
grunt.registerTask('dist-mobile-dbg', [
|
||||
'shell:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'copy:dist'
|
||||
'exec:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'copy:dist'
|
||||
]);
|
||||
grunt.registerTask('prod', [
|
||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify'
|
||||
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify'
|
||||
]);
|
||||
grunt.registerTask('translate', ['nggettext_extract']);
|
||||
grunt.registerTask('docs', ['jsdoc']);
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#! /bin/bash
|
||||
|
||||
#
|
||||
# Usage:
|
||||
# sh ./build.sh --android --reload
|
||||
|
||||
#
|
||||
OpenColor="\033["
|
||||
Red="1;31m"
|
||||
Yellow="1;33m"
|
||||
Green="1;32m"
|
||||
CloseColor="\033[0m"
|
||||
|
||||
#
|
||||
# Check function OK
|
||||
checkOK() {
|
||||
if [ $? != 0 ]; then
|
||||
|
@ -22,16 +22,43 @@ BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||
PROJECT="$BUILDDIR/project"
|
||||
VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js`
|
||||
|
||||
SKIPIOS=false
|
||||
CURRENT_OS="WP8"
|
||||
#CURRENT_OS="IPHONE"
|
||||
#CURRENT_OS="ANDROID"
|
||||
CLEAR=false
|
||||
DBGJS=false
|
||||
|
||||
# Check Args
|
||||
if [[ $1 = "--android" || $2 = "--android" || $3 = "--android" ]]
|
||||
then
|
||||
SKIPIOS=true
|
||||
if [ $CURRENT_OS == "ANDROID" ]; then
|
||||
echo "ANDROID ....."
|
||||
fi
|
||||
|
||||
if [ $CURRENT_OS == "IPHONE" ]; then
|
||||
echo "IPHONE ....."
|
||||
fi
|
||||
|
||||
if [ $CURRENT_OS == "WP8" ]; then
|
||||
echo "WP8 ....."
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check Args
|
||||
#if [[ $1 = "--android" || $2 = "--android" || $3 = "--android" ]]
|
||||
#then
|
||||
# CURRENT_OS="ANDROID"
|
||||
#fi
|
||||
#
|
||||
#if [[ $1 = "--ios" || $2 = "--ios" || $3 = "--ios" ]]
|
||||
#then
|
||||
# CURRENT_OS="IPHONE"
|
||||
#fi
|
||||
#
|
||||
#if [[ $1 = "--wp8" || $2 = "--wp8" || $3 = "--wp8" ]]
|
||||
#then
|
||||
# CURRENT_OS="WP8"
|
||||
#fi
|
||||
|
||||
|
||||
if [[ $1 = "--clear" || $2 = "--clear" || $3 = "--clear" ]]
|
||||
then
|
||||
CLEAR=true
|
||||
|
@ -45,7 +72,7 @@ fi
|
|||
|
||||
echo "${OpenColor}${Green}* Checking dependencies...${CloseColor}"
|
||||
command -v cordova >/dev/null 2>&1 || { echo >&2 "Cordova is not present, please install it: sudo npm -g cordova."; exit 1; }
|
||||
command -v xcodebuild >/dev/null 2>&1 || { echo >&2 "XCode is not present, install it or use [--android]."; exit 1; }
|
||||
#command -v xcodebuild >/dev/null 2>&1 || { echo >&2 "XCode is not present, install it or use [--android]."; exit 1; }
|
||||
|
||||
# Create project dir
|
||||
if $CLEAR
|
||||
|
@ -55,6 +82,10 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
echo "Build directory is $BUILDDIR"
|
||||
echo "Project directory is $PROJECT"
|
||||
|
||||
|
||||
if [ ! -d $PROJECT ]; then
|
||||
cd $BUILDDIR
|
||||
echo "${OpenColor}${Green}* Creating project... ${CloseColor}"
|
||||
|
@ -62,16 +93,25 @@ if [ ! -d $PROJECT ]; then
|
|||
checkOK
|
||||
|
||||
cd $PROJECT
|
||||
|
||||
if [$CURRENT_OS == "ANDROID"]; then
|
||||
echo "${OpenColor}${Green}* Adding Android platform... ${CloseColor}"
|
||||
cordova platforms add android
|
||||
checkOK
|
||||
fi
|
||||
|
||||
if [[ !$SKIPIOS ]]; then
|
||||
if [$CURRENT_OS == "IPHONE" ]; then
|
||||
echo "${OpenColor}${Green}* Adding IOS platform... ${CloseColor}"
|
||||
cordova platforms add ios
|
||||
checkOK
|
||||
fi
|
||||
|
||||
if [$CURRENT_OS == "WP8"]; then
|
||||
echo "${OpenColor}${Green}* Adding WP8 platform... ${CloseColor}"
|
||||
cordova platforms add wp8
|
||||
checkOK
|
||||
fi
|
||||
|
||||
echo "${OpenColor}${Green}* Installing plugins... ${CloseColor}"
|
||||
|
||||
cordova plugin add https://github.com/Initsogar/cordova-webintent.git
|
||||
|
@ -116,22 +156,29 @@ sed "s/<\!-- PLACEHOLDER: CORDOVA SRIPT -->/<script type='text\/javascript' char
|
|||
checkOK
|
||||
|
||||
cd $BUILDDIR
|
||||
cp config.xml $PROJECT/config.xml
|
||||
checkOK
|
||||
|
||||
mkdir -p $PROJECT/platforms/android/res/xml/
|
||||
checkOK
|
||||
if [ $CURRENT_OS == "ANDROID" ]; then
|
||||
echo "Android project!!!"
|
||||
|
||||
cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
|
||||
checkOK
|
||||
cp config.xml $PROJECT/config.xml
|
||||
checkOK
|
||||
|
||||
cp android/project.properties $PROJECT/platforms/android/project.properties
|
||||
checkOK
|
||||
mkdir -p $PROJECT/platforms/android/res/xml/
|
||||
checkOK
|
||||
|
||||
cp -R android/res/* $PROJECT/platforms/android/res
|
||||
checkOK
|
||||
cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
|
||||
checkOK
|
||||
|
||||
if [[ !$SKIPIOS ]]; then
|
||||
cp android/project.properties $PROJECT/platforms/android/project.properties
|
||||
checkOK
|
||||
|
||||
cp -R android/res/* $PROJECT/platforms/android/res
|
||||
checkOK
|
||||
fi
|
||||
|
||||
if [ $CURRENT_OS == "IPHONE" ]; then
|
||||
|
||||
echo "Iphone project!!!"
|
||||
cp ios/Copay-Info.plist $PROJECT/platforms/ios/Copay-Info.plist
|
||||
checkOK
|
||||
|
||||
|
@ -148,3 +195,11 @@ if [[ !$SKIPIOS ]]; then
|
|||
checkOK
|
||||
fi
|
||||
|
||||
if [ $CURRENT_OS == "WP8" ]; then
|
||||
echo "Windows project!!!"
|
||||
echo "from " $PROJECT/www
|
||||
echo "to " $PROJECT/platforms/wp8/www
|
||||
cp -R $PROJECT/www $PROJECT/platforms/wp8/www
|
||||
checkOK
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="en" ng-csp>
|
||||
<html lang="en" ng-app="copayApp" ng-csp>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
"grunt-markdown": "^0.5.0",
|
||||
"grunt-mocha-test": "^0.8.2",
|
||||
"grunt-release": "^0.7.0",
|
||||
"grunt-shell": "^0.6.4",
|
||||
"grunt-exec": "*",
|
||||
"istanbul": "^0.2.10",
|
||||
"karma": "^0.12.9",
|
||||
"karma-chai": "^0.1.0",
|
||||
|
|
Loading…
Reference in New Issue