git ssb

1+

mixmix / scuttle-shell



Commit 2400eaf607fa30117e61d2fdb09824dc66eede0a

windows: template fix

andre alves garzia committed on 7/1/2018, 10:14:38 PM
Parent: 70ef62e92b6493d5a2b7193806b674157cabcab0

Files changed

scripts/setup-win.jschanged
scuttleshell.template.jsonchanged
scuttleshell.jsonadded
scripts/setup-win.jsView
@@ -2,10 +2,12 @@
22 var path = require('path')
33 var regedit = require('regedit')
44 var fs = require("fs")
55 var appPath = path.resolve(".\\app.bat")
6 +var appManifestTemplateFile = path.resolve(".\\scuttleshell.template.json")
67 var appManifestFile = path.resolve(".\\scuttleshell.json")
78
9 +
810 function setup() {
911
1012 if (process.platform !== "win32") {
1113 console.log("This script works only on windows, try npm run setup")
@@ -16,14 +18,14 @@
1618 console.log("[ERROR] Application not found at: ", appPath)
1719 return 1
1820 }
1921
20- if (!fs.existsSync(appManifestFile)) {
21- console.log("[ERROR] App manifest not found at: ", appManifestFile)
22 + if (!fs.existsSync(appManifestTemplateFile)) {
23 + console.log("[ERROR] App manifest not found at: ", appManifestTemplateFile)
2224 return 1
2325 }
2426
25- let manifest = JSON.parse(fs.readFileSync(appManifestFile))
27 + let manifest = JSON.parse(fs.readFileSync(appManifestTemplateFile))
2628
2729 let applicationLauncherPath = manifest.path
2830
2931 if (!fs.existsSync(applicationLauncherPath)) {
@@ -39,9 +41,9 @@
3941
4042 var valuesToPut = {
4143 'HKCU\\Software\\Mozilla\\NativeMessagingHosts\\scuttleshell': {
4244 'scuttleshell': {
43- value: appManifestFile,
45 + value: appManifestTemplateFile,
4446 type: 'REG_DEFAULT'
4547 }
4648 }
4749 }
scuttleshell.template.jsonView
@@ -1,12 +1,12 @@
11 {
22 "name": "scuttleshell",
33 "description": "Native app companion to sbot webextensions",
4- "path": "TO BE DETERMINED",
4 + "path": "TBD",
55 "type": "stdio",
66 "allowed_extensions": [
77 "share_on_scuttlebutt@andregarzia.com",
88 "ssb_protocol_handler@andregarzia.com",
99 "sbot_test@andregarzia.com",
1010 "patchfox@andregarzia.com"
1111 ]
12-}
12 +}
scuttleshell.jsonView
@@ -1,0 +1,1 @@
1 +{"name":"scuttleshell","description":"Native app companion to sbot webextensions","path":"C:\\Users\\soapdog\\prog\\ssbc\\scuttle-shell\\app.bat","type":"stdio","allowed_extensions":["share_on_scuttlebutt@andregarzia.com","ssb_protocol_handler@andregarzia.com","sbot_test@andregarzia.com","patchfox@andregarzia.com"]}

Built with git-ssb-web