Konstantin Koch 8287c54432 Included the Visual Studio extension and made the necessary changes to make it run.
Replaced the old VS templates with ones that offer more flexiblity.
Started replacing the Content Project for the samples with our custom project type.
Inlcuded a basic not yet working AssimpImporter.
2015-04-08 14:50:03 +02:00

57 lines
1.7 KiB
C#

using ANX.Framework.VisualStudio.Nodes;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Project;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace ANX.Framework.VisualStudio
{
public class ContentProjectLauncher : IProjectLauncher
{
ContentProjectNode node;
public ContentProjectLauncher(ContentProjectNode node)
{
this.node = node;
}
public int LaunchProject(uint options, Config config, IVsOutputWindowPane pane)
{
IVsBuildableProjectCfg buildableConfig;
config.get_BuildableProjectCfg(out buildableConfig);
config.PrepareBuild(options, false);
string target = MsBuildTarget.Build;
if ((options & (uint)VSConstants.VSStd2KCmdID.Debug) != 0 || (options & 1) != 0)
target = MsBuildTarget.Rebuild;
((ContentBuildableProjectConfig)buildableConfig).Build(options, pane, target, null);
return VSConstants.S_OK;
}
public int LaunchFiles(IEnumerable<string> files, uint options, Config config, IVsOutputWindowPane pane)
{
IVsBuildableProjectCfg buildableConfig;
config.get_BuildableProjectCfg(out buildableConfig);
config.PrepareBuild(options, false);
this.node.SetOutputLogger(pane);
((ContentBuildableProjectConfig)buildableConfig).Build(options, pane, MsBuildTarget.Rebuild, files);
return VSConstants.S_OK;
}
}
}