36 Commits

Author SHA1 Message Date
d03ded6e30 Merge pull request 'Update readme for support' (#12) from topic/jb/last_touch into main
Reviewed-on: #12
Reviewed-by: cody <william@werl.me>
2025-01-17 18:16:47 +00:00
Jaby
c6bb65fae0 Add support entry 2025-01-17 19:12:52 +01:00
dd77ab7d74 Merge pull request 'Fix inconsistent EOL' (#11) from feature/jb/eol into main
Reviewed-on: #11
2025-01-08 21:31:36 +00:00
Jaby
8ef6e3a9df Fix inconsistent EOL 2025-01-08 22:27:37 +01:00
0f48b3aedb Merge pull request 'Support for podman' (#9) from feature/jb/potman into main
Reviewed-on: #9
Reviewed-by: cody <william@werl.me>
2025-01-08 21:22:17 +00:00
Jaby
620283c7b8 Try again 2025-01-08 22:18:35 +01:00
Jaby
70fd4bf806 Update template install script 2025-01-08 22:16:54 +01:00
Jaby
0d24b0fb02 Update PR 2025-01-08 22:13:27 +01:00
Jaby
c6eeb40680 Recommend Project Temapltes 2025-01-07 23:35:07 +01:00
Jaby
de915a0d33 Update scripts and template for VS Code 2025-01-07 23:33:23 +01:00
Jaby
1f255e15e1 Update readme for podman changes 2025-01-07 22:40:48 +01:00
Jaby
9dab245122 Use specific Rust version 2025-01-07 22:25:40 +01:00
Jaby
7759a15c9e Fix Support library build mess 2025-01-07 22:02:14 +01:00
Jaby
db32b1a5b5 Support pop-fe 2025-01-07 21:40:37 +01:00
Jaby
265b106eab Clean-up simple TODOs 2025-01-05 15:58:16 +01:00
Jaby
fb8337206d Add 32BIT.TMD file 2025-01-05 15:57:14 +01:00
Jaby
7536980be4 Update ENV variables for local build 2025-01-05 15:50:30 +01:00
Jaby
49b0e80697 Change seperator to : 2025-01-05 15:38:35 +01:00
Jaby
61d403de5e Support 'No Docker' run 2025-01-05 15:32:23 +01:00
Jaby
5d746aa6c8 Use ! as a seperator between project mount point and cwd 2025-01-05 14:57:00 +01:00
Jaby
5e97f1537b Update bug report 2025-01-05 14:42:56 +01:00
Jaby
3cac7f7720 Also map JABY_ENGINE_DIR 2025-01-05 14:39:21 +01:00
Jaby
819558cf9d Make Rust work better; Adjust docker version 2025-01-05 13:30:57 +01:00
Jaby
7128681a2f Support builds though podman 2025-01-04 22:53:40 +01:00
Jaby
18256d1ff0 Make Library build work with podman 2025-01-04 21:52:19 +01:00
Jaby
bc603ecb7a Create podman helper script 2025-01-03 16:23:11 +01:00
Jaby
38bc7eab06 Improve podman build 2025-01-03 10:16:57 +01:00
Jaby
fbe9b91006 Update Dockerfile to be less painful; Set JABY_ENGINE_PATH automatically 2025-01-02 21:42:31 +01:00
Jaby
2a4c0a834c Set exec bit 2025-01-02 19:48:12 +01:00
Jaby
09cb984f56 Create GCC in podman 2025-01-02 19:47:47 +01:00
d0a60373ec Merge pull request 'Set exec bit for all scripts' (#8) from exec_bits into main
Reviewed-on: #8
Reviewed-by: cody <william@werl.me>
2025-01-01 14:26:55 +00:00
cc3c57e7c9 Merge branch 'main' into exec_bits 2025-01-01 14:26:26 +00:00
04ea6b2d3b Merge pull request 'Add MIT license' (#7) from license_update into main
Reviewed-on: #7
Reviewed-by: cody <william@werl.me>
2025-01-01 14:25:22 +00:00
Jaby
8b2c3b2673 Set exec bit for all scripts 2025-01-01 14:34:08 +01:00
Jaby
690fa57053 Add MIT license 2025-01-01 14:29:39 +01:00
09e6e54368 Merge pull request 'Integrate all the progress into master' (#6) from ToolBox into main
Merging the big PR

Reviewed-on: #6
Reviewed-by: cody <william@werl.me>
2025-01-01 13:17:44 +00:00
203 changed files with 13855 additions and 13832 deletions

2
.gitattributes vendored
View File

@@ -2,3 +2,5 @@
*.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
* text=auto eol=lf

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

@@ -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}/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": "|"
} }

21
license Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Jaby
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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

19
podman/Dockerfile Normal file
View File

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

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,33 +1,52 @@
- [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)
- [JabyEngine](#jabyengine-1) - [JabyEngine](#jabyengine-1)
- [PoolBox](#poolbox) - [PoolBox](#poolbox)
- [Special thanks](#special-thanks) - [Special thanks](#special-thanks)
- [Support this project](#support-this-project)
# JabyEngine # JabyEngine
## About ## About
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.
### Building `JabyEngine` (without VSCode) 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.
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)
@@ -45,8 +64,9 @@ 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 |
@@ -69,3 +89,8 @@ These projects shall eventually turn into useful extensions for the engine. So f
* Nicolas Noble * Nicolas Noble
* Pyravia * Pyravia
* Sickle * Sickle
# Support this project
* Try it out
* Open Issues or Pull Requests
* [Support it on KoFi](https://ko-fi.com/jabyspielkiste)

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