rename assembly name ObfuzExtension4HybridCLR to Obfuz4HybridCLR.Editor

before-split
walon 2025-05-21 09:19:52 +08:00
parent 4fd71a30c3
commit acb35e375e
4 changed files with 3 additions and 29 deletions

View File

@ -13,7 +13,7 @@ using System.IO;
using HybridCLR.Editor.ABI; using HybridCLR.Editor.ABI;
using UnityEngine; using UnityEngine;
namespace ObfuzExtension4HybridCLR namespace Obfuz4HybridCLR
{ {
public static class ObfuscateUtil public static class ObfuscateUtil
{ {

View File

@ -1,5 +1,5 @@
{ {
"name": "ObfuzExtension4HybridCLR", "name": "Obfuz4HybridCLR.Editor",
"rootNamespace": "", "rootNamespace": "",
"references": [ "references": [
"GUID:2373f786d14518f44b0f475db77ba4de", "GUID:2373f786d14518f44b0f475db77ba4de",

View File

@ -14,9 +14,8 @@ using HybridCLR.Editor.Meta;
using UnityEditor.Build; using UnityEditor.Build;
using HybridCLR.Editor.Installer; using HybridCLR.Editor.Installer;
namespace ObfuzExtension4HybridCLR namespace Obfuz4HybridCLR
{ {
public static class PrebuildCommandExt public static class PrebuildCommandExt
{ {
[MenuItem("HybridCLR/ObfuzExtension/GenerateAll")] [MenuItem("HybridCLR/ObfuzExtension/GenerateAll")]
@ -29,31 +28,6 @@ namespace ObfuzExtension4HybridCLR
} }
BuildTarget target = EditorUserBuildSettings.activeBuildTarget; BuildTarget target = EditorUserBuildSettings.activeBuildTarget;
ObfuscateUtil.CompileAndObfuscateHotUpdateAssemblies(target); ObfuscateUtil.CompileAndObfuscateHotUpdateAssemblies(target);
//CompileDllCommand.CompileDll(target, EditorUserBuildSettings.development);
//// obfuscate hot update assemblies
//string hotUpdateAssemblyOutputPath = SettingsUtil.GetHotUpdateDllsOutputDirByTarget(target);
//string obfuscatedAssemblyOutputPath = ObfuzSettings.Instance.GetObfuscatedAssemblyOutputPath(target);
//var assemblySearchPaths = new List<string>
//{
// hotUpdateAssemblyOutputPath,
//};
//ObfuscateUtil.Obfuscate(target, assemblySearchPaths, obfuscatedAssemblyOutputPath);
//// override assembly in hot update path with obfuscated assembly
//foreach (string hotUpdateAssName in SettingsUtil.HotUpdateAssemblyNamesIncludePreserved)
//{
// string srcFile = $"{obfuscatedAssemblyOutputPath}/{hotUpdateAssName}.dll";
// string dstFile = $"{hotUpdateAssemblyOutputPath}/{hotUpdateAssName}.dll";
// // not all assemblies are obfuscated
// if (File.Exists(srcFile))
// {
// File.Copy(srcFile, dstFile, true);
// File.SetLastWriteTimeUtc(dstFile, new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc));
// File.SetCreationTimeUtc(dstFile, new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc));
// Debug.Log($"[ObfuzExtension] Copy {srcFile} to {dstFile}");
// }
//}
Il2CppDefGeneratorCommand.GenerateIl2CppDef(); Il2CppDefGeneratorCommand.GenerateIl2CppDef();
LinkGeneratorCommand.GenerateLinkXml(target); LinkGeneratorCommand.GenerateLinkXml(target);
StripAOTDllCommand.GenerateStripedAOTDlls(target); StripAOTDllCommand.GenerateStripedAOTDlls(target);