diff --git a/Scripts/Packager/build-linux-x64.sh b/Scripts/Packager/build-linux-x64.sh index efe7e98b..8140cb02 100755 --- a/Scripts/Packager/build-linux-x64.sh +++ b/Scripts/Packager/build-linux-x64.sh @@ -33,13 +33,13 @@ echo $log_prefix FINISHED restoring dotnet and npm packages # dotnet publish echo $log_prefix running 'dotnet publish' -cd $build_directory/xds/src/daemon -sudo dotnet clean -sudo dotnet restore +cd $build_directory/xds/src/Xds +#sudo dotnet clean +#sudo dotnet restore sudo dotnet publish -c $configuration -r $os_platform-$arch -v m -o $build_directory/StratisCore.UI/daemon echo $log_prefix chmoding the xds file -sudo chmod +x $build_directory/StratisCore.UI/daemon/Daemon* +sudo chmod +x $build_directory/StratisCore.UI/daemon/blockcore* # node Build cd $build_directory/StratisCore.UI diff --git a/Scripts/Packager/build-win-x64.sh b/Scripts/Packager/build-win-x64.sh index 0a8371a4..7bcd4ae2 100755 --- a/Scripts/Packager/build-win-x64.sh +++ b/Scripts/Packager/build-win-x64.sh @@ -35,9 +35,9 @@ echo $log_prefix FINISHED restoring dotnet and npm packages # dotnet publish echo $log_prefix running 'dotnet publish' -cd $build_directory/xds/src/daemon -dotnet clean -dotnet restore +cd $build_directory/xds/src/Xds +#dotnet clean +#dotnet restore dotnet publish -c $configuration -r $os_platform-$arch -v m -o $build_directory/StratisCore.UI/daemon # node Build diff --git a/StratisCore.UI/main.ts b/StratisCore.UI/main.ts index d9b59d1a..f8a284ef 100644 --- a/StratisCore.UI/main.ts +++ b/StratisCore.UI/main.ts @@ -107,7 +107,7 @@ app.on('ready', () => { if (sidechain && !nodaemon) { startDaemon("Stratis.SidechainD"); } else if (!nodaemon) { - startDaemon("Daemon") + startDaemon("blockcore.xdsd") } } createTray(); @@ -144,27 +144,51 @@ app.on('activate', () => { } }); +// function shutdownDaemon(portNumber) { +// var http = require('http'); +// var data = 'true'; +// var body = JSON.stringify(data); + +// var request = new http.ClientRequest({ +// method: 'POST', +// hostname: 'localhost', +// port: portNumber, +// path: '/api/node/shutdown', +// headers: { +// "Content-Type": "application/json", +// "Content-Length": Buffer.byteLength(body) +// } +// }) + +// request.write('true'); +// request.on('error', function (e) { }); +// request.on('timeout', function (e) { request.abort(); }); +// request.on('uncaughtException', function (e) { request.abort(); }); + +// request.end(body); +// }; + function shutdownDaemon(portNumber) { var http = require('http'); - var body = JSON.stringify({}); - - var request = new http.ClientRequest({ - method: 'POST', - hostname: 'localhost', - port: portNumber, - path: '/api/node/shutdown', - headers: { - "Content-Type": "application/json", - "Content-Length": Buffer.byteLength(body) - } - }) - - request.write('true'); - request.on('error', function (e) { }); - request.on('timeout', function (e) { request.abort(); }); - request.on('uncaughtException', function (e) { request.abort(); }); - - request.end(body); + var options = { + hostname: 'localhost', + port: portNumber, + path: '/api/node/shutdown', + method: 'POST' + }; + var req = http.request(options); + req.on('response', function (res) { + if (res.statusCode === 200) { + console.log('Request to shutdown node daemon returned HTTP success code.'); + } + else { + console.log('Request to shutdown node daemon returned HTTP failure code: ' + res.statusCode); + } + }); + req.on('error', function (err) { }); + req.setHeader('content-type', 'application/json-patch+json'); + req.write('true'); + req.end(); }; function startDaemon(daemonName) { diff --git a/StratisCore.UI/package.json b/StratisCore.UI/package.json index 1f448464..d520f2d0 100644 --- a/StratisCore.UI/package.json +++ b/StratisCore.UI/package.json @@ -1,7 +1,7 @@ { "name": "XDS-core", "description": "XDS Core Wallet", - "version": "1.0.4", + "version": "1.0.6", "author": { "name": "XDS Platform", "email": "anon@XDS.com" @@ -85,7 +85,7 @@ "core-js": "2.6.5", "electron": "4.1.1", "electron-builder": "20.39.0", - "electron-builder-squirrel-windows": "^22.3.3", + "electron-builder-squirrel-windows": "^22.4.1", "electron-reload": "1.4.0", "electron-winstaller": "^4.0.0", "http-server": "^0.11.1", diff --git a/X42-FullNode b/X42-FullNode new file mode 160000 index 00000000..a9b338f2 --- /dev/null +++ b/X42-FullNode @@ -0,0 +1 @@ +Subproject commit a9b338f23b1cb1dea1d635e428f99df649e0a005