From 44f1d1bd797028906219fe1889a041ea40303c84 Mon Sep 17 00:00:00 2001
From: Li
Date: Tue, 4 Oct 2022 15:34:09 +1300
Subject: [PATCH] MacOS port
---
HorseIsleServer/MPN00BS/ServerStarter.cs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/HorseIsleServer/MPN00BS/ServerStarter.cs b/HorseIsleServer/MPN00BS/ServerStarter.cs
index 67126b9..a79fe1e 100755
--- a/HorseIsleServer/MPN00BS/ServerStarter.cs
+++ b/HorseIsleServer/MPN00BS/ServerStarter.cs
@@ -78,9 +78,7 @@ namespace MPN00BS
clientProcess.StartInfo.FileName = executable;
-#if OS_LINUX
- clientProcess.StartInfo.Arguments = "http://"+cs.ipaddr+":"+cs.portnum+"/horseisle_mapfix.swf?SERVER=" + serverIp + "&PORT=" + serverPort.ToString();
-#elif OS_MACOS
+#if defined(OS_LINUX) || defined(OS_MACOS)
clientProcess.StartInfo.Arguments = "http://"+cs.ipaddr+":"+cs.portnum+"/horseisle_mapfix.swf?SERVER=" + serverIp + "&PORT=" + serverPort.ToString();
#else
clientProcess.StartInfo.Arguments = "http://"+cs.ipaddr+":"+cs.portnum+"/horseisle.swf?SERVER=" + serverIp + "&PORT=" + serverPort.ToString();
@@ -224,7 +222,7 @@ namespace MPN00BS
BaseDir = Path.Combine(hispFolder, "HISP", "N00BS");
Directory.CreateDirectory(BaseDir);
-#elif OS_LINUX
+#elif defined(OS_LINUX) || defined(OS_MACOS)
string hispFolder = Environment.GetEnvironmentVariable("HOME");
if (hispFolder == null)
return;
@@ -239,7 +237,7 @@ namespace MPN00BS
try
{
-#if OS_LINUX
+#if defined(OS_LINUX) || defined(OS_MACOS)
cs = new ContentServer("127.0.0.1", 12322);
#else
cs = new ContentServer("127.0.0.1", 80);