|
@@ -23,7 +23,7 @@ namespace HybridCLR.Editor
|
|
|
var build = Application.streamingAssetsPath + "/Dll/";
|
|
var build = Application.streamingAssetsPath + "/Dll/";
|
|
|
if (Directory.Exists(build))
|
|
if (Directory.Exists(build))
|
|
|
{
|
|
{
|
|
|
- Directory.Delete(build,true);
|
|
|
|
|
|
|
+ Directory.Delete(build, true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Directory.CreateDirectory(build);
|
|
Directory.CreateDirectory(build);
|
|
@@ -46,9 +46,8 @@ namespace HybridCLR.Editor
|
|
|
|
|
|
|
|
var md5Json = JsonHelper.ToJson(assetMd5Info);
|
|
var md5Json = JsonHelper.ToJson(assetMd5Info);
|
|
|
File.WriteAllText(build + "DllMD5.txt", md5Json);
|
|
File.WriteAllText(build + "DllMD5.txt", md5Json);
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
LogTool.Log("MD5文件生成完成");
|
|
LogTool.Log("MD5文件生成完成");
|
|
|
PlatformType platformType;
|
|
PlatformType platformType;
|
|
|
#if UNITY_ANDROID
|
|
#if UNITY_ANDROID
|
|
@@ -62,8 +61,8 @@ namespace HybridCLR.Editor
|
|
|
#else
|
|
#else
|
|
|
platformType = PlatformType.None;
|
|
platformType = PlatformType.None;
|
|
|
#endif
|
|
#endif
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
var build1 = string.Format(BuildEditor.buildDllFolder, platformType,
|
|
var build1 = string.Format(BuildEditor.buildDllFolder, platformType,
|
|
|
$"{1}.{1}.{1}");
|
|
$"{1}.{1}.{1}");
|
|
|
foreach (var bundle in allBundles)
|
|
foreach (var bundle in allBundles)
|
|
@@ -73,11 +72,11 @@ namespace HybridCLR.Editor
|
|
|
byte[] data = File.ReadAllBytes(bundle);
|
|
byte[] data = File.ReadAllBytes(bundle);
|
|
|
string fileName = fileInfo.Name;
|
|
string fileName = fileInfo.Name;
|
|
|
string p = build1 + fileName;
|
|
string p = build1 + fileName;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
File.WriteAllBytes(p, data);
|
|
File.WriteAllBytes(p, data);
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ File.WriteAllText(build1 + "DllMD5.txt", md5Json);
|
|
|
AssetDatabase.SaveAssets();
|
|
AssetDatabase.SaveAssets();
|
|
|
AssetDatabase.Refresh();
|
|
AssetDatabase.Refresh();
|
|
|
}
|
|
}
|
|
@@ -129,6 +128,7 @@ namespace HybridCLR.Editor
|
|
|
{
|
|
{
|
|
|
Directory.CreateDirectory(buildDstDir);
|
|
Directory.CreateDirectory(buildDstDir);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
BuildTarget target = EditorUserBuildSettings.activeBuildTarget;
|
|
BuildTarget target = EditorUserBuildSettings.activeBuildTarget;
|
|
|
PrebuildCommandExt.CompileAndObfuscateDll();
|
|
PrebuildCommandExt.CompileAndObfuscateDll();
|
|
|
// ObfuscateUtil.CompileAndObfuscateHotUpdateAssemblies(target);
|
|
// ObfuscateUtil.CompileAndObfuscateHotUpdateAssemblies(target);
|
|
@@ -163,8 +163,8 @@ namespace HybridCLR.Editor
|
|
|
Debug.Log($"[CopyAOTAssembliesToStreamingAssets] copy AOT dll {srcDllPath} -> {dllBytesPath}");
|
|
Debug.Log($"[CopyAOTAssembliesToStreamingAssets] copy AOT dll {srcDllPath} -> {dllBytesPath}");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// [MenuItem("Build/CompileAndObfuscateAndCopyToStreamingAssets")]
|
|
// [MenuItem("Build/CompileAndObfuscateAndCopyToStreamingAssets")]
|
|
|
// public static void CompileAndObfuscateAndCopyToStreamingAssets()
|
|
// public static void CompileAndObfuscateAndCopyToStreamingAssets()
|
|
|
// {
|
|
// {
|