diff --git a/.gitignore b/.gitignore index 93ebcbf49..dc101e2e9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,11 +13,6 @@ cordova/*.keystore cache webkitbuilds/* !webkitbuilds/README.md -!webkitbuilds/setup-win.iss -!webkitbuilds/favicon.ico -!webkitbuilds/.desktop -!webkitbuilds/build-osx.sh -!webkitbuilds/Background.png # chrome extensions chrome-app/build/* @@ -105,30 +100,14 @@ externalServices.json cordova/Makefile cordova/ProjectMakefile app-template/bitpay-wallet -cordova/ProjectMakefile cordova/config.xml cordova/wp/Package.appxmanifest -www/img/logo-negative.svg -www/img/logo.svg src/js/appConfig.js src/js/externalServices.js chrome-app/manifest.json -webkitbuilds/.desktop -webkitbuilds/setup-win.iss -www/img/favicon.ico -www/img/icon-128.png +www/img/app -cordova/Makefile -cordova/ProjectMakefile -app-template/bitpay-wallet -cordova/ProjectMakefile -cordova/config.xml -cordova/wp/Package.appxmanifest -www/img/logo-negative.svg -www/img/logo.svg -src/js/appConfig.js - cordova/android/res/ cordova/wp/Assets/ cordova/wp/*.png diff --git a/Gruntfile.js b/Gruntfile.js index 9e263d139..4bd01513c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,6 +6,7 @@ module.exports = function(grunt) { // Project Configuration grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), exec: { appConfig: { command: 'node ./util/buildAppConfig.js' @@ -19,8 +20,8 @@ module.exports = function(grunt) { cordovaclean: { command: 'make -C cordova clean' }, - osx: { - command: 'webkitbuilds/build-osx.sh sign' + macos: { + command: 'sh webkitbuilds/build-macos.sh sign' }, coveralls: { command: 'cat coverage/report-lcov/lcov.info |./node_modules/coveralls/bin/coveralls.js' @@ -60,10 +61,10 @@ module.exports = function(grunt) { 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' + cmd: 'gpg -u 1112CFA1 --output webkitbuilds/<%= pkg.title %>-linux.zip.sig --detach-sig webkitbuilds/<%= pkg.title %>-linux.zip && gpg -u 1112CFA1 --output webkitbuilds/<%= pkg.title %>-win.exe.sig --detach-sig webkitbuilds/<%= pkg.title %>-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' + cmd: 'gpg --verify webkitbuilds/<%= pkg.title %>-linux.zip.sig webkitbuilds/<%= pkg.title %>-linux.zip && gpg --verify webkitbuilds/<%= pkg.title %>-win.exe.sig webkitbuilds/<%= pkg.title %>-win.exe' }, }, watch: { @@ -209,8 +210,8 @@ module.exports = function(grunt) { files: [{ expand: true, cwd: 'webkitbuilds/', - src: ['.desktop', '../www/img/icons/favicon.ico', '../www/img/icons/icon-256.png'], - dest: 'webkitbuilds/Copay/linux64/', + src: ['.desktop', '../www/img/app/favicon.ico', '../www/img/app/512x512.png'], + dest: 'webkitbuilds/<%= pkg.title %>/linux64/', flatten: true, filter: 'isFile' }], @@ -218,24 +219,24 @@ module.exports = function(grunt) { }, nwjs: { options: { - appName: 'Copay', + appName: '<%= pkg.title %>', platforms: ['win64', 'osx64', 'linux64'], buildDir: './webkitbuilds', version: '0.16.0', - macIcns: './www/img/icons/icon.icns', - exeIco: './www/img/icons/icon.ico' + macIcns: './www/img/app/logo.icns', + exeIco: './www/img/app/logo.ico' }, src: ['./package.json', './www/**/*'] }, compress: { linux: { options: { - archive: './webkitbuilds/Copay-linux.zip' + archive: './webkitbuilds/<%= pkg.title %>-linux.zip' }, expand: true, - cwd: './webkitbuilds/Copay/linux64/', + cwd: './webkitbuilds/<%= pkg.title %>/linux64/', src: ['**/*'], - dest: 'copay-linux/' + dest: '<%= pkg.title %>-linux/' } }, browserify: { @@ -252,7 +253,7 @@ module.exports = function(grunt) { grunt.registerTask('prod', ['default', 'uglify']); grunt.registerTask('translate', ['nggettext_extract']); grunt.registerTask('desktop', ['prod', 'nwjs', 'copy:linux', 'compress:linux']); - grunt.registerTask('osx', ['prod', 'nwjs', 'exec:osx']); + grunt.registerTask('macos', ['prod', 'nwjs', 'exec:macos']); grunt.registerTask('chrome', ['exec:chrome']); grunt.registerTask('wp', ['prod', 'exec:wp']); grunt.registerTask('wp-copy', ['default', 'exec:wpcopy']); diff --git a/app-template/apply.js b/app-template/apply.js index b02b14c80..f641e72cd 100755 --- a/app-template/apply.js +++ b/app-template/apply.js @@ -13,7 +13,7 @@ var templates = { 'Package.appxmanifest': 'cordova/wp/', '.desktop': 'webkitbuilds/', 'setup-win.iss': 'webkitbuilds/', - 'manifest.json': 'chrome-app/', + 'build-macos.sh': 'webkitbuilds/', // 'bower.json': '/', }; var configDir = process.argv[2] || 'copay'; @@ -117,6 +117,6 @@ function copyDir(from, to, cb) { } -copyDir(configDir + '/img/', '../www/img/', function() { +copyDir(configDir + '/img/', '../www/img/app/', function() { console.log("apply.js finished. \n\n"); }); diff --git a/app-template/bitpay/appConfig.json b/app-template/bitpay/appConfig.json index 54faf2203..99c45da61 100644 --- a/app-template/bitpay/appConfig.json +++ b/app-template/bitpay/appConfig.json @@ -18,6 +18,7 @@ "winAppName": "BitPayWallet", "wpPublisherId": "{}", "wpProductId": "{}", + "windowsAppId": "", "pushSenderId": "1036948132229", "description": "Secure Bitcoin Wallet", "version": "0.14.0", diff --git a/app-template/bitpay/img/128x128.png b/app-template/bitpay/img/128x128.png new file mode 100755 index 000000000..0a03f7ed3 Binary files /dev/null and b/app-template/bitpay/img/128x128.png differ diff --git a/app-template/bitpay/img/16x16.png b/app-template/bitpay/img/16x16.png new file mode 100755 index 000000000..973de1c65 Binary files /dev/null and b/app-template/bitpay/img/16x16.png differ diff --git a/app-template/bitpay/img/24x24.png b/app-template/bitpay/img/24x24.png new file mode 100755 index 000000000..7ec13aba4 Binary files /dev/null and b/app-template/bitpay/img/24x24.png differ diff --git a/app-template/bitpay/img/256x256.png b/app-template/bitpay/img/256x256.png new file mode 100755 index 000000000..c2d0ac1d8 Binary files /dev/null and b/app-template/bitpay/img/256x256.png differ diff --git a/app-template/bitpay/img/32x32.png b/app-template/bitpay/img/32x32.png new file mode 100755 index 000000000..74816f940 Binary files /dev/null and b/app-template/bitpay/img/32x32.png differ diff --git a/app-template/bitpay/img/48x48.png b/app-template/bitpay/img/48x48.png new file mode 100755 index 000000000..1544ac1f1 Binary files /dev/null and b/app-template/bitpay/img/48x48.png differ diff --git a/app-template/bitpay/img/512x512.png b/app-template/bitpay/img/512x512.png new file mode 100755 index 000000000..19185804c Binary files /dev/null and b/app-template/bitpay/img/512x512.png differ diff --git a/app-template/bitpay/img/64x64.png b/app-template/bitpay/img/64x64.png new file mode 100755 index 000000000..ed9b64f6c Binary files /dev/null and b/app-template/bitpay/img/64x64.png differ diff --git a/app-template/bitpay/img/96x96.png b/app-template/bitpay/img/96x96.png new file mode 100755 index 000000000..8d473f1c8 Binary files /dev/null and b/app-template/bitpay/img/96x96.png differ diff --git a/app-template/bitpay/img/Background.png b/app-template/bitpay/img/Background.png new file mode 100644 index 000000000..7056c17cb Binary files /dev/null and b/app-template/bitpay/img/Background.png differ diff --git a/app-template/bitpay/img/icon-128.png b/app-template/bitpay/img/icon-128.png deleted file mode 100644 index 6958667cd..000000000 Binary files a/app-template/bitpay/img/icon-128.png and /dev/null differ diff --git a/app-template/bitpay/img/logo.icns b/app-template/bitpay/img/logo.icns new file mode 100644 index 000000000..d8f330e8f Binary files /dev/null and b/app-template/bitpay/img/logo.icns differ diff --git a/app-template/bitpay/img/logo.ico b/app-template/bitpay/img/logo.ico new file mode 100644 index 000000000..f91c730f2 Binary files /dev/null and b/app-template/bitpay/img/logo.ico differ diff --git a/webkitbuilds/build-osx.sh b/app-template/build-macos.sh similarity index 96% rename from webkitbuilds/build-osx.sh rename to app-template/build-macos.sh index 7e46354f5..2df04ef3a 100755 --- a/webkitbuilds/build-osx.sh +++ b/app-template/build-macos.sh @@ -1,7 +1,7 @@ #!/bin/bash SHOULD_SIGN=$1 -if [ "$SHOULD_SIGN" ] +if [ "$SHOULD_SIGN" ] then echo "Will sign the APP" fi @@ -16,10 +16,10 @@ if [ -d "$dir" ]; then fi # set up your app name, architecture, and background image file name -APP_NAME="Copay" +APP_NAME="*USERVISIBLENAME*" DMG_BACKGROUND_IMG="Background.png" -PATH_NAME="Copay/osx64/" +PATH_NAME="${APP_NAME}/osx64/" # you should not need to change these APP_EXE="${PATH_NAME}${APP_NAME}.app/Contents/MacOS/nwjs" @@ -35,11 +35,11 @@ _BACKGROUND_IMAGE_DPI_W=`sips -g dpiWidth ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9 if [ $(echo " $_BACKGROUND_IMAGE_DPI_H != 72.0 " | bc) -eq 1 -o $(echo " $_BACKGROUND_IMAGE_DPI_W != 72.0 " | bc) -eq 1 ]; then echo "WARNING: The background image's DPI is not 72. This will result in distorted backgrounds on Mac OS X 10.7+." echo " I will convert it to 72 DPI for you." - + _DMG_BACKGROUND_TMP="${DMG_BACKGROUND_IMG%.*}"_dpifix."${DMG_BACKGROUND_IMG##*.}" sips -s dpiWidth 72 -s dpiHeight 72 ${DMG_BACKGROUND_IMG} --out ${_DMG_BACKGROUND_TMP} - + DMG_BACKGROUND_IMG="${_DMG_BACKGROUND_TMP}" fi @@ -66,11 +66,11 @@ if [ $? -ne 0 ]; then # Sign Code (MATIAS) if [ $SHOULD_SIGN ] then - echo "Signing Copay DMG" + echo "Signing ${APP_NAME} DMG" export IDENTITY="3rd Party Mac Developer Application: BitPay, Inc. (884JRH5R93)" - # not need for 'out of app store' distribution (?) + # not need for 'out of app store' distribution (?) # export PARENT_PLIST=parent.plist # export CHILD_PLIST=child.plist export APP_PATH=${STAGING_DIR}/${APP_NAME}.app diff --git a/app-template/copay/appConfig.json b/app-template/copay/appConfig.json index 6e66bd2bf..f0bea8816 100644 --- a/app-template/copay/appConfig.json +++ b/app-template/copay/appConfig.json @@ -18,6 +18,7 @@ "winAppName": "CopayWallet", "wpPublisherId": "{31cdd08b-457c-413d-b440-f6665eec847d}", "wpProductId": "{5381aa50-9069-11e4-84cc-293caf9cbdc8}", + "windowsAppId": "804636ee-b017-4cad-8719-e58ac97ffa5c", "pushSenderId": "1036948132229", "description": "A Secure Bitcoin Wallet", "version": "2.5.0", diff --git a/app-template/copay/img/128x128.png b/app-template/copay/img/128x128.png new file mode 100755 index 000000000..e2a715a69 Binary files /dev/null and b/app-template/copay/img/128x128.png differ diff --git a/app-template/copay/img/16x16.png b/app-template/copay/img/16x16.png new file mode 100755 index 000000000..66a7f6960 Binary files /dev/null and b/app-template/copay/img/16x16.png differ diff --git a/app-template/copay/img/24x24.png b/app-template/copay/img/24x24.png new file mode 100755 index 000000000..f857b2562 Binary files /dev/null and b/app-template/copay/img/24x24.png differ diff --git a/app-template/copay/img/256x256.png b/app-template/copay/img/256x256.png new file mode 100755 index 000000000..8f2f6d5c9 Binary files /dev/null and b/app-template/copay/img/256x256.png differ diff --git a/app-template/copay/img/32x32.png b/app-template/copay/img/32x32.png new file mode 100755 index 000000000..6111d3120 Binary files /dev/null and b/app-template/copay/img/32x32.png differ diff --git a/app-template/copay/img/48x48.png b/app-template/copay/img/48x48.png new file mode 100755 index 000000000..b8206bd53 Binary files /dev/null and b/app-template/copay/img/48x48.png differ diff --git a/app-template/copay/img/512x512.png b/app-template/copay/img/512x512.png new file mode 100755 index 000000000..8df121629 Binary files /dev/null and b/app-template/copay/img/512x512.png differ diff --git a/app-template/copay/img/64x64.png b/app-template/copay/img/64x64.png new file mode 100755 index 000000000..87985f3e4 Binary files /dev/null and b/app-template/copay/img/64x64.png differ diff --git a/app-template/copay/img/96x96.png b/app-template/copay/img/96x96.png new file mode 100755 index 000000000..047a88431 Binary files /dev/null and b/app-template/copay/img/96x96.png differ diff --git a/app-template/copay/img/Background.png b/app-template/copay/img/Background.png new file mode 100644 index 000000000..8e7f9a152 Binary files /dev/null and b/app-template/copay/img/Background.png differ diff --git a/app-template/copay/img/icon-128.png b/app-template/copay/img/icon-128.png deleted file mode 100644 index 8624a0189..000000000 Binary files a/app-template/copay/img/icon-128.png and /dev/null differ diff --git a/app-template/copay/img/icon-chrome-128.png b/app-template/copay/img/icon-chrome-128.png deleted file mode 100644 index 0044af9ca..000000000 Binary files a/app-template/copay/img/icon-chrome-128.png and /dev/null differ diff --git a/app-template/copay/img/logo.icns b/app-template/copay/img/logo.icns new file mode 100644 index 000000000..b19117e91 Binary files /dev/null and b/app-template/copay/img/logo.icns differ diff --git a/app-template/copay/img/logo.ico b/app-template/copay/img/logo.ico new file mode 100644 index 000000000..32a1d2291 Binary files /dev/null and b/app-template/copay/img/logo.ico differ diff --git a/app-template/package.json b/app-template/package.json index fa24526d1..afd2928f4 100644 --- a/app-template/package.json +++ b/app-template/package.json @@ -12,9 +12,10 @@ "bitcore" ], "main": "www/index.html", + "title": "*USERVISIBLENAME*", "window": { "title": "*USERVISIBLENAME* - *PURPOSELINE*", - "icon": "www/img/icon-128.png", + "icon": "www/img/icons/logo.ico", "toolbar": false, "show": true, "visible": true, @@ -80,7 +81,6 @@ "start": "npm run build:www && ionic serve --nolivereload --nogulp -s", "start:ios": "npm run build:www && npm run build:ios && npm run open:ios", "start:android": "npm run build:www && npm run build:android && npm run run:android", - "start:desktop": "grunt desktop", "watch": "grunt watch", "build:www": "grunt", "build:www-release": "grunt prod", @@ -88,12 +88,13 @@ "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", + "build:desktop": "grunt desktop", + "build:macos": "grunt macos", "open:ios": "open platforms/ios/*.xcodeproj", "open:android": "open -a open -a /Applications/Android\\ Studio.app platforms/android", "final:www": "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 run:android", - "final:desktop": "grunt desktop", "run:android": "cordova run android --device", "log:android": "adb logcat | grep chromium", "apply:copay": "cd app-template && node apply.js copay && cordova prepare", diff --git a/app-template/setup-win.iss b/app-template/setup-win.iss index d2443afef..762d1434e 100755 --- a/app-template/setup-win.iss +++ b/app-template/setup-win.iss @@ -5,10 +5,11 @@ #define MyAppVersion "*VERSION*" #define MyAppPublisher "BitPay" #define MyAppURL "*URL*" -#define MyAppExeName "*PACKAGENAME.exe" +#define MyAppExeName "*PACKAGENAME*.exe" +#define AppId "*WINDOWSAPPID*" [Setup] -AppId={804636ee-b017-4cad-8719-e58ac97ffa5c} +AppId={#AppId} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} diff --git a/src/js/routes.js b/src/js/routes.js index cb1683c54..2c45c13c6 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -893,7 +893,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }); }) - .run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService) { + .run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, $window, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService) { uxLanguage.init(); openURLService.init(); @@ -1005,7 +1005,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr type: "menubar" }); try { - nativeMenuBar.createMacBuiltin("Copay"); + nativeMenuBar.createMacBuiltin($window.appConfig.nameCase); } catch (e) { $log.debug('This is not OSX'); } diff --git a/webkitbuilds/Background.png b/webkitbuilds/Background.png deleted file mode 100644 index 8e7f9a152..000000000 Binary files a/webkitbuilds/Background.png and /dev/null differ diff --git a/webkitbuilds/Background.png b/webkitbuilds/Background.png new file mode 120000 index 000000000..3c2950b39 --- /dev/null +++ b/webkitbuilds/Background.png @@ -0,0 +1 @@ +../www/img/app/Background.png \ No newline at end of file diff --git a/www/img/icons/copy.png b/www/img/icons/copy.png deleted file mode 100644 index b43ca0634..000000000 Binary files a/www/img/icons/copy.png and /dev/null differ diff --git a/www/img/icons/favicon.ico b/www/img/icons/favicon.ico deleted file mode 100644 index 03f394e70..000000000 Binary files a/www/img/icons/favicon.ico and /dev/null differ diff --git a/www/img/icons/icon-16.png b/www/img/icons/icon-16.png deleted file mode 100644 index d4664c57a..000000000 Binary files a/www/img/icons/icon-16.png and /dev/null differ diff --git a/www/img/icons/icon-256.png b/www/img/icons/icon-256.png deleted file mode 100644 index f9978eb28..000000000 Binary files a/www/img/icons/icon-256.png and /dev/null differ diff --git a/www/img/icons/icon-32.png b/www/img/icons/icon-32.png deleted file mode 100644 index eca42cbc5..000000000 Binary files a/www/img/icons/icon-32.png and /dev/null differ diff --git a/www/img/icons/icon-64.png b/www/img/icons/icon-64.png deleted file mode 100644 index fec1daa73..000000000 Binary files a/www/img/icons/icon-64.png and /dev/null differ diff --git a/www/img/icons/icon-chrome-128.png b/www/img/icons/icon-chrome-128.png deleted file mode 100644 index 0044af9ca..000000000 Binary files a/www/img/icons/icon-chrome-128.png and /dev/null differ diff --git a/www/img/icons/icon.icns b/www/img/icons/icon.icns deleted file mode 100644 index 8fc084681..000000000 Binary files a/www/img/icons/icon.icns and /dev/null differ diff --git a/www/img/icons/icon.ico b/www/img/icons/icon.ico deleted file mode 100644 index e40c22dcf..000000000 Binary files a/www/img/icons/icon.ico and /dev/null differ diff --git a/www/img/icons/icon.png b/www/img/icons/icon.png deleted file mode 100644 index 47cdc4b1f..000000000 Binary files a/www/img/icons/icon.png and /dev/null differ diff --git a/www/img/icons/logo-chrome-256.png b/www/img/icons/logo-chrome-256.png deleted file mode 100644 index 803f97494..000000000 Binary files a/www/img/icons/logo-chrome-256.png and /dev/null differ diff --git a/www/img/icons/logo-chrome-64.png b/www/img/icons/logo-chrome-64.png deleted file mode 100644 index b09c6b57a..000000000 Binary files a/www/img/icons/logo-chrome-64.png and /dev/null differ diff --git a/www/index.html b/www/index.html index fe0611bae..ef073575e 100644 --- a/www/index.html +++ b/www/index.html @@ -8,7 +8,7 @@ {{appConfig.nameCase}} - {{appConfig.description}} - +