Support pop-fe

This commit is contained in:
Jaby 2025-01-07 21:40:37 +01:00 committed by Jaby
parent febebd71b5
commit e4056a9839
7 changed files with 21 additions and 54 deletions

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

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

View File

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

View File

@ -8,8 +8,9 @@ WORKDIR /usr/scripts
ADD ["scripts/install_rust.sh", "/usr/scripts"]
RUN apt update && ./install_rust.sh
# TODO: Deal with this eventually
ADD ["scripts/install_pop-fe.sh", "/usr/scripts"]
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
ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}"
ENV JABY_ENGINE_PATH=/jaby_engine

View File

@ -1,42 +1,17 @@
#!/bin/bash
#Made possible by Cody the white tiger
# Made possible by Cody the white tiger
BASEDIR=$(dirname "$0")
mkdir -p $BASEDIR/../bin/extern/
cd $BASEDIR/../bin/extern
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
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
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
if ! test -d atracdenc; then
git clone https://github.com/dcherednik/atracdenc.git
cd atracdenc/src/
cmake .
make
cd ../..
fi
./pop-fe.py --install
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
echo "<<< Register pop-fe >>>"
ln -s /usr/scripts/run_pop_fe.sh /usr/local/bin/run_pop_fe.sh

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

@ -0,0 +1,5 @@
#!/bin/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

@ -89,4 +89,5 @@ These projects shall eventually turn into useful extensions for the engine. So f
# TODO before commit
* Remove `wslpath`
* Verify template creation
* Double check documentation