diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0612ae6..88f0135 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,72 +25,9 @@ jobs: run: | apk add build-base binutils-dev git cmake xorriso assimp-dev musl-obstack-dev jsoncpp-dev - - name: Install openvcl/MASP - run: | - git clone https://github.com/nicholas477/openvcl.git dependencies/openvcl - cd dependencies/openvcl/contrib/masp - chmod +x ./configure && ./configure LIBS="-lobstack" - make install -j$(getconf _NPROCESSORS_ONLN) - cd ../../ - make install -j$(getconf _NPROCESSORS_ONLN) - - - name: Install ps2stuff - run: | - git clone https://github.com/ps2dev/ps2stuff.git dependencies/ps2stuff - cd dependencies/ps2stuff && make clean all install -j$(getconf _NPROCESSORS_ONLN) - - - name: Install ps2gl - run: | - git clone https://github.com/nicholas477/ps2gl.git dependencies/ps2gl - cd dependencies/ps2gl && make clean all install -j$(getconf _NPROCESSORS_ONLN) DEBUG=1 - cd glut && make clean all install -j$(getconf _NPROCESSORS_ONLN) - - - name: Install meshoptimizer - run: | - git clone https://github.com/zeux/meshoptimizer.git dependencies/meshoptimizer - cd dependencies/meshoptimizer - mkdir -p build - cd build - cmake .. - make clean all install -j$(getconf _NPROCESSORS_ONLN) - - - name: Install cxxopts - run: | - git clone https://github.com/artpaul/cxxopts.git dependencies/cxxopts - cd dependencies/cxxopts - mkdir -p build - cd build - cmake .. - make clean all install -j$(getconf _NPROCESSORS_ONLN) - - - name: Compile egg-library - run: | - cd dependencies/egg-library - make clean all install -j$(getconf _NPROCESSORS_ONLN) - mkdir build - cd build - cmake .. - make clean all install -j$(getconf _NPROCESSORS_ONLN) - - - name: Compile ps2-mesh-converter - run: | - cd tools/ps2-mesh-converter - mkdir -p build - cd build - cmake .. - make clean all install -j$(getconf _NPROCESSORS_ONLN) - - - name: Compile ps2-manifest-generator - run: | - cd tools/ps2-manifest-generator - mkdir -p build - cd build - cmake .. - make clean all install -j$(getconf _NPROCESSORS_ONLN) - - name: Compile ps2 engine run: | - make clean iso -j$(getconf _NPROCESSORS_ONLN) + ./compile.sh - uses: actions/upload-artifact@v3 with: diff --git a/compile.sh b/compile.sh index 86a42cc..82e344a 100755 --- a/compile.sh +++ b/compile.sh @@ -2,6 +2,32 @@ # sudo apt install build-essential binutils-dev git cmake genisoimage libassimp-dev +# Meshoptimizer +if [ ! -d "dependencies/meshoptimizer" ]; then + echo "------Cloning meshoptimizer------" + git clone https://github.com/zeux/meshoptimizer.git dependencies/meshoptimizer +fi +echo "------Compiling meshoptimizer------" +pushd dependencies/meshoptimizer +mkdir -p build +cd build +cmake .. +sudo make install -j$(nproc) +popd + +# cxxopts +if [ ! -d "dependencies/cxxopts" ]; then + echo "------Cloning cxxopts------" + git clone https://github.com/artpaul/cxxopts.git dependencies/cxxopts +fi +echo "------Compiling cxxopts------" +pushd dependencies/cxxopts +mkdir -p build +cd build +cmake .. +sudo make install -j$(nproc) +popd + echo "------Compiling egg-library------" pushd dependencies/egg-library && ./compile.sh; popd echo "------Compiling ps2-manifest-generator------" @@ -18,7 +44,7 @@ echo "------Compiling Masp------" pushd dependencies/openvcl/contrib/masp if [ ! -f "Makefile" ]; then chmod +x ./configure - ./configure + ./configure LIBS="-lobstack" fi sudo -E make install -j$(nproc) popd diff --git a/src/Makefile.iso b/src/Makefile.iso index d849c51..2065e8c 100644 --- a/src/Makefile.iso +++ b/src/Makefile.iso @@ -17,6 +17,7 @@ IRX_SRC_FILES := $(addprefix $(PS2SDK)/iop/irx/, $(IRX_FILES)) IRX_TARGET_FILES := $(addprefix $(ISO_FOLDER_DIR)/, $(IRX_FILES)) $(IRX_TARGET_FILES): $(ISO_FOLDER_DIR)/%.irx: $(PS2SDK)/iop/irx/%.irx + $(MKDIR) -p $(ISO_FOLDER_DIR) cp $< $@ copy_irx: $(IRX_TARGET_FILES)