Support for podman #9

Merged
jaby merged 25 commits from feature/jb/potman into main 2025-01-08 21:22:17 +00:00
4 changed files with 20 additions and 53 deletions
Showing only changes of commit 18256d1ff0 - Show all commits

View File

@ -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
cody marked this conversation as resolved Outdated
Outdated
Review

Never set workdir to /jaby_engine or some other potentially useful directory? is it intended to be in /user/jaby_engine/bin/extern?

Never set workdir to `/jaby_engine` or some other potentially useful directory? is it intended to be in `/user/jaby_engine/bin/extern`?
#RUN apt update && apt install -y nginx

12
scripts/podman_jaby_engine.sh Normal file → Executable file
View File

@ -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 $@
PROJECT_PATH=$1
PROJECT_WORK_DIR=$2
cody marked this conversation as resolved
Review

Can you directly map it to the local system cargo registry? does this potentially cause any problems?

Can you directly map it to the local system cargo registry? does this potentially cause any problems?
Review

I leave this unchanged for now.
I need to figure out first if this is really an issue

I leave this unchanged for now. I need to figure out first if this is really an issue
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 $@

View File

@ -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 ^|^<Default^> && dir /b /a:d",
"command": "echo \"|<Default>\" && ls -d */",
"cwd": "${workspaceFolder}/../../config",
"fieldSeparator": "|"
}

View File

@ -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",