mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
Compare commits
24 Commits
v6.1.1
...
8e055a5a61
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e055a5a61 | ||
|
|
378e30bef0 | ||
|
|
2270fe628f | ||
|
|
44d25564ee | ||
|
|
a9b54106d4 | ||
|
|
31ec197811 | ||
|
|
3184033f4d | ||
|
|
632f8032bc | ||
|
|
1d7d84c155 | ||
|
|
fd5e5c77e5 | ||
|
|
c8a14f5d70 | ||
|
|
321c308a98 | ||
|
|
8feac77d8c | ||
|
|
dad4a67fcb | ||
|
|
d6006d3475 | ||
|
|
f69adb605a | ||
|
|
e185d6d475 | ||
|
|
f8d4880517 | ||
|
|
38869c4aaa | ||
|
|
4a75d49478 | ||
|
|
c3d03dc716 | ||
|
|
053a1d8290 | ||
|
|
45bf24f8ea | ||
|
|
f128c442cc |
@@ -1,9 +0,0 @@
|
|||||||
# Bazel Central Registry
|
|
||||||
|
|
||||||
When the ruleset is released, we want it to be published to the
|
|
||||||
Bazel Central Registry automatically:
|
|
||||||
<https://registry.bazel.build>
|
|
||||||
|
|
||||||
This folder contains configuration files to automate the publish step.
|
|
||||||
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
|
|
||||||
for authoritative documentation about these files.
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"homepage": "https://github.com/ArthurSonzogni/FTXUI",
|
|
||||||
"maintainers": [
|
|
||||||
{
|
|
||||||
"name": "Arthur Sonzogni",
|
|
||||||
"email": "sonzogniarthur@gmail.com",
|
|
||||||
"github": "ArthurSonzogni",
|
|
||||||
"github_user_id": 4759106
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"repository": [
|
|
||||||
"github:ArthurSonzogni/FTXUI"
|
|
||||||
],
|
|
||||||
"versions": [],
|
|
||||||
"yanked_versions": {}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# Copyright 2025 Arthur Sonzogni. All rights reserved.
|
|
||||||
# Use of this source code is governed by the MIT license that can be found in
|
|
||||||
# the LICENSE file.
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- centos7
|
|
||||||
- debian10
|
|
||||||
- ubuntu2004
|
|
||||||
- macos
|
|
||||||
- windows
|
|
||||||
bazel: [6.x, 7.x, 8.x]
|
|
||||||
tasks:
|
|
||||||
verify_targets:
|
|
||||||
name: Build and test.
|
|
||||||
platform: ${{ platform }}
|
|
||||||
bazel: ${{ bazel }}
|
|
||||||
build_targets:
|
|
||||||
- '@ftxui//:ftxui'
|
|
||||||
- '@ftxui//:screen'
|
|
||||||
- '@ftxui//:dom'
|
|
||||||
- '@ftxui//:component'
|
|
||||||
test_targets:
|
|
||||||
- '@ftxui//:tests'
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"integrity": "",
|
|
||||||
"strip_prefix": "",
|
|
||||||
"url": "https://github.com/ArthurSonzogni/FTXUI/releases/download/{TAG}/source.tar.gz"
|
|
||||||
}
|
|
||||||
29
.github/workflows/build.yaml
vendored
29
.github/workflows/build.yaml
vendored
@@ -12,7 +12,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
test_bazel:
|
test_bazel:
|
||||||
name: "Bazel, ${{ matrix.compiler }}, ${{ matrix.os }}"
|
name: "Test Bazel"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
run: bazel run tests
|
run: bazel run tests
|
||||||
|
|
||||||
test_cmake:
|
test_cmake:
|
||||||
name: "CMake, ${{ matrix.compiler }}, ${{ matrix.os }}"
|
name: "Tests CMake"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -173,7 +173,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# Build artifact for the release
|
# Build artifact for the release
|
||||||
package_compiled:
|
package:
|
||||||
name: "Build packages"
|
name: "Build packages"
|
||||||
needs: release
|
needs: release
|
||||||
strategy:
|
strategy:
|
||||||
@@ -217,29 +217,6 @@ jobs:
|
|||||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||||
asset_path: ${{ matrix.asset_path }}
|
asset_path: ${{ matrix.asset_path }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
# Build "source" artifact for the release. This is the same as the github
|
|
||||||
# "source" archive, but with a stable URL. This is useful for the Bazel
|
|
||||||
# Central Repository.
|
|
||||||
package_source:
|
|
||||||
name: "Build source package"
|
|
||||||
needs: release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Checkout repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: "Create source package"
|
|
||||||
run: >
|
|
||||||
git archive --format=tar.gz -o source.tar.gz HEAD
|
|
||||||
|
|
||||||
- name: "Upload source package"
|
|
||||||
uses: shogo82148/actions-upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
|
||||||
asset_path: source.tar.gz
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
|
|||||||
20
.github/workflows/publish.yaml
vendored
20
.github/workflows/publish.yaml
vendored
@@ -1,20 +0,0 @@
|
|||||||
on:
|
|
||||||
# On manual trigger:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag_name:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.0.4
|
|
||||||
with:
|
|
||||||
tag_name: ${{ inputs.tag_name }}
|
|
||||||
registry_fork: ArthurSonzogni/bazel-central-registry
|
|
||||||
permissions:
|
|
||||||
attestations: write
|
|
||||||
contents: write
|
|
||||||
id-token: write
|
|
||||||
secrets:
|
|
||||||
publish_token: ${{ secrets.PUBLISH_TOKEN }}
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -35,7 +35,6 @@ out/
|
|||||||
|
|
||||||
# bazel directory:
|
# bazel directory:
|
||||||
!bazel/**/*.bzl
|
!bazel/**/*.bzl
|
||||||
!.bcr/*
|
|
||||||
|
|
||||||
# doc directory:
|
# doc directory:
|
||||||
!doc/**/Doxyfile.in
|
!doc/**/Doxyfile.in
|
||||||
|
|||||||
14
BUILD.bazel
14
BUILD.bazel
@@ -3,9 +3,13 @@
|
|||||||
# the LICENSE file.
|
# the LICENSE file.
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - Build benchmark.
|
# - Windows/MSVC support.
|
||||||
# - Build fuzzers.
|
# - Pass /utf-8 to MSVC users depending on FTXUI.
|
||||||
# - Build documentation.
|
# - Pass "FTXUI_MICROSOFT_TERMINAL_FALLBACK" to windows users.
|
||||||
|
# - Support building benchmark.
|
||||||
|
# - Support building examples.
|
||||||
|
# - Support building fuzzer.
|
||||||
|
# - Support building documentation.
|
||||||
# - Enable the two tests timing out.
|
# - Enable the two tests timing out.
|
||||||
# - Support WebAssembly
|
# - Support WebAssembly
|
||||||
|
|
||||||
@@ -13,7 +17,7 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
|||||||
load(":bazel/ftxui.bzl", "ftxui_cc_library")
|
load(":bazel/ftxui.bzl", "ftxui_cc_library")
|
||||||
load(":bazel/ftxui.bzl", "generate_examples")
|
load(":bazel/ftxui.bzl", "generate_examples")
|
||||||
load(":bazel/ftxui.bzl", "cpp20")
|
load(":bazel/ftxui.bzl", "cpp20")
|
||||||
load(":bazel/ftxui.bzl", "windows_copts")
|
load(":bazel/ftxui.bzl", "msvc_copts")
|
||||||
load(":bazel/ftxui.bzl", "pthread_linkopts")
|
load(":bazel/ftxui.bzl", "pthread_linkopts")
|
||||||
|
|
||||||
package(default_visibility = ["//visibility:public"])
|
package(default_visibility = ["//visibility:public"])
|
||||||
@@ -241,7 +245,7 @@ cc_test(
|
|||||||
"include",
|
"include",
|
||||||
"src",
|
"src",
|
||||||
],
|
],
|
||||||
copts = cpp20() + windows_copts(),
|
copts = cpp20() + msvc_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"//:ftxui",
|
"//:ftxui",
|
||||||
"@googletest//:gtest_main",
|
"@googletest//:gtest_main",
|
||||||
|
|||||||
30
CHANGELOG.md
30
CHANGELOG.md
@@ -1,35 +1,11 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Future release
|
Next release (2025-04-01)
|
||||||
------------
|
-------------------------
|
||||||
|
|
||||||
6.1.1 (2025-04-30)
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
- Feature: Support `bazel` build system. See #1032.
|
- Feature: Support `bazel`. See #1032. Proposed by @kcc.
|
||||||
Proposed by Kostya Serebryany @kcc
|
|
||||||
If all goes well (pending), it should appear in the Bazel central repository.
|
|
||||||
It can be imported into your project using the following lines:
|
|
||||||
|
|
||||||
**MODULE.bazel**
|
|
||||||
```bazel
|
|
||||||
bazel_dep(name = "ftxui", version = "6.1.1")
|
|
||||||
```
|
|
||||||
|
|
||||||
**BUILD.bazel**
|
|
||||||
```bazel
|
|
||||||
deps = [
|
|
||||||
// Depend on the whole library:
|
|
||||||
"@ftxui//:ftxui",
|
|
||||||
|
|
||||||
// Choose a specific submodule:
|
|
||||||
"@ftxui//:component",
|
|
||||||
"@ftxui//:dom",
|
|
||||||
"@ftxui//:screen",
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
### Component
|
### Component
|
||||||
- Bugfix: Fix a crash with ResizeableSplit. See #1023.
|
- Bugfix: Fix a crash with ResizeableSplit. See #1023.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)
|
|||||||
|
|
||||||
project(ftxui
|
project(ftxui
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
VERSION 6.1.1
|
VERSION 6.0.2
|
||||||
DESCRIPTION "C++ Functional Terminal User Interface."
|
DESCRIPTION "C++ Functional Terminal User Interface."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
# Copyright 2025 Arthur Sonzogni. All rights reserved.
|
|
||||||
# Use of this source code is governed by the MIT license that can be found in
|
|
||||||
# the LICENSE file.
|
|
||||||
|
|
||||||
# FTXUI Module.
|
# FTXUI Module.
|
||||||
module(name = "ftxui", version = "6.1.1")
|
module(name = "ftxui", version = "6.0.3")
|
||||||
|
|
||||||
# Build deps.
|
# Build deps.
|
||||||
bazel_dep(name = "rules_cc", version = "0.1.1")
|
bazel_dep(name = "rules_cc", version = "0.1.1")
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ include(FetchContent)
|
|||||||
|
|
||||||
FetchContent_Declare(ftxui
|
FetchContent_Declare(ftxui
|
||||||
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
|
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
|
||||||
GIT_TAG v6.1.1
|
GIT_TAG v6.0.2
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_GetProperties(ftxui)
|
FetchContent_GetProperties(ftxui)
|
||||||
|
|||||||
@@ -1,4 +1 @@
|
|||||||
# Copyright 2025 Arthur Sonzogni. All rights reserved.
|
|
||||||
# Use of this source code is governed by the MIT license that can be found in
|
|
||||||
# the LICENSE file.
|
|
||||||
workspace(name = "ftxui")
|
workspace(name = "ftxui")
|
||||||
|
|||||||
@@ -20,42 +20,23 @@ def cpp20():
|
|||||||
"//conditions:default": ["-std=c++20"],
|
"//conditions:default": ["-std=c++20"],
|
||||||
})
|
})
|
||||||
|
|
||||||
# Microsoft terminal is a bit buggy ¯\_(ツ)_/¯ and MSVC uses bad defaults.
|
def msvc_copts():
|
||||||
def windows_copts():
|
|
||||||
MSVC_COPTS = [
|
MSVC_COPTS = [
|
||||||
# Microsoft Visual Studio must decode sources files as UTF-8.
|
# Force Microsoft Visual Studio to decode sources files in UTF-8.
|
||||||
"/utf-8",
|
"/utf-8",
|
||||||
|
|
||||||
# Microsoft Visual Studio must interpret the codepoint using unicode.
|
# Force Microsoft Visual Studio to interpret the source files as
|
||||||
|
# Unicode.
|
||||||
"/DUNICODE",
|
"/DUNICODE",
|
||||||
"/D_UNICODE",
|
"/D_UNICODE",
|
||||||
|
|
||||||
# Fallback for Microsoft Terminal.
|
# Fallback for Microsoft Terminal.
|
||||||
# This
|
|
||||||
# - Replace missing font symbols by others.
|
|
||||||
# - Reduce screen position pooling frequency to deals against a Microsoft
|
|
||||||
# race condition. This was fixed in 2020, but clients never not updated.
|
|
||||||
# - https://github.com/microsoft/terminal/pull/7583
|
|
||||||
# - https://github.com/ArthurSonzogni/FTXUI/issues/136
|
|
||||||
"/DFTXUI_MICROSOFT_TERMINAL_FALLBACK",
|
"/DFTXUI_MICROSOFT_TERMINAL_FALLBACK",
|
||||||
]
|
]
|
||||||
|
|
||||||
WINDOWS_COPTS = [
|
|
||||||
# Fallback for Microsoft Terminal.
|
|
||||||
# This
|
|
||||||
# - Replace missing font symbols by others.
|
|
||||||
# - Reduce screen position pooling frequency to deals against a Microsoft
|
|
||||||
# race condition. This was fixed in 2020, but clients never not updated.
|
|
||||||
# - https://github.com/microsoft/terminal/pull/7583
|
|
||||||
# - https://github.com/ArthurSonzogni/FTXUI/issues/136
|
|
||||||
"-DFTXUI_MICROSOFT_TERMINAL_FALLBACK",
|
|
||||||
];
|
|
||||||
|
|
||||||
return select({
|
return select({
|
||||||
# MSVC:
|
|
||||||
"@rules_cc//cc/compiler:msvc-cl": MSVC_COPTS,
|
"@rules_cc//cc/compiler:msvc-cl": MSVC_COPTS,
|
||||||
"@rules_cc//cc/compiler:clang-cl": MSVC_COPTS,
|
"@rules_cc//cc/compiler:clang-cl": MSVC_COPTS,
|
||||||
"@platforms//os:windows": WINDOWS_COPTS,
|
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -88,12 +69,10 @@ def ftxui_cc_library(
|
|||||||
"include",
|
"include",
|
||||||
"src",
|
"src",
|
||||||
],
|
],
|
||||||
copts = cpp17() + windows_copts(),
|
copts = cpp17() + msvc_copts(),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Compile all the examples in the examples/ directory.
|
|
||||||
# This is useful to check the Bazel is synchronized with CMake definitions.
|
|
||||||
def generate_examples():
|
def generate_examples():
|
||||||
cpp_files = native.glob(["examples/**/*.cpp"])
|
cpp_files = native.glob(["examples/**/*.cpp"])
|
||||||
|
|
||||||
@@ -111,5 +90,5 @@ def generate_examples():
|
|||||||
name = name,
|
name = name,
|
||||||
srcs = [src],
|
srcs = [src],
|
||||||
deps = ["//:component"],
|
deps = ["//:component"],
|
||||||
copts = cpp20() + windows_copts(),
|
copts = cpp20() + msvc_copts(),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user