public static void Main(string[] args) { if (PlaynitePaths.ProgramPath.Contains(@"temp\rar$", StringComparison.OrdinalIgnoreCase)) { MessageBox.Show( "Playnite is not allowed to run from temporary extracted archive.\rInstall/Extract application properly before starting it.", "Startup Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } var cmdLine = new CmdLineOptions(); var parsed = Parser.Default.ParseArguments <CmdLineOptions>(Environment.GetCommandLineArgs()); if (parsed is Parsed <CmdLineOptions> options) { cmdLine = options.Value; } SplashScreen splash = null; var procCount = Process.GetProcesses().Where(a => a.ProcessName.StartsWith("Playnite.")).Count(); if (cmdLine.Start.IsNullOrEmpty() && !cmdLine.HideSplashScreen && procCount == 1) { splash = new SplashScreen("SplashScreen.png"); splash.Show(false); } PlayniteSettings.ConfigureLogger(); var app = new DesktopApplication(new App(), splash, cmdLine); app.Run(); }
public static void Main(string[] args) { PlayniteSettings.ConfigureLogger(); LogManager.Init(new NLogLogProvider()); var app = new App(); app.Run(); }
public void GlobalSetup() { // To register pack:// scheme var current = new Application(); PlayniteTests.SetEntryAssembly(Assembly.GetExecutingAssembly()); FileSystem.CreateDirectory(PlayniteTests.TempPath, true); NLogLogger.IsTraceEnabled = true; PlayniteSettings.ConfigureLogger(); }
public static void Main(string[] args) { var splash = new SplashScreen("SplashScreen.png"); splash.Show(false); PlayniteSettings.ConfigureLogger(); var app = new FullscreenApplication(new App(), splash); app.Run(); }
public static void Main(string[] args) { FileSystem.CreateDirectory(PlaynitePaths.JitProfilesPath); ProfileOptimization.SetProfileRoot(PlaynitePaths.JitProfilesPath); ProfileOptimization.StartProfile("desktop"); if (PlaynitePaths.ProgramPath.Contains(@"temp\rar$", StringComparison.OrdinalIgnoreCase)) { MessageBox.Show( "Playnite is not allowed to run from temporary extracted archive.\rInstall/Extract application properly before starting it.", "Startup Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } else if (PlaynitePaths.ProgramPath.Contains("#")) { MessageBox.Show( "Playnite is unable to run from current directory due to illegal character '#' in the path. Please use different directory.", "Startup Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } var cmdLine = new CmdLineOptions(); var parsed = Parser.Default.ParseArguments <CmdLineOptions>(Environment.GetCommandLineArgs()); if (parsed is Parsed <CmdLineOptions> options) { cmdLine = options.Value; } SplashScreen splash = null; var procCount = Process.GetProcesses().Where(a => a.ProcessName.StartsWith("Playnite.")).Count(); if (cmdLine.Start.IsNullOrEmpty() && !cmdLine.HideSplashScreen && procCount == 1) { splash = new SplashScreen("SplashScreen.png"); splash.Show(false); } PlayniteSettings.ConfigureLogger(); LogManager.GetLogger().Info($"App arguments: '{string.Join(",", args)}'"); var app = new DesktopApplication(new App(), splash, cmdLine); app.Run(); }
public static void Main(string[] args) { var cmdLine = new CmdLineOptions(); var parsed = Parser.Default.ParseArguments <CmdLineOptions>(Environment.GetCommandLineArgs()); if (parsed is Parsed <CmdLineOptions> options) { cmdLine = options.Value; } SplashScreen splash = null; if (cmdLine.Start.IsNullOrEmpty()) { splash = new SplashScreen("SplashScreen.png"); splash.Show(false); } PlayniteSettings.ConfigureLogger(); var app = new FullscreenApplication(new App(), splash, cmdLine); app.Run(); }
public static void Main(string[] args) { var cmdLine = new CmdLineOptions(); var parsed = Parser.Default.ParseArguments <CmdLineOptions>(Environment.GetCommandLineArgs()); if (parsed is Parsed <CmdLineOptions> options) { cmdLine = options.Value; } SplashScreen splash = null; var procCount = Process.GetProcesses().Where(a => a.ProcessName.StartsWith("Playnite.")).Count(); if (cmdLine.Start.IsNullOrEmpty() && !cmdLine.HideSplashScreen && procCount == 1) { splash = new SplashScreen("SplashScreen.png"); splash.Show(false); } PlayniteSettings.ConfigureLogger(); var app = new FullscreenApplication(new App(), splash, cmdLine); app.Run(); }