Skip to content

Commit

Permalink
OpenXR SDK 1.0.28.2 hotfix release: Includes the following fixes
Browse files Browse the repository at this point in the history
-   Loader spec: Fix description of <queries> element contents:
    existing description would fail to install. (internal MR 2840,
    internal issue 2053)
-   Android AAR artifacts (loader) and hello_xr: Fix <queries>
    element contents. (internal MR 2840, internal issue 2053)
-   Android AAR artifacts: Fix C++ standard library selection for
    Android artifacts in build-aar.sh (internal MR 2836, internal
    issue 2052)
-   Android AAR artifacts: Use jar instead of 7-zip to perform
    archiving, and document requirements in build-aar.sh (internal
    MR 2836, OpenXR-SDK-Source issue 303, internal issue 1711)
-   build system: Support SDK hotfix versions (fourth version
    component). (internal MR 2836)
  • Loading branch information
rpavlik committed Jul 27, 2023
1 parent f5beb01 commit 8c966ae
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 47 deletions.
53 changes: 32 additions & 21 deletions .github/workflows/windows-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2022, Collabora, Ltd.
# Copyright 2021-2023, Collabora, Ltd.
# SPDX-License-Identifier: CC0-1.0

name: Windows builds
Expand All @@ -12,62 +12,73 @@ on:
workflow_dispatch:

jobs:
generate_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
run: python3 .github/scripts/generate_windows_matrix_build.py matrix
# generate_matrix:
# runs-on: ubuntu-latest
# outputs:
# matrix: "${{ steps.set-matrix.outputs.matrix }}"
# steps:
# - uses: "actions/checkout@v3"
# - id: set-matrix
# run: "python3 .github/scripts/generate_windows_matrix_build.py matrix"
msvc-build:
needs: generate_matrix
# needs: generate_matrix
strategy:
fail-fast: true
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix)}}
# TODO: Fix matrix generation? Broke recently due to changes in github actions
# matrix: "${{fromJson(needs.generate_matrix.outputs.matrix)}}"
matrix:
preset:
- win32
- x64
- win32_uwp
- x64_uwp
- arm64_uwp
- arm_uwp

uses: ./.github/workflows/msvc-build-preset.yml
uses: "./.github/workflows/msvc-build-preset.yml"
with:
preset: ${{ matrix.preset }}
preset: "${{ matrix.preset }}"
artifactName: "loader_${{ matrix.preset }}"
buildType: "RelWithDebInfo"

organize-and-release-artifacts:
if: inputs.organizeAndRelease
needs:
- msvc-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: "actions/checkout@v3"

- name: Retrieve artifacts
uses: actions/download-artifact@v3
uses: "actions/download-artifact@v3"
with:
path: artifacts

- name: Organize artifacts
run: python .github/scripts/organize_windows_artifacts.py "${{ github.workspace }}" "${{ github.workspace }}/openxr_loader"
run: 'python .github/scripts/organize_windows_artifacts.py "${{ github.workspace }}" "${{ github.workspace }}/openxr_loader"'

- name: Upload combined artifact
uses: actions/upload-artifact@v3
uses: "actions/upload-artifact@v3"
with:
name: openxr_loader_windows
path: "${{ github.workspace }}/openxr_loader"

# NuGet stuff now

- name: Setup NuGet
uses: NuGet/setup-nuget@v1
uses: "NuGet/setup-nuget@296fd3ccf8528660c91106efefe2364482f86d6f"
with:
nuget-version: "5.x"

- name: Stage loader and headers for NuGet
shell: pwsh
run: ${{ github.workspace }}/.azure-pipelines/nuget/stage_nuget.ps1 "${{ github.workspace }}/openxr_loader" "${{ github.workspace }}/specification/Makefile" "${{ github.workspace }}/openxr_loader_staging"
run: '${{ github.workspace }}/.azure-pipelines/nuget/stage_nuget.ps1 "${{ github.workspace }}/openxr_loader" "${{ github.workspace }}/specification/Makefile" "${{ github.workspace }}/openxr_loader_staging"'

- name: Pack NuGet package
run: nuget pack ${{ github.workspace }}/openxr_loader_staging/OpenXR.Loader.nuspec -OutputDirectory ${{ github.workspace }}/nuget
run: 'nuget pack "${{ github.workspace }}/openxr_loader_staging/OpenXR.Loader.nuspec" -OutputDirectory "${{ github.workspace }}/nuget"'

- name: Upload NuGet artifact
uses: actions/upload-artifact@v3
uses: "actions/upload-artifact@v3"
with:
name: NuGet
path: "${{ github.workspace }}/nuget"
1 change: 1 addition & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Upstream-Contact: Ryan Pavlik <openxr-speceditor AT khronos DOT org>
Source: https://khronos.org/registry/OpenXR/

Files: changes/*
HOTFIX
Copyright: 2019-2023, The Khronos Group Inc.
License: CC-BY-4.0

Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ the loader documentation now describes how OpenXR handles compatibility with
Android API levels of 30 and above: runtimes may need to update accordingly to
support this compatibility solution.

- **OpenXR SDK 1.0.28.2** hotfix release includes the following fixes
- Loader spec: Fix description of `<queries>` element contents: existing
description would fail to install.
([internal MR 2840](https://gitlab.khronos.org/openxr/openxr/merge_requests/2840),
[internal issue 2053](https://gitlab.khronos.org/openxr/openxr/issues/2053))
- Android AAR artifacts (loader) and hello_xr: Fix `<queries>` element contents.
([internal MR 2840](https://gitlab.khronos.org/openxr/openxr/merge_requests/2840),
[internal issue 2053](https://gitlab.khronos.org/openxr/openxr/issues/2053))
- Android AAR artifacts: Fix C++ standard library selection for Android artifacts
in `build-aar.sh`
([internal MR 2836](https://gitlab.khronos.org/openxr/openxr/merge_requests/2836),
[internal issue 2052](https://gitlab.khronos.org/openxr/openxr/issues/2052))
- Android AAR artifacts: Use `jar` instead of 7-zip to perform archiving, and
document requirements in `build-aar.sh`
([internal MR 2836](https://gitlab.khronos.org/openxr/openxr/merge_requests/2836),
[OpenXR-SDK-Source issue 303](https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/303),
[internal issue 1711](https://gitlab.khronos.org/openxr/openxr/issues/1711))
- build system: Support SDK hotfix versions (fourth version component).
([internal MR 2836](https://gitlab.khronos.org/openxr/openxr/merge_requests/2836))
- **OpenXR SDK 1.0.28.1** hotfix release includes the following fix
- API dump layer: Fix build on Windows on ARM64.
([OpenXR-SDK-Source PR 414](https://github.com/KhronosGroup/OpenXR-SDK-Source/pull/414))
- Registry
- Added defines to `xr.xml` for extension enum base and enum stride.
([internal MR 2693](https://gitlab.khronos.org/openxr/openxr/merge_requests/2693),
Expand Down
1 change: 1 addition & 0 deletions HOTFIX
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2
6 changes: 4 additions & 2 deletions src/loader/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@

<!-- so client-side code of runtime/layers can talk to their service sides -->
<intent>
<action android:name="org.khronos.openxr.OpenXRRuntimeService" />
<action android:name="org.khronos.openxr.OpenXRApiLayerService" />
<action android:name="org.khronos.openxr.OpenXRRuntimeService" />
</intent>
<intent>
<action android:name="org.khronos.openxr.OpenXRApiLayerService" />
</intent>
</queries>

Expand Down
4 changes: 3 additions & 1 deletion src/loader/AndroidManifest.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.khronos.openxr.openxr_loader_for_android"
android:versionCode="1"
android:versionName="${MAJOR}.${MINOR}.${PATCH}${OPENXR_ANDROID_VERSION_SUFFIX}">
android:versionName="${OPENXR_FULL_VERSION}${OPENXR_ANDROID_VERSION_SUFFIX}">
<!--
Copyright (c) 2020-2023, The Khronos Group Inc.
SPDX-License-Identifier: Apache-2.0
Expand All @@ -17,6 +17,8 @@
<!-- so client-side code of runtime/layers can talk to their service sides -->
<intent>
<action android:name="org.khronos.openxr.OpenXRRuntimeService" />
</intent>
<intent>
<action android:name="org.khronos.openxr.OpenXRApiLayerService" />
</intent>
</queries>
Expand Down
8 changes: 4 additions & 4 deletions src/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_compile_definitions(openxr_loader PRIVATE EXTRASYSCONFDIR="/etc")
endif()

set_target_properties(openxr_loader PROPERTIES SOVERSION "${MAJOR}" VERSION "${MAJOR}.${MINOR}.${PATCH}")
set_target_properties(openxr_loader PROPERTIES SOVERSION "${MAJOR}" VERSION "${OPENXR_FULL_VERSION}")

add_custom_target(
libopenxr_loader.so.${MAJOR}.${MINOR} ALL
COMMAND ${CMAKE_COMMAND} -E create_symlink libopenxr_loader.so.${MAJOR}.${MINOR}.${PATCH}
COMMAND ${CMAKE_COMMAND} -E create_symlink libopenxr_loader.so.${OPENXR_FULL_VERSION}
libopenxr_loader.so.${MAJOR}.${MINOR}
)
elseif(WIN32)
Expand Down Expand Up @@ -338,7 +338,7 @@ configure_package_config_file(
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/OpenXRConfigVersion.cmake
VERSION "${MAJOR}.${MINOR}.${PATCH}"
VERSION "${OPENXR_FULL_VERSION}"
COMPATIBILITY SameMajorVersion
)
install(
Expand Down Expand Up @@ -401,5 +401,5 @@ elseif(ANDROID AND INSTALL_TO_ARCHITECTURE_PREFIXES)

# This gets used directly by build-aar.sh
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/openxr_loader_for_android.pom
${CMAKE_CURRENT_BINARY_DIR}/openxr_loader_for_android-${MAJOR}.${MINOR}.${PATCH}${OPENXR_ANDROID_VERSION_SUFFIX}.pom)
${CMAKE_CURRENT_BINARY_DIR}/openxr_loader_for_android-${OPENXR_FULL_VERSION}${OPENXR_ANDROID_VERSION_SUFFIX}.pom)
endif()
11 changes: 6 additions & 5 deletions src/loader/openxr_loader_for_android.pom
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
Copyright (c) 2020 The Khronos Group Inc.
SPDX-License-Identifier: Apache-2.0
Copyright (c) 2020-2023, The Khronos Group Inc.
SPDX-License-Identifier: Apache-2.0 OR MIT
-->
<groupId>org.khronos.openxr</groupId>
<artifactId>openxr_loader_for_android</artifactId>
<version>@MAJOR@.@MINOR@.@PATCH@@OPENXR_ANDROID_VERSION_SUFFIX@</version>
<version>@MAJOR@.@MINOR@.@PATCH@@OPENXR_SDK_HOTFIX_VERSION_SUFFIX@@OPENXR_ANDROID_VERSION_SUFFIX@</version>
<packaging>aar</packaging>
<name>OpenXR Loader for Android</name>
<description>The AAR for the OpenXR Loader as used on Android.</description>
Expand Down
47 changes: 33 additions & 14 deletions src/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,45 @@
set(MAJOR "0")
set(MINOR "0")
set(PATCH "0")
set(OPENXR_SDK_HOTFIX_VERSION)

if(EXISTS "${PROJECT_SOURCE_DIR}/specification/registry/xr.xml")
file(STRINGS ${PROJECT_SOURCE_DIR}/specification/registry/xr.xml lines REGEX "#define <name>XR_CURRENT_API_VERSION")
file(STRINGS ${PROJECT_SOURCE_DIR}/specification/registry/xr.xml lines REGEX "#define <name>XR_CURRENT_API_VERSION")
else()
file(STRINGS ${PROJECT_SOURCE_DIR}/include/openxr/openxr.h lines REGEX "#define XR_CURRENT_API_VERSION")
file(STRINGS ${PROJECT_SOURCE_DIR}/include/openxr/openxr.h lines REGEX "#define XR_CURRENT_API_VERSION")
endif()

list(LENGTH lines len)
if(${len} EQUAL 1)
list(GET lines 0 cur_line)
# Erase everything up to the open parentheses
string(REGEX REPLACE "^[^\(]+" "" VERSION_BEFORE_ERASED ${cur_line})
# Erase everything after the close parentheses
string(REGEX REPLACE "[^\)]+$" "" VERSION_AFTER_ERASED ${VERSION_BEFORE_ERASED})
# Erase the parentheses
string(REPLACE "(" "" VERSION_AFTER_ERASED2 ${VERSION_AFTER_ERASED})
string(REPLACE ")" "" VERSION_AFTER_ERASED3 ${VERSION_AFTER_ERASED2})
string(REPLACE " " "" VERSION_AFTER_ERASED4 ${VERSION_AFTER_ERASED3})
string(REGEX REPLACE "^([0-9]+)\\,[0-9]+\\,[0-9]+" "\\1" MAJOR "${VERSION_AFTER_ERASED4}")
string(REGEX REPLACE "^[0-9]+\\,([0-9]+)\\,[0-9]+" "\\1" MINOR "${VERSION_AFTER_ERASED4}")
string(REGEX REPLACE "^[0-9]+\\,[0-9]+\\,([0-9]+)" "\\1" PATCH "${VERSION_AFTER_ERASED4}")

# Grab just the stuff in the parentheses of XR_MAKE_VERSION( ),
# by replacing the whole line with the stuff in the parentheses
string(REGEX REPLACE "^.+\\(([^\)]+)\\).+$" "\\1" VERSION_WITH_WHITESPACE ${cur_line})

# Remove whitespace
string(REPLACE " " "" VERSION_NO_WHITESPACE ${VERSION_WITH_WHITESPACE})

# Grab components
string(REGEX REPLACE "^([0-9]+)\\,[0-9]+\\,[0-9]+" "\\1" MAJOR "${VERSION_NO_WHITESPACE}")
string(REGEX REPLACE "^[0-9]+\\,([0-9]+)\\,[0-9]+" "\\1" MINOR "${VERSION_NO_WHITESPACE}")
string(REGEX REPLACE "^[0-9]+\\,[0-9]+\\,([0-9]+)" "\\1" PATCH "${VERSION_NO_WHITESPACE}")
else()
message(FATAL_ERROR "Unable to fetch major/minor version from registry or header")
message(FATAL_ERROR "Unable to fetch major/minor/patch version from registry or header")
endif()

# Check for an SDK hotfix version indicator file.
if(EXISTS "${PROJECT_SOURCE_DIR}/HOTFIX")
file(STRINGS "${PROJECT_SOURCE_DIR}/HOTFIX" OPENXR_SDK_HOTFIX_VERSION)
endif()
if(OPENXR_SDK_HOTFIX_VERSION)
set(OPENXR_SDK_HOTFIX_VERSION_SUFFIX ".${OPENXR_SDK_HOTFIX_VERSION}")
endif()

set(OPENXR_VERSION "${MAJOR}.${MINOR}.${PATCH}")
set(OPENXR_FULL_VERSION "${OPENXR_VERSION}${OPENXR_SDK_HOTFIX_VERSION_SUFFIX}")

if(PROJECT_NAME STREQUAL "OPENXR")
# Only show the message if we aren't a subproject
message(STATUS "OpenXR ${OPENXR_FULL_VERSION}")
endif()

0 comments on commit 8c966ae

Please sign in to comment.