From ce6dca7c138a2d67ae92e05d6c32040b5acdd12a Mon Sep 17 00:00:00 2001 From: devseed Date: Sun, 3 Nov 2024 20:16:54 +0900 Subject: [PATCH] update readme and prepare for release --- .github/workflows/build_win.yml | 3 +- .github/workflows/build_win_msvc.yml | 3 +- .gitignore | 1 + .vscode/c_cpp_properties.json | 2 + .vscode/settings.json | 83 ---------------------------- README.md | 68 ++++++++++++----------- src/onsyuri/ONScripter_event.cpp | 2 +- src/onsyuri/onscripter_main.cpp | 4 +- 8 files changed, 47 insertions(+), 119 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml index f468059..4e1e0b5 100644 --- a/.github/workflows/build_win.yml +++ b/.github/workflows/build_win.yml @@ -19,10 +19,11 @@ jobs: path: ./thirdparty key: thirdparty_build + # this should be fixed to download the inital commit thirdparty - name: download thirdparty_build if: steps.check_thirdparty_build.outputs.cache-hit != 'true' run: | - curl -fsSL https://github.com/YuriSizuku/OnscripterYuri/releases/download/v0.7.5beta/thirdparty_build.tar.gz -O + curl -fsSL https://github.com/YuriSizuku/OnscripterYuri/releases/download/v0.6/thirdparty_build.tar.gz -O tar xvzf thirdparty_build.tar.gz build_win32: diff --git a/.github/workflows/build_win_msvc.yml b/.github/workflows/build_win_msvc.yml index dde0a66..214fdc7 100644 --- a/.github/workflows/build_win_msvc.yml +++ b/.github/workflows/build_win_msvc.yml @@ -1,6 +1,7 @@ name: build windows MSVC x86, x64, ARM64 on: push: {tags: ['v*']} # Push events to matching v*, i.e. v1.0, v20.15.10 + pull_request: permissions: contents: write @@ -33,7 +34,7 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Upload artifact - uses: actions/upload-artifact@v2.3.1 + uses: actions/upload-artifact@v4 with: name: onsyuri-${{env.VCPKG_TRIPLET}} path: ${{github.workspace}}/build/${{env.BUILD_TYPE}} diff --git a/.gitignore b/.gitignore index 1ab9d84..64d5526 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # general +.vscode/settings.json asset/*test*/** asset/stdout.txt asset/stderr.txt diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 63cf646..56d0acc 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -8,6 +8,7 @@ "name": "Mingw32", "includePath": [ "${workspaceFolder}/src/onsyuri/**", + "${workspaceFolder}/thirdparty/build/arch_mingw32/include/**", "${msys2sdk}/mingw32/include" ], "defines": [ @@ -26,6 +27,7 @@ "name": "Mingw64", "includePath": [ "${workspaceFolder}/src/onsyuri/**", + "${workspaceFolder}/thirdparty/build/arch_mingw64/include/**", "${msys2sdk}/mingw64/include" ], "defines": [ diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 1a4c943..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "files.associations": { - "random": "cpp", - "cmath": "cpp", - "array": "cpp", - "bitset": "cpp", - "iterator": "cpp", - "list": "cpp", - "vector": "cpp", - "xhash": "cpp", - "xtree": "cpp", - "initializer_list": "cpp", - "type_traits": "cpp", - "xstring": "cpp", - "xutility": "cpp", - "__hash_table": "cpp", - "__split_buffer": "cpp", - "__tree": "cpp", - "map": "cpp", - "string": "cpp", - "string_view": "cpp", - "unordered_map": "cpp", - "cstdio": "cpp", - "__config": "cpp", - "bzlib_private.h": "c", - "bzlib.h": "c", - "__node_handle": "cpp", - "*.tcc": "cpp", - "ostream": "cpp", - "atomic": "cpp", - "bit": "cpp", - "cctype": "cpp", - "chrono": "cpp", - "cinttypes": "cpp", - "clocale": "cpp", - "compare": "cpp", - "concepts": "cpp", - "condition_variable": "cpp", - "cstdarg": "cpp", - "cstddef": "cpp", - "cstdint": "cpp", - "cstdlib": "cpp", - "cstring": "cpp", - "ctime": "cpp", - "cwchar": "cpp", - "cwctype": "cpp", - "deque": "cpp", - "forward_list": "cpp", - "set": "cpp", - "unordered_set": "cpp", - "exception": "cpp", - "algorithm": "cpp", - "functional": "cpp", - "memory": "cpp", - "memory_resource": "cpp", - "numeric": "cpp", - "optional": "cpp", - "ratio": "cpp", - "system_error": "cpp", - "tuple": "cpp", - "utility": "cpp", - "fstream": "cpp", - "future": "cpp", - "iomanip": "cpp", - "iosfwd": "cpp", - "iostream": "cpp", - "istream": "cpp", - "limits": "cpp", - "mutex": "cpp", - "new": "cpp", - "numbers": "cpp", - "semaphore": "cpp", - "shared_mutex": "cpp", - "span": "cpp", - "sstream": "cpp", - "stdexcept": "cpp", - "stop_token": "cpp", - "streambuf": "cpp", - "thread": "cpp", - "cfenv": "cpp", - "typeinfo": "cpp" - } -} \ No newline at end of file diff --git a/README.md b/README.md index f0dd2c4..4533391 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # Onscripter-Yuri -![GitHub release (latest by date)](https://img.shields.io/github/v/release/YuriSizuku/OnscripterYuri?color=green&label=onsyuri&logo=4chan&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_web.yml?label=web&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_win.yml?label=win(x86|x64)&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_linux.yml?label=linux(x86|x64|arm|arm64)&style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_android.yml?label=android(arm|arm64)&style=flat-square) +![GitHub release](https://img.shields.io/github/v/release/YuriSizuku/OnscripterYuri?color=green&label=onsyuri&logo=4chan&style=flat-square)![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_web.yml?label=web(wasm)&logo=firefox&style=flat-square)![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_android.yml?label=android(arm|arm64)&&logo=android&style=flat-square) +![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_win.yml?label=win_mingw(x86|x64)&logo=mingww64&style=flat-square)![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_win_msvc.yml?label=win_msvc(x86|x64|arm64)&logo=codeblocks&style=flat-square) +![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_linux.yml?label=linux(x86|x64|arm|arm64)&logo=linux&style=flat-square)![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuriSizuku/OnscripterYuri/build_darwin.yml?label=mac(x64|arm64)&logo=apple&style=flat-square) ☘️ An enhancement ONScripter project porting to many platforms, especially **web** ! -We also support for `windows`, `linux`, `android` and `psv`. This project is base on [ONScripter-Jh](https://github.com/jh10001/ONScripter-Jh) by `SDL2`. +We also support for `windows`, `linux`, `mac`, `android`, `retroarch` and `psv`. This project is base on [ONScripter-Jh](https://github.com/jh10001/ONScripter-Jh) by `SDL2`. Online Demo: [lifegame](https://onsgame.netlify.app/lifegame/), [luasnow](https://onsgame.netlify.app/luasnow/), [noesis1 (lazyload)](https://onsgame.netlify.app/noesis1/) PSV: [psv-OnscripterJH](https://github.com/YuriSizuku/psv-OnscripterJH/releases) @@ -14,49 +16,53 @@ Multi Platform: [github action release](https://github.com/YuriSizuku/Onscripter New features : -- develop - - [x] clear camke project structure - - [x] well documention for develop and usage - - [x] scripts to compile or cross compile without pain - - [x] vscode and android studio project for multi enviroment - - [x] ci in github action to automaticly build - - [x] use docker to build for all platform +- script + - [x] lua script and animation + - [x] support English half-width text, see [Word wrapping](https://github.com/YuriSizuku/OnscripterYuri/issues/2) + - [x] `nt2`, `nt3` script encryption (Mine exclusive format) + - [x] long click or touch to invoke menu + +- render + - [x] fullscreen by `--fullscreen` or `alt+enter`, scretch to fullscreen by `--fullscreen2` or `f10` + - [x] arbitary resolution `--width`, `--height` + - [x] gles2 sharpness rendering by `--sharpness 1.0` parameter, fix bug on windows + - platform - [x] windows - [x] x86, x64 (local or cross compile by mingw, static link) - [x] amd64, arm64 (local msvc, vcpkg, contributed by [ryank231231](https://github.com/YuriSizuku/OnscripterYuri/pull/3)) - - [x] lua script and animation - [x] video by system player - [x] linux - [x] x86, x64 (local compile, static or dynamic link) - [x] arm, aarch64 (cross compile, SDL2 build from raspberrypi, static link) - - [x] lua scirpt and animation + - [x] retroarch (contributed by [iyzsong](https://github.com/iyzsong)) + - [x] mac + - [x] x64, arm64 (local compile, contributed by [yujincheng08](https://github.com/yujincheng08)) - [x] web (by emscripten) - [x] fs to save in indexdb - [x] lazy load by ~~BrowserFS or worker~~ async fetch to avoid block the audio - - [x] lua script and animation - [x] mobile web with touch, with webui menu - [x] android - [x] SDK level above 21 (android 5.1, Lolipop) - [x] extern SD card by [SAF](https://github.com/YuriSizuku/android-SafFile), and scoped storage - [x] non-english charactor in path - - [x] lua script and animation - [x] video by system player - [x] psv, see [psv-Onscripter](https://github.com/YuriSizuku/psv-OnscripterJH) -- render - - [x] fullscreen by `--fullscreen` or `alt+enter`, scretch to fullscreen by `--fullscreen2` or `f10` - - [x] arbitary resolution `--width`, `--height` - - [x] gles2 sharpness rendering by `--sharpness 1.0` parameter, fix bug on windows -- other - - [x] support English half-width text, see [Word wrapping](https://github.com/YuriSizuku/OnscripterYuri/issues/2) - - [x] `nt2`, `nt3` script encryption (Mine exclusive format) - - [x] long click or touch to invoke menu -- onsjh bug fix + +- bugfix - [x] fix some bugs in origin version (can not read `00.txt` problem) - [x] fix lua animation problem - [x] fix android onresume gles null pointer - [x] fix android file stat problem (save not found) +- develop + - [x] clear camke project structure + - [x] well documention for develop and usage + - [x] scripts to compile or cross compile without pain + - [x] vscode and android studio project for multi enviroment + - [x] ci in github action to automaticly build + - [x] use docker to build for all platform + ## 1. Usage ### (1) general command @@ -65,7 +71,7 @@ New features : ./onsyuri --help ./onsyuri --root /path/to/game --save-dir /path/to/save --font /path/default.ttf --enc:sjis ./onsyuri --width 1280 --height 720 --sharpness=3.1 -./onsyuri --fullscreen2 # fullscreen1 alt+f4, fullscreen2 f11 +./onsyuri --fullscreen2 # fullscreen1 alt+f, fullscreen2 f10 (toggle stretch) Usage: onsyuri [option ...] -h, --help show this help and exit @@ -82,8 +88,8 @@ Usage: onsyuri [option ...] --window start in windowed mode --width 1280 force window width --height 720 force window height - --fullscreen start in fullscreen mode (alt+f4 or f11) - --fullscreen2 start in fullscreen mode with stretch (f10) + --fullscreen start in fullscreen mode (alt+f or alt+enter) + --fullscreen2 start in fullscreen mode with stretch (f10 to toggle stretch) --sharpness 3.1 use gles to make image sharp --no-video do not decode video --no-vsync turn off vsync @@ -113,12 +119,12 @@ You can either download the prebuild static elf from the [release](https://githu - Arch User Repository - https://aur.archlinux.org/packages/onscripter-yuri - - ``` - # for Arch based distributions, install directly from AUR. - yay -S onscripter-yuri - ``` + [aur onscripter-yuri](https://aur.archlinux.org/packages/onscripter-yuri) + +``` sh +# for Arch based distributions, install directly from AUR. +yay -S onscripter-yuri +``` ### (3) web diff --git a/src/onsyuri/ONScripter_event.cpp b/src/onsyuri/ONScripter_event.cpp index 6ede2c6..4d56c00 100644 --- a/src/onsyuri/ONScripter_event.cpp +++ b/src/onsyuri/ONScripter_event.cpp @@ -1140,7 +1140,7 @@ bool ONScripter::keyPressEvent( SDL_KeyboardEvent *event ) } if ( event_mode & ( WAIT_INPUT_MODE | WAIT_BUTTON_MODE ) ){ - if ( event->keysym.sym == SDLK_f ){ + if ( event->keysym.sym == SDLK_f ){ // alt+f for fullscreen if ( fullscreen_mode ) menu_windowCommand(); else menu_fullCommand(); } diff --git a/src/onsyuri/onscripter_main.cpp b/src/onsyuri/onscripter_main.cpp index ee14eb5..0d22c6a 100644 --- a/src/onsyuri/onscripter_main.cpp +++ b/src/onsyuri/onscripter_main.cpp @@ -69,8 +69,8 @@ void optionHelp() printf( " --window\t\tstart in windowed mode\n"); printf( " --width 1280\tforce window width\n"); printf( " --height 720\tforce window height\n"); - printf( " --fullscreen\tstart in fullscreen mode (alt+f4 or f11)\n"); - printf( " --fullscreen2\tstart in fullscreen mode with stretch (f10)\n"); + printf( " --fullscreen\tstart in fullscreen mode (alt+f or alt+enter)\n"); + printf( " --fullscreen2\tstart in fullscreen mode with stretch (f10 toggle stretch)\n"); printf( " --sharpness 3.1 \t use gles to make image sharp\n"); printf( " --no-video\tdo not decode video\n"); printf( " --no-vsync\tturn off vsync\n\n");