コード例 #1
0
        public static void Init()
        {
            if (initialized)
            {
                return;
            }
            var sc = new SynchronizationContext();

            SynchronizationContext.SetSynchronizationContext(sc);
            ME3ExplorerCoreLib.InitLib(TaskScheduler.FromCurrentSynchronizationContext(), x => { });
#if AZURE
            ME1Directory.DefaultGamePath = ME1UnrealObjectInfo.MiniGameFilesPath = GetTestMiniGamePath(MEGame.ME1);
            ME2Directory.DefaultGamePath = ME2UnrealObjectInfo.MiniGameFilesPath = GetTestMiniGamePath(MEGame.ME2);
            ME3Directory.DefaultGamePath = ME3UnrealObjectInfo.MiniGameFilesPath = GetTestMiniGamePath(MEGame.ME3);
#endif
            initialized = true;
        }
コード例 #2
0
        internal static void Init()
        {
            if (!initialized)
            {
                //Utilities.ExtractInternalFile("MassEffectModManagerCore.bundleddlls.sevenzipwrapper.dll", Path.Combine(Utilities.GetDllDirectory(), "sevenzipwrapper.dll"), false, Assembly.GetAssembly(typeof(GameTarget)));
                //Utilities.ExtractInternalFile("MassEffectModManagerCore.bundleddlls.lzo2wrapper.dll", Path.Combine(Utilities.GetDllDirectory(), "lzo2wrapper.dll"), false, Assembly.GetAssembly(typeof(GameTarget)));
                //Utilities.ExtractInternalFile("MassEffectModManagerCore.bundleddlls.zlibwrapper.dll", Path.Combine(Utilities.GetDllDirectory(), "zlibwrapper.dll"), false, Assembly.GetAssembly(typeof(GameTarget)));
                //SetDllDirectory(Utilities.GetDllDirectory());

                ME3ExplorerCoreLib.InitLib(TaskScheduler.Default, null);

                Analytics.SetEnabledAsync(false);
                Crashes.SetEnabledAsync(false);
                Settings.LogModStartup = true;
                App.BuildNumber        = 105; //THIS NEEDS TO BE UPDATED FOR EVERY MOD THAT TARGETS A NEWER RELEASE
                Log.Logger             = new LoggerConfiguration().WriteTo.Console().WriteTo.Debug().CreateLogger();
                DeleteScratchDir();

                //BackupService.RefreshBackupStatus(null); // used in mixin testing

                initialized = true;
            }
        }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: ME3Tweaks/ME3Explorer
        private static void initCoreLib()
        {
#if DEBUG
            MemoryAnalyzer.IsTrackingMemory = true;
#endif
            void packageSaveFailed(string message)
            {
                // I'm not sure if this requires ui thread since it's win32 but i'll just make sure
                Application.Current.Dispatcher.Invoke(() =>
                {
                    MessageBox.Show(message);
                });
            }

            ME3ExplorerCoreLib.InitLib(TaskScheduler.FromCurrentSynchronizationContext(), packageSaveFailed);
            CoreLibSettingsBridge.MapSettingsIntoBridge();
            PackageSaver.CheckME3Running = () =>
            {
                GameController.TryGetMEProcess(MEGame.ME3, out var me3Proc);
                return(me3Proc != null);
            };
            PackageSaver.NotifyRunningTOCUpdateRequired = GameController.SendME3TOCUpdateMessage;
            PackageSaver.GetPNGForThumbnail             = texture2D => texture2D.GetPNG(texture2D.GetTopMip());
        }