From 833558ca0184d70f6ff96bb263c88db836b23fa6 Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Thu, 17 Apr 2025 04:53:43 +0700 Subject: [PATCH] Add The Qt Company's family of Qt extensions These extensions all live in a single repository. Most extensions are relatively straight-forward to build (non-extension-pack ones require building common library first). However, qt-core comes with a binary written in Go, which requires us to use custom commands to facilitate building it using GoReleaser. Build commands have handling for difference between the currently- published version and the current Git tip, in anticipation that the Git tip will eventually be released. GitHub workflows are modified to ensure Go environment is available. Extensions are dual-licensed between Qt's commercial license and LGPL 3.0 only. The issue which request publishing on Open-VSX [1] gets some interest from upstream, but does not have any update since September 2024. [1]: https://bugreports.qt.io/browse/VSCODEEXT-96 Signed-off-by: Ratchanan Srirattanamet --- .github/workflows/publish-extensions.yml | 3 ++ .github/workflows/validate-pr.yml | 3 ++ extensions.json | 47 ++++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/.github/workflows/publish-extensions.yml b/.github/workflows/publish-extensions.yml index c9852921b..c3582de37 100644 --- a/.github/workflows/publish-extensions.yml +++ b/.github/workflows/publish-extensions.yml @@ -49,6 +49,9 @@ jobs: with: distribution: "microsoft" java-version: "17" + - uses: actions/setup-go@v5 + with: + go-version: 'stable' - name: Install dependencies for native modules run: | sudo apt-get update diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index ac7198c2e..90eca344d 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -30,6 +30,9 @@ jobs: run: | pyenv install 3.8 pyenv global 3.8 + - uses: actions/setup-go@v5 + with: + go-version: 'stable' - run: EXTENSIONS=$(node diff-extensions) node publish-extensions env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/extensions.json b/extensions.json index 944c98b56..c8a21ae72 100644 --- a/extensions.json +++ b/extensions.json @@ -1375,6 +1375,53 @@ "tecosaur.latex-utilities": { "repository": "https://github.com/tecosaur/LaTeX-Utilities" }, + "theqtcompany.qt": { + "repository": "https://github.com/qt-labs/vscodeext", + "location": "extension_packs/qt/" + }, + "theqtcompany.qt-cpp": { + "repository": "https://github.com/qt-labs/vscodeext", + "location": "qt-cpp/", + "prepublish": "npm run ci:qt-lib && npm run compile:qt-lib && npm run compile:qt-cpp" + }, + "theqtcompany.qt-cpp-pack": { + "repository": "https://github.com/qt-labs/vscodeext", + "location": "extension_packs/cpp/" + }, + "theqtcompany.qt-core": { + "repository": "https://github.com/qt-labs/vscodeext", + "location": "qt-core/", + "custom": [ + "npm ci", + "npm run ci:qt-lib", + "npm run ci:qt-core", + + "npm run compile:qt-lib", + + "go install github.com/goreleaser/goreleaser/v2@latest", + "cd qt-cli && GORELEASER_CURRENT_TAG=${VERSION} goreleaser release --snapshot --clean", + "mkdir -p qt-core/res/qtcli", + "if [ -e qt-cli/dist/bin ]; then cp -r qt-cli/dist/bin/* qt-core/res/qtcli; else cp qt-cli/dist/qtcli_{linux,windows,darwin_fat}* qt-core/res/qtcli; fi", + + "npm run package:qt-core", + "mv qt-core/out/qt-core-*.vsix qt-core/out/qt-core.vsix" + ], + "extensionFile": "out/qt-core.vsix" + }, + "theqtcompany.qt-qml": { + "repository": "https://github.com/qt-labs/vscodeext", + "location": "qt-qml/", + "prepublish": "npm run ci:qt-lib && npm run compile:qt-lib && npm run compile:qt-qml" + }, + "theqtcompany.qt-ui": { + "repository": "https://github.com/qt-labs/vscodeext", + "location": "qt-ui/", + "prepublish": "npm run ci:qt-lib && npm run compile:qt-lib && npm run compile:qt-ui" + }, + "theqtcompany.qt-wasm-pack": { + "repository": "https://github.com/qt-labs/vscodeext", + "location": "extension_packs/wasm/" + }, "Tobiah.unity-tools": { "repository": "https://github.com/TobiahZ/unity-tools" },