public ReturnCode Run()
        {
            string originDirectory      = m_ModificationParameters.BlueprintsPath;
            string destinationDirectory = m_BuildParameters.GetOutputFilePathForIdentifier(BuilderConsts.OutputBlueprints);

            BuilderUtils.CopyFilesWithFoldersStructure(
                originDirectory, destinationDirectory, i => i.EndsWith(".jbp") || i.EndsWith(".patch"));

            return(ReturnCode.Success);
        }
Exemple #2
0
        public ReturnCode Run()
        {
            string[] localeFiles = Enum.GetNames(typeof(Locale)).Select(i => i + ".json").ToArray();

            string originDirectory      = m_ModificationParameters.LocalizationPath;
            string destinationDirectory = m_BuildParameters.GetOutputFilePathForIdentifier(BuilderConsts.OutputLocalization);

            BuilderUtils.CopyFilesWithFoldersStructure(
                originDirectory, destinationDirectory, i =>
            {
                string filename = Path.GetFileName(i);
                return(localeFiles.Contains(filename));
            });

            return(ReturnCode.Success);
        }
		public ReturnCode Run()
		{
			string intermediateFolderPath = m_BuildParameters.GetOutputFilePathForIdentifier("");
			string buildFolderPath = Path.Combine(intermediateFolderPath, "..");
			string targetFolderPath = Path.Combine(buildFolderPath, m_ModificationParameters.TargetFolderName); 
			
			string intermediateAssembliesFolderPath = m_BuildParameters.GetOutputFilePathForIdentifier(BuilderConsts.OutputAssemblies);
			string intermediateBundlesFolderPath = m_BuildParameters.GetOutputFilePathForIdentifier(BuilderConsts.OutputBundles);
			string intermediateBlueprintsFolderPath = m_BuildParameters.GetOutputFilePathForIdentifier(BuilderConsts.OutputBlueprints);
			string intermediateLocalizationFolderPath = m_BuildParameters.GetOutputFilePathForIdentifier(BuilderConsts.OutputLocalization);
			
			string targetAssembliesFolderPath = Path.Combine(targetFolderPath, BuilderConsts.OutputAssemblies);
			string targetBundlesFolderPath = Path.Combine(targetFolderPath, BuilderConsts.OutputBundles);
			string targetBlueprintsFolderPath = Path.Combine(targetFolderPath, BuilderConsts.OutputBlueprints);
			string targetLocalizationFolderPath = Path.Combine(targetFolderPath, BuilderConsts.OutputLocalization);

			BuilderUtils.CopyFilesWithFoldersStructure(
				intermediateAssembliesFolderPath, targetAssembliesFolderPath, i => i.EndsWith(".dll"));

			BuilderUtils.CopyFilesWithFoldersStructure(
				intermediateBundlesFolderPath, targetBundlesFolderPath);

			BuilderUtils.CopyFilesWithFoldersStructure(
				intermediateBlueprintsFolderPath, targetBlueprintsFolderPath);

			BuilderUtils.CopyFilesWithFoldersStructure(
				intermediateLocalizationFolderPath, targetLocalizationFolderPath);
			
			File.Copy(
				Path.Combine(intermediateFolderPath, Kingmaker.Modding.OwlcatModification.ManifestFileName),
				Path.Combine(targetFolderPath, Kingmaker.Modding.OwlcatModification.ManifestFileName));
			
			File.Copy(
				Path.Combine(intermediateFolderPath, Kingmaker.Modding.OwlcatModification.SettingsFileName),
				Path.Combine(targetFolderPath, Kingmaker.Modding.OwlcatModification.SettingsFileName));

			return ReturnCode.Success;
		}