mirror of
https://github.com/servo/servo.git
synced 2025-06-29 19:43:39 +01:00
Use packaged OpenXR
This commit is contained in:
parent
acfe1ee0dd
commit
c879ce078d
5 changed files with 86 additions and 2 deletions
|
@ -696,6 +696,12 @@ class MachCommands(CommandBase):
|
||||||
if not package_gstreamer_dlls(env, servo_exe_dir, target_triple, uwp):
|
if not package_gstreamer_dlls(env, servo_exe_dir, target_triple, uwp):
|
||||||
status = 1
|
status = 1
|
||||||
|
|
||||||
|
if uwp:
|
||||||
|
# copy needed openxr DLLs in to servo.exe dir
|
||||||
|
print("Packaging openxr DLLs")
|
||||||
|
if not self.package_openxr_dlls(env, servo_exe_dir, target_triple):
|
||||||
|
status = 1
|
||||||
|
|
||||||
# UWP app packaging already bundles all required DLLs for us.
|
# UWP app packaging already bundles all required DLLs for us.
|
||||||
print("Packaging MSVC DLLs")
|
print("Packaging MSVC DLLs")
|
||||||
if not package_msvc_dlls(servo_exe_dir, target_triple, vcinstalldir, vs_version):
|
if not package_msvc_dlls(servo_exe_dir, target_triple, vcinstalldir, vs_version):
|
||||||
|
@ -746,6 +752,29 @@ class MachCommands(CommandBase):
|
||||||
opts += params
|
opts += params
|
||||||
return check_call(["cargo", "clean"] + opts, env=self.build_env(), verbose=verbose)
|
return check_call(["cargo", "clean"] + opts, env=self.build_env(), verbose=verbose)
|
||||||
|
|
||||||
|
def package_openxr_dlls(self, env, servo_exe_dir, target):
|
||||||
|
target_arch = target.split('-')[0]
|
||||||
|
if target_arch == "aarch64":
|
||||||
|
arch = "arm64"
|
||||||
|
elif target_arch == "x64":
|
||||||
|
arch = "x64"
|
||||||
|
else:
|
||||||
|
print("ERROR: We do not have openxr_loader DLLs for %s" % target_arch)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# The package on S3 contains both debug and release DLLs, but
|
||||||
|
# by default we only use release DLLs. If you need to debug OpenXR itself,
|
||||||
|
# change this to Debug.
|
||||||
|
dll_path = os.path.join(self.msvc_package_dir("openxr-loader-uwp"), arch, "Release", "openxr_loader.dll")
|
||||||
|
|
||||||
|
try:
|
||||||
|
shutil.copy(dll_path, servo_exe_dir)
|
||||||
|
except:
|
||||||
|
print("ERROR: Could not find %s" % dll_path)
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def gstreamer_root(target, env):
|
def gstreamer_root(target, env):
|
||||||
arch = {
|
arch = {
|
||||||
|
|
|
@ -9,4 +9,5 @@ WINDOWS_MSVC = {
|
||||||
"ninja": "1.7.1",
|
"ninja": "1.7.1",
|
||||||
"openssl": "111.3.0+1.1.1c-vs2017",
|
"openssl": "111.3.0+1.1.1c-vs2017",
|
||||||
"gstreamer-uwp": "1.16.0.3",
|
"gstreamer-uwp": "1.16.0.3",
|
||||||
|
"openxr-loader-uwp": "1.0",
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,8 +173,8 @@
|
||||||
<AppxManifest Include="Package.appxmanifest">
|
<AppxManifest Include="Package.appxmanifest">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</AppxManifest>
|
</AppxManifest>
|
||||||
<None Include="C:\Users\manis\dev\dlls\openxr_loader.dll">
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\openxr_loader.dll">
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</DeploymentContent>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\libcrypto.dll">
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\libcrypto.dll">
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</DeploymentContent>
|
||||||
|
@ -191,6 +191,9 @@
|
||||||
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\vcruntime140.dll">
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\vcruntime140.dll">
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</DeploymentContent>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\release\openxr_loader.dll">
|
||||||
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</DeploymentContent>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\target\aarch64-pc-windows-msvc\release\libcrypto.dll">
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\release\libcrypto.dll">
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</DeploymentContent>
|
||||||
</None>
|
</None>
|
||||||
|
@ -224,6 +227,13 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</DeploymentContent>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\target\debug\openxr_loader.dll">
|
||||||
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||||
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</DeploymentContent>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||||
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</DeploymentContent>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\target\debug\libcrypto.dll">
|
<None Include="..\..\..\target\debug\libcrypto.dll">
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||||
|
@ -239,6 +249,9 @@
|
||||||
</DeploymentContent>
|
</DeploymentContent>
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\target\release\openxr_loader.dll">
|
||||||
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\target\release\libcrypto.dll">
|
<None Include="..\..\..\target\release\libcrypto.dll">
|
||||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
|
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
|
||||||
</None>
|
</None>
|
||||||
|
|
|
@ -90,6 +90,9 @@
|
||||||
<None Include="Content\VertexShaderShared.hlsl">
|
<None Include="Content\VertexShaderShared.hlsl">
|
||||||
<Filter>Content</Filter>
|
<Filter>Content</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\target\debug\openxr_loader.dll">
|
||||||
|
<Filter>DebugServoDLLs</Filter>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\target\debug\libcrypto.dll">
|
<None Include="..\..\..\target\debug\libcrypto.dll">
|
||||||
<Filter>DebugServoDLLs</Filter>
|
<Filter>DebugServoDLLs</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
@ -102,12 +105,18 @@
|
||||||
<None Include="..\..\..\target\debug\simpleservo.dll">
|
<None Include="..\..\..\target\debug\simpleservo.dll">
|
||||||
<Filter>DebugServoDLLs</Filter>
|
<Filter>DebugServoDLLs</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\target\release\openxr_loader.dll">
|
||||||
|
<Filter>ReleaseServoDLLs</Filter>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\target\release\libcrypto.dll">
|
<None Include="..\..\..\target\release\libcrypto.dll">
|
||||||
<Filter>ReleaseServoDLLs</Filter>
|
<Filter>ReleaseServoDLLs</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\target\release\libssl.dll">
|
<None Include="..\..\..\target\release\libssl.dll">
|
||||||
<Filter>ReleaseServoDLLs</Filter>
|
<Filter>ReleaseServoDLLs</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\openxr_loader.dll">
|
||||||
|
<Filter>DebugARM64ServoDLLs</Filter>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\libcrypto.dll">
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\libcrypto.dll">
|
||||||
<Filter>DebugARM64ServoDLLs</Filter>
|
<Filter>DebugARM64ServoDLLs</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
@ -117,6 +126,9 @@
|
||||||
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\simpleservo.dll">
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\debug\simpleservo.dll">
|
||||||
<Filter>DebugARM64ServoDLLs</Filter>
|
<Filter>DebugARM64ServoDLLs</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\release\openxr_loader.dll">
|
||||||
|
<Filter>ReleaseARM64ServoDLLs</Filter>
|
||||||
|
</None>
|
||||||
<None Include="..\..\..\target\aarch64-pc-windows-msvc\release\libcrypto.dll">
|
<None Include="..\..\..\target\aarch64-pc-windows-msvc\release\libcrypto.dll">
|
||||||
<Filter>ReleaseARM64ServoDLLs</Filter>
|
<Filter>ReleaseARM64ServoDLLs</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
|
29
support/hololens/create-openxr-package.bat
Normal file
29
support/hololens/create-openxr-package.bat
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
REM USAGE
|
||||||
|
REM Clone https://github.com/microsoft/OpenXR-SDK-VisualStudio, open the openxr_loader_uwp project
|
||||||
|
REM Change the project output type to a dynamic library
|
||||||
|
REM Build it for Debug/Release x64/ARM64
|
||||||
|
REM create-openxr-package path\to\outputdir path\to\OpenXR-SDK-VisualStudio
|
||||||
|
REM name the outputdir openxr-loader-uwp-versionnumber and zip it
|
||||||
|
|
||||||
|
cd %1
|
||||||
|
mkdir arm64
|
||||||
|
mkdir arm64\Debug
|
||||||
|
cd arm64\Debug
|
||||||
|
copy %2\bin\Debug\ARM64\openxr_loader_uwp\* .
|
||||||
|
ren *.* openxr_loader.*
|
||||||
|
cd ..
|
||||||
|
mkdir Release
|
||||||
|
cd Release
|
||||||
|
copy %2\bin\Release\ARM64\openxr_loader_uwp\* .
|
||||||
|
ren *.* openxr_loader.*
|
||||||
|
cd ..\..
|
||||||
|
mkdir x64
|
||||||
|
mkdir x64\Debug
|
||||||
|
cd x64\Debug
|
||||||
|
copy %2\bin\Debug\x64\openxr_loader_uwp\* .
|
||||||
|
ren *.* openxr_loader.*
|
||||||
|
cd ..
|
||||||
|
mkdir Release
|
||||||
|
cd Release
|
||||||
|
copy %2\bin\Release\x64\openxr_loader_uwp\* .
|
||||||
|
ren *.* openxr_loader.*
|
Loading…
Add table
Add a link
Reference in a new issue