提交 c217daa9 编写于 作者: T tanghai

1.unity增加同步到Linux功能

2.服务器增加Start脚本
上级 f2db1768
......@@ -39,14 +39,20 @@ namespace Model
#if __MonoCS__
const string exe = @"mono";
string arguments = $"App.exe --id={startConfig.Options.Id} --appType={startConfig.Options.AppType}";
const string workDir = @"../Server/Bin/Debug";
#else
const string exe = @"App.exe";
string arguments = $"--id={startConfig.Options.Id} --appType={startConfig.Options.AppType}";
const string workDir = @"..\Server\Bin\Debug";
#endif
ProcessStartInfo info = new ProcessStartInfo(exe, arguments)
Log.Debug($"{startConfig.Options.Id} {MongoHelper.ToJson(startConfig)}");
ProcessStartInfo info = new ProcessStartInfo
{
FileName = exe,
Arguments = arguments,
CreateNoWindow = true,
UseShellExecute = true,
WorkingDirectory = @"..\Server\Bin\Debug"
WorkingDirectory = workDir
};
Process process = Process.Start(info);
......
#!/bin/bash
cd Bin/Debug/
pkill App.exe
mono App.exe --id=1 --appType=Manager
\ No newline at end of file
......@@ -3,9 +3,12 @@ gid = root
#strict modes = no
use chroot = no
max connections = 100
[Source]
path = /home/tanghai/Source/
read only = no
write only = no
log file=/var/log/rsyncd.log
# Remote sync configuration module
[Tanghai]
path = /home/tanghai/
auth users = tanghai
secrets file = /etc/rsyncd.secrets
list = yes
\ No newline at end of file
using System;
using System.Diagnostics;
using Base;
using UnityEditor;
namespace MyEditor
{
public class RsyncEditor : EditorWindow
{
[MenuItem("Tools/Rsync")]
[MenuItem("Tools/同步到Linux")]
private static void ShowUnDisposeObjects()
{
Process.Start("../Tools/cwRsync/rsync.exe", "");
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = @"Tools\cwRsync\rsync.exe";
startInfo.Arguments = "-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";
startInfo.UseShellExecute = true;
startInfo.WorkingDirectory = @"..\";
Process p = Process.Start(startInfo);
p.WaitForExit();
Log.Info("同步完成!");
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册