forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
47 lines (39 loc) · 1.29 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using System;
using Eto;
using Eto.Forms;
namespace MonoGame.Tools.Pipeline
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
#if WINDOWS
Xwt.Application.Initialize(Xwt.ToolkitType.Wpf);
#elif LINUX
Xwt.Application.Initialize(Xwt.ToolkitType.Gtk3);
#else
Xwt.Application.Initialize(Xwt.ToolkitType.Gtk);
#endif
var platform = Platform.Detect;
var app = new Application(platform);
Styles.Load();
var win = new MainWindow();
var controller = PipelineController.Create(win);
string project = null;
if (Global.Unix && !Global.Linux)
project = Environment.GetEnvironmentVariable("MONOGAME_PIPELINE_PROJECT");
else if (args != null && args.Length > 0)
project = string.Join(" ", args);
if (!string.IsNullOrEmpty(project))
controller.OpenProject(project);
app.Run(win);
}
}
}