build(cordova): Begin basing cordova build on more standard config.xml

This completes the installations of cordova-plugin-qrscanner, including
required changes to config.xml. Where possible, other plugins are now
included with versioning in config.xml.
This commit is contained in:
Jason Dreyzehner 2016-09-30 21:18:54 -04:00
parent 34197b4ae2
commit 15836bb817
9 changed files with 103 additions and 66 deletions

View File

@ -141,7 +141,8 @@ module.exports = function(grunt) {
'src/js/externalServices.js',
'src/js/init.js',
'src/js/trezor-url.js',
'bower_components/trezor-connect/login.js'
'bower_components/trezor-connect/login.js',
'node_modules/cordova-plugin-qrscanner/dist/cordova-plugin-qrscanner-lib.min.js'
],
dest: 'public/js/copay.js'
},

View File

@ -9,7 +9,7 @@ clean:
$(WORKDIR)android $(WORKDIR)ios: config.xml
cordova create $@ com.bitpay.*NAMENOSPACE* *NAMECASENOSPACE* || echo "Project Path Existed"
cordova create $@ com.bitpay.*NAMENOSPACE* '*NAMECASENOSPACE*' || echo "Project Path Existed"
cp ProjectMakefile $@/Makefile
rm -r $@/www && ln -sF ../../public $@/www
cp config.xml $@/config.xml
@ -35,7 +35,7 @@ wp-init: config.xml
cp config.xml $(WORKDIR)$@/config.xml
make -C $(WORKDIR)$@ $(subst $(WORKDIR),, $(WORKDIR)$@)
wp-copy:
wp-copy:
cp -rvf wp/Properties/* $(WORKDIR)wp/platforms/wp8/Properties/
cp -rvf wp/MainPage.xaml $(WORKDIR)wp/platforms/wp8/
cp -rvf wp/Package.appxmanifest $(WORKDIR)wp/platforms/wp8/

View File

@ -1,52 +1,24 @@
.PHONY:plugins ios-platform android-platform wp8-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
cordova plugin add https://github.com/driftyco/cordova-plugin-wkwebview-engine.git --save
ios-platform android-platform wp8-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
echo
android: android-platform plugins
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
cordova plugin add phonegap-plugin-push@1.2.3
echo
wp: wp8-platform plugins
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
echo
build-ios build-android build-wp8:
cordova build $(subst build-,,$@)
run:
cordova run --device

View File

@ -28,10 +28,63 @@
<preference name="windows-target-version" value="8.1"/>
<preference name="Orientation" value="default" />
<!-- Supported Platforms -->
<!-- <engine name="ios" spec="~4.2.1" />
<engine name="android" spec="~5.2.2" />
<engine name="wp8" spec="~3.8.2" /> -->
<!-- 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-disable-bitcode" spec="~1.3.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.3.3" />
<platform name="wp8">
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
</platform>
<platform name="android">
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
<plugin name="phonegap-plugin-push" spec="~1.8.2" />
</platform>
<platform name="ios">
<plugin name="cordova-plugin-cszbar" spec="https://github.com/tjwoon/csZBar.git" />
<plugin name="phonegap-plugin-push" spec="~1.5.3" />
</platform>
<!-- Hooks -->
<platform name="android">
<hook type="after_run" src="scripts/afterRun.js" />
</platform>
<platform name="ios">
<hook type="before_build" src="../../node_modules/cordova-plugin-qrscanner/scripts/swift-support.js" />
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>The camera is used to read QR codes.</string>
</config-file>
</platform>
<!-- Assets -->
<platform name="ios">
<!-- iOS 8.0+ -->
<!-- iPad Pro -->

View File

@ -86,12 +86,18 @@
"xcode": "^0.8.2"
},
"scripts": {
"preinstall": "bower install && npm i fs-extra && cd app-template && node apply.js",
"postinstall": "npm run build",
"preinstall": "bower install && npm i fs-extra",
"build": "grunt",
"start": "node app.js",
"apply:copay": "cd app-template && node apply.js",
"apply:bitpay-wallet": "cd app-template && node apply.js bitpay-wallet",
"start": "npm run build && node app.js",
"watch": "grunt watch",
"test": "./node_modules/.bin/grunt test-coveralls",
"clean": "git clean -dfx"
"clean": "git clean -dfx",
"start:ios": "npm run build && cd cordova && trash project-ios && make ios && open project-ios/platforms/ios/BitPay\\ Wallet.xcodeproj",
"start:android": "npm run build && cd cordova && trash project-android && make android"
},
"devDependencies": {}
"devDependencies": {
"trash-cli": "^1.4.0"
}
}

View File

@ -3,9 +3,9 @@
"//":" Modify it at app-template/",
"manifest_version": 2,
"name": "BitPay",
"description": "The BitPay Bitcoin Wallet",
"version": "0.13.0",
"name": "BitPay Wallet",
"description": "Secure Bitcoin Storage",
"version": "0.6.0",
"permissions": [
"storage",
"unlimitedStorage",

View File

@ -1,11 +1,11 @@
{
{
"//":"PLEASE! Do not edit this file directly",
"//":" Modify it at app-template/",
"//":" Modify it at app-template/",
"name": "bitpay",
"description": "The BitPay Bitcoin Wallet",
"name": "wallet",
"description": "Secure Bitcoin Storage",
"author": "BitPay",
"version": "0.13.0",
"version": "0.6.0",
"keywords": [
"bitcoin",
"wallet",
@ -16,7 +16,7 @@
],
"main": "public/index.html",
"window": {
"title": "BitPay - The BitPay Bitcoin Wallet",
"title": "BitPay Wallet - Secure Bitcoin Storage",
"icon": "./public/img/icons/icon-256.png",
"toolbar": false,
"show": true,
@ -89,12 +89,17 @@
"xcode": "^0.8.2"
},
"scripts": {
"preinstall": "bower install && npm i fs-extra && cd app-template && node apply.js",
"postinstall": "npm run build",
"preinstall": "bower install && npm i fs-extra",
"build": "grunt",
"start": "node app.js",
"apply:copay": "cd app-template && node apply.js",
"apply:bitpay-wallet": "cd app-template && node apply.js bitpay-wallet",
"start": "npm run build && node app.js",
"watch": "grunt watch",
"test": "./node_modules/.bin/grunt test-coveralls",
"clean": "git clean -dfx"
"clean": "git clean -dfx",
"start:ios": "npm run build && cd cordova && trash project-ios && make ios && open project-ios/platforms/ios/BitPay\\ Wallet.xcodeproj"
},
"devDependencies": {}
"devDependencies": {
"trash-cli": "^1.4.0"
}
}

View File

@ -1,9 +1,9 @@
[Desktop Entry]
Type=Application
Version=0.13.0
Name=BitPay
Comment=The BitPay Bitcoin Wallet
Exec=bitpay
Version=0.6.0
Name=BitPay Wallet
Comment=Secure Bitcoin Storage
Exec=wallet
Icon=icon-256.png
Terminal=false
Categories=Finance

View File

@ -1,8 +1,8 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "bitpay"
#define MyAppVersion "0.13.0"
#define MyAppName "wallet"
#define MyAppVersion "0.6.0"
#define MyAppPublisher "BitPay"
#define MyAppURL "https://bitpay.com"
#define MyAppExeName "*NAMECASENOSPACE.exe"
@ -18,7 +18,7 @@ AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=BitPay-win
OutputBaseFilename=BitPay Wallet-win
OutputDir=./
Compression=lzma
SolidCompression=yes
@ -32,8 +32,8 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "BitPay\win64\bitpay.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "BitPay\win64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "BitPay Wallet\win64\wallet.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "BitPay Wallet\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
@ -50,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: "bitpay"; ValueType: "string"; ValueData: "URL:BitPay Custom Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "bitpay"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "bitpay\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0"
Root: HKCR; Subkey: "bitpay\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
Root: HKCR; Subkey: "wallet"; ValueType: "string"; ValueData: "URL:BitPay Wallet Custom Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "wallet"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "wallet\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0"
Root: HKCR; Subkey: "wallet\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1"""