Exemplo n.º 1
0
        /// <exception cref = "IOException">Project root is not empty</exception>
        public void CreateProject()
        {
            if (Directory.Exists(projectRoot))
            {
                if (Directory.GetFileSystemEntries(projectRoot).Length > 0)
                {
                    throw new IOException(Localization.Get(StringId.E_DirectoryXIsNotEmpty, projectRoot));
                }
            }

            Directory.CreateDirectory(versionsPath);
            Directory.CreateDirectory(outputPath);
            Directory.CreateDirectory(utilitiesPath);
            Directory.CreateDirectory(selfPatcherPath);

            ProjectInfo projectInfo = new ProjectInfo();

            projectInfo.IgnoredPaths.Add("*" + PatchParameters.LOG_FILE_NAME);
            PatchUtils.SerializeProjectInfoToXML(projectInfo, projectInfoPath);

            File.WriteAllText(downloadLinksPath, "PASTE DOWNLOAD LINKS OF THE PATCH FILES HERE");

            Result = PatchResult.Success;
        }
Exemplo n.º 2
0
 public void SaveProjectInfo(ProjectInfo projectInfo)
 {
     PatchUtils.SerializeProjectInfoToXML(projectInfo, projectInfoPath);
 }