Skip to content

Commit

Permalink
Merge pull request #58 from matyalatte/dev
Browse files Browse the repository at this point in the history
v0.8.0 release
  • Loading branch information
matyalatte authored Nov 9, 2024
2 parents 29570ea + e254535 commit ffbad17
Show file tree
Hide file tree
Showing 71 changed files with 2,075 additions and 1,213 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ jobs:
- First Change
- Second Change
## Notes
- Linux builds only support distributions using glibc.
[Build the executable](https://github.com/matyalatte/${{ env.TOOL_NAME }}/blob/main/docs/Building.md) by yourself if you want to use it on unsupported distros.
- `Tuw-*-Windows-x64-ucrt.zip` is much smaller than the standard version, but it only works on Windows10 or later.
- Tuw supports more unix-like systems (BSD, Haiku, illumos, etc.)
[Building Workflow for Other Platforms - matyalatte/tuw](https://github.com/matyalatte/${{ env.TOOL_NAME }}/blob/main/docs/Build-on-Other.md)
draft: true
prerelease: false

Expand All @@ -71,7 +63,7 @@ jobs:
exe_ext: .exe
zip_ext: zip
arch: UCRT
arch_suffix: -x64-ucrt
arch_suffix: 10-x64
- os: ubuntu-20.04
exe_ext: ""
zip_ext: tar.bz2
Expand Down
18 changes: 11 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Tuw provides a very simple GUI for your scripts.
All you need is a JSON file and a tiny executable.
**No need for compilers, browsers, or huge executables!**

![sample](https://github.com/matyalatte/tuw/assets/69258547/9b3c8487-010e-497b-b66c-95af84906dd0)
<img src=https://user-images.githubusercontent.com/69258547/192090797-f5e5b52d-59aa-4942-a361-2c8b5c7bd746.png width=387></img>
![sample](https://github.com/user-attachments/assets/6426fc08-821f-49f5-af74-965273d45d4a)
<img src=https://github.com/user-attachments/assets/d770ea1d-cead-405c-a48c-48fe9ba3a4cf width=398></img>

## Features

Expand All @@ -39,13 +39,17 @@ All you need is a JSON file and a tiny executable.

You can download executables from [the release page](https://github.com/matyalatte/tuw/releases)

- `Tuw*-Windows*.zip` is for Windows (7 or later.)
- `Tuw*-macOS*.tar.bz2` is for macOS (10.9 or later.)
- `Tuw*-Linux*.tar.bz2` is for Linux (with GTK3.14, GLIBC2.15, and GLIBCXX3.4.21, or later versions of the libraries.)
- `Tuw-*-Windows-*.zip` is for Windows (7 or later.)
- `Tuw-*-Windows10-*.zip` requires Windows 10 or later, but it's much smaller than the standard version.
- `Tuw-*-macOS.tar.bz2` is for macOS (10.9 or later.)
- `Tuw-*-Linux-*.tar.bz2` is for Linux (with GTK3.14, GLIBC2.15, and GLIBCXX3.4.21, or later versions of the libraries.)

> [!Note]
> Tuw also supports [Linux distributions using musl](https://github.com/matyalatte/tuw/blob/main/docs/Build-on-Linux.md) and [other Unix-like systems (BSD, Haiku, illumos, etc.)](https://github.com/matyalatte/Tuw/blob/main/docs/Build-on-Other.md). While there is no release package available for these systems, you can build Tuw from the source code.
## Examples

There are some [JSON files](../examples/README.md) to learn how to define GUIs.
There are many [JSON files](../examples/README.md) to learn how to define GUIs.

## JSON Schema

Expand All @@ -59,7 +63,7 @@ For VSCode, you can add the schema path to `settings.json` (`File > Preferences
```json
"json.schemas": [
{
"fileMatch": [ "gui_definition.json" ],
"fileMatch": [ "gui_definition.json", "gui_definition.jsonc" ],
"url": "https://raw.githubusercontent.com/matyalatte/tuw/main/schema/schema.json"
}
]
Expand Down
8 changes: 8 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
ver 0.8.0
- Array brackets can now be omitted when there is only one element.
- GUI elements can now be defined in root object.
- GUI labels became optional.
- "window_name" can now be default values of GUI labels.
- Tuw now redirects stderr into the console window.
- Replaced std::string with a custom string class to reduce the binary size.

ver 0.7.2
- Added "optional" to ignore some options when a text box is empty.
- Added "prefix" and "suffix" options to append strings to user inputs.
Expand Down
12 changes: 6 additions & 6 deletions examples/all_keys/gui_definition.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"recommended": "0.7.2",
"minimum_required": "0.7.1",
"recommended": "0.8.0",
"minimum_required": "0.8.0",
"gui": [
{
"label": "Components Minimal",
"window_name": "Components Minimal",
"command": "echo file: %-% & echo folder: %-% & echo combo: %-% & echo radio: %-% & echo check: %-% & echo check_array: %-% & echo textbox: %-% & echo int: %-% & echo float: %-%",
"components": [
{
Expand Down Expand Up @@ -82,7 +82,7 @@
]
},
{
"label": "Components Optional",
"window_name": "Components Optional",
"command": "echo file: %file% & echo folder: %folder% & echo combo: %combo% & echo radio: %radio% & echo check: %check% & echo check_array: %options% & echo textbox: %text% & echo int: %integer% & echo float: %double%",
"components": [
{
Expand Down Expand Up @@ -248,8 +248,8 @@
]
},
{
"label": "GUI Optional",
"window_name": "Window Title Here",
"window_name": "GUI Optional",
"label": "GUI Optional (this string is for a menu item)",
"command_win": "echo home: %__HOME__% & echo cwd: %__CWD__% & echo percent: %% & echo sample message!",
"command_linux": "echo home: %__HOME__%; echo cwd: %__CWD__%; echo percent: %%; echo sample message!",
"command_mac": "echo home: %__HOME__%; echo cwd: %__CWD__%; echo percent: %%; echo sample message!",
Expand Down
25 changes: 11 additions & 14 deletions examples/comp_options/affix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@

```json
{
"gui": [
{
"label": "Affix example",
"command": "echo %-%",
"components": [
{
"type": "text",
"label": "Text box",
"prefix": "-pre=",
"suffix": " -suf"
}
]
}
]
"gui": {
"command": "echo %-%",
"components": [
{
"type": "text",
"label": "Text box",
"prefix": "-pre=",
"suffix": " -suf"
}
]
}
}
```
25 changes: 11 additions & 14 deletions examples/comp_options/affix/gui_definition.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"gui": [
{
"label": "Affix example",
"command": "echo %-%",
"components": [
{
"type": "text",
"label": "Text box",
"prefix": "-pre=",
"suffix": " -suf"
}
]
}
]
"gui": {
"command": "echo %-%",
"components": [
{
"type": "text",
"label": "Text box",
"prefix": "-pre=",
"suffix": " -suf"
}
]
}
}
35 changes: 16 additions & 19 deletions examples/comp_options/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@ It allows you to rename the button associated with the picker component.

```json
{
"gui": [
{
"label": "Button",
"window_name": "Button sample",
"command": "echo %-% %-%",
"components": [
{
"type": "file",
"label": "Some file",
"button": "..."
},
{
"type": "folder",
"label": "Some folder",
"button": "Open"
}
]
}
]
"gui": {
"window_name": "Button sample",
"command": "echo %-% %-%",
"components": [
{
"type": "file",
"label": "Some file",
"button": "..."
},
{
"type": "folder",
"label": "Some folder",
"button": "Open"
}
]
}
}
```
35 changes: 16 additions & 19 deletions examples/comp_options/button/gui_definition.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
{
"gui": [
{
"label": "Button",
"window_name": "Button sample",
"command": "echo %-% %-%",
"components": [
{
"type": "file",
"label": "Some file",
"button": "..."
},
{
"type": "folder",
"label": "Some folder",
"button": "Open"
}
]
}
]
"gui": {
"window_name": "Button sample",
"command": "echo %-% %-%",
"components": [
{
"type": "file",
"label": "Some file",
"button": "..."
},
{
"type": "folder",
"label": "Some folder",
"button": "Open"
}
]
}
}
61 changes: 29 additions & 32 deletions examples/comp_options/default/gui_definition.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
{
"gui": [
{
"label": "Sample GUI",
"command": "echo file: %-% & echo options: %-%",
"components": [
{
"type": "file",
"label": "Some file path",
"extension": "any files (*)|*",
"default": "./foo/bar"
},
{
"type": "check_array",
"label": "options",
"items": [
{
"label": "falg1",
"default": true
},
{
"label": "falg2",
"default": false
},
{
"label": "falg3",
"default": true
}
]
}
]
}
]
"gui": {
"command": "echo file: %-% & echo options: %-%",
"components": [
{
"type": "file",
"label": "Some file path",
"extension": "any files (*)|*",
"default": "./foo/bar"
},
{
"type": "check_array",
"label": "options",
"items": [
{
"label": "falg1",
"default": true
},
{
"label": "falg2",
"default": false
},
{
"label": "falg3",
"default": true
}
]
}
]
}
}
3 changes: 0 additions & 3 deletions examples/comp_options/id/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ You can use the defined ids as variable names in commands.

```json
{
"label": "IDs",
"command": "echo x: %x% & echo y: %y% & echo x: %x%",
"button": "Echo!",
"components": [
Expand All @@ -29,7 +28,6 @@ When you put an undefined id in `%*%`, it'll use one of the components that have

```json
{
"label": "Undefined IDs",
"command": "echo x: %-% & echo y: %y% & echo z: %foo%",
"button": "Echo!",
"components": [
Expand Down Expand Up @@ -61,7 +59,6 @@ There are some predefined ids.

```json
{
"label": "Reserved IDs",
"command": "echo percent: %% & echo cwd: %__CWD__% & echo home: %__HOME__%",
"button": "Echo!",
"components": []
Expand Down
31 changes: 14 additions & 17 deletions examples/comp_options/optional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,20 @@

```json
{
"gui": [
{
"label": "Optional component",
"command": "echo %-%",
"components": [
{
"type": "text",
"label": "Text box",
"optional": true,
"prefix": "-pre=",
"suffix": " -suf",
"validator": {
"regex": ".+"
}
"gui": {
"command": "echo %-%",
"components": [
{
"type": "text",
"label": "Text box",
"optional": true,
"prefix": "-pre=",
"suffix": " -suf",
"validator": {
"regex": ".+"
}
]
}
]
}
]
}
}
```
Loading

0 comments on commit ffbad17

Please sign in to comment.