-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scummvm: initial commit of build script
- Loading branch information
1 parent
1f8ef91
commit 28d8493
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} | ||
}; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.