2023-03-09 01:07:26 +00:00
|
|
|
version: 3
|
2021-02-05 20:00:17 +00:00
|
|
|
|
2022-02-12 22:48:50 +00:00
|
|
|
includes:
|
|
|
|
build: ./scripts/tasks/Taskfile_{{OS}}.yml
|
2022-02-09 01:23:06 +00:00
|
|
|
|
2022-07-01 00:17:06 +00:00
|
|
|
dotenv:
|
|
|
|
- ./scripts/tasks/.env
|
|
|
|
- ./scripts/tasks/.env.default
|
|
|
|
|
2021-02-05 20:00:17 +00:00
|
|
|
tasks:
|
2022-07-01 00:17:06 +00:00
|
|
|
# SETTINGS / CONFIGURATION
|
2022-08-05 21:39:32 +00:00
|
|
|
settings:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --info'
|
2022-07-01 00:17:06 +00:00
|
|
|
set-game-jak1:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --game jak1'
|
|
|
|
set-game-jak2:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --game jak2'
|
2023-10-11 08:17:46 +00:00
|
|
|
set-game-jak3:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --game jak3'
|
2022-07-01 00:17:06 +00:00
|
|
|
set-decomp-ntscv1:
|
|
|
|
desc: "aka black label"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config ntscv1'
|
|
|
|
set-decomp-ntscv2:
|
|
|
|
desc: "aka red label"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config ntscv2'
|
|
|
|
set-decomp-pal:
|
2022-10-29 19:25:03 +00:00
|
|
|
desc: "PAL region version"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config pal'
|
2022-07-01 00:17:06 +00:00
|
|
|
set-decomp-ntscjp:
|
2022-10-29 19:25:03 +00:00
|
|
|
desc: "NTSC-J region version"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config ntscjp'
|
2023-04-25 00:14:59 +00:00
|
|
|
set-decomp-ntscko:
|
|
|
|
desc: "NTSC-K region version"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config ntscko'
|
2022-02-12 22:48:50 +00:00
|
|
|
# GENERAL
|
2022-07-01 00:17:06 +00:00
|
|
|
extract:
|
|
|
|
desc: "Extracts the game's assets from './iso_data' with the set decompiler config"
|
2022-03-11 00:25:01 +00:00
|
|
|
preconditions:
|
|
|
|
- sh: test -f {{.DECOMP_BIN_RELEASE_DIR}}/decompiler{{.EXE_FILE_EXTENSION}}
|
2022-05-06 22:19:37 +00:00
|
|
|
msg: "Couldn't locate decompiler executable in '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler'"
|
2022-02-12 22:48:50 +00:00
|
|
|
cmds:
|
2023-03-09 01:07:26 +00:00
|
|
|
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"allowed_objects\": []}'"
|
2022-02-12 22:48:50 +00:00
|
|
|
boot-game:
|
2022-08-20 14:41:03 +00:00
|
|
|
desc: "Boots the game, it will fail if it's not already compiled!"
|
2022-03-11 00:25:01 +00:00
|
|
|
preconditions:
|
2022-04-12 22:48:27 +00:00
|
|
|
- sh: test -f {{.GK_BIN_RELEASE_DIR}}/gk{{.EXE_FILE_EXTENSION}}
|
2022-05-06 22:19:37 +00:00
|
|
|
msg: "Couldn't locate runtime executable in '{{.GK_BIN_RELEASE_DIR}}/gk'"
|
2022-02-12 22:48:50 +00:00
|
|
|
cmds:
|
2023-03-10 04:13:01 +00:00
|
|
|
- "{{.GK_BIN_RELEASE_DIR}}/gk -v --game {{.GAME}} -- -boot -fakeiso -debug"
|
2022-08-20 14:41:03 +00:00
|
|
|
boot-game-retail:
|
|
|
|
desc: "Boots the game without debug mode, it will fail if it's not already compiled!"
|
|
|
|
preconditions:
|
|
|
|
- sh: test -f {{.GK_BIN_RELEASE_DIR}}/gk{{.EXE_FILE_EXTENSION}}
|
|
|
|
msg: "Couldn't locate runtime executable in '{{.GK_BIN_RELEASE_DIR}}/gk'"
|
|
|
|
cmds:
|
2023-03-10 04:13:01 +00:00
|
|
|
- "{{.GK_BIN_RELEASE_DIR}}/gk -v --game {{.GAME}} -- -boot -fakeiso"
|
2022-02-12 22:48:50 +00:00
|
|
|
run-game:
|
2022-07-01 00:17:06 +00:00
|
|
|
desc: "Start the game's runtime, to start the game itself the REPL is required"
|
2022-03-11 00:25:01 +00:00
|
|
|
preconditions:
|
2022-04-12 22:48:27 +00:00
|
|
|
- sh: test -f {{.GK_BIN_RELEASE_DIR}}/gk{{.EXE_FILE_EXTENSION}}
|
2022-05-06 22:19:37 +00:00
|
|
|
msg: "Couldn't locate runtime executable in '{{.GK_BIN_RELEASE_DIR}}/gk'"
|
2022-02-12 22:48:50 +00:00
|
|
|
cmds:
|
2023-03-10 04:13:01 +00:00
|
|
|
- "{{.GK_BIN_RELEASE_DIR}}/gk -v --game {{.GAME}} -- -fakeiso -debug"
|
2022-07-01 00:17:06 +00:00
|
|
|
# DEVELOPMENT
|
2022-02-12 22:48:50 +00:00
|
|
|
repl:
|
2022-04-20 22:20:59 +00:00
|
|
|
desc: "Start the REPL"
|
2022-03-11 00:25:01 +00:00
|
|
|
preconditions:
|
2022-04-12 22:48:27 +00:00
|
|
|
- sh: test -f {{.GOALC_BIN_RELEASE_DIR}}/goalc{{.EXE_FILE_EXTENSION}}
|
2022-05-06 22:19:37 +00:00
|
|
|
msg: "Couldn't locate compiler executable in '{{.GOALC_BIN_RELEASE_DIR}}/goalc'"
|
2022-02-12 22:48:50 +00:00
|
|
|
cmds:
|
repl: Add a few new quality of life improvements (#2030)
- You can define a `startup.gc` in your user folder, each line will be
executed on startup (deprecates the usefulness of some cli flags)
- You can define a `repl-config.json` file to override REPL settings.
Long-term this is a better approach than a bunch of CLI flags as well
- Via this, you can override the amount of time the repl will attempt to
listen for the target
- At the same time, I think i may have found why on Windows it can
sometimes take forever to timeout when the game dies, will dig into this
later
- Added some keybinds for common operations, shown here
https://user-images.githubusercontent.com/13153231/202890278-1ff2bb06-dddf-4bde-9178-aa0883799167.mp4
> builds the game, connects to it, attaches a debugger and continues,
launches it, gets the backtrace, stops the target -- all with only
keybinds.
If you want these keybinds to work inside VSCode's integrated terminal,
you need to add the following to your settings file
```json
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.quickOpen",
"-workbench.action.quickOpenView"
]
```
2022-11-20 19:28:41 +00:00
|
|
|
- "{{.GOALC_BIN_RELEASE_DIR}}/goalc --user-auto --game {{.GAME}}"
|
2024-01-16 01:37:16 +00:00
|
|
|
format-json:
|
2022-04-20 22:20:59 +00:00
|
|
|
desc: "Format code"
|
2021-02-05 20:00:17 +00:00
|
|
|
cmds:
|
2021-10-17 01:01:23 +00:00
|
|
|
# npm install -g prettier
|
2024-02-04 18:53:06 +00:00
|
|
|
- cmd: npx prettier --write ./decompiler/config/jak*/**/*.jsonc
|
2024-01-16 01:37:16 +00:00
|
|
|
ignore_error: true
|
|
|
|
format:
|
2023-04-08 19:30:27 +00:00
|
|
|
desc: "Format code"
|
|
|
|
cmds:
|
2024-01-16 01:37:16 +00:00
|
|
|
- cmd: python ./scripts/cpp/format-includes.py
|
2024-02-24 19:27:56 +00:00
|
|
|
- cmd: python ./scripts/ci/lint-trailing-whitespace.py --fix
|
2024-01-16 01:37:16 +00:00
|
|
|
- cmd: python ./third-party/run-clang-format/run-clang-format.py -r common decompiler game goalc test tools lsp -i
|
|
|
|
- task: format-json
|
2024-02-28 01:12:44 +00:00
|
|
|
format-gsrc:
|
|
|
|
desc: "Run formatter on gsrc file"
|
|
|
|
preconditions:
|
|
|
|
- sh: test -f {{.FORMATTER_BIN_RELEASE_DIR}}/formatter{{.EXE_FILE_EXTENSION}}
|
|
|
|
msg: "Couldn't locate formatter executable in '{{.FORMATTER_BIN_RELEASE_DIR}}/formatter'"
|
|
|
|
cmds:
|
|
|
|
- "{{.FORMATTER_BIN_RELEASE_DIR}}/formatter --write --file '{{.FILE}}'"
|
2022-02-12 22:48:50 +00:00
|
|
|
# DECOMPILING
|
2021-05-08 02:56:37 +00:00
|
|
|
decomp:
|
|
|
|
cmds:
|
2023-03-09 01:07:26 +00:00
|
|
|
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": true, \"levels_extract\": false}'"
|
2022-08-29 22:49:57 +00:00
|
|
|
decomp-file:
|
|
|
|
cmds:
|
2023-03-09 01:07:26 +00:00
|
|
|
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": true, \"levels_extract\": false, \"allowed_objects\": [\"{{.FILE}}\"]}'"
|
2021-05-08 02:56:37 +00:00
|
|
|
decomp-clean:
|
|
|
|
cmds:
|
2022-08-31 23:22:47 +00:00
|
|
|
- python ./scripts/tasks/clean-decomp.py --game "{{.GAME}}"
|
2022-10-11 22:30:26 +00:00
|
|
|
lint-gsrc-file:
|
|
|
|
cmds:
|
2024-02-04 18:53:06 +00:00
|
|
|
- python ./scripts/gsrc/lint-gsrc-file.py --game {{.GAME}} --file "{{.FILE}}"
|
2022-08-31 23:22:47 +00:00
|
|
|
update-gsrc:
|
|
|
|
cmds:
|
2023-03-09 01:07:26 +00:00
|
|
|
- python ./scripts/gsrc/update-gsrc-via-refs.py --game "{{.GAME}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler" --decompiler_config {{.DECOMP_CONFIG}} --version {{.DECOMP_CONFIG_VERSION}}
|
2022-12-22 18:57:57 +00:00
|
|
|
update-gsrc-glob:
|
|
|
|
cmds:
|
2023-03-09 01:07:26 +00:00
|
|
|
- python ./scripts/gsrc/update-gsrc-via-refs.py --game "{{.GAME}}" --file_pattern "{{.GLOB}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler" --decompiler_config {{.DECOMP_CONFIG}} --version {{.DECOMP_CONFIG_VERSION}}
|
2022-08-31 23:22:47 +00:00
|
|
|
update-gsrc-file:
|
2022-08-29 22:49:57 +00:00
|
|
|
cmds:
|
|
|
|
- task: decomp-file
|
2024-02-04 18:53:06 +00:00
|
|
|
- python ./scripts/gsrc/update-from-decomp.py --game "{{.GAME}}" --file "{{.FILE}}"
|
2022-10-11 22:30:26 +00:00
|
|
|
- task: lint-gsrc-file
|
2024-02-04 18:53:06 +00:00
|
|
|
copy-common-naming:
|
|
|
|
cmds:
|
|
|
|
- python ./scripts/gsrc/copy-common-naming.py --file "{{.FILE}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler"
|
|
|
|
- task: format-json
|
|
|
|
copy-common-naming-from-refs:
|
|
|
|
cmds:
|
|
|
|
- python ./scripts/gsrc/copy-common-naming.py --update-names-from-refs --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler"
|
|
|
|
- task: format-json
|
2024-01-29 21:15:42 +00:00
|
|
|
# ASSET RIPPING
|
|
|
|
rip-textures:
|
|
|
|
cmds:
|
|
|
|
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"save_texture_pngs\": true}'"
|
|
|
|
rip-levels:
|
|
|
|
cmds:
|
|
|
|
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"rip_levels\": true}'"
|
|
|
|
rip-collision:
|
|
|
|
cmds:
|
|
|
|
- "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"extract_collision\": true, \"rip_collision\": true}'"
|
2022-07-01 00:17:06 +00:00
|
|
|
# TOOLS
|
2022-08-24 23:34:09 +00:00
|
|
|
analyze-ee-memory:
|
|
|
|
cmds:
|
|
|
|
- python ./scripts/tasks/extract-zip.py --file "{{.FILE}}" --out ./savestate_out/
|
|
|
|
- '{{.MEMDUMP_BIN_RELEASE_DIR}}/memory_dump_tool ./savestate_out/eeMemory.bin --output-path ./ --game {{.GAME}} > ee-analysis.log'
|
|
|
|
watch-pcsx2:
|
2022-10-29 20:28:52 +00:00
|
|
|
# python -m pip install -U "watchdog[watchmedo]"
|
2022-08-24 23:34:09 +00:00
|
|
|
cmds:
|
|
|
|
- watchmedo shell-command --drop --patterns="*.p2s" --recursive --command='task analyze-ee-memory FILE="${watch_src_path}"' "{{.SAVESTATE_DIR}}"
|
|
|
|
vars:
|
|
|
|
SAVESTATE_DIR: '{{default "." .SAVESTATE_DIR}}'
|
2022-09-24 20:04:52 +00:00
|
|
|
type-search:
|
|
|
|
desc: Just an example to show it running
|
|
|
|
cmds:
|
|
|
|
- "{{.TYPESEARCH_BIN_RELEASE_DIR}}/type_searcher --output-path ./search-results.json --game {{.GAME}} --fields '[{\"type\":\"int16\",\"offset\":2},{\"type\":\"int16\",\"offset\":4}]'"
|
2023-06-18 21:19:35 +00:00
|
|
|
update-treesitter:
|
|
|
|
desc: Updates locally built tree-sitter rules
|
|
|
|
cmds:
|
|
|
|
- cd ../tree-sitter-opengoal && yarn gen
|
|
|
|
- python ./scripts/tasks/cp.py --src "../tree-sitter-opengoal/src/*" --dest "./third-party/tree-sitter/tree-sitter-opengoal"
|
|
|
|
- python ./scripts/tasks/cp.py --src "../tree-sitter-opengoal/grammar.js" --dest "./third-party/tree-sitter/tree-sitter-opengoal"
|
2023-06-25 20:17:18 +00:00
|
|
|
fix-translations:
|
|
|
|
desc: Finds and tries to fix invalid translation Characters
|
|
|
|
cmds:
|
|
|
|
- python ./scripts/ci/lint-characters.py --fix
|
2024-02-24 19:27:56 +00:00
|
|
|
lint:
|
|
|
|
cmds:
|
|
|
|
- python ./scripts/ci/lint-trailing-whitespace.py
|
2022-02-12 22:48:50 +00:00
|
|
|
# TESTS
|
2022-10-16 21:20:44 +00:00
|
|
|
offline-tests: # ran by jenkins
|
2021-05-26 23:40:12 +00:00
|
|
|
cmds:
|
2023-01-04 23:26:59 +00:00
|
|
|
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --fail-on-cmp'
|
2023-01-12 00:07:35 +00:00
|
|
|
offline-test-file:
|
|
|
|
cmds:
|
|
|
|
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --file {{.FILE}}'
|
2022-10-22 17:26:28 +00:00
|
|
|
offline-tests-fast:
|
|
|
|
cmds:
|
2022-12-30 17:09:04 +00:00
|
|
|
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --pretty-print --num_threads 32 --dump_current_output --fail-on-cmp'
|
2022-10-22 17:26:28 +00:00
|
|
|
# TODO - amalgamate offline-tests and this task, run twice if the previous step fails
|
2022-07-28 04:49:10 +00:00
|
|
|
update-ref-tests:
|
2022-07-06 22:10:38 +00:00
|
|
|
cmds:
|
2022-10-22 17:26:28 +00:00
|
|
|
- cmd: python ./scripts/tasks/delete-file-or-folder.py --path failures
|
2022-12-30 17:09:04 +00:00
|
|
|
- cmd: '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --pretty-print --num_threads 32 --dump_current_output --fail-on-cmp'
|
2022-07-06 22:10:38 +00:00
|
|
|
ignore_error: true
|
2022-09-14 00:03:00 +00:00
|
|
|
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/ --game {{.GAME}}
|
2022-10-22 17:26:28 +00:00
|
|
|
- task: offline-tests-fast
|
2022-09-24 17:04:52 +00:00
|
|
|
update-ref-file:
|
|
|
|
cmds:
|
2022-10-22 17:26:28 +00:00
|
|
|
- cmd: python ./scripts/tasks/delete-file-or-folder.py --path failures
|
2022-10-29 20:28:52 +00:00
|
|
|
- cmd: '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --file {{.FILE}} --game {{.GAME}} --dump_current_output --fail-on-cmp'
|
2022-09-24 17:04:52 +00:00
|
|
|
ignore_error: true
|
|
|
|
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/ --game {{.GAME}}
|
|
|
|
- task: offline-test-file
|
2021-09-06 18:29:06 +00:00
|
|
|
type-test:
|
|
|
|
cmds:
|
2024-01-16 05:15:33 +00:00
|
|
|
- cmd: '{{.GOALCTEST_BIN_RELEASE_DIR}}/goalc-test --gtest_brief=0 --gtest_filter="*{{.TYPE_CONSISTENCY_TEST_FILTER}}*" --gtest_break_on_failure'
|