Initialize() 공개 메소드

public Initialize ( ) : void
리턴 void
예제 #1
0
 public static void Initialize()
 {
     EnsureFolderSetup();
     Logger.InitializeLogging(Path.Combine(ModsDirectory, "PPModLoader.log"));
     SimpleInjector.Container container = CompositionRoot.GetContainer();
     _modManager = new ModManager(ModsDirectory, new JsonConfigProvider(), new FileSystemModLoader(), container);
     _modManager.Initialize();
 }
예제 #2
0
        public static void Initialize()         //WTFModLoaderInjector entry
        {
            if (ModsDirectory == null || SteamModsDirectory == null)
            {
                LegacyLoad();
            }
            else
            {
                string manifestDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                if (_modManager != null)
                {
                    return;
                }
                CurrentBuildVersion = "0.4";
                String manifestDirectoryFile = System.IO.Path.GetFullPath(System.IO.Path.Combine(manifestDirectory, System.IO.Path.Combine(@"0Harmony.dll")));
                String rootdirectoryFile     = System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), System.IO.Path.Combine(@"0Harmony.dll")));
                if (System.IO.File.Exists(manifestDirectoryFile) && System.IO.File.Exists(rootdirectoryFile))
                {
                    String rootdirectoryBackupFile = System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), System.IO.Path.Combine(@"0Harmony.dll.old")));
                    File.Copy(rootdirectoryFile, rootdirectoryBackupFile, true);
                    File.Delete(rootdirectoryFile);
                }

                manifestDirectoryFile = System.IO.Path.GetFullPath(System.IO.Path.Combine(manifestDirectory, System.IO.Path.Combine(@"Newtonsoft.Json.dll")));
                rootdirectoryFile     = System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), System.IO.Path.Combine(@"Newtonsoft.Json.dll")));
                if (System.IO.File.Exists(manifestDirectoryFile) && System.IO.File.Exists(rootdirectoryFile))
                {
                    String rootdirectoryBackupFile = System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), System.IO.Path.Combine(@"Newtonsoft.Json.dll.old")));
                    File.Copy(rootdirectoryFile, rootdirectoryBackupFile, true);
                    File.Delete(rootdirectoryFile);
                }

                manifestDirectoryFile = System.IO.Path.GetFullPath(System.IO.Path.Combine(manifestDirectory, System.IO.Path.Combine(@"SimpleInjector.dll")));
                rootdirectoryFile     = System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), System.IO.Path.Combine(@"SimpleInjector.dll")));
                if (System.IO.File.Exists(manifestDirectoryFile) && System.IO.File.Exists(rootdirectoryFile))
                {
                    String rootdirectoryBackupFile = System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), System.IO.Path.Combine(@"SimpleInjector.dll.old")));
                    File.Copy(rootdirectoryFile, rootdirectoryBackupFile, true);
                    File.Delete(rootdirectoryFile);
                }
            }
            EnsureFolderSetup();
            ModDbManager.Init();
            ModDbManager.updateCfgDb();
            ModDbManager.loadCfgData();
            HarmonyPatcher.PatchGameRootMenu();
            Logger.InitializeLogging(Path.Combine(ModsDirectory, "WTFModLoader.log"));
            SimpleInjector.Container container = CompositionRoot.GetContainer();
            container.Options.ResolveUnregisteredConcreteTypes = true;
            _modManager = new ModManager(ModsDirectory, SteamModsDirectory, new JsonConfigProvider(), new FileSystemModLoader(), container);
            _modManager.Initialize();
        }
예제 #3
0
        public static readonly OsuServer Server = new ServerBanchoAnnex();//_servers[0];

        public static void Init()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ServerSelectorForm());

            SetWorkingDirectory();
            Logger.Debug("Loading assemblies...");
            LoadAssemblies();

            Logger.Debug("Current Directory:" + Directory.GetCurrentDirectory());

            ModManager.Initialize();
        }
예제 #4
0
 protected override void Initialize()
 {
     FezMod.LoadComponentReplacements(this);
     ModManager.Initialize();
     orig_Initialize();
 }