Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to run Stride.Core.Tasks program on any desktop OS #2042

Merged
merged 4 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sources/core/Stride.Core.Tasks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using Microsoft.Build.Locator;
using Mono.Options;
using Stride.Core.Assets.CompilerApp.Tasks;
Expand Down Expand Up @@ -77,6 +78,9 @@ public static int RealMain(string[] args)
{
case "locate-devenv":
{
if(!OperatingSystem.IsWindows())
throw new OptionException("This option is only available on Windows", "");

if (commandArgs.Count != 2)
throw new OptionException("Need one extra argument", "");
var devenvPath = LocateDevenv.FindDevenv(commandArgs[1]);
Expand Down
2 changes: 1 addition & 1 deletion sources/core/Stride.Core.Tasks/Stride.Core.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrideAssemblyProcessor>false</StrideAssemblyProcessor>
<TargetFramework>$(StrideEditorTargetFramework)</TargetFramework>
<TargetFramework>$(StrideXplatEditorTargetFramework)</TargetFramework>
<StrideBuildTags>WindowsTools</StrideBuildTags>
<StrideOutputPath>bin\$(Configuration)\</StrideOutputPath>
<RestorePackages>true</RestorePackages>
Expand Down
3 changes: 2 additions & 1 deletion sources/targets/Stride.props
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ExecutableExtension Condition="$([MSBuild]::IsOSPlatform('Windows'))">.exe</ExecutableExtension>
</PropertyGroup>

<!-- Pack target -->
Expand All @@ -106,7 +107,7 @@
<!--<PackAssets ProjectFile="$(MSBuildProjectFile)" IntermediatePackagePath="$(IntermediateOutputPath)\stride">
<Output TaskParameter="GeneratedItems" ItemName="None"/>
</PackAssets>-->
<Exec Command="&quot;$(MSBuildThisFileDirectory)..\core\Stride.Core.Tasks\bin\$(Configuration)\$(StrideEditorTargetFramework)\Stride.Core.Tasks.exe&quot; pack-assets &quot;$(MSBuildProjectFile)&quot; &quot;$(IntermediateOutputPath)\stride&quot;" ConsoleToMsBuild="true">
<Exec Command="&quot;$(MSBuildThisFileDirectory)..\core\Stride.Core.Tasks\bin\$(Configuration)\$(StrideXplatEditorTargetFramework)\Stride.Core.Tasks$(ExecutableExtension)&quot; pack-assets &quot;$(MSBuildProjectFile)&quot; &quot;$(IntermediateOutputPath)\stride&quot;" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" ItemName="PackAssetsLine" />
</Exec>
<ItemGroup>
Expand Down