Ejemplo n.º 1
0
        internal static void OuterMain(string filename)
        {
            PlatformUtils.SetPlatform();

            Paths.SetExecutablePath(filename);

            AppDomain.CurrentDomain.AssemblyResolve += SharedEntrypoint.LocalResolve;

            PreloaderMain();
        }
Ejemplo n.º 2
0
        internal static void PreloaderMain(string[] args)
        {
            PlatformUtils.SetPlatform();

            Logger.Listeners.Add(new ConsoleLogListener());

            ConsoleManager.Initialize(true);

            NetPreloader.Start(args);
        }
Ejemplo n.º 3
0
        private static void PreloaderMain()
        {
            PlatformUtils.SetPlatform();

            if (UnityPreloader.ConfigApplyRuntimePatches.Value)
            {
                XTermFix.Apply();
                ConsoleSetOutFix.Apply();
            }

            UnityPreloader.Run(EnvVars.DOORSTOP_MANAGED_FOLDER_DIR);
        }
Ejemplo n.º 4
0
        public static void PreloaderMain(string[] args)
        {
            string bepinPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH)));

            PlatformUtils.SetPlatform();

            Paths.SetExecutablePath(EnvVars.DOORSTOP_PROCESS_PATH, bepinPath);
            Preloader.IL2CPPUnhollowedPath = Path.Combine(Paths.BepInExRootPath, "unhollowed");

            AppDomain.CurrentDomain.AssemblyResolve += LocalResolve;
            AppDomain.CurrentDomain.AssemblyResolve -= DoorstopEntrypoint.ResolveCurrentDirectory;


            Preloader.Run();
        }
Ejemplo n.º 5
0
        public static void PreloaderPreMain()
        {
            PlatformUtils.SetPlatform();

            var bepinPath = Utility.ParentDirectory(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH), 2);

            Paths.SetExecutablePath(EnvVars.DOORSTOP_PROCESS_PATH, bepinPath,
                                    EnvVars.DOORSTOP_MANAGED_FOLDER_DIR,
                                    EnvVars.DOORSTOP_DLL_SEARCH_DIRS);

            LoadCriticalAssemblies();
            AppDomain.CurrentDomain.AssemblyResolve += LocalResolve;
            // Remove temporary resolver early so it won't override local resolver
            AppDomain.CurrentDomain.AssemblyResolve -= DoorstopEntrypoint.ResolveCurrentDirectory;
            PreloaderMain();
        }
Ejemplo n.º 6
0
        public static void PreloaderMain(string[] args)
        {
            string bepinPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH)));

            PlatformUtils.SetPlatform();

            Paths.SetExecutablePath(EnvVars.DOORSTOP_PROCESS_PATH, bepinPath, EnvVars.DOORSTOP_MANAGED_FOLDER_DIR);

            // Cecil 0.11 requires one to manually set up list of trusted assemblies for assembly resolving
            AppDomain.CurrentDomain.SetData(TRUSTED_PLATFORM_ASSEMBLIES, string.Join(Path.PathSeparator, Directory.GetFiles(Paths.ManagedPath, "*.dll", SearchOption.TopDirectoryOnly)));

            Preloader.IL2CPPUnhollowedPath = Path.Combine(Paths.BepInExRootPath, "unhollowed");

            AppDomain.CurrentDomain.AssemblyResolve += LocalResolve;
            AppDomain.CurrentDomain.AssemblyResolve -= DoorstopEntrypoint.ResolveCurrentDirectory;


            Preloader.Run();
        }
Ejemplo n.º 7
0
        public static void PreloaderMain(string[] args)
        {
            var bepinPath =
                Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH)));

            PlatformUtils.SetPlatform();

            Paths.SetExecutablePath(EnvVars.DOORSTOP_PROCESS_PATH, bepinPath, EnvVars.DOORSTOP_MANAGED_FOLDER_DIR);

            // Cecil 0.11 requires one to manually set up list of trusted assemblies for assembly resolving
            AppDomain.CurrentDomain.AddCecilPlatformAssemblies(Paths.ManagedPath);

            Preloader.IL2CPPUnhollowedPath = Path.Combine(Paths.BepInExRootPath, "unhollowed");

            AppDomain.CurrentDomain.AssemblyResolve += LocalResolve;
            AppDomain.CurrentDomain.AssemblyResolve -= DoorstopEntrypoint.ResolveCurrentDirectory;


            Preloader.Run();
        }