diff --git a/podman/Dockerfile b/podman/Dockerfile index 339c74b2..ab6a5b1f 100644 --- a/podman/Dockerfile +++ b/podman/Dockerfile @@ -11,6 +11,9 @@ RUN apt update && ./install_rust.sh # TODO: Deal with this eventually ADD ["scripts/install_pop-fe.sh", "/usr/scripts"] +ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}" +ENV JABY_ENGINE_PATH=/jaby_engine + #WORKDIR /usr/src/project #RUN apt update && apt install -y nginx diff --git a/scripts/podman_jaby_engine.sh b/scripts/podman_jaby_engine.sh old mode 100644 new mode 100755 index bbfcdcff..5b270dad --- a/scripts/podman_jaby_engine.sh +++ b/scripts/podman_jaby_engine.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash -if [[ -z "${JABY_ENGINE_PROJECT_PATH}" ]]; then -PROJECT_MOUNT=-v ${JABY_ENGINE_PROJECT_PATH}:${JABY_ENGINE_PROJECT_PATH} -else -PROJECT_MOUNT= -fi - -podman run --rm -it -v ${JABY_ENGINE_PATH}:${JABY_ENGINE_PATH} $PROJECT_MOUNT -e JABY_ENGINE_PATH=${JABY_ENGINE_PATH} -e PSX_LICENSE_PATH=${PSX_LICENSE_PATH} -w ${PWD} jaby_engine $@ \ No newline at end of file +PROJECT_PATH=$1 +PROJECT_WORK_DIR=$2 +shift +shift +podman run --rm -it -v ${JABY_ENGINE_PATH}:/jaby_engine -v ${PROJECT_PATH}:/project -e PSX_LICENSE_PATH=${PSX_LICENSE_PATH} -w /project/$PROJECT_WORK_DIR jaby_engine $@ \ No newline at end of file diff --git a/src/Library/Library.code-workspace b/src/Library/Library.code-workspace index afb872fc..904f6e6d 100644 --- a/src/Library/Library.code-workspace +++ b/src/Library/Library.code-workspace @@ -19,23 +19,13 @@ { "label": "make", "type": "shell", - "windows": { - "command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg} PSX_TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:config options}", - }, - "linux": { - "command": "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" }, { "label": "make_all", "type": "shell", - "windows": { - "command": "wsl make -f MakeAll.mk ${input:target prefix}_${input:target} BUILD_PROFILE=${input:build cfg} CUSTOM_CONFIG=${input:config options}", - }, - "linux": { - "command": "make -f MakeAll.mk ${input:target} BUILD_PROFILE=${input:build cfg}", - }, + "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" } ], @@ -59,7 +49,7 @@ "type": "command", "command": "shellCommand.execute", "args": { - "command": "echo ^|^ && dir /b /a:d", + "command": "echo \"|\" && ls -d */", "cwd": "${workspaceFolder}/../../config", "fieldSeparator": "|" } diff --git a/src/Tools/Tools.code-workspace b/src/Tools/Tools.code-workspace index 7b35fa07..3acdfd0c 100644 --- a/src/Tools/Tools.code-workspace +++ b/src/Tools/Tools.code-workspace @@ -6,23 +6,14 @@ ], "settings": { "cargo_task": [ - "./ all!Unix: All", - "cpp_out all!Unix: cpp_out", - "mkoverlay all!Unix: mkoverlay", - "psxcdgen_ex all!Unix: psxcdgen_ex", - "psxcdread all!Unix: psxcdread", - "psxfileconv all!Unix: psxfileconv", - "psxreadmap all!Unix: psxreadmap", - "wslpath all!Unix: wslpath", - - "./ all-windows!Windows: All", - "cpp_out all-windows!Windows: cpp_out", - "mkoverlay all-windows!Windows: mkoverlay", - "psxcdgen_ex all-windows!Windows: psxcdgen_ex", - "psxcdread all-windows!Windows: psxcdread", - "psxfileconv all-windows!Windows: psxfileconv", - "psxreadmap all-windows!Windows: psxreadmap", - "wslpath all-windows!Windows: wslpath" + "./ all!All", + "cpp_out all!cpp_out", + "mkoverlay all!mkoverlay", + "psxcdgen_ex all!psxcdgen_ex", + "psxcdread all!psxcdread", + "psxfileconv all!psxfileconv", + "psxreadmap all!psxreadmap", + "wslpath all!wslpath", ] }, "tasks": { @@ -34,26 +25,11 @@ "group": { "kind": "build" }, - "windows": { - "command": "wsl --shell-type login make -C ${input:windows_cargo_task} CARGO_CMD=${input:cargo cmd} BUILD_PROFILE=${input:build cfg}" - }, - "linux": { - "command": "make -C ${input:linux_cargo_task} 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": [] } ], "inputs": [ - { - "id": "windows_cargo_task", - "type": "command", - "command": "shellCommand.execute", - "args": { - "command": "powershell", - "commandArgs": ["-command", "'${config:cargo_task}'.Replace(',',\"`n\")"], - "fieldSeparator": "!" - } - }, { "id": "linux_cargo_task", "type": "command",