mirror of https://github.com/BTCPrivate/copay.git
build(cordova): simplify build, use cordova in a more standard way
This commit is contained in:
parent
4ccf10d1b3
commit
d5e6b8fab8
|
@ -4,6 +4,8 @@ i18n/crowdin_api_key.txt
|
||||||
src/js/translations.js
|
src/js/translations.js
|
||||||
|
|
||||||
# cordova
|
# cordova
|
||||||
|
plugins
|
||||||
|
platforms
|
||||||
cordova/project-*/*
|
cordova/project-*/*
|
||||||
cordova/*.keystore
|
cordova/*.keystore
|
||||||
|
|
||||||
|
@ -89,13 +91,15 @@ Session.vim
|
||||||
src/sass/*.css
|
src/sass/*.css
|
||||||
.sass-cache
|
.sass-cache
|
||||||
|
|
||||||
# copay public
|
# copay www
|
||||||
public/css/*
|
www/css/*
|
||||||
public/lib/*
|
www/lib/*
|
||||||
public/js/*
|
www/js/*
|
||||||
public/fonts
|
www/fonts
|
||||||
|
|
||||||
## templates
|
## templates
|
||||||
|
/config.xml
|
||||||
|
/ionic.config.json
|
||||||
/appConfig.json
|
/appConfig.json
|
||||||
externalServices.json
|
externalServices.json
|
||||||
cordova/Makefile
|
cordova/Makefile
|
||||||
|
@ -104,8 +108,8 @@ app-template/bpapp
|
||||||
cordova/ProjectMakefile
|
cordova/ProjectMakefile
|
||||||
cordova/config.xml
|
cordova/config.xml
|
||||||
cordova/wp/Package.appxmanifest
|
cordova/wp/Package.appxmanifest
|
||||||
public/img/logo-negative.svg
|
www/img/logo-negative.svg
|
||||||
public/img/logo.svg
|
www/img/logo.svg
|
||||||
src/js/appConfig.js
|
src/js/appConfig.js
|
||||||
src/js/externalServices.js
|
src/js/externalServices.js
|
||||||
|
|
||||||
|
@ -116,8 +120,8 @@ app-template/bpapp
|
||||||
cordova/ProjectMakefile
|
cordova/ProjectMakefile
|
||||||
cordova/config.xml
|
cordova/config.xml
|
||||||
cordova/wp/Package.appxmanifest
|
cordova/wp/Package.appxmanifest
|
||||||
public/img/logo-negative.svg
|
www/img/logo-negative.svg
|
||||||
public/img/logo.svg
|
www/img/logo.svg
|
||||||
src/js/appConfig.js
|
src/js/appConfig.js
|
||||||
|
|
||||||
cordova/android/res/
|
cordova/android/res/
|
||||||
|
@ -127,7 +131,3 @@ cordova/wp/*.jpg
|
||||||
cordova/ios/splash/
|
cordova/ios/splash/
|
||||||
cordova/ios/icons/
|
cordova/ios/icons/
|
||||||
cordova/project/
|
cordova/project/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
48
Gruntfile.js
48
Gruntfile.js
|
@ -34,17 +34,23 @@ module.exports = function(grunt) {
|
||||||
wpcopy: {
|
wpcopy: {
|
||||||
command: 'make -C cordova wp-copy',
|
command: 'make -C cordova wp-copy',
|
||||||
},
|
},
|
||||||
|
ios-debug: {
|
||||||
|
command: 'npm run build:ios',
|
||||||
|
},
|
||||||
ios: {
|
ios: {
|
||||||
command: 'make -C cordova ios',
|
command: 'npm run build:ios-release',
|
||||||
},
|
},
|
||||||
xcode: {
|
xcode: {
|
||||||
command: 'open cordova/project-ios/platforms/ios/*.xcodeproj',
|
command: 'npm run open:ios',
|
||||||
|
},
|
||||||
|
android-debug: {
|
||||||
|
command: 'npm run build:android',
|
||||||
},
|
},
|
||||||
android: {
|
android: {
|
||||||
command: 'make -C cordova android',
|
command: 'npm run build:android-release',
|
||||||
},
|
},
|
||||||
androidrun: {
|
androidrun: {
|
||||||
command: 'make -C cordova androidrun',
|
command: 'npm run run:android && npm run log:android',
|
||||||
},
|
},
|
||||||
androidbuild: {
|
androidbuild: {
|
||||||
command: 'cd cordova/project && cordova build android --release',
|
command: 'cd cordova/project && cordova build android --release',
|
||||||
|
@ -125,7 +131,7 @@ module.exports = function(grunt) {
|
||||||
'angular-pbkdf2/angular-pbkdf2.js',
|
'angular-pbkdf2/angular-pbkdf2.js',
|
||||||
'angular-bitcore-wallet-client/angular-bitcore-wallet-client.js'
|
'angular-bitcore-wallet-client/angular-bitcore-wallet-client.js'
|
||||||
],
|
],
|
||||||
dest: 'public/lib/angular.js'
|
dest: 'www/lib/angular.js'
|
||||||
},
|
},
|
||||||
js: {
|
js: {
|
||||||
src: [
|
src: [
|
||||||
|
@ -144,11 +150,11 @@ module.exports = function(grunt) {
|
||||||
'bower_components/trezor-connect/login.js',
|
'bower_components/trezor-connect/login.js',
|
||||||
'node_modules/cordova-plugin-qrscanner/dist/cordova-plugin-qrscanner-lib.min.js'
|
'node_modules/cordova-plugin-qrscanner/dist/cordova-plugin-qrscanner-lib.min.js'
|
||||||
],
|
],
|
||||||
dest: 'public/js/copay.js'
|
dest: 'www/js/copay.js'
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
src: ['src/sass/*.css', 'src/css/*.css'],
|
src: ['src/sass/*.css', 'src/css/*.css'],
|
||||||
dest: 'public/css/copay.css'
|
dest: 'www/css/copay.css'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uglify: {
|
uglify: {
|
||||||
|
@ -157,8 +163,8 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
prod: {
|
prod: {
|
||||||
files: {
|
files: {
|
||||||
'public/js/copay.js': ['public/js/copay.js'],
|
'www/js/copay.js': ['www/js/copay.js'],
|
||||||
'public/lib/angular.js': ['public/lib/angular.js']
|
'www/lib/angular.js': ['www/lib/angular.js']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -166,8 +172,8 @@ module.exports = function(grunt) {
|
||||||
pot: {
|
pot: {
|
||||||
files: {
|
files: {
|
||||||
'i18n/po/template.pot': [
|
'i18n/po/template.pot': [
|
||||||
'public/index.html',
|
'www/index.html',
|
||||||
'public/views/**/*.html',
|
'www/views/**/*.html',
|
||||||
'src/js/routes.js',
|
'src/js/routes.js',
|
||||||
'src/js/services/*.js',
|
'src/js/services/*.js',
|
||||||
'src/js/controllers/**/*.js'
|
'src/js/controllers/**/*.js'
|
||||||
|
@ -190,19 +196,19 @@ module.exports = function(grunt) {
|
||||||
expand: true,
|
expand: true,
|
||||||
flatten: true,
|
flatten: true,
|
||||||
src: 'bower_components/ionic/release/fonts/ionicons.*',
|
src: 'bower_components/ionic/release/fonts/ionicons.*',
|
||||||
dest: 'public/fonts/'
|
dest: 'www/fonts/'
|
||||||
},
|
},
|
||||||
ionic_js: {
|
ionic_js: {
|
||||||
expand: true,
|
expand: true,
|
||||||
flatten: true,
|
flatten: true,
|
||||||
src: 'bower_components/ionic/release/js/ionic.bundle.min.js',
|
src: 'bower_components/ionic/release/js/ionic.bundle.min.js',
|
||||||
dest: 'public/lib/'
|
dest: 'www/lib/'
|
||||||
},
|
},
|
||||||
linux: {
|
linux: {
|
||||||
files: [{
|
files: [{
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: 'webkitbuilds/',
|
cwd: 'webkitbuilds/',
|
||||||
src: ['.desktop', '../public/img/icons/favicon.ico', '../public/img/icons/icon-256.png'],
|
src: ['.desktop', '../www/img/icons/favicon.ico', '../www/img/icons/icon-256.png'],
|
||||||
dest: 'webkitbuilds/Copay/linux64/',
|
dest: 'webkitbuilds/Copay/linux64/',
|
||||||
flatten: true,
|
flatten: true,
|
||||||
filter: 'isFile'
|
filter: 'isFile'
|
||||||
|
@ -224,10 +230,10 @@ module.exports = function(grunt) {
|
||||||
platforms: ['win64', 'osx64', 'linux64'],
|
platforms: ['win64', 'osx64', 'linux64'],
|
||||||
buildDir: './webkitbuilds',
|
buildDir: './webkitbuilds',
|
||||||
version: '0.16.0',
|
version: '0.16.0',
|
||||||
macIcns: './public/img/icons/icon.icns',
|
macIcns: './www/img/icons/icon.icns',
|
||||||
exeIco: './public/img/icons/icon.ico'
|
exeIco: './www/img/icons/icon.ico'
|
||||||
},
|
},
|
||||||
src: ['./package.json', './public/**/*']
|
src: ['./package.json', './www/**/*']
|
||||||
},
|
},
|
||||||
compress: {
|
compress: {
|
||||||
linux: {
|
linux: {
|
||||||
|
@ -261,12 +267,12 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('wp', ['prod', 'exec:wp']);
|
grunt.registerTask('wp', ['prod', 'exec:wp']);
|
||||||
grunt.registerTask('wp-copy', ['default', 'exec:wpcopy']);
|
grunt.registerTask('wp-copy', ['default', 'exec:wpcopy']);
|
||||||
grunt.registerTask('wp-init', ['default', 'exec:wpinit']);
|
grunt.registerTask('wp-init', ['default', 'exec:wpinit']);
|
||||||
grunt.registerTask('ios', ['prod', 'exec:ios']);
|
grunt.registerTask('ios', ['exec:ios']);
|
||||||
grunt.registerTask('ios-debug', ['default', 'exec:ios']);
|
grunt.registerTask('ios-debug', ['exec:ios-debug']);
|
||||||
grunt.registerTask('ios-run', ['exec:xcode']);
|
grunt.registerTask('ios-run', ['exec:xcode']);
|
||||||
grunt.registerTask('cordovaclean', ['exec:cordovaclean']);
|
grunt.registerTask('cordovaclean', ['exec:cordovaclean']);
|
||||||
grunt.registerTask('android-debug', ['default', 'exec:android', 'exec:androidrun']);
|
grunt.registerTask('android-debug', ['exec:android-debug', 'exec:androidrun']);
|
||||||
grunt.registerTask('android', ['prod', 'exec:android']);
|
grunt.registerTask('android', ['exec:android-release']);
|
||||||
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
|
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
|
||||||
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
|
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
|
||||||
|
|
||||||
|
|
|
@ -7,31 +7,11 @@ all:
|
||||||
clean:
|
clean:
|
||||||
rm -Rf $(WORKDIR)*
|
rm -Rf $(WORKDIR)*
|
||||||
|
|
||||||
|
|
||||||
$(WORKDIR)android $(WORKDIR)ios: config.xml
|
|
||||||
cordova create $@ com.bitpay.*BUNDLENAME* "*USERVISIBLENAME*" || echo "Project Path Existed"
|
|
||||||
cp ProjectMakefile $@/Makefile
|
|
||||||
rm -r $@/www && ln -sF ../../public $@/www
|
|
||||||
cp config.xml $@/config.xml
|
|
||||||
make -C $@ $(subst $(WORKDIR),, $@)
|
|
||||||
|
|
||||||
ios: $(WORKDIR)ios
|
|
||||||
make -C $(WORKDIR)ios build-ios
|
|
||||||
|
|
||||||
android: project-android
|
|
||||||
mkdir -p android/platforms/android/res/xml/
|
|
||||||
mkdir -p $(WORKDIR)android/scripts
|
|
||||||
cp -R scripts/* $(WORKDIR)android/scripts
|
|
||||||
cp android/build-extras.gradle $(WORKDIR)android/platforms/android/build-extras.gradle
|
|
||||||
cp android/project.properties $(WORKDIR)android/platforms/android/project.properties
|
|
||||||
cp -R android/res/* $(WORKDIR)android/platforms/android/res
|
|
||||||
make -C $(WORKDIR)android build-android
|
|
||||||
|
|
||||||
wp-init: config.xml
|
wp-init: config.xml
|
||||||
cordova create $(WORKDIR)$@ com.bitpay.*BUNDLENAME* "*USERVISIBLENAME*" || echo "Project Path Existed"
|
cordova create $(WORKDIR)$@ com.bitpay.*BUNDLENAME* "*USERVISIBLENAME*" || echo "Project Path Existed"
|
||||||
cp ProjectMakefile $(WORKDIR)$@/Makefile
|
cp ProjectMakefile $(WORKDIR)$@/Makefile
|
||||||
mkdir -p $(WORKDIR)$@/www
|
mkdir -p $(WORKDIR)$@/www
|
||||||
cp -Rf ../public/* $(WORKDIR)$@/www
|
cp -Rf ../www/* $(WORKDIR)$@/www
|
||||||
cp config.xml $(WORKDIR)$@/config.xml
|
cp config.xml $(WORKDIR)$@/config.xml
|
||||||
make -C $(WORKDIR)$@ $(subst $(WORKDIR),, $(WORKDIR)$@)
|
make -C $(WORKDIR)$@ $(subst $(WORKDIR),, $(WORKDIR)$@)
|
||||||
|
|
||||||
|
@ -43,10 +23,5 @@ wp-copy:
|
||||||
cp -rvf wp/SplashScreenImage.jpg $(WORKDIR)wp/platforms/wp8/
|
cp -rvf wp/SplashScreenImage.jpg $(WORKDIR)wp/platforms/wp8/
|
||||||
cp -rvf wp/ApplicationIcon.png $(WORKDIR)wp/platforms/wp8/
|
cp -rvf wp/ApplicationIcon.png $(WORKDIR)wp/platforms/wp8/
|
||||||
cp -rvf wp/Background.png $(WORKDIR)wp/platforms/wp8/
|
cp -rvf wp/Background.png $(WORKDIR)wp/platforms/wp8/
|
||||||
cp -rvf ../public/* $(WORKDIR)wp/www
|
cp -rvf ../www/* $(WORKDIR)wp/www
|
||||||
wp/fix-svg.sh
|
wp/fix-svg.sh
|
||||||
|
|
||||||
|
|
||||||
androidrun:
|
|
||||||
make -C $(WORKDIR)android run
|
|
||||||
adb logcat | grep chromium
|
|
||||||
|
|
|
@ -5,21 +5,13 @@ plugins:
|
||||||
cordova prepare
|
cordova prepare
|
||||||
rm -rf platforms/android/res/values-es
|
rm -rf platforms/android/res/values-es
|
||||||
|
|
||||||
ios-platform android-platform wp8-platform:
|
wp8-platform:
|
||||||
cordova platforms add $(subst -platform,,$@) || echo "Platform already added"
|
cordova platforms add $(subst -platform,,$@) || echo "Platform already added"
|
||||||
|
|
||||||
ios: ios-platform plugins
|
|
||||||
cordova plugin add https://github.com/tjwoon/csZBar.git
|
|
||||||
cordova plugin add phonegap-plugin-push@1.5.3
|
|
||||||
|
|
||||||
android: android-platform plugins
|
|
||||||
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
|
|
||||||
cordova plugin add phonegap-plugin-push@1.2.3
|
|
||||||
|
|
||||||
wp: wp8-platform plugins
|
wp: wp8-platform plugins
|
||||||
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
|
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
|
||||||
|
|
||||||
build-ios build-android build-wp8:
|
build-wp8:
|
||||||
cordova build $(subst build-,,$@)
|
cordova build $(subst build-,,$@)
|
||||||
|
|
||||||
run:
|
run:
|
||||||
|
|
|
@ -5,10 +5,11 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
var templates = {
|
var templates = {
|
||||||
'package.json': '/',
|
|
||||||
'Makefile': 'cordova/',
|
'Makefile': 'cordova/',
|
||||||
'ProjectMakefile': 'cordova/',
|
'ProjectMakefile': 'cordova/',
|
||||||
'config.xml': 'cordova/',
|
'config.xml': 'cordova/',
|
||||||
|
'config-template.xml': '/',
|
||||||
|
'ionic.config.json': '/',
|
||||||
'Package.appxmanifest': 'cordova/wp/',
|
'Package.appxmanifest': 'cordova/wp/',
|
||||||
'.desktop': 'webkitbuilds/',
|
'.desktop': 'webkitbuilds/',
|
||||||
'setup-win.iss': 'webkitbuilds/',
|
'setup-win.iss': 'webkitbuilds/',
|
||||||
|
@ -60,6 +61,9 @@ Object.keys(templates).forEach(function(k) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(k === 'config-template.xml'){
|
||||||
|
k = 'config.xml';
|
||||||
|
}
|
||||||
fs.writeFileSync('../' + targetDir + k, content, 'utf8');
|
fs.writeFileSync('../' + targetDir + k, content, 'utf8');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -113,7 +117,7 @@ function copyDir(from, to, cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
copyDir(configDir + '/img/', '../public/img/', function() {
|
copyDir(configDir + '/img/', '../www/img/', function() {
|
||||||
copyDir(configDir + '/androidRes/', '../cordova/android/res/', function() {
|
copyDir(configDir + '/androidRes/', '../cordova/android/res/', function() {
|
||||||
copyDir(configDir + '/iosIcons/', '../cordova/ios/icons/', function() {
|
copyDir(configDir + '/iosIcons/', '../cordova/ios/icons/', function() {
|
||||||
copyDir(configDir + '/iosSplash/', '../cordova/ios/splash/', function() {
|
copyDir(configDir + '/iosSplash/', '../cordova/ios/splash/', function() {
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<widget id="com.bitpay.*BUNDLENAME*"
|
||||||
|
version="*VERSION*"
|
||||||
|
android-versionCode="*ANDROIDVERSION*"
|
||||||
|
ios-CFBundleVersion="*VERSION*">
|
||||||
|
<name>*USERVISIBLENAME*</name>
|
||||||
|
<description>
|
||||||
|
*PURPOSELINE*
|
||||||
|
</description>
|
||||||
|
<author email="support@bitpay.com" href="*URL*">
|
||||||
|
BitPay Inc.
|
||||||
|
</author>
|
||||||
|
<content src="index.html" />
|
||||||
|
<access origin="*" />
|
||||||
|
<preference name="AndroidPersistentFileLocation" value="Internal" />
|
||||||
|
<preference name="iosPersistentFileLocation" value="Library" />
|
||||||
|
<preference name="DisallowOverscroll" value="true"/>
|
||||||
|
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
|
||||||
|
<preference name="SplashScreen" value="copayscreen" />
|
||||||
|
<preference name="ShowSplashScreenSpinner" value="false" />
|
||||||
|
<preference name="AutoHideSplashScreen" value="false" />
|
||||||
|
<preference name="FadeSplashScreen" value="true" />
|
||||||
|
<preference name="FadeSplashScreenDuration" value="1" />
|
||||||
|
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||||
|
<preference name="StatusBarBackgroundColor" value="#1e3186" />
|
||||||
|
<preference name="StatusBarStyle" value="lightcontent" />
|
||||||
|
<preference name="BackupWebStorage" value="none"/>
|
||||||
|
<preference name="windows-target-version" value="8.1"/>
|
||||||
|
<preference name="Orientation" value="default" />
|
||||||
|
|
||||||
|
<!-- Plugins -->
|
||||||
|
<plugin name="cordova-plugin-globalization" spec="~1.0.4" />
|
||||||
|
<plugin name="cordova.plugins.diagnostic" spec="~3.2.1" />
|
||||||
|
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
|
||||||
|
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
|
||||||
|
<plugin name="cordova-plugin-inappbrowser" spec="~1.5.0" />
|
||||||
|
<plugin name="cordova-plugin-x-toast" spec="~2.5.2" />
|
||||||
|
<plugin name="com.verso.cordova.clipboard" spec="https://github.com/VersoSolutions/CordovaClipboard" />
|
||||||
|
<plugin name="cordova-plugin-x-socialsharing" spec="https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" />
|
||||||
|
<plugin name="cordova-plugin-spinner-dialog" spec="~1.3.1" />
|
||||||
|
<plugin name="cordova-plugin-dialogs" spec="~1.3.0" />
|
||||||
|
<plugin name="cordova-plugin-network-information" spec="~1.3.0" />
|
||||||
|
<plugin name="cordova-plugin-console" spec="~1.0.4" />
|
||||||
|
<plugin name="cordova-plugin-uniquedeviceid" spec="~1.3.2" />
|
||||||
|
<plugin name="cordova-plugin-file" spec="~4.3.0" />
|
||||||
|
<plugin name="cordova-plugin-touch-id" spec="~3.2.0" />
|
||||||
|
<plugin name="cordova-plugin-transport-security" spec="~0.1.2" />
|
||||||
|
<plugin name="cordova-ios-requires-fullscreen" spec="~0.0.2" />
|
||||||
|
<plugin name="cordova-plugin-android-fingerprint-auth" spec="~0.2.0" />
|
||||||
|
<plugin name="cordova-plugin-screen-orientation" spec="~1.4.2" />
|
||||||
|
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
|
||||||
|
<plugin name="cordova-plugin-whitelist" spec="~1.3.0" />
|
||||||
|
<plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" />
|
||||||
|
<plugin name="cordova-plugin-qrscanner" spec="~2.4.0" />
|
||||||
|
<plugin name="cordova-plugin-customurlscheme" spec="~4.2.0">
|
||||||
|
<variable name="URL_SCHEME" value="UNUSED" />
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Supported Platforms -->
|
||||||
|
<engine name="ios" spec="~4.2.1" />
|
||||||
|
<engine name="android" spec="~5.2.2" />
|
||||||
|
<engine name="wp8" spec="~3.8.2" />
|
||||||
|
|
||||||
|
<!-- Platform Specific Settings -->
|
||||||
|
<platform name="ios">
|
||||||
|
<plugin name="phonegap-plugin-push" spec="1.5.3" />
|
||||||
|
<!-- <hook type="after_prepare" src="util/hooks/ios/add-custom-urls-to-plist.js" />
|
||||||
|
<hook type="after_prepare" src="util/hooks/ios/add-uistatusbarhidden-to-plist.js" /> -->
|
||||||
|
</platform>
|
||||||
|
|
||||||
|
<platform name="android">
|
||||||
|
<hook type="after_prepare" src="util/hooks/android/add-custom-urls-to-android-manifest.js" />
|
||||||
|
<hook type="after_prepare" src="util/hooks/android/prohibit-cloud-backups-in-android-manifest.js" />
|
||||||
|
<!-- https://github.com/phonegap/phonegap-plugin-push/issues/424 -->
|
||||||
|
<plugin name="phonegap-plugin-push" spec="1.2.3" />
|
||||||
|
</platform>
|
||||||
|
|
||||||
|
<platform name="wp8">
|
||||||
|
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
|
||||||
|
</platform>
|
||||||
|
|
||||||
|
</widget>
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"name": "*USERVISIBLENAME*",
|
||||||
|
"app_id": "com.bitpay.*BUNDLENAME*"
|
||||||
|
}
|
|
@ -11,10 +11,10 @@
|
||||||
"multisignature",
|
"multisignature",
|
||||||
"bitcore"
|
"bitcore"
|
||||||
],
|
],
|
||||||
"main": "public/index.html",
|
"main": "www/index.html",
|
||||||
"window": {
|
"window": {
|
||||||
"title": "*USERVISIBLENAME* - *PURPOSELINE*",
|
"title": "*USERVISIBLENAME* - *PURPOSELINE*",
|
||||||
"icon": "./public/img/icons/icon-256.png",
|
"icon": "./www/img/icons/icon-256.png",
|
||||||
"toolbar": false,
|
"toolbar": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
|
|
@ -34,7 +34,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
|
||||||
[Files]
|
[Files]
|
||||||
Source: "*PACKAGENAME*\win64\*PACKAGENAME*.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "*PACKAGENAME*\win64\*PACKAGENAME*.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "*PACKAGENAME*\win64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "*PACKAGENAME*\win64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
Source: "../public/img/icons/favicon.ico"; DestDir: "{app}"; DestName: "icon.ico"; Flags: ignoreversion
|
Source: "../www/img/icons/favicon.ico"; DestDir: "{app}"; DestName: "icon.ico"; Flags: ignoreversion
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
|
|
13
app.js
13
app.js
|
@ -1,13 +0,0 @@
|
||||||
var express = require('express');
|
|
||||||
var path = require('path');
|
|
||||||
var app = express();
|
|
||||||
app.use(express.static(__dirname + '/public'));
|
|
||||||
|
|
||||||
var port = process.env.PORT || 3000;
|
|
||||||
app.listen(port);
|
|
||||||
console.log("App listening on port " + port);
|
|
||||||
|
|
||||||
app.get('*', function(req, res) {
|
|
||||||
res.sendFile(path.join(__dirname, 'public'));
|
|
||||||
});
|
|
||||||
|
|
|
@ -9,16 +9,16 @@ BASE=$(CURDIR)
|
||||||
|
|
||||||
all: $(ZIPFILE)
|
all: $(ZIPFILE)
|
||||||
|
|
||||||
dir:
|
dir:
|
||||||
rm -rf $(BUILDDIR)
|
rm -rf $(BUILDDIR)
|
||||||
mkdir -p $(BUILDDIR)
|
mkdir -p $(BUILDDIR)
|
||||||
cp manifest.json $(BUILDDIR)/manifest.json
|
cp manifest.json $(BUILDDIR)/manifest.json
|
||||||
cp -vf $(INITIAL) $(BUILDDIR)
|
cp -vf $(INITIAL) $(BUILDDIR)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
cd ../public && rsync -rLRv --exclude-from $(BASE)/exclude $(INCLUDE) $(BASE)/$(BUILDDIR) && cd -
|
cd ../www && rsync -rLRv --exclude-from $(BASE)/exclude $(INCLUDE) $(BASE)/$(BUILDDIR) && cd -
|
||||||
cd .. && rsync -rLRv ./bower_components/trezor-connect/chrome/* $(BASE)/$(BUILDDIR)/ && cd -
|
cd .. && rsync -rLRv ./bower_components/trezor-connect/chrome/* $(BASE)/$(BUILDDIR)/ && cd -
|
||||||
|
|
||||||
|
|
||||||
$(ZIPFILE): dir files
|
$(ZIPFILE): dir files
|
||||||
cd $(BUILDDIR)
|
cd $(BUILDDIR)
|
||||||
|
|
73
package.json
73
package.json
|
@ -1,9 +1,4 @@
|
||||||
{
|
{
|
||||||
"//":"PLEASE! Do not edit this file directly",
|
|
||||||
"//":" Modify it at app-template/",
|
|
||||||
|
|
||||||
"name": "bitpay-wallet",
|
|
||||||
"description": "Secure Bitcoin Storage",
|
|
||||||
"author": "BitPay",
|
"author": "BitPay",
|
||||||
"version": "0.14.0",
|
"version": "0.14.0",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -14,27 +9,6 @@
|
||||||
"multisignature",
|
"multisignature",
|
||||||
"bitcore"
|
"bitcore"
|
||||||
],
|
],
|
||||||
"main": "public/index.html",
|
|
||||||
"window": {
|
|
||||||
"title": "BitPay Wallet - Secure Bitcoin Storage",
|
|
||||||
"icon": "./public/img/icons/icon-256.png",
|
|
||||||
"toolbar": false,
|
|
||||||
"show": true,
|
|
||||||
"visible": true,
|
|
||||||
"resizable": true,
|
|
||||||
"frame": true,
|
|
||||||
"width": 400,
|
|
||||||
"height": 600,
|
|
||||||
"position": "center",
|
|
||||||
"fullscreen": false
|
|
||||||
},
|
|
||||||
"webkit": {
|
|
||||||
"page-cache": false,
|
|
||||||
"java": false,
|
|
||||||
"plugin": false
|
|
||||||
},
|
|
||||||
"dom_storage_quota": 200,
|
|
||||||
"id": "jid1-x7bV5evAaI1P9Q",
|
|
||||||
"homepage": "https://github.com/bitpay/copay",
|
"homepage": "https://github.com/bitpay/copay",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -85,22 +59,41 @@
|
||||||
"mocha": "^2.4.5",
|
"mocha": "^2.4.5",
|
||||||
"pbkdf2": "^3.0.4",
|
"pbkdf2": "^3.0.4",
|
||||||
"phantomjs-prebuilt": "^2.1.7",
|
"phantomjs-prebuilt": "^2.1.7",
|
||||||
"shelljs": "^0.3.0",
|
"shelljs": "^0.3.0"
|
||||||
"xcode": "^0.8.2"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "bower install && npm i fs-extra",
|
"preinstall": "bower install && npm i fs-extra",
|
||||||
"build": "grunt",
|
"postinstall": "npm run apply:bitpay && cordova prepare",
|
||||||
"apply:copay": "cd app-template && node apply.js",
|
"start": "npm run build:www && ionic serve --nolivereload --nogulp",
|
||||||
"apply:bitpay-wallet": "cd app-template && node apply.js bitpay-wallet",
|
"start:ios": "npm run build:www && npm run build:ios && npm run open:ios",
|
||||||
"start": "npm run build && node app.js",
|
"start:android": "npm run build:www && npm run build:android && npm run open:android",
|
||||||
"watch": "grunt watch",
|
"watch": "grunt watch",
|
||||||
"test": "./node_modules/.bin/grunt test-coveralls",
|
"build:www": "grunt",
|
||||||
"clean": "git clean -dfx",
|
"build:www-release": "grunt prod",
|
||||||
"start:ios": "npm run build && cd cordova && trash project-ios && make ios && open project-ios/platforms/ios/BitPay\\ Wallet.xcodeproj",
|
"build:ios": "cordova prepare ios && cordova build ios --debug",
|
||||||
"start:android": "npm run build && cd cordova && trash project-android && make android && open -a /Applications/Android\\ Studio.app project-android/platforms/android"
|
"build:android": "cordova prepare android && cordova build android --debug",
|
||||||
|
"build:ios-release": "cordova prepare ios && cordova build ios --release",
|
||||||
|
"build:android-release": "cordova prepare android && cordova build android --release",
|
||||||
|
"open:ios": "open platforms/ios/*.xcodeproj",
|
||||||
|
"open:android": "open -a open -a /Applications/Android\\ Studio.app platforms/android",
|
||||||
|
"final:www": "npm run clean && npm run build:www-release",
|
||||||
|
"final:ios": "npm run final:www && npm run build:ios-release && npm run open:ios",
|
||||||
|
"final:android": "npm run final:www && npm run build:android-release && npm run open:android",
|
||||||
|
"final:all-mac": "npm run final:www npm run build:ios-release npm run build:android-release && npm run open:ios && npm run open:android",
|
||||||
|
"run:android": "cordova run android --device",
|
||||||
|
"log:android": "adb logcat | grep chromium",
|
||||||
|
"apply:copay": "cd app-template && node apply.js",
|
||||||
|
"apply:bitpay": "cd app-template && node apply.js bitpay-wallet",
|
||||||
|
"test": "./node_modules/.bin/grunt test-coveralls",
|
||||||
|
"clean": "git clean -dfx && npm install"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"trash-cli": "^1.4.0"
|
"androidmanifest": "^2.0.0",
|
||||||
|
"cordova": "^5.4.1",
|
||||||
|
"globby": "^6.0.0",
|
||||||
|
"ionic": "^2.1.0",
|
||||||
|
"plist": "^2.0.1",
|
||||||
|
"trash-cli": "^1.4.0",
|
||||||
|
"xcode": "^0.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue