From ebd1c2eb09df50ee32b062eb52295d323cfe70dd Mon Sep 17 00:00:00 2001 From: Nigel Breslaw Date: Sat, 16 Nov 2024 00:30:29 +0200 Subject: [PATCH] Put back missing _templates to fix nightly snapshots --- .github/workflows/nightly_snapshot.yaml | 6 +- .reuse/dep5 | 2 +- .../utils/_templates/embedded-tutorials.md | 43 ++++++++++++++ .../utils/_templates/nightly-release-notes.md | 59 +++++++++++++++++++ .../src/utils/_templates/release-artifacts.md | 22 +++++++ docs/src/utils/_templates/release-notes.md | 9 +++ xtask/src/license_headers_check.rs | 2 +- 7 files changed, 138 insertions(+), 5 deletions(-) create mode 100644 docs/src/utils/_templates/embedded-tutorials.md create mode 100644 docs/src/utils/_templates/nightly-release-notes.md create mode 100644 docs/src/utils/_templates/release-artifacts.md create mode 100644 docs/src/utils/_templates/release-notes.md diff --git a/.github/workflows/nightly_snapshot.yaml b/.github/workflows/nightly_snapshot.yaml index 966cb71c122..9c6d6f1fbe2 100644 --- a/.github/workflows/nightly_snapshot.yaml +++ b/.github/workflows/nightly_snapshot.yaml @@ -572,11 +572,11 @@ jobs: RELEASE_INPUT: ${{ github.event.inputs.release }} run: | if [ "$RELEASE_INPUT" != "true" ]; then - notes_file=slint-src/docs/_templates/nightly-release-notes.md + notes_file=slint-src/docs/src/utils/_templates/nightly-release-notes.md version=nightly download_version=$version else - notes_file=slint-src/docs/_templates/release-notes.md + notes_file=slint-src/docs/src/utils/_templates/release-notes.md version=$(echo artifacts/Slint-cpp-*-win64-MSVC.exe | sed -nre 's/^.*-([0-9]+\.[0-9]+\.[0-9]+).*$/\1/p') if [[ -z "$version" ]]; then echo "Version not found" @@ -587,7 +587,7 @@ jobs: download_version=v$version fi echo "VERSION=$version" >> $GITHUB_OUTPUT - cat $notes_file slint-src/docs/_templates/release-artifacts.md > release-notes.md + cat $notes_file slint-src/docs/src/utils/_templates/release-artifacts.md > release-notes.md sed -i -e "s,{version},$version,g" release-notes.md sed -i -e "s,{download_version},$download_version,g" release-notes.md sed -i -e "s,{major_version},$major_version,g" release-notes.md diff --git a/.reuse/dep5 b/.reuse/dep5 index 4bc8396bb70..d7163289472 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -27,7 +27,7 @@ Files: .github/issue_template.md .github/pull_request_template.md Copyright: Copyright © SixtyFPS GmbH License: MIT -Files: docs/_templates/*.md +Files: docs/src/utils/_templates/*.md Copyright: Copyright © SixtyFPS GmbH License: MIT diff --git a/docs/src/utils/_templates/embedded-tutorials.md b/docs/src/utils/_templates/embedded-tutorials.md new file mode 100644 index 00000000000..e3fabb77dd5 --- /dev/null +++ b/docs/src/utils/_templates/embedded-tutorials.md @@ -0,0 +1,43 @@ +# Embedded Tutorial template + + + + +Start with an introduction to the tutorial. Include the following: + +- What will the reader learn by the end of it? +- What hardware, and architecture combination is this tutorial designed for? + +## Known limitations + +Does this platform and architecture combination have any limitations, issues, etc? + +## Prerequisites + +- What must a reader have available or installed to follow this tutorial? + - Slint language SDKs (seems obvious, but always worth providing people with a path back to earlier concepts) + - Are there any prerequisites for the language SDK for this hardware or architecture combination? + - For example can it only run versions up to a particular number, etc? + - The SDK for their board, etc + - Are any other dependencies needed for Slint to work on this setup? + - Windowing systems, headers, IDE plugins + - Slint supports Wayland, X-Windows, glibc, and d-bus + - Build systems + - Input and output drivers +- What should they have ideally followed or understood before starting this tutorial? + - The quickstart, the introduction? + - Are there any external tutorials or resources specific to running Slint or a Slint-compatible language on the setup? + +## Develop application + +Suggest following the getting started tutorial. Note any special build steps required for the hardware, architecture, and software combination. + +## Debugging techniques + +Detail how people can test and debug an application running on another device. + +## Conclusion and summary + +- What did the reader learn in this tutorial and what should they read or do next? +- Does this platform and/or software combination require licensing? Then provide details on how to get in touch. +- Is there any other reason someone should get in touch with the Slint team about this platform and software combination? Then provide details on how to get in touch. diff --git a/docs/src/utils/_templates/nightly-release-notes.md b/docs/src/utils/_templates/nightly-release-notes.md new file mode 100644 index 00000000000..fed29ea0217 --- /dev/null +++ b/docs/src/utils/_templates/nightly-release-notes.md @@ -0,0 +1,59 @@ +This GitHub release is a nightly snapshot of Slint development. It serves to provide access to pre-release binaries. + +The attached binaries are updated once a day by a GitHub action building from the `master` branch. + +## How To Try Out This Development Release + +### Rust + +For Rust users, include the following in your Cargo.toml (or .cargo/config.toml): + +```toml +[patch.crates-io] +slint = { git = "https://github.com/slint-ui/slint" } +slint-build = { git = "https://github.com/slint-ui/slint" } +``` + +Please note: All Slint dependencies need to be on the same revision. To update and run, use `cargo update` and `cargo run`. +Make sure the log shows you are building the right version of Slint. + + +### C++ + +For C++ users with a binary package, download the binary from the "Assets" section below. + +If you're building from source with CMake's `FetchContent`, change the `GIT_TAG` to `master`: + +```cmake +FetchContent_Declare( + Slint + GIT_REPOSITORY https://github.com/slint-ui/slint.git + GIT_TAG master # Change this to master + SOURCE_SUBDIR api/cpp +) +``` + +Remember to remove your build directory and re-run cmake. + +### JavaScript / Node.js + +Run `npm install slint-ui@nightly` to install or upgrade. This works for new and existing projects. + +### Editors / IDEs + +For VSCode, you download the ["Slint (Nightly)" extension from the Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Slint.slint-nightly). +Note that you need to disable or uninstall an existing version of the Slint VS Code extension. + +For other editors, you compile the latest version of the Slint Language Server with: + +```sh +cargo install --git https://github.com/slint-ui/slint slint-lsp +``` + +Alternatively, download the binary from "Assets" section below. + +### Online Demos and Documentation + + - Documentation: https://slint.dev/snapshots/master/docs + - SlintPad: https://slint.dev/snapshots/master/editor + - Demos: links from https://github.com/slint-ui/slint/tree/master/examples diff --git a/docs/src/utils/_templates/release-artifacts.md b/docs/src/utils/_templates/release-artifacts.md new file mode 100644 index 00000000000..640cf28ab5e --- /dev/null +++ b/docs/src/utils/_templates/release-artifacts.md @@ -0,0 +1,22 @@ +# Assets + +## C++ SDK + +For C++ developers, this release contains the follwing pre-packed builds of Slint: + +| Desktop Operating System | Compiler | Architecture | Download | +|--------------------------|----------|--------------|----------| +| Linux | gcc | x86-64 | [Slint-cpp-{download_version}-Linux-x86_64.tar.gz](https://github.com/slint-ui/slint/releases/download/{download_version}/Slint-cpp-{download_version}-Linux-x86_64.tar.gz) | +| Windows | MSVC | x86-64 | [Slint-cpp-{download_version}-win64-MSVC.exe](https://github.com/slint-ui/slint/releases/download/{download_version}/Slint-cpp-{download_version}-win64-MSVC.exe) | + +| Templates for Microcontroller Evaluation Board | Download | +|----------------------------------|----------| +| [STM32H747I-DISCO](https://www.st.com/en/evaluation-tools/stm32h747i-disco.html): Dual-core Arm M7/M4 MCU with 4” touch LCD display module | [slint-cpp-template-stm32h747i-disco.zip](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-cpp-template-stm32h747i-disco.zip) | +| [STM32H735G-DK](https://www.st.com/en/evaluation-tools/stm32h735g-dk.html): Arm M7 MCU with 4” touch LCD display module | [slint-cpp-template-stm32h735g-dk.zip](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-cpp-template-stm32h735g-dk.zip) | + +## Tool Binaries + +| Add-on | Linux x86-64 | Windows | macOS | +|-----------|--------------|---------|-------| +| **slint-lsp** | [slint-lsp-linux.tar.gz](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-lsp-linux.tar.gz) | [slint-lsp-windows.zip](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-lsp-windows.zip) | [slint-lsp-macos.tar.gz](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-lsp-macos.tar.gz) | +| **slint-viewer** | [slint-viewer-linux.tar.gz](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-viewer-linux.tar.gz) | [slint-viewer-windows.zip](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-viewer-windows.zip) | [slint-viewer-macos.tar.gz](https://github.com/slint-ui/slint/releases/download/{download_version}/slint-viewer-macos.tar.gz) | diff --git a/docs/src/utils/_templates/release-notes.md b/docs/src/utils/_templates/release-notes.md new file mode 100644 index 00000000000..b8a51d843ed --- /dev/null +++ b/docs/src/utils/_templates/release-notes.md @@ -0,0 +1,9 @@ +Slint {version} is a patch release that fixes several bugs and crashes. For a complete list of changes, check out the [ChangeLog](https://github.com/slint-ui/slint/blob/master/CHANGELOG.md). + +Upgrading to Slint {version}: + + * Rust: Run `cargo update`. + * C++: If you're using `FetchContent` with CMake, update the GIT_TAG entry in CMakeLists.txt to `v{version}` or `release/{major_version}.{minor_version}` for automatic tracking of {major_version}.{minor_version}.x releases. + * Node.js: Run `npm update slint-ui` to bring your `package.json` up-to-date. + * ESP-IDF developers: Run `idf.py update-dependencies` to bring your idf_component.yml up-to-date. + diff --git a/xtask/src/license_headers_check.rs b/xtask/src/license_headers_check.rs index 70abe1f38ea..16541f6c63a 100644 --- a/xtask/src/license_headers_check.rs +++ b/xtask/src/license_headers_check.rs @@ -435,7 +435,7 @@ lazy_static! { ("^editors/tree-sitter-slint/corpus/", LicenseLocation::NoLicense), // liberal license ("^api/cpp/docs/_static/", LicenseLocation::NoLicense), ("^api/cpp/docs/_templates/", LicenseLocation::NoLicense), - ("^docs/_templates/", LicenseLocation::NoLicense), + ("^docs/src/utils/_templates/", LicenseLocation::NoLicense), ("^docs/quickstart/theme/", LicenseLocation::NoLicense), ("^editors/tree-sitter-slint/queries/", LicenseLocation::NoLicense), // liberal license