public override void Sync2ToolsProjectDir()
    {
        string bytesDataPath = EditorConfig.ToolsProjectDirRoot + "/Resources/ConfigData/";
        string genCodePath   = EditorConfig.ToolsProjectDirRoot + "/Scripts/GenerateCodes/";

        EditorConfig.CopyDir(CreatedFilePath, bytesDataPath);
        EditorConfig.CopyDir(CreatedCsFilePath, genCodePath);
    }
 //[MenuItem("武当剑工具/资源打包/拷贝/ Assetbundle 到开发环境(程序编程环境)", false, 3)]
 public static void CopyABResourceToDevEnvirment()
 {
     foreach (string folder in EditorConfig.FolderNames)
     {
         string DestPath = EditorConfig.DevProjectDirRoot + "/StreamingAssets/" + EditorConfig.GetoutputPath(bFolderOnly: true) + "/" + folder + "/";
         string ResPath  = EditorConfig.ABExportPath + EditorConfig.GetoutputPath(bFolderOnly: true) + "/" + folder;
         EditorConfig.CopyDir(ResPath, DestPath);
     }
     CopyManifestToDevEnvirment();
 }
    void ExecPartialFiles(List <BaseWindowListData> partialDataList)
    {
        string tempExcelDir = ProtoBuildTool.tempExcelDir;

        //拷贝文件到临时目录
        if (Directory.Exists(tempExcelDir))
        {
            //清空目录下的excel文件
            DirectoryInfo directoryInfo = new DirectoryInfo(tempExcelDir);
            foreach (var fileInfo in directoryInfo.GetFiles())
            {
                string name = fileInfo.Name;
                if (name.EndsWith(".xls") || name.EndsWith(".xlsx"))
                {
                    File.Delete(fileInfo.FullName);
                }
            }
        }
        else
        {
            Directory.CreateDirectory(tempExcelDir);
        }
        int fileCount = 0;

        foreach (var selectFile in partialDataList)
        {
            string srcFilePath  = OriginFilePath + "/" + selectFile.name;
            string destFilePath = tempExcelDir + "/" + selectFile.name;
            if (File.Exists(srcFilePath))
            {
                ++fileCount;
                File.Copy(srcFilePath, destFilePath, true);
            }
        }
        if (0 == fileCount)
        {
            ProtoBuildTool.ShowDialog("没有任何文件被选中!");
            return;
        }
        ProtoBuildTool.ExcuteModule(false, isNeedSyncCsv2Server);

        //同步
        if (isNeedSyncCsv2Server)
        {
            string exprotCsvPath = toolsPath + "/python_protoc/csv/";
            //DirectoryInfo info = new DirectoryInfo(ProtoBuildTool.serverCsvDataDir);
            EditorConfig.CopyDir(exprotCsvPath, ProtoBuildTool.serverCsvDataDir.Replace("/", "\\"));
        }
    }
示例#4
0
    public static void CopyToDevEnv()
    {
        LoadPref();
        if (configLevel == 0)
        {
            if (ShowDialog("你还没有进行过任何设置,请至少使用默认配置"))
            {
                OpenConfigWindow();
            }
        }

        if (null == mSettingData)
        {
            LoadConfig();
        }

        string bytesDataPath = EditorConfig.DevProjectDirRoot + "/Resources/ConfigData/";
        string genCodePath   = EditorConfig.DevProjectDirRoot + "/Scripts/GenerateCodes/";

        EditorConfig.CopyDir(mSettingData.bytesPath, bytesDataPath);
        EditorConfig.CopyDir(mSettingData.csPath, genCodePath);
    }