Port to Playstation 4 (#3988)

This commit is contained in:
John Törnblom authored and GitHub committed 2022-02-03 14:50:26 +01:00
1 parent 8d5b709749
commit 4a34544678
7 files changed
+128

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
name: PS4 Release Build
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize ]
release:
types: [created]
workflow_dispatch:
jobs:
ps4:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Build Environment
run: >
sudo apt update &&
sudo apt install -y wget cmake git gettext smpq &&
wget https://github.com/PacBrew/pacbrew-pacman/releases/download/pacbrew-release-1.0/pacbrew-pacman-1.0.deb &&
sudo dpkg -i pacbrew-pacman-1.0.deb && sudo pacbrew-pacman -Sy &&
sudo pacbrew-pacman --noconfirm -S ps4-openorbis ps4-openorbis-portlibs &&
echo "#include <endian.h>" | sudo tee /opt/pacbrew/ps4/openorbis/include/sys/endian.h
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: Packaging/ps4/build.sh
- name: Upload-Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: devilutionx.pkg
path: build-ps4/devilutionx.pkg
+4
View File
@@ -48,6 +48,10 @@ if(VITA)
include(platforms/vita)
endif()
if(PS4)
include(platforms/ps4)
endif()
if(ANDROID)
include(platforms/android)
endif()
+19
View File
@@ -0,0 +1,19 @@
set(DISCORD_INTEGRATION OFF)
set(BUILD_TESTING OFF)
set(ASAN OFF)
set(UBSAN OFF)
SET(DISABLE_LTO ON)
set(NONET ON)
set(NOEXIT ON)
set(BUILD_ASSETS_MPQ ON)
# Packbrew SDK provides SDL_image, but FindSDL2_image() fails to
# pick up its dependencies (with includes libjpeg, libwebp etc).
# One way to address this, is to do the following:
#
# target_link_libraries(${BIN_TARGET} PUBLIC ${PC_SDL2_image_LIBRARIES})
#
# or simply use the in-tree copy as follows:
set(DEVILUTIONX_SYSTEM_SDL_IMAGE OFF)
+9
View File
@@ -337,6 +337,15 @@ if(VITA)
endif()
if(PS4)
add_custom_command(
TARGET devilutionx_mpq POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${DEVILUTIONX_MPQ} "${PROJECT_SOURCE_DIR}/Packaging/ps4/")
add_self(${BIN_TARGET})
add_pkg(${BIN_TARGET} "${PROJECT_SOURCE_DIR}/Packaging/ps4"
"DVLX00001" "DevilutionX" "${PROJECT_VERSION}")
endif()
if(NINTENDO_3DS)
set(APP_TITLE "DevilutionX")
set(APP_DESCRIPTION "DevilutionX port for 3DS")
+40
View File
@@ -0,0 +1,40 @@
# devilutionX PS4 port
## Prerequisites
- A Playstation 4 capable of running homebrew.
- Game assets from the Diablo game (diabdat.mpq),
or its [shareware][shareware] (spawn.mpq)
## Installation
- Install the devilutionX PS4 pkg
- Copy the game assets (e.g., via ftp) to /user/data/diasurgical/devilution/
- Launch the game
## Known limitations
- No networking
## Controls
- D-pad: move hero
- ○: attack nearby enemies, talk to townspeople and merchants, pickup/place
items in the inventory, OK while in main menu
- ×: select spell, back while in menus
- △: pickup items, open nearby chests and doors, use item in the inventory
- □: cast spell, delete character while in main menu
- L1: use health item from belt
- R1: use mana potion from belt
- L2: toggle character sheet
- R2: toggle inventory
- Left stick: move hero
- Right stick: move cursor
- L3: toggle auto map
- R3: click with cursor
## Building from Source
Install the [PacBrew openorbis SDK][pacbrew-openorbis], then run the following
bash script.
```console
devilutionX$ ./Packaging/ps4/build.sh
```
[shareware]: http://ftp.blizzard.com/pub/demos/diablosw.exe
[pacbrew-openorbis]: https://github.com/PacBrew/pacbrew-packages
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
SCRIPTDIR="${BASH_SOURCE[0]}"
SCRIPTDIR="$(dirname "${SCRIPTDIR}")"
cmake -S "${SCRIPTDIR}/../../" \
-B build-ps4 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_TOOLCHAIN_FILE="/opt/pacbrew/ps4/openorbis/cmake/ps4.cmake"
cmake --build build-ps4 -j $(getconf _NPROCESSORS_ONLN)
mv build-ps4/IV0001-DVLX00001_00-*.pkg build-ps4/devilutionx.pkg
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB