Skip to content

Commit

Permalink
Packaging: add support for xrOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fkuehne committed Mar 20, 2024
1 parent 47cdb05 commit 72b3128
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
13 changes: 13 additions & 0 deletions extras/package/apple/build.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export VLC_DEPLOYMENT_TARGET_MACOSX="10.11"
export VLC_DEPLOYMENT_TARGET_IOS="9.0"
# tvOS deployment target
export VLC_DEPLOYMENT_TARGET_TVOS="11.0"
# xrOS deployment target
export VLC_DEPLOYMENT_TARGET_XROS="1.0"

#
# Contrib options
Expand Down Expand Up @@ -94,6 +96,11 @@ export VLC_CONTRIB_OPTIONS_TVOS=(
--disable-aom
)

# Additional contrib bootstrap options for iOS
export VLC_CONTRIB_OPTIONS_XROS=(
--disable-aom
)

#
# VLC options
#
Expand Down Expand Up @@ -142,6 +149,9 @@ export VLC_CONFIG_OPTIONS_IOS=()
# Additional configure options for tvOS
export VLC_CONFIG_OPTIONS_TVOS=()

# Additional configure options for xrOS
export VLC_CONFIG_OPTIONS_XROS=()

#
# VLC module options
#
Expand Down Expand Up @@ -218,3 +228,6 @@ export VLC_MODULE_REMOVAL_LIST_IOS=()

# Additional modules to remove for tvOS
export VLC_MODULE_REMOVAL_LIST_TVOS=()

# Additional modules to remove for xrOS
export VLC_MODULE_REMOVAL_LIST_XROS=()
27 changes: 26 additions & 1 deletion extras/package/apple/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,13 @@ set_deployment_target()
VLC_DEPLOYMENT_TARGET_CFLAG="${VLC_DEPLOYMENT_TARGET_CFLAG}-simulator"
fi
VLC_DEPLOYMENT_TARGET_LDFLAG="-Wl,-platform_version,${VLC_DEPLOYMENT_TARGET_LDFLAG},${VLC_DEPLOYMENT_TARGET},${VLC_APPLE_SDK_VERSION}"
VLC_DEPLOYMENT_TARGET_CFLAG="${VLC_DEPLOYMENT_TARGET_CFLAG}-version-min=${VLC_DEPLOYMENT_TARGET}"

# xrOS does not support the minimal version flag in clang 15.x (yet ?)
if [ "$VLC_HOST_OS" != "xros" ]; then
VLC_DEPLOYMENT_TARGET_CFLAG="${VLC_DEPLOYMENT_TARGET_CFLAG}-version-min=${VLC_DEPLOYMENT_TARGET}"
else
VLC_DEPLOYMENT_TARGET_CFLAG=""
fi
}

# Validates the architecture and sets VLC_HOST_ARCH
Expand Down Expand Up @@ -307,6 +313,17 @@ validate_sdk_name()
VLC_HOST_OS="macosx"
set_deployment_target "$VLC_DEPLOYMENT_TARGET_MACOSX"
;;
xros*)
VLC_HOST_PLATFORM="xrOS"
VLC_HOST_OS="xros"
set_deployment_target "$VLC_DEPLOYMENT_TARGET_XROS"
;;
xrsimulator*)
VLC_HOST_PLATFORM="xr-Simulator"
VLC_HOST_PLATFORM_SIMULATOR="yes"
VLC_HOST_OS="xros"
set_deployment_target "$VLC_DEPLOYMENT_TARGET_XROS"
;;
watch*)
abort_err "Building for watchOS is not supported by this script"
;;
Expand Down Expand Up @@ -612,6 +629,8 @@ if [ "$VLC_HOST_OS" = "ios" ]; then
elif [ "$VLC_HOST_OS" = "tvos" ]; then
export BUILDFORIOS="yes"
export BUILDFORTVOS="yes"
elif [ "$VLC_HOST_OS" = "xros" ]; then
export BUILDFORIOS="yes"
fi

# Default to "make" if there is no MAKE env variable
Expand Down Expand Up @@ -646,6 +665,8 @@ elif [ "$VLC_HOST_OS" = "ios" ]; then
VLC_CONTRIB_OPTIONS+=( "${VLC_CONTRIB_OPTIONS_IOS[@]}" )
elif [ "$VLC_HOST_OS" = "tvos" ]; then
VLC_CONTRIB_OPTIONS+=( "${VLC_CONTRIB_OPTIONS_TVOS[@]}" )
elif [ "$VLC_HOST_OS" = "xros" ]; then
VLC_CONTRIB_OPTIONS+=( "${VLC_CONTRIB_OPTIONS_XROS[@]}" )
fi

# Create dir to build contribs in
Expand Down Expand Up @@ -726,6 +747,8 @@ elif [ "$VLC_HOST_OS" = "ios" ]; then
VLC_CONFIG_OPTIONS+=( "${VLC_CONFIG_OPTIONS_IOS[@]}" )
elif [ "$VLC_HOST_OS" = "tvos" ]; then
VLC_CONFIG_OPTIONS+=( "${VLC_CONFIG_OPTIONS_TVOS[@]}" )
elif [ "$VLC_HOST_OS" = "xros" ]; then
VLC_CONFIG_OPTIONS+=( "${VLC_CONFIG_OPTIONS_XROS[@]}" )
fi

if [ "$VLC_DISABLE_DEBUG" -gt "0" ]; then
Expand Down Expand Up @@ -791,6 +814,8 @@ elif [ "$VLC_HOST_OS" = "ios" ]; then
VLC_MODULE_REMOVAL_LIST+=( "${VLC_MODULE_REMOVAL_LIST_IOS[@]}" )
elif [ "$VLC_HOST_OS" = "tvos" ]; then
VLC_MODULE_REMOVAL_LIST+=( "${VLC_MODULE_REMOVAL_LIST_TVOS[@]}" )
elif [ "$VLC_HOST_OS" = "xros" ]; then
VLC_MODULE_REMOVAL_LIST+=( "${VLC_MODULE_REMOVAL_LIST_XROS[@]}" )
fi

for module in "${VLC_MODULE_REMOVAL_LIST[@]}"; do
Expand Down

0 comments on commit 72b3128

Please sign in to comment.