From bfcc2df0c0fcf6daaca9d3473acc8ed8305cf5fd Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 9 Sep 2023 22:27:01 -0400 Subject: [PATCH] Update README.md, move VS Code settings to doc --- .gitignore | 5 ++- .vscode/c_cpp_properties.json | 25 -------------- .vscode/extensions.json | 7 ---- .vscode/settings.json | 18 ---------- README.md | 11 +++++- docs/vscode.md | 63 +++++++++++++++++++++++++++++++++++ 6 files changed, 75 insertions(+), 54 deletions(-) delete mode 100644 .vscode/c_cpp_properties.json delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/settings.json create mode 100644 docs/vscode.md diff --git a/.gitignore b/.gitignore index 96cb138..b0fcb79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,8 @@ __pycache__ .idea -.ninja_deps -.ninja_log +.vscode +.ninja_* *.exe -!tools/sjiswrap.exe build build.ninja objdiff.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 859ada7..0000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "configurations": [ - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/include/**" - ], - "cStandard": "c99", - "cppStandard": "c++98", - "intelliSenseMode": "linux-clang-x86", - "compilerPath": "", - "configurationProvider": "ms-vscode.makefile-tools", - "browse": { - "path": [ - "${workspaceFolder}/include" - ], - "limitSymbolsToIncludedHeaders": true - }, - "defines": [ - "DEBUG" - ] - } - ], - "version": 4 -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 7aed64f..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "recommendations": [ - "ms-vscode.cpptools", - "xaver.clang-format", - "ms-python.black-formatter" - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e73c8d0..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "[c]": { - "files.encoding": "utf8", - "editor.defaultFormatter": "xaver.clang-format" - }, - "[cpp]": { - "files.encoding": "utf8", - "editor.defaultFormatter": "xaver.clang-format" - }, - "[python]":{ - "editor.defaultFormatter": "ms-python.black-formatter" - }, - "editor.tabSize": 2, - "files.autoSave": "onFocusChange", - "files.insertFinalNewline": true, - "files.trimFinalNewlines": true, - "search.useIgnoreFiles": false, -} diff --git a/README.md b/README.md index 4c6a6cd..5b1d685 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ Dependencies Windows: -------- + +On Windows, it's **highly recommended** to use native tooling. WSL or msys2 are **not** required. +When running under WSL, [objdiff](#diffing) is unable to get filesystem notifications for automatic rebuilds. + - Install [ninja](https://github.com/ninja-build/ninja/releases) and add it to `%PATH%`. - Install [Python](https://www.python.org/downloads/) and add it to `%PATH%`. - Also available from the [Windows Store](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K). @@ -43,7 +47,7 @@ Building ``` git clone https://github.com/encounter/ww.git ``` -- Using [Dolphin Emulator](https://dolphin-emu.org/), extract your game to `orig/GZLE01`. +- Using [Dolphin Emulator](https://dolphin-emu.org/), extract your game to `orig/GZLE01` (or `GLZJ01` for JPN, `GLZE01` for PAL). ![](assets/dolphin-extract.png) - To save space, the only necessary files are the following. Any others can be deleted. - `sys/main.dol` @@ -68,3 +72,8 @@ Download the latest release from [encounter/objdiff](https://github.com/encounte Select an object from the left sidebar to begin diffing. Changes to the project will rebuild automatically: changes to source files, headers, `configure.py`, `splits.txt` or `symbols.txt`. ![](assets/objdiff.png) + +More documentation +==================== + +- [Visual Studio Code](docs/vscode.md) diff --git a/docs/vscode.md b/docs/vscode.md new file mode 100644 index 0000000..ef2f83f --- /dev/null +++ b/docs/vscode.md @@ -0,0 +1,63 @@ +Visual Studio Code +================== + +Settings +-------- + +Recommended `.vscode/settings.json`: + +```jsonc +{ + "[c]": { + "files.encoding": "utf8", + "editor.defaultFormatter": "xaver.clang-format" + }, + "[cpp]": { + "files.encoding": "utf8", + "editor.defaultFormatter": "xaver.clang-format" + }, + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "search.useIgnoreFiles": false, + "search.exclude": { + "build/*/config.json": true, + "build/**/*.MAP": true, + "build.ninja": true, + ".ninja_*": true, + "objdiff.json": true, + } +} +``` + +C/C++ configuration +------------------- + +Recommended `.vscode/c_cpp_properties.json`: + +```jsonc +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/include/**" + ], + "cStandard": "c99", + "cppStandard": "c++98", + "intelliSenseMode": "linux-clang-x86", + "compilerPath": "", + "configurationProvider": "ms-vscode.makefile-tools", + "browse": { + "path": [ + "${workspaceFolder}/include" + ], + "limitSymbolsToIncludedHeaders": true + } + } + ], + "version": 4 +} +```