refactor build scripts

This commit is contained in:
Matias Alejo Garcia 2016-08-10 17:35:40 -03:00
parent 8460eede78
commit 23f7f56f3f
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
110 changed files with 512 additions and 954 deletions

49
.gitignore vendored
View File

@ -7,13 +7,14 @@ src/js/translations.js
coinbase.json
src/js/coinbase.js
# version
src/js/version.js
# cordova
cordova/project/*
cordova/project-*/*
cordova/*.keystore
amazon.json
src/js/amazon.js
# node-webkit
cache
webkitbuilds/*
@ -28,9 +29,8 @@ webkitbuilds/*
public/fonts
# chrome extensions
browser-extensions/chrome/copay-chrome-extension
browser-extensions/chrome/copay-chrome-extension.zip
browser-extensions/chrome/copay-chrome-extension.zip.sig
chrome-app/build/*
chrome-app/*zip
# Logs
logs
@ -104,3 +104,38 @@ public/icons/*
public/css/*
public/lib/*
public/js/*
## templates
appConfig.json
cordova/Makefile
cordova/ProjectMakefile
app-template/bpapp
cordova/ProjectMakefile
cordova/config.xml
cordova/wp/Package.appxmanifest
public/img/logo-negative.svg
public/img/logo.svg
src/js/appConfig.js
cordova/Makefile
cordova/ProjectMakefile
app-template/bpapp
cordova/ProjectMakefile
cordova/config.xml
cordova/wp/Package.appxmanifest
public/img/logo-negative.svg
public/img/logo.svg
src/js/appConfig.js
cordova/android/res/
cordova/wp/Assets/
cordova/wp/*.png
cordova/wp/*.jpg
cordova/ios/splash/
cordova/ios/icons/
cordova/project/

View File

@ -6,43 +6,56 @@ module.exports = function(grunt) {
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'string-replace': {
dist: {
files: {
'cordova/config.xml': ['config-templates/config.xml'],
'cordova/wp/Package.appxmanifest': ['config-templates/Package.appxmanifest'],
'cordova/wp/Properties/WMAppManifest.xml': ['config-templates/WMAppManifest.xml'],
'webkitbuilds/.desktop': ['config-templates/.desktop'],
'webkitbuilds/setup-win.iss': ['config-templates/setup-win.iss']
},
options: {
replacements: [{
pattern: /%APP-VERSION%/g,
replacement: '<%= pkg.version %>'
}, {
pattern: /%ANDROID-VERSION-CODE%/g,
replacement: '<%= pkg.androidVersionCode %>'
}]
}
}
},
exec: {
version: {
command: 'node ./util/version.js'
appConfig: {
command: 'node ./util/buildAppConfig.js'
},
coinbase: {
command: 'node ./util/coinbase.js'
},
clear: {
clean: {
command: 'rm -Rf bower_components node_modules'
},
cordovaclean: {
command: 'make -C cordova clean'
},
osx: {
command: 'webkitbuilds/build-osx.sh sign'
},
coveralls: {
command: 'cat coverage/report-lcov/lcov.info |./node_modules/coveralls/bin/coveralls.js'
}
},
chrome: {
command: 'make -C chrome-app '
},
wp: {
command: 'make -C cordova wp',
},
ios: {
command: 'make -C cordova ios',
},
xcode: {
command: 'open cordova/project-ios/platforms/ios/*.xcodeproj',
},
android: {
command: 'make -C cordova android',
},
androidrun: {
command: 'make -C cordova androidrun',
},
androidbuild: {
command: 'cd cordova/project && cordova build android --release',
},
androidsign: {
command: 'rm -f cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../copay.keystore -signedjar cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-unsigned.apk copay_play && ../android-sdk-macosx/build-tools/21.1.1/zipalign -v 4 cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk ',
stdin: true,
},
desktopsign: {
cmd: 'gpg -u 1112CFA1 --output webkitbuilds/Copay-linux.zip.sig --detach-sig webkitbuilds/Copay-linux.zip && gpg -u 1112CFA1 --output webkitbuilds/Copay-win.exe.sig --detach-sig webkitbuilds/Copay-win.exe'
},
desktopverify: {
cmd: 'gpg --verify webkitbuilds/Copay-linux.zip.sig webkitbuilds/Copay-linux.zip && gpg --verify webkitbuilds/Copay-win.exe.sig webkitbuilds/Copay-win.exe'
},
},
watch: {
options: {
@ -119,7 +132,7 @@ module.exports = function(grunt) {
'src/js/services/*.js',
'src/js/controllers/**/*.js',
'src/js/translations.js',
'src/js/version.js',
'src/js/appConfig.js',
'src/js/coinbase.js',
'src/js/init.js',
'src/js/trezor-url.js',
@ -266,12 +279,22 @@ module.exports = function(grunt) {
}
});
grunt.registerTask('default', ['nggettext_compile', 'exec:version', 'exec:coinbase', 'browserify', 'sass', 'concat', 'copy:icons', 'copy:ionic_fonts']);
grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:coinbase', 'browserify', 'sass', 'concat', 'copy:icons', 'copy:ionic_fonts']);
grunt.registerTask('prod', ['default', 'uglify']);
grunt.registerTask('translate', ['nggettext_extract']);
grunt.registerTask('test', ['karma:unit']);
grunt.registerTask('test-coveralls', ['browserify', 'karma:prod', 'exec:coveralls']);
grunt.registerTask('desktop', ['prod', 'nwjs', 'copy:linux', 'compress:linux']);
grunt.registerTask('osx', ['prod', 'nwjs', 'exec:osx']);
grunt.registerTask('release', ['string-replace:dist']);
grunt.registerTask('chrome', ['exec:chrome']);
grunt.registerTask('wp', ['prod', 'exec:wp']);
grunt.registerTask('wp-debug', ['default', 'exec:wp']);
grunt.registerTask('ios', ['prod', 'exec:ios', 'exec:xcode']);
grunt.registerTask('ios-debug', ['default', 'exec:ios', 'exec:xcode']);
grunt.registerTask('cordovaclean', ['exec:cordovaclean']);
grunt.registerTask('android-debug', ['default', 'exec:android', 'exec:androidrun']);
grunt.registerTask('android', ['prod', 'exec:android']);
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
};

View File

@ -1,72 +1 @@
VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js`
sign:
gpg -u 1112CFA1 --output browser-extensions/chrome/copay-chrome-extension.zip.sig --detach-sig browser-extensions/chrome/copay-chrome-extension.zip
verify:
gpg --verify browser-extensions/chrome/copay-chrome-extension.zip.sig browser-extensions/chrome/copay-chrome-extension.zip
sign-osx:
codesign -s 3rd webkitbuilds/Copay-osx.dmg
verify-osx:
codesign -dv webkitbuilds/Copay-osx.dmg
sign-desktop:
gpg -u 1112CFA1 --output webkitbuilds/Copay-linux.zip.sig --detach-sig webkitbuilds/Copay-linux.zip
gpg -u 1112CFA1 --output webkitbuilds/Copay-win.exe.sig --detach-sig webkitbuilds/Copay-win.exe
verify-desktop:
gpg --verify webkitbuilds/Copay-linux.zip.sig webkitbuilds/Copay-linux.zip
gpg --verify webkitbuilds/Copay-win.exe.sig webkitbuilds/Copay-win.exe
chrome:
browser-extensions/chrome/build.sh
cordova-base:
grunt dist-mobile
# ios: cordova-base
# make -C cordova ios
# open cordova/project/platforms/ios/Copay
#
# android: cordova-base
# make -C cordova run-android
#
# release-android: cordova-base
# make -C cordova release-android
#
wp8-prod:
cordova/build.sh WP8 --clear
cordova/wp/fix-svg.sh
echo -e "\a"
wp8-debug:
cordova/build.sh WP8 --dbgjs
cordova/wp/fix-svg.sh
echo -e "\a"
ios-prod:
cordova/build.sh IOS --clear
cd cordova/project && cordova build ios
open cordova/project/platforms/ios/Copay.xcodeproj
ios-debug:
cordova/build.sh IOS --dbgjs
cd cordova/project && cordova build ios
open cordova/project/platforms/ios/Copay.xcodeproj
android-prod:
cordova/build.sh ANDROID --clear
rm -f cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk
cd cordova/project && cordova build android --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../copay.keystore -signedjar cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-unsigned.apk copay_play
../android-sdk-macosx/build-tools/21.1.1/zipalign -v 4 cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk
android-debug:
cordova/build.sh ANDROID --dbgjs
cd cordova/project && cordova run android
android-debug-fast:
cordova/build.sh ANDROID --dbgjs
cd cordova/project && cordova run android --device

View File

@ -1,12 +1,11 @@
[Desktop Entry]
Type=Application
Version=%APP-VERSION%
Name=Copay
Comment=A multisignature wallet
Exec=copay
Version=*VERSION*
Name=*NAMECASENOSPACE*
Comment=*DESCRIPTION*
Exec=*NAMENOSPACE*
Icon=icon-256.png
Terminal=false
Categories=Finance
X-Ubuntu-Touch=true
X-Ubuntu-StageHint=SideStage

44
app-template/Makefile Normal file
View File

@ -0,0 +1,44 @@
.PHONY: ios android wp
WORKDIR=project-
all:
clean:
rm -Rf $(WORKDIR)*
$(WORKDIR)android $(WORKDIR)ios $(WORKDIR)wp: config.xml
cordova create $@ com.bitpay.*NAMENOSPACE* *NAMECASENOSPACE* || echo "Project Path Existed"
cp ProjectMakefile $@/Makefile
cp -af ../public/** $@/www
sed "s/<\!-- PLACEHOLDER: CORDOVA SRIPT -->/<script type='text\/javascript' charset='utf-8' src='cordova.js'><\/script>/g" ../public/index.html > $@/www/index.html
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/
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: build-wp
cp -vf wp/Properties/* $</platforms/wp8/Properties/
cp -vf wp/MainPage.xaml $</platforms/wp8/
cp -vf wp/Package.appxmanifest $</platforms/wp8/
cp -vf wp/Assets/* $</platforms/wp8/Assets/
cp -vf wp/SplashScreenImage.jpg $</platforms/wp8/
cp -vf wp/ApplicationIcon.png $</platforms/wp8/
cp -vf wp/Background.png $</platforms/wp8/
cp -af ../public/** $</www
wp/fix-svg.sh
androidrun:
make -C $(WORKDIR)android run
adb logcat | grep copay.js

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
<Identity Name="18C7659D.CopayWallet" Publisher="CN=F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" Version="%APP-VERSION%.0" />
<Identity Name="18C7659D.*WINAPPNAME*" Publisher="CN=F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" Version="*VERSION*.0" />
<mp:PhoneIdentity PhoneProductId="5381aa50-9069-11e4-84cc-293caf9cbdc8" PhonePublisherId="F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" />
<Properties>
<DisplayName>Copay Bitcoin Wallet</DisplayName>
<DisplayName>*APPDESCRIPTION*</DisplayName>
<PublisherDisplayName>BitPay Inc.</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
@ -16,7 +16,7 @@
</Resources>
<Applications>
<Application Id="x5381aa50y9069y11e4y84ccy293caf9cbdc8x" Executable="AGHost.exe" EntryPoint="MainPage.xaml">
<m3:VisualElements DisplayName="Copay Bitcoin Wallet" Square150x150Logo="Assets\SquareTile150x150.png" Square44x44Logo="Assets\Logo.png" Description="A multisignature Bitcoin Wallet" ForegroundText="light" BackgroundColor="#464646">
<m3:VisualElements DisplayName="*APPDESCRIPTION*" Square150x150Logo="Assets\SquareTile150x150.png" Square44x44Logo="Assets\Logo.png" Description="A multisignature Bitcoin Wallet" ForegroundText="light" BackgroundColor="#464646">
<m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png">
</m3:DefaultTile>
<m3:SplashScreen Image="SplashScreenImage.jpg" />

View File

@ -0,0 +1,51 @@
.PHONY:plugins ios-platform android-platform wp-platform
plugins:
cordova plugin add cordova-plugin-globalization
cordova plugin add cordova.plugins.diagnostic
cordova plugin add cordova-plugin-splashscreen
cordova plugin add cordova-plugin-statusbar
cordova plugin add https://github.com/cmgustavo/Custom-URL-scheme.git --variable URL_SCHEME=bitcoin --variable SECOND_URL_SCHEME=*NAMENOSPACE*
cordova plugin add cordova-plugin-inappbrowser
cordova plugin add cordova-plugin-x-toast && cordova prepare
cordova plugin add https://github.com/VersoSolutions/CordovaClipboard
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare
cordova plugin add cordova-plugin-spinner-dialog
cordova plugin add cordova-plugin-dialogs
cordova plugin add cordova-plugin-network-information
cordova plugin add cordova-plugin-console
cordova plugin add cordova-plugin-uniquedeviceid
cordova plugin add cordova-plugin-file
cordova plugin add cordova-plugin-touch-id
cordova prepare
cordova plugin add cordova-plugin-transport-security
cordova plugin add cordova-ios-requires-fullscreen
cordova plugin add cordova-plugin-disable-bitcode
rm -rf platforms/android/res/values-es
cordova plugin add cordova-plugin-android-fingerprint-auth
cordova plugin add cordova-plugin-screen-orientation
cordova plugin add ionic-plugin-keyboard
cordova plugin add cordova-plugin-whitelist
ios-platform android-platform wp-platform:
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: wp-platform plugins
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
build-ios build-android build-wp8:
cordova build $(subst build-,,$@)
run:
cordova run --device

View File

@ -11,7 +11,7 @@
<Language code="pl" />
<Language code="cs" />
</Languages>
<App Author="Bitpay Inc." BitsPerPixel="32" Description="A multisignature Bitcoin Wallet" Genre="apps.normal" ProductID="{5381aa50-9069-11e4-84cc-293caf9cbdc8}" Publisher="Copay Bitcoin Wallet" PublisherID="{31cdd08b-457c-413d-b440-f6665eec847d}" RuntimeType="Silverlight" Title="Copay Bitcoin Wallet" Version="%APP-VERSION%.0" xmlns="" NotificationService="MPN">
<App Author="Bitpay Inc." BitsPerPixel="32" Description="*DESCRIPTION*" Genre="apps.normal" ProductID="*WPPRODUCTID*" Publisher="*APPDESCRIPTION*" PublisherID="*WPPUBLISHERID*" RuntimeType="Silverlight" Title="*APPDESCRIPTION*" Version="*VERSION*.0" xmlns="" NotificationService="MPN">
<IconPath IsRelative="true" IsResource="false">Assets\icon@2.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
@ -23,12 +23,12 @@
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
</Tasks>
<Tokens>
<PrimaryToken TaskName="_default" TokenID="CopayToken">
<PrimaryToken TaskName="_default" TokenID="*NAMECASENOSPACE*Token">
<TemplateFlip>
<SmallImageURI IsRelative="true" IsResource="false">Assets\200x200@1.png</SmallImageURI>
<Count>0</Count>
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\200x200@2.png</BackgroundImageURI>
<Title>Copay Bitcoin Wallet</Title>
<Title>*APPDESCRIPTION*</Title>
<BackContent />
<BackBackgroundImageURI />
<BackTitle />

120
app-template/apply.js Executable file
View File

@ -0,0 +1,120 @@
#!/usr/bin/env node
'use strict';
//
var templates = {
'package.json': '/',
'Makefile': 'cordova/',
'ProjectMakefile': 'cordova/',
'config.xml': 'cordova/',
'Package.appxmanifest': 'cordova/wp/',
'.desktop': 'webkitbuilds/.desktop',
'setup-win.iss': 'webkitbuilds/setup-win.iss',
// 'bower.json': '/',
};
var configDir = process.argv[2] || 'copay';
var JSONheader = ' { ' + "\n" + ' "//":"PLEASE! Do not edit this file directly",' + "\n" + ' "//":" Modify it at app-template/", ' + "\n";
var MakefileHeader = "# PLEASE! Do not edit this file directly \n# Modify it at app-template/\n";
var fs = require('fs-extra');
var path = require('path');
var configBlob = fs.readFileSync(configDir + '/appConfig.json', 'utf8');
var config = JSON.parse(configBlob, 'utf8');
/////////////////
console.log('Applying ' + config.nameCase + ' template');
Object.keys(templates).forEach(function(k) {
var targetDir = templates[k];
console.log(' # ' + k + ' => ' + targetDir);
var content = fs.readFileSync(k, 'utf8');
if (k.indexOf('.json') > 0) {
content = content.replace('{', JSONheader);
} else if (k.indexOf('Makefile') >= 0) {
content = MakefileHeader + content;
}
Object.keys(config).forEach(function(k) {
if (k.indexOf('_') == 0) return;
var r = new RegExp("\\*" + k.toUpperCase() + "\\*", "g");
content = content.replace(r, config[k]);
});
var r = new RegExp("\\*[A-Z]{3,30}\\*", "g");
var s = content.match(r);
if (s) {
console.log('UNKNOWN VARIABLE', s);
process.exit(1);
}
fs.writeFileSync('../' + targetDir + k, content, 'utf8');
});
/////////////////
console.log('Copying ' + configDir + '/appConfig.json' + ' to root');
configBlob = configBlob.replace('{', JSONheader);
fs.writeFileSync('../appConfig.json', configBlob, 'utf8');
function copyDir(from, to, cb) {
console.log('Copying dir ' + from + ' to');
var files = [];
fs.walk(from)
.on('data', function(item) {
if ((item.stats["mode"] & 0x4000)) {
var tmp = item.path + '/';
var l = tmp.length - from.length;
if (tmp.indexOf(from) == l) return; // #same dir
console.log('[apply.js.81]', l); //TODO
console.log('[apply.js.78]', from); //TODO
// console.log('[apply.js.78]', to); //TODO
console.log('[apply.js.78]', item.path); //TODO
console.log('[apply.js.78]', tmp.indexOf(from)); //TODO
}
if (item.path.indexOf('DS_Store') >= 0) return;
files.push(item.path)
})
.on('end', function() {
files.forEach(function(i) {
console.log(' # ' + i);
fs.copySync(i, to + path.basename(i));
});
return cb();
})
}
copyDir(configDir + '/img/', '../public/img/', function() {
copyDir(configDir + '/androidRes/', '../cordova/android/res/', function() {
copyDir(configDir + '/iosIcons/', '../cordova/ios/icons/', function() {
copyDir(configDir + '/iosSplash/', '../cordova/ios/splash/', function() {
copyDir(configDir + '/wpAssets/', '../cordova/wp/Assets/', function() {
copyDir(configDir + '/wpImg/', '../cordova/wp/', function() {
// TODO WP
console.log("apply.js finished. \n\n");
});
});
});
});
});
});

View File

@ -1,13 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.bitpay.copay"
version="2.5.0"
android-versionCode="115"
ios-CFBundleVersion="2.5.0">
<name>Copay</name>
<widget id="com.bitpay.*NAMENOSPACE*"
version="*VERSION*"
android-versionCode="*ANDROIDVERSION*"
ios-CFBundleVersion="*VERSION*">
<name>*NAMECASENOSPACE*</name>
<description>
A secure bitcoin wallet for friends and companies.
*APPDESCRIPTION*
</description>
<author email="support@bitpay.com" href="https://copay.io">
<author email="support@bitpay.com" href="*URL*">
BitPay Inc.
</author>
<content src="index.html" />

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1011 B

After

Width:  |  Height:  |  Size: 1011 B

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View File

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 225 KiB

View File

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 515 KiB

View File

Before

Width:  |  Height:  |  Size: 561 KiB

After

Width:  |  Height:  |  Size: 561 KiB

View File

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View File

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 427 KiB

After

Width:  |  Height:  |  Size: 427 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 409 KiB

After

Width:  |  Height:  |  Size: 409 KiB

View File

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 174 KiB

96
app-template/package.json Normal file
View File

@ -0,0 +1,96 @@
{
"name": "*NAMENOSPACE*",
"description": "*DESCRIPTION*",
"author": "BitPay",
"version": "*VERSION*",
"keywords": [
"wallet",
"copay",
"multisignature",
"bitcoin",
"bitcore"
],
"main": "public/index.html",
"window": {
"title": "Copay - A multisignature bitcoin wallet",
"icon": "./public/img/icons/icon-256.png",
"toolbar": false,
"show": true,
"visible": true,
"resizable": true,
"frame": true,
"width": 800,
"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",
"license": "MIT",
"repository": {
"url": "git://github.com/bitpay/copay.git",
"type": "git"
},
"bugs": {
"url": "https://github.com/bitpay/copay/issues"
},
"dependencies": {
"bitcore-wallet-client": "2.11.0",
"coveralls": "^2.11.9",
"express": "^4.11.2",
"fs": "0.0.2",
"shelljs": "^0.3.0"
},
"scripts": {
"preinstall": "bower install && cd app-template && ./apply.js",
"postinstall": "npm run build",
"build": "grunt",
"start": "node app.js",
"test": "./node_modules/.bin/grunt test-coveralls",
"clean": "git clean -dfx"
},
"devDependencies": {
"grunt-angular-gettext": "^2.2.3",
"fs-extra": "^0.30.0",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-compress": "^1.3.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-exec": "^1.0.0",
"grunt-karma": "^2.0.0",
"grunt-karma-coveralls": "^2.5.4",
"grunt-nw-builder": "^2.0.3",
"grunt-sass": "^1.2.0",
"adm-zip": "^0.4.7",
"angular": "1.4.6",
"angular-mocks": "1.4.10",
"bhttp": "^1.2.1",
"bower": "^1.7.9",
"chai": "^3.5.0",
"cordova": "5.4.1",
"cordova-android": "5.1.1",
"karma": "^0.13.22",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^1.0.1",
"karma-cli": "^1.0.0",
"karma-coverage": "^1.0.0",
"karma-mocha": "^1.0.1",
"karma-mocha-reporter": "^2.0.3",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sinon": "^1.0.5",
"load-grunt-tasks": "^3.5.0",
"mocha": "^2.4.5",
"phantomjs-prebuilt": "^2.1.7",
"xcode": "^0.8.2"
}
}

View File

@ -1,11 +1,11 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Copay"
#define MyAppVersion "%APP-VERSION%"
#define MyAppName "*NAMENOSPACE*"
#define MyAppVersion "*VERSION*"
#define MyAppPublisher "BitPay"
#define MyAppURL "https://copay.io"
#define MyAppExeName "Copay.exe"
#define MyAppURL "*URL*"
#define MyAppExeName "*NAMECASENOSPACE.exe"
[Setup]
AppId={{804636ee-b017-4cad-8719-e58ac97ffa5c}
@ -18,11 +18,10 @@ AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=Copay-win
OutputBaseFilename=*NAMECASENOSPACE*-win
OutputDir=./
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
@ -33,8 +32,8 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "Copay\win64\copay.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "Copay\win64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "*NAMECASENOSPACE*\win64\*NAMENOSPACE*.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "*NAMECASENOSPACE*\win64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "../public/img/icons/favicon.ico"; DestDir: "{app}"; DestName: "icon.ico"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
@ -51,8 +50,8 @@ Root: HKCR; Subkey: "bitcoin"; ValueType: "string"; ValueName: "URL Protocol"; V
Root: HKCR; Subkey: "bitcoin\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0"
Root: HKCR; Subkey: "bitcoin\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
Root: HKCR; Subkey: "copay"; ValueType: "string"; ValueData: "URL:Copay Custom Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "copay"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "copay\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0"
Root: HKCR; Subkey: "copay\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
Root: HKCR; Subkey: "*NAMENOSPACE*"; ValueType: "string"; ValueData: "URL:*NAMECASENOSPACE* Custom Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "*NAMENOSPACE*"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "*NAMENOSPACE*\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0"
Root: HKCR; Subkey: "*NAMENOSPACE*\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1"""

View File

@ -1,71 +0,0 @@
#! /bin/bash
# Description: This script compiles and copy the needed files to later package the application for Chrome
OpenColor="\033["
Red="1;31m"
Yellow="1;33m"
Green="1;32m"
CloseColor="\033[0m"
# Check function OK
checkOK() {
if [ $? != 0 ]; then
echo "${OpenColor}${Red}* ERROR. Exiting...${CloseColor}"
exit 1
fi
}
# Configs
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APPDIR="$BUILDDIR/copay-chrome-extension"
ZIPFILE="copay-chrome-extension.zip"
VERSION=`cut -d '"' -f2 $BUILDDIR/../../src/js/version.js|head -n 1`
# Move to the build directory
cd $BUILDDIR
# Create/Clean temp dir
echo "${OpenColor}${Green}* Checking temp dir...${CloseColor}"
if [ -d $APPDIR ]; then
rm -rf $APPDIR
fi
mkdir -p $APPDIR
# Re-compile copayBundle.js
echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}"
grunt
checkOK
# Copy all chrome-extension files
echo "${OpenColor}${Green}* Copying all chrome-extension files...${CloseColor}"
sed "s/APP_VERSION/$VERSION/g" manifest.json > $APPDIR/manifest.json
checkOK
INCLUDE=`cat ../include`
INITIAL=$BUILDDIR/initial.js
echo "INITIAL: $INITIAL"
cp -vf $INITIAL $APPDIR
cd $BUILDDIR/../../public
CMD="rsync -rLRv --exclude-from $BUILDDIR/../exclude $INCLUDE $APPDIR"
echo $CMD
$CMD
checkOK
cd $BUILDDIR/../..
CMD="rsync -rLRv ./bower_components/trezor-connect/chrome/* $APPDIR"
echo $CMD
$CMD
checkOK
# Zipping chrome-extension
echo "${OpenColor}${Green}* Zipping all chrome-extension files...${CloseColor}"
cd $BUILDDIR
rm $ZIPFILE
zip -qr $ZIPFILE "`basename $APPDIR`"
checkOK
echo "${OpenColor}${Yellow}\nThe Chrome Extension is ready at $BUILDDIR/copay-chrome-extension.zip${CloseColor}"

28
chrome-app/Makefile Normal file
View File

@ -0,0 +1,28 @@
# Configs
BUILDDIR=build
ZIPFILE=copay-chrome-extension.zip
VERSION=`cut -d '"' -f2 ../src/js/version.js|head -n 1`
INCLUDE=$(shell cat ./include)
INITIAL=./initial.js
BASE=$(CURDIR)
all: $(ZIPFILE)
dir:
rm -rf $(BUILDDIR)
mkdir -p $(BUILDDIR)
sed "s/APP_VERSION/$(VERSION)/g" manifest.json > $(BUILDDIR)/manifest.json
cp -vf $(INITIAL) $(BUILDDIR)
files:
cd ../public && rsync -rLRv --exclude-from $(BASE)/exclude $(INCLUDE) $(BASE)/$(BUILDDIR) && cd -
cd .. && rsync -rLRv ./bower_components/trezor-connect/chrome/* $(BASE)/$(BUILDDIR)/ && cd -
$(ZIPFILE): dir files
cd $(BUILDDIR)
rm -f $(ZIPFILE)
zip -qr $(ZIPFILE) "`basename $(BUILDDIR)`"
@echo "** The Chrome Extension is ready at copay-chrome-extension.zip"

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,75 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.bitpay.copay"
version="%APP-VERSION%"
android-versionCode="%ANDROID-VERSION-CODE%"
ios-CFBundleVersion="%APP-VERSION%">
<name>Copay</name>
<description>
A secure bitcoin wallet for friends and companies.
</description>
<author email="support@bitpay.com" href="https://copay.io">
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="BackgroundColor" value="#2C3E50" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#2C3E50" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="BackupWebStorage" value="none"/>
<preference name="windows-target-version" value="8.1"/>
<preference name="Orientation" value="default" />
<platform name="android">
<hook type="after_run" src="scripts/afterRun.js" />
</platform>
<platform name="ios">
<!-- iOS 8.0+ -->
<!-- iPad Pro -->
<icon src="../ios/icons/icon-83.5@2x.png" width="167" height="167" />
<!-- iPhone 6 Plus -->
<icon src="../ios/icons/icon-60@3x.png" width="180" height="180" />
<!-- iOS 7.0+ -->
<!-- iPhone / iPod Touch -->
<icon src="../ios/icons/icon-60@2x.png" width="120" height="120" />
<!-- iPad -->
<icon src="../ios/icons/icon-76.png" width="76" height="76" />
<icon src="../ios/icons/icon-76@2x.png" width="152" height="152" />
<!-- iOS 6.1 -->
<!-- Spotlight Icon -->
<icon src="../ios/icons/icon-40.png" width="40" height="40" />
<icon src="../ios/icons/icon-40@2x.png" width="80" height="80" />
<!-- iPhone / iPod Touch -->
<icon src="../ios/icons/icon.png" width="57" height="57" />
<icon src="../ios/icons/icon@2x.png" width="114" height="114" />
<!-- iPad -->
<icon src="../ios/icons/icon-72.png" width="72" height="72" />
<icon src="../ios/icons/icon-72@2x.png" width="144" height="144" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="../ios/icons/icon-small.png" width="29" height="29" />
<icon src="../ios/icons/icon-small@2x.png" width="58" height="58" />
<icon src="../ios/icons/icon-small@3x.png" width="87" height="87" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="../ios/icons/icon-50.png" width="50" height="50" />
<icon src="../ios/icons/icon-50@2x.png" width="100" height="100" />
<!-- Splash -->
<splash src="../ios/splash/Default~iphone.png" width="320" height="480"/>
<splash src="../ios/splash/Default@2x~iphone.png" width="640" height="960"/>
<splash src="../ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="../ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="../ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="../ios/splash/Default-667h.png" width="750" height="1334"/>
<splash src="../ios/splash/Default-736h.png" width="1242" height="2208"/>
</platform>
</widget>

View File

@ -1,50 +0,0 @@
.PHONY: plugins android wp8 ios clean
all:
# grunt dist-mobile-dbg
plugins:
make -C project plugins
project:
cordova create project com.bitpay.copay Copay
cp config.xml project/config.xml
cp ProjectMakefile project/Makefile
cp -af ../dist/web/** project/www
sed "s/<\!-- PLACEHOLDER: CORDOVA SRIPT -->/<script type='text\/javascript' charset='utf-8' src='cordova.js'><\/script>/g" ../index.html > project/www/index.html
android: project plugins
mkdir -p project/platforms/android/res/xml/
cp android/AndroidManifest.xml project/platforms/android/AndroidManifest.xml
cp android/project.properties project/platforms/android/project.properties
cp -R android/res/* project/platforms/android/res
make -C project android
wp8: project plugins
make -C project wp8
cp -R project/www/* project/platforms/wp8/www
cp -R wp/res/* project/platforms/wp/res
ios: project plugins
make -C project ios
cp ios/Copay-Info.plist project/platforms/ios/Copay-Info.plist
mkdir -p project/platforms/ios/Copay/Resources/icons
mkdir -p project/platforms/ios/Copay/Resources/splash
cp -R ios/icons/* project/platforms/ios/Copay/Resources/icons
cp -R ios/splash/* project/platforms/ios/Copay/Resources/splash
open-ios: ios
open project/platforms/ios/Copay.xcodeproj
run-android: android
make -C project run-android
release-android: android
make -C project release-android
clean:
rm -rf project

View File

@ -1,31 +0,0 @@
.PHONY: android plugins wp8 ios
plugins:
@echo "Intalling cordova plugins"
cordova plugin add https://github.com/Initsogar/cordova-webintent.git
cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
cordova plugin add org.apache.cordova.splashscreen
cordova plugin add org.apache.cordova.statusbar
cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=bitcoin
cordova plugin add org.apache.cordova.inappbrowser
android:
cordova platforms add android
wp8:
cordova platforms add wp8
ios:
cordova platforms add ios
build-ios:
cordova build ios
run-android:
cordova run android
release-android:
cordova build android --release

View File

@ -1,36 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="v0.10.7" android:windowSoftInputMode="adjustPan" package="com.bitpay.copay" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="@drawable/copay" android:label="@string/app_name" android:allowBackup="false">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:launchMode="singleTop" android:name="CordovaApp" android:theme="@android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:clearTaskOnLaunch="true" android:configChanges="orientation|screenSize|keyboardHidden" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="@string/share_name" android:name="com.google.zxing.client.android.encode.EncodeActivity">
<intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.ENCODE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="@string/share_name" android:name="com.google.zxing.client.android.HelpActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
</manifest>

View File

@ -1,240 +0,0 @@
#! /bin/bash
#
# Usage:
# sh ./build.sh --android --reload
#
#
# Check function OK
checkOK() {
if [ $? != 0 ]; then
echo "${OpenColor}${Red}* ERROR. Exiting...${CloseColor}"
exit 1
fi
}
# Configs
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT="$BUILDDIR/project"
CURRENT_OS=$1
if [ -z "CURRENT_OS" ]
then
echo "Build.sh WP8|ANDROID|IOS"
fi
CLEAR=false
DBGJS=false
if [[ $2 == "--clear" || $3 == "--clear" ]]
then
CLEAR=true
fi
if [[ $2 == "--dbgjs" || $3 == "--dbgjs" ]]
then
DBGJS=true
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; }
# Create project dir
if $CLEAR
then
if [ -d $PROJECT ]; then
rm -rf $PROJECT
fi
fi
echo "Build directory is $BUILDDIR"
echo "Project directory is $PROJECT"
if [ ! -d $PROJECT ]; then
cd $BUILDDIR
echo "${OpenColor}${Green}* Creating project... ${CloseColor}"
cordova create project com.bitpay.copay Copay
checkOK
cd $PROJECT
if [ $CURRENT_OS == "ANDROID" ]; then
echo "${OpenColor}${Green}* Adding Android platform... ${CloseColor}"
cordova platforms add android@5.1.1
checkOK
fi
if [ $CURRENT_OS == "IOS" ]; 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}"
if [ $CURRENT_OS == "IOS" ]
then
cordova plugin add https://github.com/tjwoon/csZBar.git
checkOK
else
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
checkOK
fi
if [ $CURRENT_OS == "IOS" ]; then
cordova plugin add phonegap-plugin-push@1.5.3
checkOK
fi
if [ $CURRENT_OS == "ANDROID" ]; then
cordova plugin add phonegap-plugin-push@1.2.3
checkOK
fi
cordova plugin add cordova-plugin-globalization
checkOK
cordova plugin add cordova.plugins.diagnostic
checkOK
cordova plugin add cordova-plugin-splashscreen
checkOK
cordova plugin add cordova-plugin-statusbar
checkOK
cordova plugin add https://github.com/cmgustavo/Custom-URL-scheme.git --variable URL_SCHEME=bitcoin --variable SECOND_URL_SCHEME=copay
checkOK
cordova plugin add cordova-plugin-inappbrowser
checkOK
cordova plugin add cordova-plugin-x-toast && cordova prepare
checkOK
cordova plugin add https://github.com/VersoSolutions/CordovaClipboard
checkOK
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare
checkOK
cordova plugin add cordova-plugin-spinner-dialog
checkOK
cordova plugin add cordova-plugin-dialogs
checkOK
cordova plugin add cordova-plugin-network-information
checkOK
cordova plugin add cordova-plugin-console
checkOK
cordova plugin add cordova-plugin-uniquedeviceid
checkOK
cordova plugin add cordova-plugin-file
checkOK
cordova plugin add cordova-plugin-touch-id && cordova prepare
checkOK
cordova plugin add cordova-plugin-transport-security
checkOK
cordova plugin add cordova-ios-requires-fullscreen
checkOK
cordova plugin add cordova-plugin-disable-bitcode
checkOK
## Fix plugin android-fingerprint
rm -rf $PROJECT/platforms/android/res/values-es
cordova plugin add cordova-plugin-android-fingerprint-auth
checkOK
cordova plugin add cordova-plugin-screen-orientation
checkOK
cordova plugin add ionic-plugin-keyboard
checkOK
fi
if $DBGJS
then
echo "${OpenColor}${Green}* Generating copay bundle (debug js)...${CloseColor}"
cd $BUILDDIR/..
grunt
checkOK
else
echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}"
cd $BUILDDIR/..
grunt prod
checkOK
fi
echo "${OpenColor}${Green}* Copying files...${CloseColor}"
cd $BUILDDIR/..
cp -af public/** $PROJECT/www
checkOK
sed "s/<\!-- PLACEHOLDER: CORDOVA SRIPT -->/<script type='text\/javascript' charset='utf-8' src='cordova.js'><\/script>/g" public/index.html > $PROJECT/www/index.html
checkOK
cd $BUILDDIR
cp config.xml $PROJECT/config.xml
checkOK
if [ $CURRENT_OS == "ANDROID" ]; then
echo "Android project!!!"
mkdir -p $PROJECT/platforms/android/res/xml/
checkOK
# cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
# checkOK
cp android/build-extras.gradle $PROJECT/platforms/android/build-extras.gradle
checkOK
cp android/project.properties $PROJECT/platforms/android/project.properties
checkOK
mkdir -p $PROJECT/scripts
checkOK
cp scripts/* $PROJECT/scripts
checkOK
cp -R android/res/* $PROJECT/platforms/android/res
checkOK
fi
if [ $CURRENT_OS == "WP8" ]; then
echo "Wp8 project!!!"
cp -R $PROJECT/www/* $PROJECT/platforms/wp8/www
checkOK
if ! $CLEAR
then
cp -vf wp/Properties/* $PROJECT/platforms/wp8/Properties/
checkOK
cp -vf wp/MainPage.xaml $PROJECT/platforms/wp8/
checkOK
cp -vf wp/Package.appxmanifest $PROJECT/platforms/wp8/
checkOK
cp -vf wp/Assets/* $PROJECT/platforms/wp8/Assets/
cp -vf wp/SplashScreenImage.jpg $PROJECT/platforms/wp8/
cp -vf wp/ApplicationIcon.png $PROJECT/platforms/wp8/
cp -vf wp/Background.png $PROJECT/platforms/wp8/
checkOK
fi
fi

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
<Identity Name="18C7659D.CopayWallet" Publisher="CN=F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" Version="2.5.0.0" />
<mp:PhoneIdentity PhoneProductId="5381aa50-9069-11e4-84cc-293caf9cbdc8" PhonePublisherId="F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" />
<Properties>
<DisplayName>Copay Bitcoin Wallet</DisplayName>
<PublisherDisplayName>BitPay Inc.</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.3.1</OSMinVersion>
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="x5381aa50y9069y11e4y84ccy293caf9cbdc8x" Executable="AGHost.exe" EntryPoint="MainPage.xaml">
<m3:VisualElements DisplayName="Copay Bitcoin Wallet" Square150x150Logo="Assets\SquareTile150x150.png" Square44x44Logo="Assets\Logo.png" Description="A multisignature Bitcoin Wallet" ForegroundText="light" BackgroundColor="#464646">
<m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png">
</m3:DefaultTile>
<m3:SplashScreen Image="SplashScreenImage.jpg" />
</m3:VisualElements>
<Extensions>
<Extension Category="windows.backgroundTasks" EntryPoint="AgHost.BackgroundTask">
<BackgroundTasks>
<Task Type="systemEvent" />
</BackgroundTasks>
</Extension>
</Extensions>
</Application>
</Applications>
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>AgHostSvcs.dll</Path>
<ActivatableClass ActivatableClassId="AgHost.BackgroundTask" ThreadingModel="both" />
</InProcessServer>
</Extension>
</Extensions>
</Package>

Some files were not shown because too many files have changed in this diff Show More