Skip to content

Commit

Permalink
scummvm: initial commit of build script
Browse files Browse the repository at this point in the history
  • Loading branch information
john-tornblom committed Oct 19, 2024
1 parent 1f8ef91 commit 28d8493
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
51 changes: 51 additions & 0 deletions homebrew/ScummVM/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Copyright (C) 2024 John Törnblom
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not see
# <http://www.gnu.org/licenses/>.

VER="2.8.1"
URL="https://downloads.scummvm.org/frs/scummvm/$VER/scummvm-$VER.tar.xz"

SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"

if [[ -z "$PS5_PAYLOAD_SDK" ]]; then
echo "error: PS5_PAYLOAD_SDK is not set"
exit 1
fi

source "${PS5_PAYLOAD_SDK}/toolchain/prospero.sh" || exit 1

TEMPDIR=$(mktemp -d)
trap 'rm -rf -- "$TEMPDIR"' EXIT
wget -O $TEMPDIR/scummvm.tar.xz "${URL}" || exit 1
tar xf $TEMPDIR/scummvm.tar.xz -C $TEMPDIR || exit 1
cd $TEMPDIR/scummvm-$VER || exit 1

export PKG_CONFIG_DIR=
export PKG_CONFIG_SYSROOT_DIR=${PS5_PAYLOAD_SDK}/target
export PKG_CONFIG_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}/user/homebrew/lib/pkgconfig
export PKG_CONFIG_PATH=${PKG_CONFIG_SYSROOT_DIR}/user/homebrew/libdata/pkgconfig

./configure --prefix="${PREFIX}" --host=x86_64-pc-freebsd \
--enable-static --enable-release --enable-all-engines \
--with-sdl-prefix="${PS5_PAYLOAD_SDK}/target/user/homebrew/bin" \
--with-libcurl-prefix="${PS5_PAYLOAD_SDK}/target/user/homebrew/bin" \
--with-freetype2-prefix="${PS5_PAYLOAD_SDK}/target/user/homebrew/bin" \
--enable-vkeybd
${MAKE} dist-generic

cp dist-generic/scummvm/scummvm "${SCRIPT_DIR}/scummvm.elf"
cp -r dist-generic/scummvm/data "${SCRIPT_DIR}/data"
39 changes: 39 additions & 0 deletions homebrew/ScummVM/homebrew.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* Copyright (C) 2024 John Törnblom
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, see
<http://www.gnu.org/licenses/>. */


async function main() {
const PAYLOAD = window.workingDir + '/scummvm.elf';
const CWD = window.workingDir + '/data';
const ARGS = ['--fullscreen',
'--config=/data/homebrew/ScummVM/scummvm.ini',
'--screenshotpath=/data/homebrew/ScummVM/screenshots',
'--savepath=/data/homebrew/ScummVM/saves',
'--themepath=/data/homebrew/ScummVM/themes',
'--iconspath=/data/homebrew/ScummVM/icons',
'--extrapath=/data/homebrew/ScummVM/extras'];
return {
mainText: "ScummVM",
secondaryText: 'Script Creation Utility for Maniac Mansion VM',
onclick: async () => {
return {
path: PAYLOAD,
cwd: CWD,
args: ARGS
};
}
};
}
Binary file added homebrew/ScummVM/sce_sys/icon0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 28d8493

Please sign in to comment.