45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
|
using System;
|
|||
|
using System.IO;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEditor;
|
|||
|
using GameEditor.Util;
|
|||
|
public class ClientConfigManager
|
|||
|
{
|
|||
|
|
|||
|
private static ClientConfigManager _instance;
|
|||
|
public static ClientConfigManager Instance
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
if (_instance == null)
|
|||
|
{
|
|||
|
if (_instance == null)
|
|||
|
{
|
|||
|
_instance = new ClientConfigManager();
|
|||
|
}
|
|||
|
}
|
|||
|
return _instance;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private string svnPath = "svn://60.1.1.230/jieling/ClientConfig";
|
|||
|
private string localPath = Application.dataPath + "/../ClientConfig";
|
|||
|
|
|||
|
public void SVN_Update()
|
|||
|
{
|
|||
|
if (!Directory.Exists(localPath))
|
|||
|
{
|
|||
|
Directory.CreateDirectory(localPath);
|
|||
|
ProcessUtil.ProcessCommand(Application.dataPath, "svn checkout " + svnPath + " "+ localPath);
|
|||
|
}
|
|||
|
ProcessUtil.ProcessCommand(localPath, "svn update");
|
|||
|
}
|
|||
|
|
|||
|
public string[] GetVersionList()
|
|||
|
{
|
|||
|
string versionPath = localPath + "/Version";
|
|||
|
string[] list = Directory.GetDirectories(versionPath);
|
|||
|
Debug.LogError(list.Length);
|
|||
|
return list;
|
|||
|
}
|
|||
|
}
|