-
Notifications
You must be signed in to change notification settings - Fork 63
/
SeeSharpSnake.csproj
139 lines (117 loc) · 5.58 KB
/
SeeSharpSnake.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishSingleFile Condition="'$(Mode)' == ''">true</PublishSingleFile>
<EnableDefaultItems>false</EnableDefaultItems>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="Game/FrameBuffer.cs" />
<Compile Include="Game/Game.cs" />
<Compile Include="Game/Random.cs" />
<Compile Include="Game/Snake.cs" />
</ItemGroup>
<ItemGroup Condition="'$(IncludePal)' == 'true'">
<Compile Include="Pal/Thread.Windows.cs" />
<Compile Include="Pal/Environment.Windows.cs" />
<Compile Include="Pal/Console.Windows.cs" />
<Compile Include="Pal/Console.cs" />
</ItemGroup>
<ItemGroup Condition="'$(IncludePal)' == 'true' and $(RuntimeIdentifier.StartsWith('win-'))">
<Compile Include="Pal/RuntimeInformation.Windows.cs" />
</ItemGroup>
<ItemGroup Condition="'$(IncludePal)' == 'true' and $(RuntimeIdentifier.StartsWith('linux-'))">
<Compile Include="Pal/RuntimeInformation.Linux.cs" />
</ItemGroup>
<ItemGroup Condition="'$(Mode)' == 'CoreRT-NoRuntime' or '$(Mode)' == 'CoreRT-Uefi'">
<Compile Include="MiniBCL.cs" />
<Compile Include="MiniRuntime.cs" />
<Compile Include="MiniRuntime.Dos.cs" />
</ItemGroup>
<ItemGroup Condition="'$(Mode)' == 'CoreRT-Uefi'">
<Compile Include="Pal/Thread.Uefi.cs" />
<Compile Include="Pal/Environment.Uefi.cs" />
<Compile Include="Pal/Console.Uefi.cs" />
<Compile Include="Pal/Console.cs" />
<Compile Include="Pal/UefiEnvironment.cs" />
<Compile Include="Pal/UefiApplication.cs" />
<Compile Include="Pal/RuntimeInformation.Uefi.cs" />
</ItemGroup>
<ItemGroup Condition="'$(Mode)' != ''">
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="1.0.0-alpha-*" />
</ItemGroup>
<PropertyGroup Condition="'$(Mode)' == 'CoreRT-Moderate' or '$(Mode)' == 'CoreRT-High' or '$(Mode)' == 'CoreRT-ReflectionFree'">
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
</PropertyGroup>
<PropertyGroup Condition="'$(Mode)' == 'CoreRT-High' or '$(Mode)' == 'CoreRT-ReflectionFree' or '$(Mode)' == 'CoreRT-NoRuntime'">
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
<IlcInvariantGlobalization>true</IlcInvariantGlobalization>
<IlcFoldIdenticalMethodBodies>true</IlcFoldIdenticalMethodBodies>
</PropertyGroup>
<ItemGroup Condition="'$(Mode)' == 'CoreRT-High'">
<IlcArg Include="--removefeature:EventSource" />
<IlcArg Include="--removefeature:FrameworkStrings" />
</ItemGroup>
<PropertyGroup Condition="'$(Mode)' == 'CoreRT-ReflectionFree'">
<IlcDisableReflection>true</IlcDisableReflection>
</PropertyGroup>
<PropertyGroup Condition="'$(Mode)' == 'CoreRT-NoRuntime' or '$(Mode)' == 'CoreRT-Uefi'">
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
<Optimize>true</Optimize>
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
<IlcDisableReflection>true</IlcDisableReflection>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<IlcSystemModule>SeeSharpSnake</IlcSystemModule>
</PropertyGroup>
<PropertyGroup Condition="'$(Mode)' == 'CoreRT-NoRuntime'">
<IncludePal>true</IncludePal>
</PropertyGroup>
<ItemGroup Condition="'$(Mode)' == 'CoreRT-NoRuntime'">
<LinkerArg Include="/subsystem:console /entry:__managed__Main /merge:.modules=.rdata /merge:.pdata=.rdata /DYNAMICBASE:NO /filealign:16 /align:16" />
</ItemGroup>
<ItemGroup Condition="'$(Mode)' == 'CoreRT-Uefi'">
<LinkerArg Include="/subsystem:EFI_APPLICATION /entry:EfiMain" />
</ItemGroup>
<Target Name="CustomizeReferences" BeforeTargets="BeforeCompile" AfterTargets="FindReferenceAssembliesForReferences"
Condition="'$(Mode)' == 'CoreRT-NoRuntime' or '$(Mode)' == 'CoreRT-Uefi'">
<ItemGroup>
<ReferencePathWithRefAssemblies Remove="@(ReferencePathWithRefAssemblies)" />
<ReferencePath Remove="@(ReferencePath)" />
</ItemGroup>
</Target>
<Target Name="GenerateVirtuaDisk" AfterTargets="Publish"
Condition="'$(Mode)' == 'CoreRT-Uefi'">
<PropertyGroup>
<VHD>$(MSBuildProjectDirectory)\$(NativeOutputPath)seesharpsnake.vhdx</VHD>
<CreatePartitionCommand>
create vdisk file=$(VHD) maximum=40
select vdisk file=$(VHD)
attach vdisk
convert gpt
create partition efi
format quick fs=fat32 label="System"
assign letter="X"
exit
</CreatePartitionCommand>
<CreatePartitionCommand2>
select vdisk file=$(VHD)
select partition 1
remove letter=X
detach vdisk
exit
</CreatePartitionCommand2>
</PropertyGroup>
<Delete Files="$(VHD)" />
<WriteLinesToFile File="$(NativeOutputPath)diskpart1.txt" Overwrite="true" Lines="$(CreatePartitionCommand)" />
<WriteLinesToFile File="$(NativeOutputPath)diskpart2.txt" Overwrite="true" Lines="$(CreatePartitionCommand2)" />
<Exec Command="diskpart /s "$(MSBuildProjectDirectory)\$(NativeOutputPath)diskpart1.txt"" />
<Copy SourceFiles="$(MSBuildProjectDirectory)\$(NativeOutputPath)$(TargetName)$(NativeBinaryExt)" DestinationFiles="X:\EFI\BOOT\BOOTX64.efi" />
<Exec Command="diskpart /s "$(MSBuildProjectDirectory)\$(NativeOutputPath)diskpart2.txt"" />
</Target>
</Project>