remove lhelper script, build configuration and dependency support (#1906)

* remove lhelper script, build configuration and dependency support

* turn lhelper flag into a error
This commit is contained in:
Jan 2024-10-22 17:12:23 +02:00 committed by GitHub
parent de805aaf64
commit 0966be64b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 104 deletions

View File

@ -1,8 +0,0 @@
CC="${CC:-gcc}"
CXX="${CXX:-g++}"
CFLAGS=
CXXFLAGS=
LDFLAGS=
BUILD_TYPE=Release
packages=(pcre2 freetype2 sdl2 lua)

View File

@ -14,20 +14,16 @@ show_help() {
echo echo
echo "Available options:" echo "Available options:"
echo echo
echo "-l --lhelper Install tools required by LHelper and doesn't"
echo " install external libraries."
echo " --debug Debug this script." echo " --debug Debug this script."
echo echo
} }
main() { main() {
local lhelper=false
for i in "$@"; do for i in "$@"; do
case $i in case $i in
-s|--lhelper) -s|--lhelper)
lhelper=true echo "error: support for lhelper has been deprecated" >> /dev/stderr
shift exit 1
;; ;;
--debug) --debug)
set -x set -x
@ -45,27 +41,14 @@ main() {
fi fi
if [[ "$OSTYPE" == "linux"* ]]; then if [[ "$OSTYPE" == "linux"* ]]; then
if [[ $lhelper == true ]]; then sudo apt-get install -qq libfuse2 ninja-build wayland-protocols libsdl2-dev libfreetype6
sudo apt-get install -qq ninja-build
else
sudo apt-get install -qq libfuse2 ninja-build wayland-protocols libsdl2-dev libfreetype6
fi
pip3 install meson pip3 install meson
elif [[ "$OSTYPE" == "darwin"* ]]; then elif [[ "$OSTYPE" == "darwin"* ]]; then
if [[ $lhelper == true ]]; then brew install bash ninja sdl2
brew install bash md5sha1sum ninja
else
brew install bash ninja sdl2
fi
pip3 install meson dmgbuild pip3 install meson dmgbuild
elif [[ "$OSTYPE" == "msys" ]]; then elif [[ "$OSTYPE" == "msys" ]]; then
if [[ $lhelper == true ]]; then pacman --noconfirm -S \
pacman --noconfirm -S \ ${MINGW_PACKAGE_PREFIX}-{ca-certificates,gcc,meson,ninja,ntldd,pkg-config,mesa,freetype,pcre2,SDL2} unzip
${MINGW_PACKAGE_PREFIX}-{ca-certificates,gcc,meson,ninja,ntldd,pkg-config,mesa} unzip
else
pacman --noconfirm -S \
${MINGW_PACKAGE_PREFIX}-{ca-certificates,gcc,meson,ninja,ntldd,pkg-config,mesa,freetype,pcre2,SDL2} unzip
fi
fi fi
} }

View File

@ -1,73 +0,0 @@
#!/bin/bash
set -e
show_help() {
echo
echo "Usage: $0 <OPTIONS>"
echo
echo "Available options:"
echo
echo " --debug Debug this script."
echo "-h --help Show this help and exit."
echo "-p --prefix PREFIX Install directory prefix."
echo " Default: '$HOME/.local'."
echo
}
main() {
local lhelper_prefix="$HOME/.local"
for i in "$@"; do
case $i in
-h|--help)
show_help
exit 0
;;
-p|--prefix)
lhelper_prefix="$2"
echo "LHelper prefix set to: \"${lhelper_prefix}\""
shift
shift
;;
--debug)
set -x
shift
;;
*)
# unknown option
;;
esac
done
if [[ -n $1 ]]; then show_help; exit 1; fi
if [[ ! -f ${lhelper_prefix}/bin/lhelper ]]; then
git clone https://github.com/franko/lhelper.git
# FIXME: This should be set in ~/.bash_profile if not using CI
# export PATH="${HOME}/.local/bin:${PATH}"
mkdir -p "${lhelper_prefix}/bin"
pushd lhelper; bash install "${lhelper_prefix}"; popd
if [[ "$OSTYPE" == "darwin"* ]]; then
CC=clang CXX=clang++ lhelper create build
else
lhelper create lite-xl build
fi
fi
# Not using $(lhelper activate lite-xl) to support CI
source "$(lhelper env-source build)"
# Help MSYS2 to find the SDL2 include and lib directories to avoid errors
# during build and linking when using lhelper.
# Francesco: not sure why this is needed. I have never observed the problem when
# building on window.
# if [[ "$OSTYPE" == "msys" ]]; then
# CFLAGS=-I${LHELPER_ENV_PREFIX}/include/SDL2
# LDFLAGS=-L${LHELPER_ENV_PREFIX}/lib
# fi
}
main "$@"