Browse Source

upstream merge fix

all-modes
pbca26 8 years ago
parent
commit
4824fce5c5
  1. 8
      .gitignore
  2. 3
      .gitmodules
  3. 10
      README.md
  4. BIN
      assets/bin/osx/iguana
  5. BIN
      assets/bin/osx/komodo-cli
  6. BIN
      assets/bin/osx/komodod
  7. BIN
      assets/bin/win64/iguana.exe
  8. BIN
      assets/bin/win64/libcrypto-1_1.dll
  9. BIN
      assets/bin/win64/libcurl-4.dll
  10. BIN
      assets/bin/win64/libcurl.dll
  11. BIN
      assets/bin/win64/libgcc_s_sjlj-1.dll
  12. BIN
      assets/bin/win64/libnanomsg.dll
  13. BIN
      assets/bin/win64/libssl-1_1.dll
  14. BIN
      assets/bin/win64/libwinpthread-1.dll
  15. 0
      assets/bin/win64/nanomsg.dll
  16. 0
      assets/bin/win64/pthreadvc2.dll
  17. 14
      check_submodule.sh
  18. 1
      gui/EasyDEX-GUI
  19. 36
      pull-gui.sh
  20. 80
      routes/shepherd.js

8
.gitignore

@ -47,11 +47,5 @@ genesis
DB
coins
# Ignore all EasyDEX-GUI subfolder files, except README
EasyDEX-GUI
Iguana-GUI
#EasyDEX-GUI/*
#!EasyDEX-GUI/README
# Electron-builder related folders
build
build

3
.gitmodules

@ -0,0 +1,3 @@
[submodule "gui/EasyDEX-GUI"]
path = gui/EasyDEX-GUI
url = https://github.com/SuperNETorg/EasyDEX-GUI.git

10
README.md

@ -4,15 +4,9 @@ Desktop App for SuperNET DAPPs
#### For Developers
You must have `node.js` and `npm` installed on your machine.
Clone Iguana Desktop App
Clone Iguana Desktop App with EasyDEX-GUI submodule
```shell
git clone https://github.com/SuperNETorg/iguana.git
```
Please clone EasyDEX-GUI from github repo here.
```shell
cd gui
git clone https://github.com/SuperNETorg/EasyDEX-GUI.git
git clone --recursive https://github.com/SuperNETorg/iguana.git
```
Install Iguana App

BIN
assets/bin/osx/iguana

Binary file not shown.

BIN
assets/bin/osx/komodo-cli

Binary file not shown.

BIN
assets/bin/osx/komodod

Binary file not shown.

BIN
assets/bin/win64/iguana.exe

Binary file not shown.

BIN
assets/bin/win64/libcrypto-1_1.dll

Binary file not shown.

BIN
assets/bin/win64/libcurl-4.dll

Binary file not shown.

BIN
assets/bin/win64/libcurl.dll

Binary file not shown.

BIN
assets/bin/win64/libgcc_s_sjlj-1.dll

Binary file not shown.

BIN
assets/bin/win64/libnanomsg.dll

Binary file not shown.

BIN
assets/bin/win64/libssl-1_1.dll

Binary file not shown.

BIN
assets/bin/win64/libwinpthread-1.dll

Binary file not shown.

0
assets/bin/win64/nanomsg.dll

0
assets/bin/win64/pthreadvc2.dll

14
check_submodule.sh

@ -0,0 +1,14 @@
#!/bin/bash
### Script will check EasyDEX-GUI submodule in gui folder.
### If you used git clone without --recursive option this is way to go.
PWD=`pwd`
SIZE=`du -sk gui/EasyDEX-GUI`
echo "Checking EasyDEX-GUI folder."
cd gui/EasyDEX-GUI && \
git submodule update --init --recursive && \
cd ../.. && \
echo "Folder looks fine." || \
echo "Some problem with cloning submodule EasyDEX-GUI."
echo

1
gui/EasyDEX-GUI

@ -0,0 +1 @@
Subproject commit 597a06dd1376289aedeaf622ba1dd571e07088c6

36
pull-gui.sh

@ -1,36 +0,0 @@
#!/usr/bin/env bash
if [ -d "tmp" ]; then
cd tmp
else
mkdir tmp
cd tmp
fi
if [ -d "EasyDEX-GUI" ]; then
cd EasyDEX-GUI
git pull
cd ../
else
git clone https://github.com/SuperNETorg/EasyDEX-GUI.git
fi
#if [ -d "Iguana-application" ]; then
# cd Iguana-application
# git checkout 0.3.1
# git pull
#else
# git clone https://github.com/SuperNETorg/Iguana-application.git -b 0.3.1
# cd Iguana-application
#fi
#bower install
#npm install
#gulp electron
cd ../../
rm "gui/EasyDEX-GUI" -rf
#rm "gui/Iguana-GUI" -rf
#cp -rf "tmp/Iguana-application/compiled/prod" "gui/Iguana-GUI"
cp -rf "tmp/EasyDEX-GUI" "gui/EasyDEX-GUI"

80
routes/shepherd.js

@ -10,6 +10,7 @@ const electron = require('electron'),
mkdirp = require('mkdirp'),
express = require('express'),
exec = require('child_process').exec,
spawn = require('child_process').spawn,
md5 = require('md5'),
pm2 = require('pm2'),
request = require('request'),
@ -1162,7 +1163,13 @@ shepherd.post('/setconf', function(req, res) {
console.log(req.body);
//console.log(req.body.chain);
setConf(req.body.chain);
if (os.platform() === 'win32' && req.body.chain == 'komodod') {
setkomodoconf = spawn(path.join(__dirname, '../assets/bin/win64/genkmdconf.bat'));
} else {
setConf(req.body.chain);
}
var obj = {
'msg': 'success',
'result': 'result'
@ -1280,7 +1287,7 @@ shepherd.get('/kick', function(req, res, next) {
{
'name': 'tmp/[coin]',
'type': 'folder'
}
}
]
};
@ -1293,13 +1300,13 @@ shepherd.get('/kick', function(req, res, next) {
'result': 'kickstart: brutal is executed'
};
res.end(JSON.stringify(successObj));
res.end(JSON.stringify(successObj));
}
}
}
if (fs.existsSync(iguanaDir + '/config.json')) {
}
}
});
shepherd.loadLocalConfig = function() {
@ -1619,12 +1626,21 @@ function setConf(flock) {
switch (flock) {
case 'komodod':
var DaemonConfPath = komodoDir + '/komodo.conf';
if (os.platform() === 'win32') {
DaemonConfPath = path.normalize(DaemonConfPath);
}
break;
case 'zcashd':
var DaemonConfPath = ZcashDir + '/zcash.conf';
if (os.platform() === 'win32') {
DaemonConfPath = path.normalize(DaemonConfPath);
}
break;
default:
var DaemonConfPath = komodoDir + '/' + flock + '/' + flock + '.conf';
if (os.platform() === 'win32') {
DaemonConfPath = path.normalize(DaemonConfPath);
}
}
console.log(DaemonConfPath);
@ -1824,26 +1840,42 @@ function getConf(flock) {
console.log(flock);
if (os.platform() === 'darwin') {
komodoDir = process.env.HOME + '/Library/Application Support/Komodo',
ZcashDir = process.env.HOME + '/Library/Application Support/Zcash';
}
if (os.platform() === 'darwin') {
komodoDir = process.env.HOME + '/Library/Application Support/Komodo';
ZcashDir = process.env.HOME + '/Library/Application Support/Zcash';
}
if (os.platform() === 'linux') {
komodoDir = process.env.HOME + '/.komodo',
ZcashDir = process.env.HOME + '/.zcash';
}
if (os.platform() === 'linux') {
komodoDir = process.env.HOME + '/.komodo';
ZcashDir = process.env.HOME + '/.zcash';
}
switch (flock) {
case 'komodod':
DaemonConfPath = komodoDir;
break;
case 'zcashd':
DaemonConfPath = ZcashDir;
break;
default:
DaemonConfPath = komodoDir + '/' + flock;
}
if (os.platform() === 'win32') {
komodoDir = process.env.APPDATA + '/Komodo';
ZcashDir = process.env.APPDATA + '/Zcash';
}
switch (flock) {
case 'komodod':
DaemonConfPath = komodoDir;
if (os.platform() === 'win32') {
DaemonConfPath = path.normalize(DaemonConfPath);
console.log('===>>> SHEPHERD API OUTPUT ===>>>');
console.log(DaemonConfPath);
}
break;
case 'zcashd':
DaemonConfPath = ZcashDir;
if (os.platform() === 'win32') {
DaemonConfPath = path.normalize(DaemonConfPath);
}
break;
default:
DaemonConfPath = komodoDir + '/' + flock;
if (os.platform() === 'win32') {
DaemonConfPath = path.normalize(DaemonConfPath);
}
}
console.log(DaemonConfPath);
return DaemonConfPath;
@ -1852,7 +1884,7 @@ function getConf(flock) {
function formatBytes(bytes, decimals) {
if (bytes == 0)
return '0 Bytes';
var k = 1000,
dm = decimals + 1 || 3,
sizes = [
@ -1867,7 +1899,7 @@ function formatBytes(bytes, decimals) {
'YB'
],
i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}

Loading…
Cancel
Save