From 0719f922a191ce863f630a76679b66b9efc587a8 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Thu, 23 Oct 2025 14:39:24 +0200 Subject: [PATCH] Add openapi generator provisioning on Windows Place the downloaded file into the new directory inside C:\Utils and add it to the PATH, because that's what the qtopenapi build scripts expect. Task-number: QTBUG-138968 Change-Id: I113b0095074cc8f0dc0470daf54fa7f22ee22719 Reviewed-by: Toni Saario --- .../common/windows/install-openapi.ps1 | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 coin/provisioning/common/windows/install-openapi.ps1 diff --git a/coin/provisioning/common/windows/install-openapi.ps1 b/coin/provisioning/common/windows/install-openapi.ps1 new file mode 100644 index 00000000..bb77a482 --- /dev/null +++ b/coin/provisioning/common/windows/install-openapi.ps1 @@ -0,0 +1,27 @@ +# Copyright (C) 2025 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +# openapi is needed for qtopenapi project + +. "$PSScriptRoot\helpers.ps1" + +$version = "7.15.0" + +$temp = "$env:tmp" +Write-Host "Fetching openapi generator ver. $version..." +$url_cache = "http://ci-files01-hki.ci.qt.io/input/qtopenapi/openapi_client_generators/openapi-generator-cli-$version.jar" +$url_official = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$version/openapi-generator-cli-$version.jar" +$target_file = "openapi-generator-cli.jar" +$sha1 = "bb58e257f724fb46b7f2b309a9fa98e63fd7199f" + +Download $url_official $url_cache "$temp\$target_file" +Verify-Checksum "$temp\$target_file" $sha1 + +$openapi_location = "C:\Utils\qt-openapi" +Write-Host "Copying $target_file to $openapi_location" +New-Item -Path "$openapi_location" -ItemType Directory +Move-Item "$temp\$target_file" "$openapi_location\$target_file" + +Prepend-Path "$openapi_location" + +Write-Output "OpenAPI generator = $version" >> ~/versions.txt