|
|
@@ -298,6 +298,39 @@ namespace ToolCore
|
|
|
paths.Join(searchPaths, ";");
|
|
|
}
|
|
|
|
|
|
+ void NETCSProject::CreateCustomCommands(XMLElement &propertyGroup, const String& cfg)
|
|
|
+ {
|
|
|
+ Project* atomicProject = projectGen_->GetAtomicProject();
|
|
|
+
|
|
|
+ if (!atomicProject)
|
|
|
+ return;
|
|
|
+
|
|
|
+ ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
|
|
|
+
|
|
|
+ XMLElement customCommands = propertyGroup.CreateChild("CustomCommands").CreateChild("CustomCommands");
|
|
|
+
|
|
|
+ XMLElement xcommand = customCommands.CreateChild("Command");
|
|
|
+
|
|
|
+ xcommand.SetAttribute("type", "Execute");
|
|
|
+
|
|
|
+ String startArguments;
|
|
|
+
|
|
|
+ #ifdef ATOMIC_DEV_BUILD
|
|
|
+ String playerBin = tenv->GetAtomicNETRootDir() + cfg + "/AtomicIPCPlayer.exe";
|
|
|
+ #else
|
|
|
+ String playerBin = tenv->GetAtomicNETRootDir() + "Release/AtomicIPCPlayer.exe";
|
|
|
+ startArguments += ToString("--resourcePrefix \"%s\" ", (fileSystem->GetProgramDir() + "Resources/").CString());
|
|
|
+ #endif
|
|
|
+
|
|
|
+
|
|
|
+ startArguments += ToString("--project \"%s\"", atomicProject->GetProjectPath().CString());
|
|
|
+
|
|
|
+ String command = ToString("\"%s\"", playerBin.CString()) + " " + startArguments;
|
|
|
+
|
|
|
+ xcommand.SetAttribute("command", command);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
void NETCSProject::CreateReleasePropertyGroup(XMLElement &projectRoot)
|
|
|
{
|
|
|
XMLElement pgroup = projectRoot.CreateChild("PropertyGroup");
|
|
|
@@ -314,6 +347,10 @@ namespace ToolCore
|
|
|
pgroup.CreateChild("AllowUnsafeBlocks").SetValue("true");
|
|
|
pgroup.CreateChild("PlatformTarget").SetValue("x64");
|
|
|
|
|
|
+#ifndef ATOMIC_PLATFORM_WINDOWS
|
|
|
+ CreateCustomCommands(pgroup, "Debug");
|
|
|
+#endif
|
|
|
+
|
|
|
}
|
|
|
|
|
|
void NETCSProject::CreateDebugPropertyGroup(XMLElement &projectRoot)
|
|
|
@@ -332,6 +369,10 @@ namespace ToolCore
|
|
|
pgroup.CreateChild("AllowUnsafeBlocks").SetValue("true");
|
|
|
pgroup.CreateChild("PlatformTarget").SetValue("x64");
|
|
|
|
|
|
+#ifndef ATOMIC_PLATFORM_WINDOWS
|
|
|
+ CreateCustomCommands(pgroup, "Release");
|
|
|
+#endif
|
|
|
+
|
|
|
}
|
|
|
|
|
|
void NETCSProject::CreateAssemblyInfo()
|
|
|
@@ -444,6 +485,7 @@ namespace ToolCore
|
|
|
{
|
|
|
XMLElement afterBuild = project.CreateChild("Target");
|
|
|
afterBuild.SetAttribute("Name", "AfterBuild");
|
|
|
+
|
|
|
XMLElement copy = afterBuild.CreateChild("Copy");
|
|
|
copy.SetAttribute("SourceFiles", "$(TargetPath)");
|
|
|
|
|
|
@@ -457,6 +499,14 @@ namespace ToolCore
|
|
|
|
|
|
copy.SetAttribute("DestinationFolder", destPath);
|
|
|
|
|
|
+#ifndef ATOMIC_PLATFORM_WINDOWS
|
|
|
+
|
|
|
+ copy = afterBuild.CreateChild("Copy");
|
|
|
+ copy.SetAttribute("SourceFiles", "$(TargetPath).mdb");
|
|
|
+ copy.SetAttribute("DestinationFolder", destPath);
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
// Create the AtomicProject.csproj.user file if it doesn't exist
|
|
|
String userSettingsFilename = projectPath_ + name_ + ".csproj.user";
|
|
|
if (!fileSystem->FileExists(userSettingsFilename))
|