149 lines
8.2 KiB
Lua
149 lines
8.2 KiB
Lua
assert(platform == "durango")
|
|
|
|
require "gear4_ms"
|
|
|
|
require "solution"
|
|
require "library"
|
|
require "project"
|
|
|
|
DurangoTestProject = MSTestProject:New{
|
|
}
|
|
|
|
DurangoLibProject = MSLibProject:New{
|
|
}
|
|
|
|
--
|
|
function DurangoLibProject:GenerateConfigurations()
|
|
MSLibProject.GenerateConfigurations(self)
|
|
configuration { "*" }
|
|
linkoptions { "/ignore:4264" }
|
|
end
|
|
|
|
function DurangoTestProject:GenerateConfigurations()
|
|
configuration { "*" }
|
|
flags { "NoIncrementalLink",
|
|
"Durango_DeployApp",
|
|
"Durango_RemoveExtraDeployFiles"
|
|
}
|
|
links { "pixEvt" , "d3d11_x" , "combase" , "kernelx" , "uuid" , "ws2_32" }
|
|
linkoptions { "/ignore:4264" }
|
|
targetsuffix ("")
|
|
|
|
prebuildcommands { "rd /S /Q \"$(LayoutDir)/Contributors\" 2> NUL",
|
|
"rd /S /Q \"$(LayoutDir)/Image\" 2> NUL" }
|
|
postbuildcommands { "xcopy \"$(SolutionDir)../../../gear_testing/resources/durango/*.png\" \"$(TargetDir)\" /y/r/f" }
|
|
durangologodir("$(SolutionDir)../../../gear_testing/resources/durango")
|
|
durangologodiruserelativepath("true")
|
|
durangomanifestextensions([[
|
|
<Extensions>
|
|
<mx:Extension Category="windows.xbox.networking">
|
|
<mx:XboxNetworkingManifest>
|
|
<mx:SocketDescriptions>
|
|
<mx:SocketDescription Name="TestSocket_UDP_Misc" SecureIpProtocol="Udp" BoundPort="50124">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceSocketUsage Type="Initiate" /> <!-- connection will send initial packet -->
|
|
<mx:SecureDeviceSocketUsage Type="Accept" /> <!-- connection will accept packets -->
|
|
<mx:SecureDeviceSocketUsage Type="SendDebug" /> <!-- connection will only send packets (UDP) -->
|
|
<mx:SecureDeviceSocketUsage Type="ReceiveDebug" /> <!-- connection will only receive packets (UDP) -->
|
|
</mx:AllowedUsages>
|
|
</mx:SocketDescription>
|
|
<mx:SocketDescription Name="TestSocket_TCP_Misc" SecureIpProtocol="Tcp" BoundPort="50125">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceSocketUsage Type="Initiate" /> <!-- connection will send initial packet -->
|
|
<mx:SecureDeviceSocketUsage Type="Accept" /> <!-- connection will accept packets -->
|
|
<mx:SecureDeviceSocketUsage Type="SendDebug" /> <!-- connection will only send packets (TCP) -->
|
|
<mx:SecureDeviceSocketUsage Type="ReceiveDebug" /> <!-- connection will only receive packets (TCP) -->
|
|
</mx:AllowedUsages>
|
|
</mx:SocketDescription>
|
|
<mx:SocketDescription Name="TestSocket_UDP_EchoServer" SecureIpProtocol="Udp" BoundPort="32222">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceSocketUsage Type="Initiate" /> <!-- connection will send initial packet -->
|
|
<mx:SecureDeviceSocketUsage Type="Accept" /> <!-- connection will accept packets -->
|
|
<mx:SecureDeviceSocketUsage Type="SendDebug" /> <!-- connection will only send packets (UDP) -->
|
|
<mx:SecureDeviceSocketUsage Type="ReceiveDebug" /> <!-- connection will only receive packets (UDP) -->
|
|
</mx:AllowedUsages>
|
|
</mx:SocketDescription>
|
|
<mx:SocketDescription Name="TestSocket_TCP_EchoServer" SecureIpProtocol="Tcp" BoundPort="23333">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceSocketUsage Type="Initiate" /> <!-- connection will send initial packet -->
|
|
<mx:SecureDeviceSocketUsage Type="Accept" /> <!-- connection will accept packets -->
|
|
<mx:SecureDeviceSocketUsage Type="SendDebug" /> <!-- connection will only send packets (TCP) -->
|
|
<mx:SecureDeviceSocketUsage Type="ReceiveDebug" /> <!-- connection will only receive packets (TCP) -->
|
|
</mx:AllowedUsages>
|
|
</mx:SocketDescription>
|
|
</mx:SocketDescriptions>
|
|
<mx:SecureDeviceAssociationTemplates>
|
|
<mx:SecureDeviceAssociationTemplate Name="TestTrafficUdp" InitiatorSocketDescription="TestSocket_UDP_Misc" AcceptorSocketDescription="TestSocket_UDP_Misc" MultiplayerSessionRequirement="None">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceAssociationUsage Type="Default" />
|
|
</mx:AllowedUsages>
|
|
</mx:SecureDeviceAssociationTemplate>
|
|
<mx:SecureDeviceAssociationTemplate Name="TestTrafficTcp" InitiatorSocketDescription="TestSocket_TCP_Misc" AcceptorSocketDescription="TestSocket_TCP_Misc" MultiplayerSessionRequirement="None">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceAssociationUsage Type="Default" />
|
|
</mx:AllowedUsages>
|
|
</mx:SecureDeviceAssociationTemplate>
|
|
<mx:SecureDeviceAssociationTemplate Name="TestEchoServerTrafficUdp" InitiatorSocketDescription="TestSocket_UDP_EchoServer" AcceptorSocketDescription="TestSocket_UDP_EchoServer" MultiplayerSessionRequirement="None">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceAssociationUsage Type="Default" />
|
|
</mx:AllowedUsages>
|
|
</mx:SecureDeviceAssociationTemplate>
|
|
<mx:SecureDeviceAssociationTemplate Name="TestEchoServerTrafficTcp" InitiatorSocketDescription="TestSocket_TCP_EchoServer" AcceptorSocketDescription="TestSocket_TCP_EchoServer" MultiplayerSessionRequirement="None">
|
|
<mx:AllowedUsages>
|
|
<mx:SecureDeviceAssociationUsage Type="Default" />
|
|
</mx:AllowedUsages>
|
|
</mx:SecureDeviceAssociationTemplate>
|
|
</mx:SecureDeviceAssociationTemplates>
|
|
</mx:XboxNetworkingManifest>
|
|
</mx:Extension>
|
|
</Extensions>]])
|
|
|
|
MSTestProject.GenerateConfigurations(self)
|
|
end
|
|
|
|
DurangoLibrary = MSLibrary:New{
|
|
TestProject = DurangoTestProject,
|
|
LibProject = DurangoLibProject
|
|
}
|
|
|
|
DurangoSolution = MSSolution:New{
|
|
Library = DurangoLibrary,
|
|
location = joindir("solutions", MSSolution.subdir),
|
|
platform = "durango",
|
|
durangoconfigurations = {
|
|
["Debug"] = {
|
|
flags = { "VS_RuntimeLibrary_MultiThreadedDLLDebug" },
|
|
},
|
|
["Re*"] = {
|
|
flags = { "VS_RuntimeLibrary_MultiThreadedDLL",
|
|
"VS_EnableParallelCodeGeneration",
|
|
},
|
|
},
|
|
},
|
|
|
|
DurangoDefaults = {
|
|
defines = { "_DURANGO",
|
|
"_VARIADIC_MAX=10",
|
|
"WINAPI_FAMILY=WINAPI_FAMILY_TV_TITLE",
|
|
"WIN32_LEAN_AND_MEAN",
|
|
"_CRT_SECURE_NO_WARNINGS",
|
|
},
|
|
flags = { "VS_ConsumeWindowsRuntimeExtension",
|
|
"VS_Enable_CPP_Exceptions_Yes",
|
|
"EnableEnhancedInstructionSet_AVX",
|
|
"VS_FloatingPointModel_Precise",
|
|
"NoMinimalRebuild",
|
|
-- "VS_BufferSecurityCheck_Yes", -- TRC XR-009: not mandatory for exclusive OS game
|
|
}
|
|
}
|
|
}
|
|
|
|
function DurangoSolution:GenerateConfigurations()
|
|
MSSolution.GenerateConfigurations(self)
|
|
for name, options in pairs(self.durangoconfigurations) do
|
|
self:GenerateConfiguration(name, options)
|
|
end
|
|
self:GenerateConfiguration("*",self.DurangoDefaults)
|
|
end
|
|
|
|
RegisterSolution("durango", DurangoSolution)
|