mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Ports: Enable menu support for half-life port
This partially enables support for menus in half-life. Currently, mouse input does not work in it, the arrow keys are needed for navigation.
This commit is contained in:
parent
9d97902081
commit
d6432a3f99
Notes:
sideshowbarker
2024-07-17 20:19:43 +09:00
Author: https://github.com/ccapitalK Commit: https://github.com/SerenityOS/serenity/commit/d6432a3f996 Pull-request: https://github.com/SerenityOS/serenity/pull/12039 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/sin-ack
1 changed files with 31 additions and 9 deletions
|
@ -2,16 +2,27 @@
|
|||
port="halflife"
|
||||
version="1.0.0"
|
||||
useconfigure="true"
|
||||
depends=("SDL2")
|
||||
workdir="xash3d-fwgs-master"
|
||||
depends=("SDL2" "fontconfig" "freetype")
|
||||
workdir="."
|
||||
files="https://github.com/SerenityPorts/xash3d-fwgs/archive/master.tar.gz xash3d_engine.tar.gz
|
||||
https://github.com/SerenityPorts/hlsdk-xash3d/archive/master.tar.gz xash3d_hldll.tar.gz"
|
||||
https://github.com/SerenityPorts/hlsdk-xash3d/archive/master.tar.gz xash3d_hldll.tar.gz
|
||||
https://github.com/FWGS/vgui-dev/archive/master.tar.gz vgui-dev.tar.gz
|
||||
https://github.com/FWGS/mainui_cpp/archive/master.tar.gz mainui.tar.gz
|
||||
https://github.com/FWGS/miniutl/archive/master.tar.gz miniutl.tar.gz"
|
||||
launcher_name="Half-Life"
|
||||
launcher_category="Games"
|
||||
launcher_command="sh /home/anon/Games/halflife/hl.sh"
|
||||
|
||||
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
|
||||
|
||||
# This one is a bit tricky to build, so I'm going a little bit off the script....
|
||||
configure() {
|
||||
# Initialize submodules from tarballs
|
||||
[ -e ./xash3d-fwgs-master/mainui ] && rm -r ./xash3d-fwgs-master/mainui
|
||||
cp -r mainui_cpp-master/ ./xash3d-fwgs-master/mainui
|
||||
rmdir ./xash3d-fwgs-master/mainui/miniutl
|
||||
cp -r MiniUTL-master/ ./xash3d-fwgs-master/mainui/miniutl
|
||||
|
||||
# Configure the shared object projects (client and game)
|
||||
cd ./hlsdk-xash3d-master
|
||||
./waf configure -T release
|
||||
|
@ -19,18 +30,19 @@ configure() {
|
|||
|
||||
# Configure the engine itself...
|
||||
cd ./xash3d-fwgs-master
|
||||
./waf configure --sdl2=${SERENITY_INSTALL_ROOT}/usr/local -T release
|
||||
./waf configure --sdl2="${SERENITY_INSTALL_ROOT}/usr/local" --vgui=../vgui-dev-master/ -T release
|
||||
cd ../
|
||||
}
|
||||
|
||||
build() {
|
||||
# Build the game and client
|
||||
cd ../hlsdk-xash3d-master
|
||||
cd ./hlsdk-xash3d-master
|
||||
./waf build
|
||||
cd ../
|
||||
|
||||
# Build the engine
|
||||
cd ./xash3d-fwgs-master
|
||||
./waf build
|
||||
./waf build
|
||||
cd ../
|
||||
}
|
||||
|
||||
|
@ -45,12 +57,19 @@ install() {
|
|||
}
|
||||
|
||||
post_install() {
|
||||
# On arch-linux systems, rename is installed as perl-rename
|
||||
if command -v perl-rename &> /dev/null
|
||||
then
|
||||
rename_command=perl-rename
|
||||
else
|
||||
rename_command=rename
|
||||
fi
|
||||
# Strip the output libraries of their "lib" prefix
|
||||
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/valve/cl_dlls/
|
||||
rename 's/^...//' lib*
|
||||
"$rename_command" 's/^...//' lib*
|
||||
popd
|
||||
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/valve/dlls/
|
||||
rename 's/^...//' lib*
|
||||
"$rename_command" 's/^...//' lib*
|
||||
popd
|
||||
|
||||
# Create a launch script
|
||||
|
@ -59,7 +78,10 @@ post_install() {
|
|||
export LD_LIBRARY_PATH=/home/anon/Games/halflife/
|
||||
scriptdir=$(dirname "$0")
|
||||
cd $scriptdir
|
||||
./xash3d
|
||||
./xash3d -console
|
||||
EOF
|
||||
chmod +x ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/hl.sh
|
||||
|
||||
echo "Please remember to copy the 'valve/' folder from your own Half-Life installation"
|
||||
echo "into ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue