|
@@ -1,6 +1,7 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.IO;
|
|
|
+using GFGEditor;
|
|
|
using UnityEditor;
|
|
|
using UnityEngine;
|
|
|
|
|
@@ -9,7 +10,7 @@ namespace VEngine.Editor.Builds
|
|
|
public class BuildTask
|
|
|
{
|
|
|
private readonly string[] EXCLUDE_EXTS = new string[] { ".meta" };
|
|
|
- private readonly string[] EXCLUDE_DIRS = new string[] { "Assets/Res/.svn", "Assets/Res/MD5" };
|
|
|
+ private readonly string[] EXCLUDE_DIRS = new string[] { "Assets/Res/.svn", ImportArtResTool.Md5FilePath };
|
|
|
private readonly BuildAssetBundleOptions buildAssetBundleOptions;
|
|
|
private readonly List<Asset> bundledAssets = new List<Asset>();
|
|
|
private readonly string bundleExtension;
|
|
@@ -76,7 +77,7 @@ namespace VEngine.Editor.Builds
|
|
|
|
|
|
public void BuildCustomBundles(string[] resRootDirNames, string setName)
|
|
|
{
|
|
|
- foreach(var resRootDirName in resRootDirNames)
|
|
|
+ foreach (var resRootDirName in resRootDirNames)
|
|
|
{
|
|
|
CreateBundles(resRootDirName, setName);
|
|
|
}
|
|
@@ -107,6 +108,17 @@ namespace VEngine.Editor.Builds
|
|
|
var i = bundle.IndexOf(".");
|
|
|
bundle = bundle.Substring(0, i);
|
|
|
bundle = bundle.ToLower();
|
|
|
+
|
|
|
+
|
|
|
+ for (int j = 0; j < buildSetting.dirTypeList.Count; j++)
|
|
|
+ {
|
|
|
+ string str = buildSetting.dirTypeList[j];
|
|
|
+ if (bundle.IndexOf(str) >= 0)
|
|
|
+ {
|
|
|
+ bundle = str.Substring(0, str.Length - 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
bundledAssets.Add(new Asset
|
|
|
{
|
|
|
path = filePath,
|
|
@@ -118,7 +130,7 @@ namespace VEngine.Editor.Builds
|
|
|
foreach (var dir in dirBundleList)
|
|
|
{
|
|
|
var dirPath = Path.Combine(Environment.CurrentDirectory, dir);
|
|
|
- if(!GFGEditor.FileUtil.CheckPathInParent(dirPath, path))
|
|
|
+ if (!GFGEditor.FileUtil.CheckPathInParent(dirPath, path))
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
@@ -203,7 +215,7 @@ namespace VEngine.Editor.Builds
|
|
|
Debug.LogErrorFormat("Failed to build {0}.", name);
|
|
|
return;
|
|
|
}
|
|
|
- if(!string.IsNullOrEmpty(GFGGame.LauncherConfig.resKey))
|
|
|
+ if (!string.IsNullOrEmpty(GFGGame.LauncherConfig.resKey))
|
|
|
{
|
|
|
CreateEncryptAssets(outputPath, outputPath, manifest, GFGGame.LauncherConfig.resKey);
|
|
|
}
|