(...)
Configuração: Criar um arquivo JSON na pasta do executavel com o nome "config.json"
(...)
Ele procurava o arquivo em "C:\bot". Fiz um "patch" pra procurar em "./bot" pra funcionar no mac (deve funcionar no linux tambem).
Depois é só compilar com "msbuild RobotArbitrage.sln".
diff --git a/Logger.cs b/Logger.cs
index 656be2d..abf39ad 100644
--- a/Logger.cs
+++ b/Logger.cs
@@ -20,7 +20,7 @@ public class Logger
Console.WriteLine(value);
lock (objLock)
{
- System.IO.StreamWriter w = new StreamWriter(@"C:\bot\" + prefix + "logger.txt", true);
+ System.IO.StreamWriter w = new StreamWriter(@"./bot/" + prefix + "logger.txt", true);
w.WriteLine(value);
w.Close();
w.Dispose();
@@ -33,7 +33,7 @@ public class Logger
Console.WriteLine(value);
lock (objLock)
{
- System.IO.StreamWriter w = new StreamWriter(@"C:\bot\" + prefix + "trade.txt", true);
+ System.IO.StreamWriter w = new StreamWriter(@"./bot/" + prefix + "trade.txt", true);
w.WriteLine(value);
w.Close();
w.Dispose();
@@ -60,7 +60,7 @@ public class Logger
Console.WriteLine(value);
lock (objLock)
{
- System.IO.StreamWriter w = new StreamWriter(@"C:\bot\" + prefix + "triangle.txt", true);
+ System.IO.StreamWriter w = new StreamWriter(@"./bot/" + prefix + "triangle.txt", true);
w.WriteLine(value);
w.Close();
w.Dispose();
@@ -76,7 +76,7 @@ public class Logger
Console.WriteLine(value);
lock (objLock)
{
- System.IO.StreamWriter w = new StreamWriter(@"C:\bot\high.txt", true);
+ System.IO.StreamWriter w = new StreamWriter(@"./bot/high.txt", true);
w.WriteLine(value);
w.Close();
w.Dispose();
diff --git a/Program.cs b/Program.cs
index 4650fae..af1d249 100644
--- a/Program.cs
+++ b/Program.cs
@@ -768,7 +768,7 @@ class Program
static void config()
{
- String configJson = System.IO.File.ReadAllText(@"C:\bot\config.json");
+ String configJson = System.IO.File.ReadAllText(@"./bot/config.json");
Newtonsoft.Json.Linq.JContainer jContainer = (Newtonsoft.Json.Linq.JContainer)JsonConvert.DeserializeObject(configJson);
Key.key = jContainer["key"].ToString();