{
	"folders": [
		{
			"path": ".",
			"name": "PoolBox"
		}
	],
	"tasks": {
		"version": "2.0.0",
		"tasks": [
			{
				"label": "build",
				"type": "shell",
				"windows": { //                                                                                                                                            v re-export for WSL                                 v re-export for WSL
					"command": "wsl make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config} PSX_LICENSE_PATH=$(wslpath ${env:PSX_LICENSE_PATH}) JABY_ENGINE_DIR=$(wslpath ${env:JABY_ENGINE_PATH})",
				},
				"linux":   {
					"command": "make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}",
				},
				"group": {
					"kind": "build",
					"isDefault": true
				},
				"options": {
					"env": {
						"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
					}
				}
			},
			{
				"label": "read memory map",
				"type": "shell",
				"command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf",
				"problemMatcher": [],
				"options": {
					"env": {
						"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
					}
				}
			}
		],
		"inputs": [
			{
				"id": "build profile",
				"type": "pickString",
				"options": ["debug", "release"],
				"default": "release",
				"description": "The build profile for PoolBox"
			},
			{
				"id": "project",
				"type": "pickString",
				"options": ["all", "assets", "application", "cd", "pkg"],
				"default": "all",
				"description": "Project to build"
			},
			{
				"id": "target",
				"type": "pickString",
				"options": ["all", "clean", "rebuild"],
				"default": "all",
				"description": "the build target"
			},
			{
                "id": "region",
                "type": "pickString",
                "options": ["SCEE", "SCEA", "SCEI"],
                "default": "SCEE",
                "description": "Region profile to use"
            },
			{
                "id": "custom config",
                "type": "command",
                "command": "shellCommand.execute",
                "args": {
                    "command": "echo ^|^<Default^> && dir /b /a:d",
                    "cwd": "${env:JABY_ENGINE_PATH}/config",
                    "fieldSeparator": "|"
                }
            },
			{
				"id": "output memory map",
				"type": "pickString",
				"options": ["", "-o application/bin/PoolBox.map"],
				"default": "",
				"description": "Output a memory map"
			}
		]
	},
	"extensions": {
        "recommendations": ["augustocdias.tasks-shell-input"]
    },
	"settings": {
		"C_Cpp.default.includePath": [
			"${env:JABY_ENGINE_PATH}/include",
			"${env:JABY_ENGINE_PATH}/support/include"
            ],
		"C_Cpp.default.compilerPath": "",
		"C_Cpp.default.cStandard": "c17",
        "C_Cpp.default.cppStandard": "c++20",
		"C_Cpp.default.intelliSenseMode": "linux-gcc-x86",
        "C_Cpp.default.compilerArgs": [
            ],
		"C_Cpp.default.defines": [
			"JABYENGINE_PAL"
            ],
	}
}