示例#1
0
        public static string GetLocalClientLuaPath(string excelPath)
        {
            string clientLuaPath = ExcelParserFileHelper.GetTempLuaPath(excelPath, false);

            clientLuaPath = clientLuaPath.Replace("/tmp/", LuaLocalPath.Substring(2));
            return(clientLuaPath);
        }
示例#2
0
        public static string GetBranchClientLuaPath(string excelPath, int branchId)
        {
            string clientLuaPath = ExcelParserFileHelper.GetTempLuaPath(excelPath, false);

            clientLuaPath = clientLuaPath.Replace("/tmp/", LuaTablePaths[branchId].Substring(2));
            return(clientLuaPath);
        }
示例#3
0
    private void MatchExcelFile(string path, string relativeDir, string fileNameContainExt)
    {
        string excelmd5 = ExcelParserFileHelper.GetMD5HashFromFile(path);
        string tarPath  = ExcelParserFileHelper.GetTargetLuaPath(path, true);
        string tempPath = ExcelParserFileHelper.GetTempLuaPath(path, true);

        //#region 生成一份服务器的配置
        //if (!ExcelParserFileHelper.IsSameFileMD5(tarPath, excelmd5))
        //{
        //    Excel excel = Excel.Parse(latestExlPath, true);
        //    if (excel != null && excel.success)
        //        GenServerVersion(excel, tempPath, excelmd5);
        //}
        //#endregion
        #region 客户端的Excel生成一份客户端的配置
        if (path.IndexOf("serverexcel") < 0)
        {
            //tarPath = ExcelParserFileHelper.GetTargetLuaPath(path, false);
            //if (aimPath == null)
            //{
            //    tempPath = ExcelParserFileHelper.GetTempLuaPath(path, false);
            //}
            //else
            //{
            //    //这里暂时这么处理
            //    tempPath = aimPath;
            //}
            //if (!ExcelParserFileHelper.IsSameFileMD5(tempPath, excelmd5))
            //{
            //    Excel excel = Excel.Parse(latestExlPath, false);
            //    if (excel != null && excel.success)
            //        GenClientVersion(excel, tempPath, excelmd5);
            //}
            Excel excel = Excel.Parse(path, false);
            if (excel != null && excel.success)
            {
                GenClientVersion(excel, tempPath, excelmd5);
            }
            if (NeedAutoImport(path))
            {
                _NeedImportClient.Add(Path.GetFileNameWithoutExtension(tempPath));
            }
        }
        if (NeedAutoImport(path))
        {
            _NeedImportServer.Add(Path.GetFileNameWithoutExtension(tempPath));
        }
        #endregion
    }
示例#4
0
    static void WriteTableImportFile(string contents, bool isServer = true)
    {
        string path = ExcelParserFileHelper.GetTempLuaPath(_TableImportPath, isServer);

        FileUtil.WriteTextFile(contents, path);
    }