diff --git a/.gitattributes b/.gitattributes index b7be3103..47ba9f05 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ *.xa filter=lfs diff=lfs merge=lfs -text *.wav filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text -*.mp3 filter=lfs diff=lfs merge=lfs -text \ No newline at end of file +*.mp3 filter=lfs diff=lfs merge=lfs -text +*.TMD filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/bin/convert2cdda.sh b/bin/convert2cdda.sh deleted file mode 100644 index 60d16550..00000000 --- a/bin/convert2cdda.sh +++ /dev/null @@ -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 \ No newline at end of file diff --git a/bin/extern/32BIT.TMD b/bin/extern/32BIT.TMD new file mode 100644 index 00000000..08225d62 --- /dev/null +++ b/bin/extern/32BIT.TMD @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9b3dca0dd6b7cf7a41642a31743b43b3e9b2185b5dee3ad1f3120940b20fd08 +size 8856 diff --git a/bin/run_pop_fe.sh b/bin/run_pop_fe.sh deleted file mode 100644 index 630d0868..00000000 --- a/bin/run_pop_fe.sh +++ /dev/null @@ -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 \ No newline at end of file diff --git a/docs/Bugs/known_bugs.md b/docs/Bugs/known_bugs.md new file mode 100644 index 00000000..b4dd1a53 --- /dev/null +++ b/docs/Bugs/known_bugs.md @@ -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... \ No newline at end of file diff --git a/docs/docs.md b/docs/docs.md index 30637036..3b509dac 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -2,7 +2,7 @@ - [JabyEngine Documentation](#jabyengine-documentation) - [Features](#features) - [Known limitations](#known-limitations) - - [Observed bugs](#observed-bugs) + - [Bugs](#bugs) ## Features - [Auto LBAs](./Features/auto_lba.md) @@ -10,5 +10,6 @@ ## Known limitations - Insufficient documentation -## Observed bugs +### Bugs +- [Known bugs](./Bugs/known_bugs.md) - [Observed bugs](./Bugs/observed_bugs.md) \ No newline at end of file diff --git a/examples/PoolBox/PoolBox.code-workspace b/examples/PoolBox/PoolBox.code-workspace index 540f55ec..ddada09d 100644 --- a/examples/PoolBox/PoolBox.code-workspace +++ b/examples/PoolBox/PoolBox.code-workspace @@ -8,35 +8,20 @@ "tasks": { "version": "2.0.0", "tasks": [ - { + { "label": "build", "type": "shell", - "windows": { // v re-export for WSL v re-export for WSL - "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}", - }, + "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": { "kind": "build", "isDefault": true }, - "options": { - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } }, { "label": "read memory map", - "type": "shell", - "command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf", + "type": "shell", + "command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf", "problemMatcher": [], - "options": { - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } } ], "inputs": [ @@ -73,7 +58,7 @@ "type": "command", "command": "shellCommand.execute", "args": { - "command": "echo ^|^ && dir /b /a:d", + "command": "echo \"|\" && ls -d */", "cwd": "${env:JABY_ENGINE_PATH}/config", "fieldSeparator": "|" } diff --git a/mkfile/ISOMakefile.mk b/mkfile/ISOMakefile.mk index c0c85139..4799aa2b 100644 --- a/mkfile/ISOMakefile.mk +++ b/mkfile/ISOMakefile.mk @@ -8,7 +8,7 @@ $(CD_OUTPUT): always $(PKG_OUTPUT): always @mkdir -p $(REGION) @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) clean: pkg_clean diff --git a/mkfile/Makefile b/mkfile/Makefile index cd1685f3..4aa1e396 100644 --- a/mkfile/Makefile +++ b/mkfile/Makefile @@ -10,7 +10,7 @@ PLATFORM ?= PSX #Build profile, possible values: release, debug, profile, coverage BUILD_DIR ?= bin/$(PSX_TV_FORMAT) BUILD_PROFILE ?= debug -PSX_TV_FORMAT ?= PAL +PSX_TV_FORMAT ?= PAL CONFIG_NAME ?= $(PLATFORM)-$(BUILD_PROFILE) OUTPUT_DIR = $(BUILD_DIR)/$(CONFIG_NAME) diff --git a/podman/Dockerfile b/podman/Dockerfile new file mode 100644 index 00000000..c278cf2d --- /dev/null +++ b/podman/Dockerfile @@ -0,0 +1,19 @@ +FROM "ubuntu:22.04" +WORKDIR /usr/scripts +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 \ No newline at end of file diff --git a/podman/install.sh b/podman/install.sh new file mode 100755 index 00000000..7c514c63 --- /dev/null +++ b/podman/install.sh @@ -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 \ No newline at end of file diff --git a/podman/scripts/install_pop-fe.sh b/podman/scripts/install_pop-fe.sh new file mode 100755 index 00000000..8925858f --- /dev/null +++ b/podman/scripts/install_pop-fe.sh @@ -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 \ No newline at end of file diff --git a/podman/scripts/install_rust.sh b/podman/scripts/install_rust.sh new file mode 100755 index 00000000..1ad8759e --- /dev/null +++ b/podman/scripts/install_rust.sh @@ -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 \ No newline at end of file diff --git a/podman/scripts/make_gcc.sh b/podman/scripts/make_gcc.sh new file mode 100755 index 00000000..a6331421 --- /dev/null +++ b/podman/scripts/make_gcc.sh @@ -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 \ No newline at end of file diff --git a/podman/scripts/run_pop_fe.sh b/podman/scripts/run_pop_fe.sh new file mode 100755 index 00000000..06a4497d --- /dev/null +++ b/podman/scripts/run_pop_fe.sh @@ -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 \ No newline at end of file diff --git a/readme.md b/readme.md index 70c32237..f6610118 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,9 @@ - [JabyEngine](#jabyengine) - [About](#about) - [How to build](#how-to-build) - - [Building `JabyEngine` (without VSCode)](#building-jabyengine-without-vscode) - - [Building support library (without VSCode)](#building-support-library-without-vscode) + - [Building `Tools` (without VS Code)](#building-tools-without-vs-code) + - [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) - [Building `PoolBox` (without VSCode)](#building-poolbox-without-vscode) - [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! ## 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 : <...>` 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. + +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: * `BUILD_PROFILE`: `debug`/`release` * `PSX_TV_FORMAT`: `PAL`/`NTSC` * `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`. #### `FontWriter` (without VSCode) @@ -44,9 +62,10 @@ These projects shall eventually turn into useful extensions for the engine. So f # Media creators ## JabyEngine -| Art | Author | -|-----------------------------------------------------------------|--------| -| `ressources\Splash_ntsc.png`
`ressources\Splash_ntsc.png` | Niuka | +| Art | Author | +|-----------------------------------------------------------------|------------------------------------------------------------| +| `ressources\Splash_ntsc.png`
`ressources\Splash_ntsc.png` | Niuka | +| `bin/extern/32BIT.TMD` | http://psx.arthus.net/homebrew/assets/boot_logos/32BIT.TMD | ## PoolBox | Art | Author | @@ -68,4 +87,4 @@ These projects shall eventually turn into useful extensions for the engine. So f * Cody the white tiger * Nicolas Noble * Pyravia -* Sickle \ No newline at end of file +* Sickle diff --git a/scripts/podman_jaby_engine.sh b/scripts/podman_jaby_engine.sh new file mode 100755 index 00000000..97df0bb4 --- /dev/null +++ b/scripts/podman_jaby_engine.sh @@ -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" + +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 \ No newline at end of file diff --git a/src/Library/Library.code-workspace b/src/Library/Library.code-workspace index afb872fc..d63328b3 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": "|" } @@ -81,7 +71,7 @@ ] }, "extensions": { - "recommendations": ["augustocdias.tasks-shell-input"] + "recommendations": ["augustocdias.tasks-shell-input", "cantonios.project-templates"] }, "settings": { "cmake.configureOnOpen": false, diff --git a/src/Tools/Common.mk b/src/Tools/Common.mk index 772d68d5..25fca883 100644 --- a/src/Tools/Common.mk +++ b/src/Tools/Common.mk @@ -31,5 +31,4 @@ define cargo_unix_default ) 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" \ No newline at end of file diff --git a/src/Tools/Tools.code-workspace b/src/Tools/Tools.code-workspace index 7b35fa07..0ce65be7 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", @@ -73,7 +49,7 @@ { "id": "cargo cmd", "type":"pickString", - "options": ["build", "check", "update", "upgrade", "clean", "run", "tree"], + "options": ["build", "check", "upgrade", "clean", "run", "tree"], "default": "build", "description": "cargo command to run" } diff --git a/support/src/FontWriter/Makefile b/support/src/FontWriter/Makefile index af90a06e..a9921bf2 100644 --- a/support/src/FontWriter/Makefile +++ b/support/src/FontWriter/Makefile @@ -1,4 +1,3 @@ -JABY_ENGINE_DIR = ../../.. include $(JABY_ENGINE_DIR)/mkfile/common/RebuildTarget.mk ARTIFACT = libFontWriter diff --git a/support/src/Makefile b/support/src/Makefile index 923279d5..dc95c529 100644 --- a/support/src/Makefile +++ b/support/src/Makefile @@ -1,6 +1,6 @@ -FontWriter: always +.PHONY: FontWriter + +FontWriter: $(MAKE) -C $(JABY_ENGINE_DIR)/support/src/FontWriter $(MAKECMDGOALS) -all: FontWriter - -always: ; \ No newline at end of file +all: FontWriter \ No newline at end of file diff --git a/support/src/SupportLibrary.code-workspace b/support/src/SupportLibrary.code-workspace index 9fea4a4e..1c8ddf84 100644 --- a/support/src/SupportLibrary.code-workspace +++ b/support/src/SupportLibrary.code-workspace @@ -19,15 +19,7 @@ { "label": "make", "type": "shell", - "windows": { - "command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg}", - }, - "linux": { - "command": "make ${input:target} BUILD_PROFILE=${input:build cfg}", - }, - "options": { - "cwd": "${workspaceFolder}/FontWriter" - }, + "command": "../../scripts/podman_jaby_engine.sh ${workspaceFolder}/..:src/FontWriter make ${input:target} BUILD_PROFILE=${input:build cfg}", "group": "build" } ], diff --git a/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace index 4e1124dc..b733125f 100644 --- a/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace +++ b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace @@ -11,32 +11,17 @@ { "label": "build", "type": "shell", - "windows": { // v re-export for WSL v re-export for WSL - "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}", - }, + "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": { "kind": "build", "isDefault": true }, - "options": { - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } }, { "label": "read memory map", "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": [], - "options": { - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } } ], "inputs": [ @@ -73,7 +58,7 @@ "type": "command", "command": "shellCommand.execute", "args": { - "command": "echo ^|^ && dir /b /a:d", + "command": "echo \"|\" && ls -d */", "cwd": "${env:JABY_ENGINE_PATH}/config", "fieldSeparator": "|" } diff --git a/template/install.bat b/template/install.bat deleted file mode 100644 index 2a89868b..00000000 --- a/template/install.bat +++ /dev/null @@ -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% \ No newline at end of file diff --git a/template/install.sh b/template/install.sh new file mode 100755 index 00000000..ddaf4f52 --- /dev/null +++ b/template/install.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +dst="$HOME/.config/Code/User/ProjectTemplates" + +mkdir -p $dst +cp -r "JabyEngine-PSX_Game" "$dst" \ No newline at end of file diff --git a/wsl_scripts/install_pop-fe.sh b/wsl_scripts/install_pop-fe.sh deleted file mode 100755 index e32a4787..00000000 --- a/wsl_scripts/install_pop-fe.sh +++ /dev/null @@ -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 diff --git a/wsl_scripts/install_rust.sh b/wsl_scripts/install_rust.sh deleted file mode 100755 index 9bb29601..00000000 --- a/wsl_scripts/install_rust.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \ No newline at end of file diff --git a/wsl_scripts/make_gcc.sh b/wsl_scripts/make_gcc.sh deleted file mode 100755 index 4ece47cd..00000000 --- a/wsl_scripts/make_gcc.sh +++ /dev/null @@ -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 diff --git a/wsl_scripts/prerequisites.sh b/wsl_scripts/prerequisites.sh deleted file mode 100755 index ff0823e1..00000000 --- a/wsl_scripts/prerequisites.sh +++ /dev/null @@ -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 \ No newline at end of file