mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-04 10:38:46 +08:00
Merge branch 'add-redox-target' into 'master'
Draft: Add Redox target in native_bootstrap.sh See merge request redox-os/redox!1618
This commit is contained in:
commit
2dcf7e46bb
@ -16,6 +16,71 @@ banner()
|
|||||||
echo "|------------------------------------------|"
|
echo "|------------------------------------------|"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# This function takes care of installing all dependencies for building Redox on
|
||||||
|
# Redox
|
||||||
|
# @params: $1 the emulator to install
|
||||||
|
# $2 install non-interactively, boolean
|
||||||
|
# $3 the package manager to use
|
||||||
|
###############################################################################
|
||||||
|
redox()
|
||||||
|
{
|
||||||
|
noninteractive=$2
|
||||||
|
package_manager=$3
|
||||||
|
echo "Detected Redox OS"
|
||||||
|
echo "Updating system..."
|
||||||
|
sudo $package_manager update
|
||||||
|
|
||||||
|
if [ $package_manager == "pkg" ]; then
|
||||||
|
if [ "$noninteractive" = true ]; then
|
||||||
|
install_command+="pkg install"
|
||||||
|
else
|
||||||
|
install_command="pkg install"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
install_command="$package_manager install"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing required packages..."
|
||||||
|
pkgs="\
|
||||||
|
rust \
|
||||||
|
cargo \
|
||||||
|
gcc \
|
||||||
|
gnu-make \
|
||||||
|
qemu \
|
||||||
|
bison \
|
||||||
|
cmake \
|
||||||
|
wget \
|
||||||
|
file \
|
||||||
|
flex \
|
||||||
|
gperf \
|
||||||
|
expat \
|
||||||
|
libgmp \
|
||||||
|
libpng \
|
||||||
|
libjpeg \
|
||||||
|
sdl \
|
||||||
|
sdl2-ttf \
|
||||||
|
html-parser-perl \
|
||||||
|
libtool \
|
||||||
|
m4 \
|
||||||
|
nasm \
|
||||||
|
patch \
|
||||||
|
automake \
|
||||||
|
autoconf \
|
||||||
|
scons \
|
||||||
|
pkg-config \
|
||||||
|
po4a \
|
||||||
|
texinfo \
|
||||||
|
ninja-build \
|
||||||
|
meson \
|
||||||
|
python310 \
|
||||||
|
python3-mako \
|
||||||
|
xdg-utils \
|
||||||
|
vim \
|
||||||
|
perl \
|
||||||
|
doxygen"
|
||||||
|
}
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# This function takes care of installing a dependency via package manager of
|
# This function takes care of installing a dependency via package manager of
|
||||||
# choice for building Redox on BSDs (macOS, FreeBSD, etc.).
|
# choice for building Redox on BSDs (macOS, FreeBSD, etc.).
|
||||||
@ -1068,6 +1133,12 @@ if [ "Darwin" == "$(uname -s)" ]; then
|
|||||||
else
|
else
|
||||||
# Here we will use package managers to determine which operating system the user is using.
|
# Here we will use package managers to determine which operating system the user is using.
|
||||||
|
|
||||||
|
# Redox OS
|
||||||
|
elif hash 2>/dev/null pkg; then
|
||||||
|
redox "$emulator"
|
||||||
|
# FreeBSD
|
||||||
|
elif hash 2>/dev/null pkg; then
|
||||||
|
freebsd "$emulator"
|
||||||
# SUSE and derivatives
|
# SUSE and derivatives
|
||||||
if hash 2>/dev/null zypper; then
|
if hash 2>/dev/null zypper; then
|
||||||
suse "$emulator"
|
suse "$emulator"
|
||||||
@ -1086,9 +1157,6 @@ else
|
|||||||
# Arch Linux
|
# Arch Linux
|
||||||
elif hash 2>/dev/null pacman; then
|
elif hash 2>/dev/null pacman; then
|
||||||
archLinux "$emulator" "$noninteractive"
|
archLinux "$emulator" "$noninteractive"
|
||||||
# FreeBSD
|
|
||||||
elif hash 2>/dev/null pkg; then
|
|
||||||
freebsd "$emulator"
|
|
||||||
# Unsupported platform
|
# Unsupported platform
|
||||||
else
|
else
|
||||||
printf "\e[31;1mFatal error: \e[0;31mUnsupported platform, please open an issue\e[0m\n"
|
printf "\e[31;1mFatal error: \e[0;31mUnsupported platform, please open an issue\e[0m\n"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user