|
@@ -33,6 +33,8 @@
|
|
|
#include "../Project/Project.h"
|
|
#include "../Project/Project.h"
|
|
|
#include "../Project/ProjectEvents.h"
|
|
#include "../Project/ProjectEvents.h"
|
|
|
|
|
|
|
|
|
|
+#include "../Subprocess/SubprocessSystem.h"
|
|
|
|
|
+
|
|
|
#include "NETProjectGen.h"
|
|
#include "NETProjectGen.h"
|
|
|
#include "NETBuildSystem.h"
|
|
#include "NETBuildSystem.h"
|
|
|
#include "NETProjectSystem.h"
|
|
#include "NETProjectSystem.h"
|
|
@@ -60,6 +62,49 @@ namespace ToolCore
|
|
|
projectAssemblyDirty_ = false;
|
|
projectAssemblyDirty_ = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ void NETProjectSystem::OpenSourceFile(const String& sourceFilePath)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!visualStudioPath_.Length())
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
|
|
+ StringVector args;
|
|
|
|
|
+
|
|
|
|
|
+ if (vsSubprocess_.Expired())
|
|
|
|
|
+ {
|
|
|
|
|
+ SubprocessSystem* subs = GetSubsystem<SubprocessSystem>();
|
|
|
|
|
+ vsSubprocess_ = 0;
|
|
|
|
|
+
|
|
|
|
|
+ args.Push(solutionPath_);
|
|
|
|
|
+ args.Push(sourceFilePath);
|
|
|
|
|
+
|
|
|
|
|
+ try
|
|
|
|
|
+ {
|
|
|
|
|
+ vsSubprocess_ = subs->Launch(visualStudioPath_, args);
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (Poco::SystemException)
|
|
|
|
|
+ {
|
|
|
|
|
+ vsSubprocess_ = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ try
|
|
|
|
|
+ {
|
|
|
|
|
+ std::vector<std::string> args;
|
|
|
|
|
+ args.push_back("/edit");
|
|
|
|
|
+ args.push_back(sourceFilePath.CString());
|
|
|
|
|
+ Poco::Process::launch(visualStudioPath_.CString(), args);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (Poco::SystemException)
|
|
|
|
|
+ {
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
void NETProjectSystem::HandleUpdate(StringHash eventType, VariantMap& eventData)
|
|
void NETProjectSystem::HandleUpdate(StringHash eventType, VariantMap& eventData)
|
|
|
{
|
|
{
|
|
|
using namespace Update;
|
|
using namespace Update;
|
|
@@ -191,7 +236,7 @@ namespace ToolCore
|
|
|
FileSystem* fileSystem = GetSubsystem<FileSystem>();
|
|
FileSystem* fileSystem = GetSubsystem<FileSystem>();
|
|
|
|
|
|
|
|
// Query for Visual Studio 2015 path
|
|
// Query for Visual Studio 2015 path
|
|
|
- String visualStudioPath_ = Poco::Environment::get("VS140COMNTOOLS").c_str();
|
|
|
|
|
|
|
+ visualStudioPath_ = Poco::Environment::get("VS140COMNTOOLS").c_str();
|
|
|
|
|
|
|
|
if (visualStudioPath_.Length())
|
|
if (visualStudioPath_.Length())
|
|
|
{
|
|
{
|