Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions ports/qtbase/cmake/qt_install_submodule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ if(NOT DEFINED QT6_DIRECTORY_PREFIX)
set(QT6_DIRECTORY_PREFIX "Qt6/")
endif()

if(VCPKG_TARGET_IS_ANDROID AND NOT ANDROID_SDK_ROOT)
message(FATAL_ERROR "${PORT} requires ANDROID_SDK_ROOT to be set. Consider adding it to the triplet." )
if(VCPKG_TARGET_IS_ANDROID)
if(NOT ANDROID_SDK_ROOT)
if($ENV{ANDROID_HOME})
set(ANDROID_SDK_ROOT "$ENV{ANDROID_HOME}")
endif()
if(NOT ANDROID_SDK_ROOT)
message(FATAL_ERROR "${PORT} requires ANDROID_SDK_ROOT to be set. Set ANDROID_HOME as environment variable or ANDROID_SDK_ROOT in the triplet.")
endif()
endif()
if(NOT IS_DIRECTORY ${ANDROID_SDK_ROOT})
message(FATAL_ERROR "ANDROID_SDK_ROOT (or ENV{ANDROID_HOME}) is set to `${ANDROID_SDK_ROOT}` which is not a directory.")
endif()
endif()

function(qt_download_submodule_impl)
Expand Down
6 changes: 3 additions & 3 deletions ports/qtbase/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qtbase",
"version": "6.7.2",
"port-version": 2,
"port-version": 3,
"description": "Qt Base (Core, Gui, Widgets, Network, ...)",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down Expand Up @@ -63,7 +63,7 @@
"concurrent",
{
"name": "dbus",
"platform": "!(static & windows)"
"platform": "!uwp & !staticcrt & !android & !ios"
},
"default-features",
"dnslookup",
Expand Down Expand Up @@ -207,7 +207,7 @@
},
"egl": {
"description": "EGL",
"supports": "linux",
"supports": "linux | android",
"dependencies": [
"egl"
]
Expand Down
41 changes: 41 additions & 0 deletions scripts/azure-pipelines/acquire-android-sdk.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$JDKVersion = '17.0.2'
$ToolsVersion = '10406996_latest'

Write-Host "Downloading the JDK"
& "./vcpkg" x-download openjdk-$JDKVersion.tar.gz "--sha512=0bf168239a9a1738ad6368b8f931d072aeb122863ec39ea86dc0449837f06953ce18be87bab7e20fd2585299a680ea844ec419fa235da87dfdd7e37b73740a57" "--url=https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-${JDKVersion}_linux-x64_bin.tar.gz" @cachingArgs

Write-Host "Setting up the JDK in $env:JAVA_HOME"
$env:JAVA_HOME = Join-Path $Pwd "jdk-$JDKVersion"
& tar -xvf openjdk-$JDKVersion.tar.gz

Write-Host "Downloading the Android SDK"
& "./vcpkg" x-download sdk-commandlinetools-linux-$ToolsVersion.zip "--sha512=64b7d18ee7adeb1204eaa2978091e874dc9af9604796b64e1a185a11c15325657383fc9900e55e4590c8b8a2784b3881745d2f32daef1207e746c0ee41c2b72b" "--url=https://dl.google.com/android/repository/commandlinetools-linux-${ToolsVersion}.zip"

$env:ANDROID_HOME = Join-Path $Pwd "android-sdk"
Write-Host "Setting up the Android SDK in $env:ANDROID_HOME"
& unzip -q sdk-commandlinetools-linux-$ToolsVersion.zip -d android-sdk

# https://doc.qt.io/qt-6/android-getting-started.html
if ($false) {
& bash -c 'yes | ./android-sdk/cmdline-tools/bin/sdkmanager "--sdk_root=$ANDROID_HOME" "platform-tools" "platforms;android-34" "build-tools;34.0.0"'
} else {
$filename = 'build-tools_r34-linux.zip'
Write-Host "Adding $filename"
& "./vcpkg" x-download $filename "--sha512=c28dd52f8eca82996726905617f3cb4b0f0aee1334417b450d296991d7112cab1288f5fd42c48a079ba6788218079f81caa3e3e9108e4a6f27163a1eb7f32bd7" "--url=https://dl.google.com/android/repository/$filename"
New-Item -Name android-sdk/build-tools -Type Directory
& unzip -q $filename -d android-sdk/build-tools
Rename-Item ./android-sdk/build-tools/android-14 34.0.0

$filename = 'platform-34-ext7_r03.zip'
Write-Host "Adding $filename"
& "./vcpkg" x-download $filename "--sha512=7d7feb2b04326578cc37fd80e9a8b604aa8bcd8360de160eadedf2a5f28f62a809d3bd6e386d72ba9d32cacbf0a0e3417d54c4195d5091d86d40b29404b222bb" "--url=https://dl.google.com/android/repository/$filename"
New-Item -Name android-sdk/platforms -Type Directory
& unzip -q $filename -d android-sdk/platforms

$filename = 'platform-tools_r35.0.1-linux.zip'
Write-Host "Adding $filename"
& "./vcpkg" x-download $filename "--sha512=6b95e496cbef1e0940aaca79ab7c3f149f8e670a1fd427fdc34ee22cac773aaa1b5619a4e964d0c176894fb6fb9ecb9d3a037a657c086aa737a2c104f9a1f229" "--url=https://dl.google.com/android/repository/$filename"
& unzip -q $filename -d android-sdk
}
& bash -c 'yes | ./android-sdk/cmdline-tools/bin/sdkmanager "--sdk_root=$ANDROID_HOME" --licenses'
& ./android-sdk/cmdline-tools/bin/sdkmanager "--sdk_root=$env:ANDROID_HOME" --list_installed
13 changes: 13 additions & 0 deletions scripts/azure-pipelines/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# DisableDockerDetector "Used to build the container deployed to Azure Container Registry"
FROM ubuntu:focal-20240530

ADD https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip /android-sdk-11076708.zip
ADD https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb /packages-microsoft-prod.deb
ADD https://dl.google.com/android/repository/android-ndk-r26d-linux.zip /android-ndk-r26d-linux.zip

Expand Down Expand Up @@ -62,8 +63,20 @@ apt-get -y --no-install-recommends install $APT_PACKAGES
# Android NDK
unzip /android-ndk-r26d-linux.zip
rm -f android-ndk-r26d-linux.zip

# Android SDK
unzip /android-sdk-11076708.zip -d android-sdk
rm -f android-sdk-11076708.zip

shopt -s extglob
mkdir /android-sdk/cmdline-tools/latest
# https://stackoverflow.com/questions/65262340/cmdline-tools-could-not-determine-sdk-root
mv /android-sdk/cmdline-tools/!(latest) /android-sdk/cmdline-tools/latest
yes | /android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses
/android-sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-33" "build-tools;29.0.2" "platform-tools" "tools"
END_OF_SCRIPT

ENV ANDROID_NDK_HOME /android-ndk-r26d
ENV ANDROID_SDK_ROOT /android-sdk

WORKDIR /vcpkg
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:
- name: tripletPattern
displayName: 'Enable triplets which contain this substring'
type: string
default: '-'
default: 'android'

jobs:
- template: windows/azure-pipelines.yml
Expand Down
7 changes: 7 additions & 0 deletions scripts/azure-pipelines/test-modified-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ if ($IsWindows) {
rmdir empty
}

if ($IsLinux)
{
. ./scripts/azure-pipelines/acquire-android-sdk.ps1
$NoParentHashes = $true
}


& "./vcpkg$executableExtension" x-ci-clean @commonArgs
$lastLastExitCode = $LASTEXITCODE
if ($lastLastExitCode -ne 0)
Expand Down
3 changes: 2 additions & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7418,7 +7418,8 @@
},
"qtbase": {
"baseline": "6.7.2",
"port-version": 2

"port-version": 3
},
"qtcharts": {
"baseline": "6.7.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qtbase.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a90ea5e0b28db8843505b1ab2d6f69b51f054287",
"version": "6.7.2",
"port-version": 3
},
{
"git-tree": "4ab85d9411b4c85c89976e768f158dd0631b442d",
"version": "6.7.2",
Expand Down