Support builds though podman

This commit is contained in:
jaby 2025-01-04 22:53:40 +01:00
parent f684cfbfdb
commit a5093d06dd
6 changed files with 18 additions and 29 deletions

View File

@ -8,35 +8,20 @@
"tasks": { "tasks": {
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "build", "label": "build",
"type": "shell", "type": "shell", // TODO: Sort out JABY_ENGINE_DIR!!! Can it be set in the docker image? Can it just be JABY_ENGINE_PATH?
"windows": { // v re-export for WSL v re-export for WSL "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} JABY_ENGINE_DIR=/jaby_engine",
"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": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
}, },
"options": {
"env": {
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
}
}
}, },
{ {
"label": "read memory map", "label": "read memory map",
"type": "shell", "type": "shell", // TODO: Make this work again? Or remove it and just tell people how to use it? Does not work with docker...?
"command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf", "command": "${env:JABY_ENGINE_PATH}/scripts/podman_jaby_engine.sh ${workspaceFolder} . psxreadmap ${input:output memory map} application/bin/PAL/PSX-${input:build profile}/PoolBox.elf",
"problemMatcher": [], "problemMatcher": [],
"options": {
"env": {
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
}
}
} }
], ],
"inputs": [ "inputs": [
@ -73,7 +58,7 @@
"type": "command", "type": "command",
"command": "shellCommand.execute", "command": "shellCommand.execute",
"args": { "args": {
"command": "echo ^|^<Default^> && dir /b /a:d", "command": "echo \"|<Default>\" && ls -d */",
"cwd": "${env:JABY_ENGINE_PATH}/config", "cwd": "${env:JABY_ENGINE_PATH}/config",
"fieldSeparator": "|" "fieldSeparator": "|"
} }

View File

@ -9,6 +9,7 @@
</Defaults>--> </Defaults>-->
<Description> <Description>
<Publisher>Jaby</Publisher> <Publisher>Jaby</Publisher>
<!-- TODO: v Add to git lfs -->
<License alt-logo = "%JABY_ENGINE_DIR%/bin/extern/32BIT.TMD" alt-text = " Not licensed by Sony Will not work on all hardware/software"> <License alt-logo = "%JABY_ENGINE_DIR%/bin/extern/32BIT.TMD" alt-text = " Not licensed by Sony Will not work on all hardware/software">
%PSX_LICENSE_PATH%/%PSX_LICENSE%.DAT %PSX_LICENSE_PATH%/%PSX_LICENSE%.DAT
</License> </License>

View File

@ -13,6 +13,7 @@ ADD ["scripts/install_pop-fe.sh", "/usr/scripts"]
ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}" ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}"
ENV JABY_ENGINE_PATH=/jaby_engine ENV JABY_ENGINE_PATH=/jaby_engine
ENV PSX_LICENSE_PATH=/psx_license
#WORKDIR /usr/src/project #WORKDIR /usr/src/project

View File

@ -1,6 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ -n "${PSX_LICENSE_PATH}" ]]; then
LICENSE_MOUNT="-v ${PSX_LICENSE_PATH}:/psx_license"
else
LICENSE_MOUNT=
fi
PROJECT_PATH=$1 PROJECT_PATH=$1
PROJECT_WORK_DIR=$2 PROJECT_WORK_DIR=$2
shift shift
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 $@ podman run --rm -it -v ${JABY_ENGINE_PATH}:/jaby_engine -v ${PROJECT_PATH}:/project $LICENSE_MOUNT -w /project/$PROJECT_WORK_DIR jaby_engine $@

View File

@ -1,4 +1,4 @@
JABY_ENGINE_DIR = ../../.. JABY_ENGINE_DIR = /jaby_engine
include $(JABY_ENGINE_DIR)/mkfile/common/RebuildTarget.mk include $(JABY_ENGINE_DIR)/mkfile/common/RebuildTarget.mk
ARTIFACT = libFontWriter ARTIFACT = libFontWriter

View File

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