mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 05:05:06 +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
1 changed files with 31 additions and 9 deletions
|
@ -2,16 +2,27 @@
|
||||||
port="halflife"
|
port="halflife"
|
||||||
version="1.0.0"
|
version="1.0.0"
|
||||||
useconfigure="true"
|
useconfigure="true"
|
||||||
depends=("SDL2")
|
depends=("SDL2" "fontconfig" "freetype")
|
||||||
workdir="xash3d-fwgs-master"
|
workdir="."
|
||||||
files="https://github.com/SerenityPorts/xash3d-fwgs/archive/master.tar.gz xash3d_engine.tar.gz
|
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_name="Half-Life"
|
||||||
launcher_category="Games"
|
launcher_category="Games"
|
||||||
launcher_command="sh /home/anon/Games/halflife/hl.sh"
|
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....
|
# This one is a bit tricky to build, so I'm going a little bit off the script....
|
||||||
configure() {
|
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)
|
# Configure the shared object projects (client and game)
|
||||||
cd ./hlsdk-xash3d-master
|
cd ./hlsdk-xash3d-master
|
||||||
./waf configure -T release
|
./waf configure -T release
|
||||||
|
@ -19,12 +30,13 @@ configure() {
|
||||||
|
|
||||||
# Configure the engine itself...
|
# Configure the engine itself...
|
||||||
cd ./xash3d-fwgs-master
|
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() {
|
||||||
# Build the game and client
|
# Build the game and client
|
||||||
cd ../hlsdk-xash3d-master
|
cd ./hlsdk-xash3d-master
|
||||||
./waf build
|
./waf build
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
|
@ -45,12 +57,19 @@ install() {
|
||||||
}
|
}
|
||||||
|
|
||||||
post_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
|
# Strip the output libraries of their "lib" prefix
|
||||||
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/valve/cl_dlls/
|
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/valve/cl_dlls/
|
||||||
rename 's/^...//' lib*
|
"$rename_command" 's/^...//' lib*
|
||||||
popd
|
popd
|
||||||
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/valve/dlls/
|
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/valve/dlls/
|
||||||
rename 's/^...//' lib*
|
"$rename_command" 's/^...//' lib*
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Create a launch script
|
# Create a launch script
|
||||||
|
@ -59,7 +78,10 @@ post_install() {
|
||||||
export LD_LIBRARY_PATH=/home/anon/Games/halflife/
|
export LD_LIBRARY_PATH=/home/anon/Games/halflife/
|
||||||
scriptdir=$(dirname "$0")
|
scriptdir=$(dirname "$0")
|
||||||
cd $scriptdir
|
cd $scriptdir
|
||||||
./xash3d
|
./xash3d -console
|
||||||
EOF
|
EOF
|
||||||
chmod +x ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/hl.sh
|
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…
Add table
Add a link
Reference in a new issue