From bd40205427be8ac37cf876ca977e4741500ac960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 6 Dec 2023 23:55:34 +0800 Subject: [PATCH 1/2] Help: fix json text loading --- CMakeLists.txt | 4 ++-- src/data/help.json | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c12b8df0d..fffe16259 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,7 +206,7 @@ endif() ############# function(fastfetch_encode_c_string STR OUTVAR) - string(REGEX REPLACE "\n$" "" TEMP "${STR}") # Remove trailing newline + string(REGEX REPLACE "\n$" "" TEMP "${STR}") # Remove trailing newline string(REPLACE "\\" "\\\\" TEMP "${TEMP}") # Escape backslashes string(REPLACE "\n" "\\n" TEMP "${TEMP}") # Replace newlines with \n string(REPLACE "\"" "\\\"" TEMP "${TEMP}") # Replace quotes with \" @@ -222,7 +222,7 @@ endfunction(fastfetch_load_text) find_package(Python) if(Python_FOUND) # Minify JSON string. `io.open(0,encoding='utf-8')` is needed to avoid encoding issues on Windows - execute_process(COMMAND ${Python_EXECUTABLE} -c "import io,json,sys;json.dump(json.load(io.open(0,encoding='utf-8')),sys.stdout,separators=(',', ':'),ensure_ascii=False)" + execute_process(COMMAND ${Python_EXECUTABLE} -c "import json,sys;json.dump(json.load(sys.stdin),sys.stdout,separators=(',',':'))" INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/data/help.json" OUTPUT_VARIABLE DATATEXT_JSON_HELP) else() diff --git a/src/data/help.json b/src/data/help.json index f63b3d95f..f72a94a2d 100644 --- a/src/data/help.json +++ b/src/data/help.json @@ -548,7 +548,7 @@ "desc": "Set the character to use in elapsed part of percentage bars", "arg": { "type": "str", - "default": "■" + "default": "\u25a0" } }, { @@ -1290,12 +1290,12 @@ "arg": { "type": "enum", "enum": { - "block": "███", - "circle": "●", - "diamond": "◆", - "triangle": "▲", - "square": "■", - "star": "★" + "block": "\u2588\u2588\u2588", + "circle": "\u25cf", + "diamond": "\u25c6", + "triangle": "\u25b2", + "square": "\u25a0", + "star": "\u2605" }, "default": "block" } From 0182e32f00c25f076399418da778020771066207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 7 Dec 2023 09:33:26 +0800 Subject: [PATCH 2/2] Release: v2.3.3 --- CHANGELOG.md | 5 +++++ CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be2d92919..03212cd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.3.3 + +Bugfixes: +* Fix `--help` doesn't work in Windows and some other platforms + # 2.3.2 Bugfixes: diff --git a/CMakeLists.txt b/CMakeLists.txt index fffe16259..20a65e01f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url project(fastfetch - VERSION 2.3.2 + VERSION 2.3.3 LANGUAGES C DESCRIPTION "Fast neofetch-like system information tool" HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"