Skip to content

Commit

Permalink
Fea #6,添加MacOS支持
Browse files Browse the repository at this point in the history
  • Loading branch information
mingkuang-Chuyu committed May 5, 2023
1 parent ec16c88 commit aa77214
Show file tree
Hide file tree
Showing 39 changed files with 4,873 additions and 93 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ mono_crash.*
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
# x64/
# x86/
# [Ww][Ii][Nn]32/
# [Aa][Rr][Mm]/
# [Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
Expand Down
40 changes: 30 additions & 10 deletions Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,39 @@ MSBuild.exe "Build.proj"
</ItemGroup>
<Copy SourceFiles="@(VCTargetsFiles)" DestinationFiles="$(MSBuildThisFileDirectory)\Release\VCTargets\%(RecursiveDir)%(Filename)%(Extension)" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)\Microsoft.Build.CppTasks.Common\bin\Release\net6.0\Microsoft.Build.CppTasks.Common.dll" DestinationFolder="$(MSBuildThisFileDirectory)\Release\VCTargets\v170" />

<PropertyGroup>
<ApplicationTypeDefaultPropsRootPath>$(MSBuildThisFileDirectory)VCTargets\v170\Application Type\</ApplicationTypeDefaultPropsRootPath>
</PropertyGroup>
<ItemGroup>
<PlatformsRootFiles Include="$(MSBuildThisFileDirectory)\YY.Build.Cross.Tasks\Targets\Linux\*.*"/>
<PlatformsFiles Include="$(MSBuildThisFileDirectory)\YY.Build.Cross.Tasks\Targets\Linux\Platforms\**\*.*"/>
<ApplicationTypeDefaultPropsPath Include="$(ApplicationTypeDefaultPropsRootPath)\*\Default.props"/>
</ItemGroup>
<Copy SourceFiles="@(PlatformsRootFiles)" DestinationFolder="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\Linux\1.0" />
<Copy SourceFiles="@(PlatformsFiles)" DestinationFiles="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\Linux\1.0\Platforms\ARM\PlatformToolsets\%(RecursiveDir)%(Filename)%(Extension)" />
<Copy SourceFiles="@(PlatformsFiles)" DestinationFiles="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\Linux\1.0\Platforms\ARM64\PlatformToolsets\%(RecursiveDir)%(Filename)%(Extension)" />
<Copy SourceFiles="@(PlatformsFiles)" DestinationFiles="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\Linux\1.0\Platforms\MIPS\PlatformToolsets\%(RecursiveDir)%(Filename)%(Extension)" />
<Copy SourceFiles="@(PlatformsFiles)" DestinationFiles="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\Linux\1.0\Platforms\x64\PlatformToolsets\%(RecursiveDir)%(Filename)%(Extension)" />
<Copy SourceFiles="@(PlatformsFiles)" DestinationFiles="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\Linux\1.0\Platforms\x86\PlatformToolsets\%(RecursiveDir)%(Filename)%(Extension)" />
<ItemGroup>
<ApplicationType
Include="@(ApplicationTypeDefaultPropsPath-&gt;Remove(0, $(ApplicationTypeDefaultPropsRootPath.Length))-&gt;Replace('\Default.props','')-&gt;Replace('/Default.props',''))"/>
</ItemGroup>
<MSBuild Projects="$(MSBuildThisFileFullPath)" StopOnFirstFailure="True" Targets="CopyApplicationTypeFiles" BuildInParallel="True" Properties="CurrentApplicationType=%(ApplicationType.Identity)"/>
</Target>
<Target Name="CopyApplicationTypeFiles">
<PropertyGroup>
<PlatformsRootPath>$(MSBuildThisFileDirectory)VCTargets\v170\Application Type\$(CurrentApplicationType)\1.0\Platforms\</PlatformsRootPath>
</PropertyGroup>
<ItemGroup>
<PlatformsPath Include="$(PlatformsRootPath)*\Platform.props"/>
</ItemGroup>
<ItemGroup>
<PlatformsName
Include="@(PlatformsPath-&gt;Remove(0, $(PlatformsRootPath.Length))-&gt;Replace('\Platform.props','')-&gt;Replace('/Platform.props',''))"/>
</ItemGroup>
<MSBuild Projects="$(MSBuildThisFileFullPath)" StopOnFirstFailure="True" Targets="CopyPlatformToolsetsFiles" BuildInParallel="True" Properties="CurrentPlatformName=%(PlatformsName.Identity)"/>
</Target>
<Target Name="CopyPlatformToolsetsFiles">
<ItemGroup>
<PlatformsRootFiles Include="$(MSBuildThisFileDirectory)\YY.Build.Cross.Tasks\Targets\$(CurrentApplicationType)\*.*"/>
<PlatformsFiles Include="$(MSBuildThisFileDirectory)\YY.Build.Cross.Tasks\Targets\$(CurrentApplicationType)\Platforms\**\*.*"/>
</ItemGroup>
<Copy SourceFiles="@(PlatformsRootFiles)" DestinationFolder="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\$(CurrentApplicationType)\1.0" />
<Copy SourceFiles="@(PlatformsFiles)" DestinationFiles="$(MSBuildThisFileDirectory)\Release\VCTargets\v170\Application Type\$(CurrentApplicationType)\1.0\Platforms\$(CurrentPlatformName)\PlatformToolsets\%(RecursiveDir)%(Filename)%(Extension)" />
</Target>

<Target Name="_GetProjectAllConfiguration" Returns="@(AllProjectReferenceConfigurations)">
<!--故意过滤Debug配置-->
<CreateItem
Expand Down
Loading

0 comments on commit aa77214

Please sign in to comment.