Support for podman #9

Merged
jaby merged 25 commits from feature/jb/potman into main 2025-01-08 21:22:17 +00:00
30 changed files with 234 additions and 239 deletions

3
.gitattributes vendored
View File

@ -1,4 +1,5 @@
*.xa filter=lfs diff=lfs merge=lfs -text *.xa filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text *.wav filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text *.mp3 filter=lfs diff=lfs merge=lfs -text
*.TMD filter=lfs diff=lfs merge=lfs -text

View File

@ -1,6 +0,0 @@
#!/bin/bash
#Made possible by Cody the white tiger
# $1 => Input file
# $2 => Output file
ffmpeg -i $1 -sample_fmt s16 -ar 44100 $2

BIN
bin/extern/32BIT.TMD (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -1,9 +0,0 @@
#!/bin/bash
#Made possible by Cody the white tiger
BASEDIR=$(dirname "$0")
cd $BASEDIR
source extern/py3venv/bin/activate
cd extern/pop-fe/
./pop-fe.py --title=$1 --ps1-newemu --cover=$2/Icon.png --pic0=$2/Title.png --pic1=$2/Background.png --ps3-pkg="${3%.*}.pkg" $3

6
docs/Bugs/known_bugs.md Normal file
View File

@ -0,0 +1,6 @@
# Known bugs
- [Known bugs](#known-bugs)
- [`psxreadmap` is not functional under Linux](#psxreadmap-is-not-functional-under-linux)
## `psxreadmap` is not functional under Linux
Key input seems not work under any version under Linux...

View File

@ -2,7 +2,7 @@
- [JabyEngine Documentation](#jabyengine-documentation) - [JabyEngine Documentation](#jabyengine-documentation)
- [Features](#features) - [Features](#features)
- [Known limitations](#known-limitations) - [Known limitations](#known-limitations)
- [Observed bugs](#observed-bugs) - [Bugs](#bugs)
## Features ## Features
- [Auto LBAs](./Features/auto_lba.md) - [Auto LBAs](./Features/auto_lba.md)
@ -10,5 +10,6 @@
## Known limitations ## Known limitations
- Insufficient documentation - Insufficient documentation
## Observed bugs ### Bugs
- [Known bugs](./Bugs/known_bugs.md)
- [Observed bugs](./Bugs/observed_bugs.md) - [Observed bugs](./Bugs/observed_bugs.md)

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",
"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}",
"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",
"command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf", "command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/${input:tv format}/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

@ -8,7 +8,7 @@ $(CD_OUTPUT): always
$(PKG_OUTPUT): always $(PKG_OUTPUT): always
@mkdir -p $(REGION) @mkdir -p $(REGION)
@echo "!!PKG generation is experimentel!!" @echo "!!PKG generation is experimentel!!"
run_pop_fe.sh $(ARTIFACT) $(PWD)/assets/pkg $(PWD)/iso/$(REGION)/$(ARTIFACT).cue run_pop_fe.sh $(ARTIFACT) $(shell pwd)/../assets/pkg $(shell pwd)/$(REGION)/$(ARTIFACT).cue
all: $(CD_OUTPUT) all: $(CD_OUTPUT)
clean: pkg_clean clean: pkg_clean

View File

@ -10,7 +10,7 @@ PLATFORM ?= PSX
#Build profile, possible values: release, debug, profile, coverage #Build profile, possible values: release, debug, profile, coverage
BUILD_DIR ?= bin/$(PSX_TV_FORMAT) BUILD_DIR ?= bin/$(PSX_TV_FORMAT)
BUILD_PROFILE ?= debug BUILD_PROFILE ?= debug
PSX_TV_FORMAT ?= PAL PSX_TV_FORMAT ?= PAL
CONFIG_NAME ?= $(PLATFORM)-$(BUILD_PROFILE) CONFIG_NAME ?= $(PLATFORM)-$(BUILD_PROFILE)
OUTPUT_DIR = $(BUILD_DIR)/$(CONFIG_NAME) OUTPUT_DIR = $(BUILD_DIR)/$(CONFIG_NAME)

19
podman/Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM "ubuntu:22.04"
WORKDIR /usr/scripts
cody marked this conversation as resolved
Review

Potentially not needed?

Potentially not needed?
ADD ["scripts/make_gcc.sh", "/usr/scripts"]
WORKDIR /tmp
RUN apt update && /usr/scripts/make_gcc.sh
WORKDIR /usr/scripts
ADD ["scripts/install_rust.sh", "/usr/scripts"]
RUN apt update && ./install_rust.sh
ADD ["scripts/install_pop-fe.sh", "scripts/run_pop_fe.sh", "/usr/scripts"]
WORKDIR /usr/jaby_engine/bin/extern
RUN apt update && /usr/scripts/install_pop-fe.sh
WORKDIR /project
ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}"
ENV JABY_ENGINE_PATH=/jaby_engine
ENV JABY_ENGINE_DIR=/jaby_engine
ENV PSX_LICENSE_PATH=/psx_license

17
podman/install.sh Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
podman build -t jaby_engine .
if [[ -z "${JABY_ENGINE_PATH}" ]]; then
echo "Setting JABY_ENGINE_PATH to parent folder"
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
export JABY_ENGINE_PATH="$(dirname "$SCRIPT_DIR")"
if cat /etc/passwd | grep $USER | grep bash > /dev/null; then
# Bash found
echo "export JABY_ENGINE_PATH="$JABY_ENGINE_PATH"" >> ~/.bashrc
else
# No bash found
echo "Please add export JABY_ENGINE_PATH="$JABY_ENGINE_PATH" to your shell profile"
fi
fi

View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Made possible by Cody the white tiger
echo "<<< Install pop-fe >>>"
apt-get install -y cmake python-is-python3 python3 python3-pip python3-venv pkg-config libiso9660-dev libsndfile1-dev swig libsndfile-dev ffmpeg mame-tools cmake wget unzip
git clone --recursive https://github.com/sahlberg/pop-fe
pip3 install pytubefix PyPDF2 requests pycdlib ecdsa tkinterdnd2 opencv-contrib-python rarfile scikit-learn scipy
make -C pop-fe/PSL1GHT/tools/ps3py/
cmake -B pop-fe/atracdenc/src/ -S pop-fe/atracdenc/src/
make -C pop-fe/atracdenc/src/
cd pop-fe
./pop-fe.py --install
echo "<<< Register pop-fe >>>"
ln -s /usr/scripts/run_pop_fe.sh /usr/local/bin/run_pop_fe.sh

9
podman/scripts/install_rust.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
echo "<<< Install Rust prerequisites >>>"
apt install -y curl
RUST_VERSION=1.78.0
echo "<<< Install Rust $RUST_VERSION >>>"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=$RUST_VERSION -y
. "$HOME/.cargo/env"
cargo install cargo-edit --locked

65
podman/scripts/make_gcc.sh Executable file
View File

@ -0,0 +1,65 @@
#!/usr/bin/env bash
echo "<<< Install GCC prerequisites >>>"
apt install -y make texinfo g++ gcc git libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison
GCC_VERSION=13.1.0
echo "<<< Build GCC >>>"
mkdir -p psx-gcc
cd psx-gcc
echo "<<< clone binutils >>>"
git clone git://sourceware.org/git/binutils-gdb.git
cd binutils-gdb
mkdir -p build
cd build
echo "<<< Configure binutils >>>"
../configure --target=mipsel-linux-gnu --with-sysroot --disable-nls --disable-werror
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Make binutils >>>"
make -j$(nproc)
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Install binutils >>>"
make -j$(nproc) install
if [ $? -ne 0 ]; then
exit 1
fi
cd ../..
echo "<<< clone gcc >>>"
git clone --recurse-submodules git://gcc.gnu.org/git/gcc.git
cd gcc
echo "<<< checkout gcc $GCC_VERSION >>>"
git checkout "releases/gcc-$GCC_VERSION"
mkdir -p build
cd build
echo "<<< configure gcc >>>"
../configure --target=mipsel-linux-gnu --disable-nls --enable-languages=c,c++ --without-headers
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Make gcc >>>"
make -j$(nproc) all-gcc
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Install gcc >>>"
make -j$(nproc) install-gcc
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Delete GCC folder >>>"
cd /tmp
rm -fr psx-gcc

5
podman/scripts/run_pop_fe.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Made possible by Cody the white tiger
cd /usr/jaby_engine/bin/extern/pop-fe
./pop-fe.py --title=$1 --ps1-newemu --cover=$2/Icon.png --pic0=$2/Title.png --pic1=$2/Background.png --ps3-pkg="${3%.*}.pkg" $3

View File

@ -1,8 +1,9 @@
- [JabyEngine](#jabyengine) - [JabyEngine](#jabyengine)
- [About](#about) - [About](#about)
- [How to build](#how-to-build) - [How to build](#how-to-build)
- [Building `JabyEngine` (without VSCode)](#building-jabyengine-without-vscode) - [Building `Tools` (without VS Code)](#building-tools-without-vs-code)
- [Building support library (without VSCode)](#building-support-library-without-vscode) - [Building `JabyEngine` (without VS Code)](#building-jabyengine-without-vs-code)
- [Building support library (without VS Code)](#building-support-library-without-vs-code)
- [`FontWriter` (without VSCode)](#fontwriter-without-vscode) - [`FontWriter` (without VSCode)](#fontwriter-without-vscode)
- [Building `PoolBox` (without VSCode)](#building-poolbox-without-vscode) - [Building `PoolBox` (without VSCode)](#building-poolbox-without-vscode)
- [Media creators](#media-creators) - [Media creators](#media-creators)
@ -15,19 +16,36 @@
JabyEngine is my personal attempt to eventually make my own PS1 game from "ground up". Originally I didn't indented to release this code publicly but recently I decided to give it a try. If you read this, thank you! JabyEngine is my personal attempt to eventually make my own PS1 game from "ground up". Originally I didn't indented to release this code publicly but recently I decided to give it a try. If you read this, thank you!
## How to build ## How to build
JabyEngine relies on linux to be build. For Windows users it uses `wsl` instead but support for it might get dropped during further development. JabyEngine can be build with a docker image using `podman`. Simply run the `install.sh` script from the `podman` folder and you should be good to go.
`podman_jaby_engine.sh` allows you to easily run the docker image for builds:
`podman_jaby_engine.sh <project mounting folder>:<working directory relative to project mounting folder> <Command to run> <Arg1> <Args2> <...>`
The following environment variables should be set: The following environment variables should be set:
* `JABY_ENGINE_PATH`: The path to the root folder of this repo * `JABY_ENGINE_PATH`: The path to the root folder of this repo. If you used the `install.sh` script and the environment variable was not set, the script will have set it to the folder. Restarting the shell or VS Code might be required.
* `PSX_LICENSE_PATH`: The path to a folder containing the PS1 licenses for generating a CD. * `PSX_LICENSE_PATH`: The path to a folder containing the PS1 licenses for generating a CD.
Additionally you can also specify the following optional environment variables:
* `JABY_ENGINE_NO_DOCKER`: Turns off the usage of `podman` for builds. This is only recommended for specific development.
### Building `JabyEngine` (without VSCode) VS Code has build targets set for all the projects which should be build in this order:
* `src/Tools/Tools.code-workspace`: Build all tools
* `src/Library/Library.code-workspace`: Build JabyEngine for the configurations you need
* `support/src/SupportLibrary.code-workspace` (optional): Build for using support code
* `examples/PoolBox/PoolBox.code-workspace`(optional): Build for an example "game"
### Building `Tools` (without VS Code)
`make` requires the following values to be passed:
* `CARGO_CMD`: `build`
* `BUILD_PROFILE`: `debug`/`release`
### Building `JabyEngine` (without VS Code)
`make` requires the following values to be passed: `make` requires the following values to be passed:
* `BUILD_PROFILE`: `debug`/`release` * `BUILD_PROFILE`: `debug`/`release`
* `PSX_TV_FORMAT`: `PAL`/`NTSC` * `PSX_TV_FORMAT`: `PAL`/`NTSC`
* `CUSTOM_CONFIG`: Empty or folder name under `./config` * `CUSTOM_CONFIG`: Empty or folder name under `./config`
### Building support library (without VSCode) ### Building support library (without VS Code)
These projects shall eventually turn into useful extensions for the engine. So far they are more tests then proper code. However `PoolBox` is depended on `FontWriter`. These projects shall eventually turn into useful extensions for the engine. So far they are more tests then proper code. However `PoolBox` is depended on `FontWriter`.
#### `FontWriter` (without VSCode) #### `FontWriter` (without VSCode)
@ -44,9 +62,10 @@ These projects shall eventually turn into useful extensions for the engine. So f
# Media creators # Media creators
## JabyEngine ## JabyEngine
| Art | Author | | Art | Author |
|-----------------------------------------------------------------|--------| |-----------------------------------------------------------------|------------------------------------------------------------|
| `ressources\Splash_ntsc.png` <br/> `ressources\Splash_ntsc.png` | Niuka | | `ressources\Splash_ntsc.png` <br/> `ressources\Splash_ntsc.png` | Niuka |
| `bin/extern/32BIT.TMD` | http://psx.arthus.net/homebrew/assets/boot_logos/32BIT.TMD |
## PoolBox ## PoolBox
| Art | Author | | Art | Author |
@ -68,4 +87,4 @@ These projects shall eventually turn into useful extensions for the engine. So f
* Cody the white tiger * Cody the white tiger
* Nicolas Noble * Nicolas Noble
* Pyravia * Pyravia
* Sickle * Sickle

25
scripts/podman_jaby_engine.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
JABY_ENGINE_DOT_FOLDER="$HOME/.jaby_engine"
JABY_ENGINE_CARGO_FOLDER="$JABY_ENGINE_DOT_FOLDER/cargo/registry"
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
if [[ -n "${PSX_LICENSE_PATH}" ]]; then
LICENSE_MOUNT="-v ${PSX_LICENSE_PATH}:/psx_license"
else
LICENSE_MOUNT=
fi
PROJECT_PATH_ARR=(${1//:/ })
PROJECT_PATH=${PROJECT_PATH_ARR[0]}
PROJECT_WORK_DIR=${PROJECT_PATH_ARR[1]}
shift
if [[ -z "${JABY_ENGINE_NO_DOCKER}" ]]; then
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 $@
else
echo "WARNING! You are not running in podman"
export JABY_ENGINE_DIR=$JABY_ENGINE_PATH
export PATH="$JABY_ENGINE_PATH/bin:${PATH}"
cd $PROJECT_PATH/$PROJECT_WORK_DIR
$@
fi

View File

@ -19,23 +19,13 @@
{ {
"label": "make", "label": "make",
"type": "shell", "type": "shell",
"windows": { "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": "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}",
},
"group": "build" "group": "build"
}, },
{ {
"label": "make_all", "label": "make_all",
"type": "shell", "type": "shell",
"windows": { "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": "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}",
},
"group": "build" "group": "build"
} }
], ],
@ -59,7 +49,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": "${workspaceFolder}/../../config", "cwd": "${workspaceFolder}/../../config",
"fieldSeparator": "|" "fieldSeparator": "|"
} }
@ -81,7 +71,7 @@
] ]
}, },
"extensions": { "extensions": {
"recommendations": ["augustocdias.tasks-shell-input"] "recommendations": ["augustocdias.tasks-shell-input", "cantonios.project-templates"]
}, },
"settings": { "settings": {
"cmake.configureOnOpen": false, "cmake.configureOnOpen": false,

View File

@ -31,5 +31,4 @@ define cargo_unix_default
) )
endef endef
# Run `cargo install cargo-edit --locked`to support upgrade
# Windows build requires "rustup target add x86_64-pc-windows-gnu" and "sudo apt-get install mingw-w64" # Windows build requires "rustup target add x86_64-pc-windows-gnu" and "sudo apt-get install mingw-w64"

View File

@ -6,23 +6,14 @@
], ],
"settings": { "settings": {
"cargo_task": [ "cargo_task": [
"./ all!Unix: All", "./ all!All",
"cpp_out all!Unix: cpp_out", "cpp_out all!cpp_out",
"mkoverlay all!Unix: mkoverlay", "mkoverlay all!mkoverlay",
"psxcdgen_ex all!Unix: psxcdgen_ex", "psxcdgen_ex all!psxcdgen_ex",
"psxcdread all!Unix: psxcdread", "psxcdread all!psxcdread",
"psxfileconv all!Unix: psxfileconv", "psxfileconv all!psxfileconv",
"psxreadmap all!Unix: psxreadmap", "psxreadmap all!psxreadmap",
"wslpath all!Unix: wslpath", "wslpath all!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"
] ]
}, },
"tasks": { "tasks": {
@ -34,26 +25,11 @@
"group": { "group": {
"kind": "build" "kind": "build"
}, },
"windows": { "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": "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}"
},
"problemMatcher": [] "problemMatcher": []
} }
], ],
"inputs": [ "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", "id": "linux_cargo_task",
"type": "command", "type": "command",
@ -73,7 +49,7 @@
{ {
"id": "cargo cmd", "id": "cargo cmd",
"type":"pickString", "type":"pickString",
"options": ["build", "check", "update", "upgrade", "clean", "run", "tree"], "options": ["build", "check", "upgrade", "clean", "run", "tree"],
"default": "build", "default": "build",
"description": "cargo command to run" "description": "cargo command to run"
} }

View File

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

View File

@ -1,6 +1,6 @@
FontWriter: always .PHONY: FontWriter
FontWriter:
$(MAKE) -C $(JABY_ENGINE_DIR)/support/src/FontWriter $(MAKECMDGOALS) $(MAKE) -C $(JABY_ENGINE_DIR)/support/src/FontWriter $(MAKECMDGOALS)
all: FontWriter all: FontWriter
always: ;

View File

@ -19,15 +19,7 @@
{ {
"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": {
"cwd": "${workspaceFolder}/FontWriter"
},
"group": "build" "group": "build"
} }
], ],

View File

@ -11,32 +11,17 @@
{ {
"label": "build", "label": "build",
"type": "shell", "type": "shell",
"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}",
"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",
"command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/#{ProjectName}.elf", "command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/#{ProjectName}.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

@ -1,6 +0,0 @@
echo off
set dst_name=JabyEngine-PSX_Game
set dst="%APPDATA%\Code\User\ProjectTemplates\%dst_name%"
mkdir %dst%
xcopy /s %dst_name% %dst%

5
template/install.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
dst="$HOME/.config/Code/User/ProjectTemplates"
mkdir -p $dst
cp -r "JabyEngine-PSX_Game" "$dst"

View File

@ -1,42 +0,0 @@
#!/bin/bash
#Made possible by Cody the white tiger
BASEDIR=$(dirname "$0")
mkdir -p $BASEDIR/../bin/extern/
cd $BASEDIR/../bin/extern
sudo apt install -y python3 python3-pip python3-venv pkg-config libiso9660-dev libsndfile1-dev swig
if ! test -d py3venv; then
python3 -m venv py3venv
fi
source py3venv/bin/activate
pip3 install ecdsa wheel pillow rarfile PyPDF2 requests opencv-contrib-python pycryptodome pycdio pycdlib
if ! test -d pop-fe; then
git clone https://github.com/sahlberg/pop-fe
fi
if ! test -d Cue2cu2; then
git clone https://github.com/NRGDEAD/Cue2cu2
cp Cue2cu2/cue2cu2.py pop-fe
fi
cd pop-fe
if ! test -d atracdenc; then
git clone https://github.com/dcherednik/atracdenc.git
cd atracdenc/src/
cmake .
make
cd ../..
fi
if ! test -d PSL1GHT; then
git clone https://github.com/sahlberg/PSL1GHT
cd PSL1GHT/tools/ps3py
git checkout origin/use-python3
make
fi
#if ! test -f /usr/local/bin/python; then
# sudo ln -s $(which python3) /usr/local/bin/python
#fi

View File

@ -1,2 +0,0 @@
#!/bin/bash
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

View File

@ -1,55 +0,0 @@
#!/bin/bash
mkdir -p psx-gcc
cd psx-gcc
echo "clone binutils"
git clone git://sourceware.org/git/binutils-gdb.git
cd binutils-gdb
mkdir -p build
cd build
echo "Configure binutils"
../configure --target=mipsel-linux-gnu --with-sysroot --disable-nls --disable-werror
if [ $? -ne 0 ]; then
exit 1
fi
echo "Make binutils"
make
if [ $? -ne 0 ]; then
exit 1
fi
echo "Install binutils"
sudo make install
if [ $? -ne 0 ]; then
exit 1
fi
cd ../..
echo "clone gcc"
git clone --recurse-submodules git://gcc.gnu.org/git/gcc.git
cd gcc
echo "checkout gcc 13.1.0"
git checkout releases/gcc-13.1.0
mkdir -p build
cd build
echo "configure gcc"
../configure --target=mipsel-linux-gnu --disable-nls --enable-languages=c,c++ --without-headers
if [ $? -ne 0 ]; then
exit 1
fi
echo "Make gcc"
make all-gcc
if [ $? -ne 0 ]; then
exit 1
fi
echo "Install gcc"
sudo make install-gcc
if [ $? -ne 0 ]; then
exit 1
fi

View File

@ -1,3 +0,0 @@
#!/bin/bash
sudo apt update
sudo apt install make texinfo g++ gcc libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison