Ejemplo n.º 1
0
        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 FullscreenApplication(new App(), splash, cmdLine);

            app.Run();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        public static void Main(string[] args)
        {
            FileSystem.CreateDirectory(PlaynitePaths.JitProfilesPath);
            ProfileOptimization.SetProfileRoot(PlaynitePaths.JitProfilesPath);
            ProfileOptimization.StartProfile("fullscreen");

            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 FullscreenApplication(() => new App(), splash, cmdLine);

            app.Run();
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }