فهرست منبع

rsync终于算是正常了,可以同步文件到linux服务器,以后可以在linux编译运行了

tanghai 9 سال پیش
والد
کامیت
e52abc987c

+ 5 - 5
Server/App/Start.txt

@@ -1,5 +1,5 @@
-{ "_t" : "StartConfig", "Options" : { "_id" : 1, "AppType" : "Manager" }, "IP" : "192.168.12.112", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10000 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10001 }] } }
-{ "_t" : "StartConfig", "Options" : { "_id" : 2, "AppType" : "Realm" }, "IP" : "192.168.12.112", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10002 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10003 }] } }
-{ "_t" : "StartConfig", "Options" : { "_id" : 3, "AppType" : "Gate" }, "IP" : "192.168.12.112", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10004 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10005 }] } }
-{ "_t" : "StartConfig", "Options" : { "_id" : 4, "AppType" : "Gate" }, "IP" : "192.168.12.112", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10006 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10007 }] } }
-{ "_t" : "StartConfig", "Options" : { "_id" : 5, "AppType" : "Gate" }, "IP" : "192.168.12.112", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10008 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10009 }] } }
+{ "_t" : "StartConfig", "Options" : { "_id" : 1, "AppType" : "Manager" }, "IP" : "*", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10000 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10001 }] } }
+{ "_t" : "StartConfig", "Options" : { "_id" : 2, "AppType" : "Realm" }, "IP" : "*", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10002 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10003 }] } }
+{ "_t" : "StartConfig", "Options" : { "_id" : 3, "AppType" : "Gate" }, "IP" : "*", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10004 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10005 }] } }
+{ "_t" : "StartConfig", "Options" : { "_id" : 4, "AppType" : "Gate" }, "IP" : "*", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10006 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10007 }] } }
+{ "_t" : "StartConfig", "Options" : { "_id" : 5, "AppType" : "Gate" }, "IP" : "*", "Config" : { "_id" : NumberLong("9223372036854775804"), "Type" : "StartConfig", "components" : [{ "_t" : "InnerConfig", "_id" : NumberLong("9223372036854775803"), "Host" : "127.0.0.1", "Port" : 10008 }, { "_t" : "OuterConfig", "_id" : NumberLong("9223372036854775802"), "Host" : "127.0.0.1", "Port" : 10009 }] } }

+ 10 - 3
Server/Model/Component/AppManagerComponent.cs

@@ -25,7 +25,7 @@ namespace Model
 			StartConfig[] startConfigs = Game.Scene.GetComponent<StartConfigComponent>().GetAll();
 			foreach (StartConfig startConfig in startConfigs)
 			{
-				if (!ips.Contains(startConfig.IP))
+				if (!ips.Contains(startConfig.IP) && startConfig.IP != "*")
 				{
 					continue;
 				}
@@ -35,13 +35,20 @@ namespace Model
 					continue;
 				}
 
-				string arguments = $"--id={startConfig.Options.Id} --appType={startConfig.Options.AppType}";
 
-				ProcessStartInfo info = new ProcessStartInfo(@"App.exe", arguments)
+#if __MonoCS__
+				const string exe = @"mono";
+				string arguments = $"App.exe --id={startConfig.Options.Id} --appType={startConfig.Options.AppType}";
+#else
+				const string exe = @"App.exe";
+				string arguments = $"--id={startConfig.Options.Id} --appType={startConfig.Options.AppType}";
+#endif
+				ProcessStartInfo info = new ProcessStartInfo(exe, arguments)
 				{
 					UseShellExecute = true,
 					WorkingDirectory = @"..\Server\Bin\Debug"
 				};
+
 				Process process = Process.Start(info);
 				this.processes.Add(process.Id, process);
 			}

+ 1 - 1
Tools/cwRsync/Rsync.txt

@@ -1,2 +1,2 @@
 SET HOME=%HOMEDRIVE%%HOMEPATH%
-rsync.exe -vzrtopg --progress --password-file=./rsync.secrets --exclude-from=exclude.txt ../.. tanghai@192.168.1.134::Source/Egametang
+.\Tools\cwRsync\rsync.exe -vzrtopg --password-file=./Tools/cwRsync/rsync.secrets --exclude-from=./Tools/cwRsync/exclude.txt --delete ./ tanghai@192.168.1.134::Tanghai/Source/Egametang --chmod=ugo=rwX

+ 10 - 1
Tools/cwRsync/exclude.txt

@@ -1 +1,10 @@
-../../.git
+.git/
+Log/
+Tools/
+Server/Bin/
+Server/packages/
+Server/Temp/
+Server/Server.sdf
+Unity/Library/
+Unity/Temp/
+*/obj

+ 0 - 1
Unity/Assets/Editor/ServerCommandLineEditor/ServerCommandLineEditor.cs

@@ -23,7 +23,6 @@ namespace MyEditor
 		[MenuItem("Tools/服务端命令行配置")]
 		private static void ShowWindow()
 		{
-			
 			GetWindow(typeof(ServerCommandLineEditor));
 		}