2023-03-08 20:07:26 -05:00
|
|
|
version: 3
|
2021-02-05 15:00:17 -05:00
|
|
|
|
2022-02-12 17:48:50 -05:00
|
|
|
includes:
|
|
|
|
build: ./scripts/tasks/Taskfile_{{OS}}.yml
|
2022-02-08 20:23:06 -05:00
|
|
|
|
2022-06-30 20:17:06 -04:00
|
|
|
dotenv:
|
|
|
|
- ./scripts/tasks/.env
|
|
|
|
- ./scripts/tasks/.env.default
|
|
|
|
|
2021-02-05 15:00:17 -05:00
|
|
|
tasks:
|
2022-06-30 20:17:06 -04:00
|
|
|
# SETTINGS / CONFIGURATION
|
2022-08-05 17:39:32 -04:00
|
|
|
settings:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --info'
|
2022-06-30 20:17:06 -04: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 04:17:46 -04:00
|
|
|
set-game-jak3:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --game jak3'
|
2022-06-30 20:17:06 -04: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 15:25:03 -04:00
|
|
|
desc: "PAL region version"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config pal'
|
2022-06-30 20:17:06 -04:00
|
|
|
set-decomp-ntscjp:
|
2022-10-29 15:25:03 -04:00
|
|
|
desc: "NTSC-J region version"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config ntscjp'
|
2023-04-24 20:14:59 -04:00
|
|
|
set-decomp-ntscko:
|
|
|
|
desc: "NTSC-K region version"
|
|
|
|
cmds:
|
|
|
|
- 'python ./scripts/tasks/update-env.py --decomp_config ntscko'
|
2022-02-12 17:48:50 -05:00
|
|
|
# GENERAL
|
2022-06-30 20:17:06 -04:00
|
|
|
extract:
|
|
|
|
desc: "Extracts the game's assets from './iso_data' with the set decompiler config"
|
2022-03-10 19:25:01 -05:00
|
|
|
preconditions:
|
|
|
|
- sh: test -f {{.DECOMP_BIN_RELEASE_DIR}}/decompiler{{.EXE_FILE_EXTENSION}}
|
2022-05-06 18:19:37 -04:00
|
|
|
msg: "Couldn't locate decompiler executable in '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler'"
|
2022-02-12 17:48:50 -05:00
|
|
|
cmds:
|
2023-03-08 20:07:26 -05: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 17:48:50 -05:00
|
|
|
boot-game:
|
2022-08-20 10:41:03 -04:00
|
|
|
desc: "Boots the game, it will fail if it's not already compiled!"
|
2022-03-10 19:25:01 -05:00
|
|
|
preconditions:
|
2022-04-12 18:48:27 -04:00
|
|
|
- sh: test -f {{.GK_BIN_RELEASE_DIR}}/gk{{.EXE_FILE_EXTENSION}}
|
2022-05-06 18:19:37 -04:00
|
|
|
msg: "Couldn't locate runtime executable in '{{.GK_BIN_RELEASE_DIR}}/gk'"
|
2022-02-12 17:48:50 -05:00
|
|
|
cmds:
|
2023-03-09 23:13:01 -05:00
|
|
|
- "{{.GK_BIN_RELEASE_DIR}}/gk -v --game {{.GAME}} -- -boot -fakeiso -debug"
|
2022-08-20 10:41:03 -04: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-09 23:13:01 -05:00
|
|
|
- "{{.GK_BIN_RELEASE_DIR}}/gk -v --game {{.GAME}} -- -boot -fakeiso"
|
2022-02-12 17:48:50 -05:00
|
|
|
run-game:
|
2022-06-30 20:17:06 -04:00
|
|
|
desc: "Start the game's runtime, to start the game itself the REPL is required"
|
2022-03-10 19:25:01 -05:00
|
|
|
preconditions:
|
2022-04-12 18:48:27 -04:00
|
|
|
- sh: test -f {{.GK_BIN_RELEASE_DIR}}/gk{{.EXE_FILE_EXTENSION}}
|
2022-05-06 18:19:37 -04:00
|
|
|
msg: "Couldn't locate runtime executable in '{{.GK_BIN_RELEASE_DIR}}/gk'"
|
2022-02-12 17:48:50 -05:00
|
|
|
cmds:
|
2023-03-09 23:13:01 -05:00
|
|
|
- "{{.GK_BIN_RELEASE_DIR}}/gk -v --game {{.GAME}} -- -fakeiso -debug"
|
2022-06-30 20:17:06 -04:00
|
|
|
# DEVELOPMENT
|
2022-02-12 17:48:50 -05:00
|
|
|
repl:
|
2022-04-20 18:20:59 -04:00
|
|
|
desc: "Start the REPL"
|
2022-03-10 19:25:01 -05:00
|
|
|
preconditions:
|
2022-04-12 18:48:27 -04:00
|
|
|
- sh: test -f {{.GOALC_BIN_RELEASE_DIR}}/goalc{{.EXE_FILE_EXTENSION}}
|
2022-05-06 18:19:37 -04:00
|
|
|
msg: "Couldn't locate compiler executable in '{{.GOALC_BIN_RELEASE_DIR}}/goalc'"
|
2022-02-12 17:48:50 -05: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 14:28:41 -05:00
|
|
|
- "{{.GOALC_BIN_RELEASE_DIR}}/goalc --user-auto --game {{.GAME}}"
|
2024-01-15 20:37:16 -05:00
|
|
|
format-json:
|
2022-04-20 18:20:59 -04:00
|
|
|
desc: "Format code"
|
2021-02-05 15:00:17 -05:00
|
|
|
cmds:
|
2021-10-16 21:01:23 -04:00
|
|
|
# npm install -g prettier
|
2023-03-08 20:07:26 -05:00
|
|
|
- cmd: npx prettier --write ./decompiler/config/jak1/**/*.jsonc
|
2021-10-16 21:01:23 -04:00
|
|
|
ignore_error: true
|
2023-03-08 20:07:26 -05:00
|
|
|
- cmd: npx prettier --write ./decompiler/config/jak2/**/*.jsonc
|
2022-08-24 19:34:09 -04:00
|
|
|
ignore_error: true
|
2024-01-15 20:37:16 -05:00
|
|
|
- cmd: npx prettier --write ./decompiler/config/jak3/**/*.jsonc
|
|
|
|
ignore_error: true
|
|
|
|
format:
|
2023-04-08 15:30:27 -04:00
|
|
|
desc: "Format code"
|
|
|
|
cmds:
|
2024-01-15 20:37:16 -05:00
|
|
|
- cmd: python ./scripts/cpp/format-includes.py
|
|
|
|
- cmd: python ./third-party/run-clang-format/run-clang-format.py -r common decompiler game goalc test tools lsp -i
|
|
|
|
- task: format-json
|
2022-02-12 17:48:50 -05:00
|
|
|
# DECOMPILING
|
2021-05-07 22:56:37 -04:00
|
|
|
decomp:
|
|
|
|
cmds:
|
2023-03-08 20:07:26 -05: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 18:49:57 -04:00
|
|
|
decomp-file:
|
|
|
|
cmds:
|
2023-03-08 20:07:26 -05: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-07 22:56:37 -04:00
|
|
|
decomp-clean:
|
|
|
|
cmds:
|
2022-08-31 19:22:47 -04:00
|
|
|
- python ./scripts/tasks/clean-decomp.py --game "{{.GAME}}"
|
2022-10-11 18:30:26 -04:00
|
|
|
lint-gsrc-file:
|
|
|
|
cmds:
|
|
|
|
- python ./scripts/gsrc/lint-gsrc-file.py --game {{.GAME}} --file {{.FILE}}
|
2022-08-31 19:22:47 -04:00
|
|
|
update-gsrc:
|
|
|
|
cmds:
|
2023-03-08 20:07:26 -05: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 13:57:57 -05:00
|
|
|
update-gsrc-glob:
|
|
|
|
cmds:
|
2023-03-08 20:07:26 -05: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 19:22:47 -04:00
|
|
|
update-gsrc-file:
|
2022-08-29 18:49:57 -04:00
|
|
|
cmds:
|
|
|
|
- task: decomp-file
|
|
|
|
- python ./scripts/gsrc/update-from-decomp.py --game "{{.GAME}}" --file {{.FILE}}
|
2022-10-11 18:30:26 -04:00
|
|
|
- task: lint-gsrc-file
|
2024-01-29 16:15:42 -05: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-06-30 20:17:06 -04:00
|
|
|
# TOOLS
|
2022-08-24 19:34:09 -04: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 16:28:52 -04:00
|
|
|
# python -m pip install -U "watchdog[watchmedo]"
|
2022-08-24 19:34:09 -04: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 16:04:52 -04: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 17:19:35 -04: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 16:17:18 -04:00
|
|
|
fix-translations:
|
|
|
|
desc: Finds and tries to fix invalid translation Characters
|
|
|
|
cmds:
|
|
|
|
- python ./scripts/ci/lint-characters.py --fix
|
2022-02-12 17:48:50 -05:00
|
|
|
# TESTS
|
2022-10-16 17:20:44 -04:00
|
|
|
offline-tests: # ran by jenkins
|
2021-05-26 19:40:12 -04:00
|
|
|
cmds:
|
2023-01-04 18:26:59 -05:00
|
|
|
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --fail-on-cmp'
|
2023-01-11 19:07:35 -05:00
|
|
|
offline-test-file:
|
|
|
|
cmds:
|
|
|
|
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --file {{.FILE}}'
|
2022-10-22 13:26:28 -04:00
|
|
|
offline-tests-fast:
|
|
|
|
cmds:
|
2022-12-30 12:09:04 -05: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 13:26:28 -04:00
|
|
|
# TODO - amalgamate offline-tests and this task, run twice if the previous step fails
|
2022-07-28 00:49:10 -04:00
|
|
|
update-ref-tests:
|
2022-07-06 18:10:38 -04:00
|
|
|
cmds:
|
2022-10-22 13:26:28 -04:00
|
|
|
- cmd: python ./scripts/tasks/delete-file-or-folder.py --path failures
|
2022-12-30 12:09:04 -05: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 18:10:38 -04:00
|
|
|
ignore_error: true
|
2022-09-13 20:03:00 -04:00
|
|
|
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/ --game {{.GAME}}
|
2022-10-22 13:26:28 -04:00
|
|
|
- task: offline-tests-fast
|
2022-09-24 13:04:52 -04:00
|
|
|
update-ref-file:
|
|
|
|
cmds:
|
2022-10-22 13:26:28 -04:00
|
|
|
- cmd: python ./scripts/tasks/delete-file-or-folder.py --path failures
|
2022-10-29 16:28:52 -04: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 13:04:52 -04:00
|
|
|
ignore_error: true
|
|
|
|
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/ --game {{.GAME}}
|
|
|
|
- task: offline-test-file
|
2021-09-06 14:29:06 -04:00
|
|
|
type-test:
|
|
|
|
cmds:
|
2024-01-16 00:15:33 -05:00
|
|
|
- cmd: '{{.GOALCTEST_BIN_RELEASE_DIR}}/goalc-test --gtest_brief=0 --gtest_filter="*{{.TYPE_CONSISTENCY_TEST_FILTER}}*" --gtest_break_on_failure'
|