Use ! as a seperator between project mount point and cwd

This commit is contained in:
jaby 2025-01-05 14:57:00 +01:00
parent 6c7738912a
commit ec02fade51
5 changed files with 10 additions and 10 deletions

View File

@ -10,8 +10,8 @@
"tasks": [ "tasks": [
{ {
"label": "build", "label": "build",
"type": "shell", // TODO: Sort out JABY_ENGINE_DIR!!! Can it be set in the docker image? Can it just be JABY_ENGINE_PATH? "type": "shell",
"command": "${env:JABY_ENGINE_PATH}/scripts/podman_jaby_engine.sh ${workspaceFolder} . make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}", "command": "${env:JABY_ENGINE_PATH}/scripts/podman_jaby_engine.sh ${workspaceFolder}!. make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}",
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
@ -19,7 +19,7 @@
}, },
{ {
"label": "read memory map", "label": "read memory map",
"type": "shell", // TODO: Make this work again? Or remove it and just tell people how to use it? Does not work with docker...? "type": "shell",
"command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/PAL/PSX-${input:build profile}/PoolBox.elf", "command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/PAL/PSX-${input:build profile}/PoolBox.elf",
"problemMatcher": [], "problemMatcher": [],
} }

View File

@ -8,9 +8,9 @@ else
LICENSE_MOUNT= LICENSE_MOUNT=
fi fi
PROJECT_PATH=$1 PROJECT_PATH_ARR=(${1//!/ })
PROJECT_WORK_DIR=$2 PROJECT_PATH=${PROJECT_PATH_ARR[0]}
shift PROJECT_WORK_DIR=${PROJECT_PATH_ARR[1]}
shift shift
mkdir -p $JABY_ENGINE_CARGO_FOLDER mkdir -p $JABY_ENGINE_CARGO_FOLDER
podman run --rm -it -v $JABY_ENGINE_CARGO_FOLDER:/root/.cargo/registry -v ${JABY_ENGINE_PATH}:/jaby_engine -v ${PROJECT_PATH}:/project $LICENSE_MOUNT -w /project/$PROJECT_WORK_DIR jaby_engine $@ podman run --rm -it -v $JABY_ENGINE_CARGO_FOLDER:/root/.cargo/registry -v ${JABY_ENGINE_PATH}:/jaby_engine -v ${PROJECT_PATH}:/project $LICENSE_MOUNT -w /project/$PROJECT_WORK_DIR jaby_engine $@

View File

@ -19,13 +19,13 @@
{ {
"label": "make", "label": "make",
"type": "shell", "type": "shell",
"command": "../../scripts/podman_jaby_engine.sh ../../ src/Library make ${input:target} BUILD_PROFILE=${input:build cfg} PSX_TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:config options}", "command": "../../scripts/podman_jaby_engine.sh ../../!src/Library make ${input:target} BUILD_PROFILE=${input:build cfg} PSX_TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:config options}",
"group": "build" "group": "build"
}, },
{ {
"label": "make_all", "label": "make_all",
"type": "shell", "type": "shell",
"command": "../../scripts/podman_jaby_engine.sh ../../ src/Library make -f MakeAll.mk ${input:target prefix}_${input:target} BUILD_PROFILE=${input:build cfg} CUSTOM_CONFIG=${input:config options}", "command": "../../scripts/podman_jaby_engine.sh ../../!src/Library make -f MakeAll.mk ${input:target prefix}_${input:target} BUILD_PROFILE=${input:build cfg} CUSTOM_CONFIG=${input:config options}",
"group": "build" "group": "build"
} }
], ],

View File

@ -25,7 +25,7 @@
"group": { "group": {
"kind": "build" "kind": "build"
}, },
"command": "../../scripts/podman_jaby_engine.sh ../../ src/Tools make -C ${input:linux_cargo_task} CARGO_CMD=${input:cargo cmd} BUILD_PROFILE=${input:build cfg}", "command": "../../scripts/podman_jaby_engine.sh ../../!src/Tools make -C ${input:linux_cargo_task} CARGO_CMD=${input:cargo cmd} BUILD_PROFILE=${input:build cfg}",
"problemMatcher": [] "problemMatcher": []
} }
], ],

View File

@ -19,7 +19,7 @@
{ {
"label": "make", "label": "make",
"type": "shell", "type": "shell",
"command": "../../../scripts/podman_jaby_engine.sh ${workspaceFolder}/.. src/FontWriter make ${input:target} BUILD_PROFILE=${input:build cfg}", "command": "../../../scripts/podman_jaby_engine.sh ${workspaceFolder}/..!src/FontWriter make ${input:target} BUILD_PROFILE=${input:build cfg}",
"options": { "options": {
// TODO: This should not be the case // TODO: This should not be the case
"cwd": "${workspaceFolder}/FontWriter" "cwd": "${workspaceFolder}/FontWriter"