internal static void Init() { lock (typeof(KoiInfo)) { if (inited) { return; } AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve; KoiDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); settings = new KoiSettings(); inited = true; } }
internal static void Init(ConfuserContext ctx) { lock (typeof(KoiInfo)) { if (inited) { return; } AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve; KoiDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); settings = new KoiSettings(); // Check if not yet processed. if (Assembly.GetExecutingAssembly().ManifestModule.GetType("KoiVM.Confuser.Internal.Fish") != null) { return; } if (ctx != null) { var packPath = Path.Combine(KoiDirectory, "koi.pack"); if (!File.Exists(packPath)) { RetrieveKoi(ctx); } else if (!settings.NoCheck) { CheckUpdate(ctx); } InitKoi(); } inited = true; } }