minor tweaking + Makefile update...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-01-15 06:51:15 +03:00
parent 15c6cabe5c
commit c885e0855c
3 changed files with 10 additions and 163 deletions

View File

@ -572,6 +572,8 @@ $(BUILD_DIR)/app.asar: $(PACK_FULL)
# update package.json to start electron... # update package.json to start electron...
cd "$(BUILD_DIR)/$(APP_NAME)/" ; \ cd "$(BUILD_DIR)/$(APP_NAME)/" ; \
sed -i 's/"index.html"/"e.js"/g' package.json sed -i 's/"index.html"/"e.js"/g' package.json
# remove electron from the dist...
rm -rf "$(BUILD_DIR)/$(APP_NAME)/$(NODE_DIR)/electron"
cd "$(BUILD_DIR)" ; \ cd "$(BUILD_DIR)" ; \
asar p "$(APP_NAME)" app.asar \ asar p "$(APP_NAME)" app.asar \
--exclude-hidden \ --exclude-hidden \

View File

@ -179,13 +179,13 @@ var ElectronHostActions = actions.Actions({
set size(value){ set size(value){
value value
&& electron.remote.getCurrentWindow() && electron.remote.getCurrentWindow()
.setSize(value[0], value[1]) }, .setSize(Math.round(value[0]), Math.round(value[1])) },
get position(){ get position(){
return electron.remote.getCurrentWindow().getPosition() }, return electron.remote.getCurrentWindow().getPosition() },
set position(value){ set position(value){
value value
&& electron.remote.getCurrentWindow() && electron.remote.getCurrentWindow()
.setPosition(value[0], value[1]) }, .setPosition(Math.round(value[0]), Math.round(value[1])) },
show: ['- Window/', show: ['- Window/',
function(){ function(){
@ -488,8 +488,8 @@ var WindowedAppControlActions = actions.Actions({
} else { } else {
var w = cfg.width || 800 var w = cfg.width || 800
var h = cfg.height || 600 var h = cfg.height || 600
var x = cfg.x || Math.round((screen.width - w)/2) var x = cfg.x || (screen.width - w)/2
var y = cfg.y || Math.round((screen.height - h)/2) var y = cfg.y || (screen.height - h)/2
this.position = [x, y] this.position = [x, y]
this.size = [w, h] this.size = [w, h]
@ -555,10 +555,10 @@ module.WindowedAppControl = core.ImageGridFeatures.Feature({
if(cfg){ if(cfg){
var W = screen.width var W = screen.width
var H = screen.height var H = screen.height
var w = cfg.width || Math.round(Math.max(0.8 * W, 600)) var w = cfg.width || Math.max(0.8 * W, 600)
var h = cfg.height || Math.round(Math.max(0.8 * H, 400)) var h = cfg.height || Math.max(0.8 * H, 400)
var x = cfg.x || Math.round((W - w)/2) var x = cfg.x || (W - w)/2
var y = cfg.y || Math.round((H - h)/2) var y = cfg.y || (H - h)/2
this.position = [x, y] this.position = [x, y]
this.size = [w, h] this.size = [w, h]

View File

@ -9,15 +9,6 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
}, },
"agent-base": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz",
"integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==",
"dev": true,
"requires": {
"es6-promisify": "^5.0.0"
}
},
"ajv": { "ajv": {
"version": "6.6.1", "version": "6.6.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz",
@ -72,12 +63,6 @@
"resolved": "https://registry.npmjs.org/async-json/-/async-json-0.0.2.tgz", "resolved": "https://registry.npmjs.org/async-json/-/async-json-0.0.2.tgz",
"integrity": "sha1-qnEn2wOejkPaxyvR+7Z7oz9WgnA=" "integrity": "sha1-qnEn2wOejkPaxyvR+7Z7oz9WgnA="
}, },
"async-limiter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
"dev": true
},
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@ -363,32 +348,6 @@
} }
} }
}, },
"electron-wix-msi": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/electron-wix-msi/-/electron-wix-msi-1.3.0.tgz",
"integrity": "sha512-EniMpjYKizQ8fGiv5L6ef68ahZtqaDCqIQONiHiPx0PKCTZ1qfhpiMRLidZ+d2PBkMksgQuSYpI0N9AzRR5+cg==",
"dev": true,
"requires": {
"debug": "^3.1.0",
"fs-extra": "^4.0.2",
"klaw": "^2.1.0",
"lodash": "^4.17.4",
"uuid": "^3.1.0"
},
"dependencies": {
"fs-extra": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
"integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
}
}
},
"encoding": { "encoding": {
"version": "0.1.12", "version": "0.1.12",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
@ -427,21 +386,6 @@
} }
} }
}, },
"es6-promise": {
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz",
"integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==",
"dev": true
},
"es6-promisify": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
"integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
"dev": true,
"requires": {
"es6-promise": "^4.0.3"
}
},
"exiftool": { "exiftool": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/exiftool/-/exiftool-0.0.3.tgz", "resolved": "https://registry.npmjs.org/exiftool/-/exiftool-0.0.3.tgz",
@ -1236,16 +1180,6 @@
"sshpk": "^1.7.0" "sshpk": "^1.7.0"
} }
}, },
"https-proxy-agent": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz",
"integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==",
"dev": true,
"requires": {
"agent-base": "^4.1.0",
"debug": "^3.1.0"
}
},
"iconv-lite": { "iconv-lite": {
"version": "0.4.19", "version": "0.4.19",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
@ -1438,23 +1372,6 @@
"verror": "1.10.0" "verror": "1.10.0"
} }
}, },
"klaw": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/klaw/-/klaw-2.1.1.tgz",
"integrity": "sha1-QrdolHARacyRD9DRnOZ3tfs3ivE=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.9"
},
"dependencies": {
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
"dev": true
}
}
},
"less": { "less": {
"version": "3.9.0", "version": "3.9.0",
"resolved": "https://registry.npmjs.org/less/-/less-3.9.0.tgz", "resolved": "https://registry.npmjs.org/less/-/less-3.9.0.tgz",
@ -1491,12 +1408,6 @@
} }
} }
}, },
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
"dev": true
},
"loose-envify": { "loose-envify": {
"version": "1.3.1", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
@ -1789,12 +1700,6 @@
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
}, },
"progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
},
"progress-stream": { "progress-stream": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz",
@ -1828,12 +1733,6 @@
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
"integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk="
}, },
"proxy-from-env": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=",
"dev": true
},
"prr": { "prr": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
@ -1851,45 +1750,6 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
}, },
"puppeteer": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.11.0.tgz",
"integrity": "sha512-iG4iMOHixc2EpzqRV+pv7o3GgmU2dNYEMkvKwSaQO/vMZURakwSOn/EYJ6OIRFYOque1qorzIBvrytPIQB3YzQ==",
"dev": true,
"requires": {
"debug": "^4.1.0",
"extract-zip": "^1.6.6",
"https-proxy-agent": "^2.2.1",
"mime": "^2.0.3",
"progress": "^2.0.1",
"proxy-from-env": "^1.0.0",
"rimraf": "^2.6.1",
"ws": "^6.1.0"
},
"dependencies": {
"debug": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz",
"integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
},
"mime": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
"integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==",
"dev": true
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
}
}
},
"qs": { "qs": {
"version": "6.5.2", "version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
@ -2360,12 +2220,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
}, },
"uuid": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
"dev": true
},
"v8-compile-cache": { "v8-compile-cache": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz",
@ -2522,15 +2376,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"ws": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.2.tgz",
"integrity": "sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw==",
"dev": true,
"requires": {
"async-limiter": "~1.0.0"
}
},
"xtend": { "xtend": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",