mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-06 11:38:41 +08:00
Compare commits
4 Commits
2dbfcf12f7
...
5befe74130
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5befe74130 | ||
|
|
bca742a7bd | ||
|
|
6dc7fc6fad | ||
|
|
25474ebbe3 |
20
config/aarch64/dev-redox.toml
Normal file
20
config/aarch64/dev-redox.toml
Normal file
@ -0,0 +1,20 @@
|
||||
# Configuration for Redox development
|
||||
|
||||
include = ["../dev-redox.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
# filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# see ci.toml for error reasons
|
||||
gdbserver = "ignore"
|
||||
gnu-binutils = "ignore"
|
||||
mesa = "ignore"
|
||||
mesa-glu = "ignore"
|
||||
mpc = "ignore"
|
||||
strace = "ignore"
|
||||
56
config/dev-redox.toml
Normal file
56
config/dev-redox.toml
Normal file
@ -0,0 +1,56 @@
|
||||
# Configuration for Redox development
|
||||
|
||||
include = ["desktop.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 20000
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
dev-essential = {}
|
||||
redox-tests = {}
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/test.rs"
|
||||
data = """
|
||||
fn main() {
|
||||
println!("Hello, Redox!");
|
||||
}
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/test.c"
|
||||
data = """
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Hello, Redox!\\n");
|
||||
}
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/test.cpp"
|
||||
data = """
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Hello, Redox!" << std::endl;
|
||||
}
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/test.py"
|
||||
data = """
|
||||
print("Hello, Redox!")
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/test.lua"
|
||||
data = """
|
||||
print("Hello, Redox!")
|
||||
"""
|
||||
14
config/i686/dev-redox.toml
Normal file
14
config/i686/dev-redox.toml
Normal file
@ -0,0 +1,14 @@
|
||||
# Configuration for Redox development
|
||||
|
||||
include = ["../dev-redox.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
# filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
14
config/x86_64/dev-redox.toml
Normal file
14
config/x86_64/dev-redox.toml
Normal file
@ -0,0 +1,14 @@
|
||||
# Configuration for Redox development
|
||||
|
||||
include = ["../dev-redox.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
# filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
@ -16,6 +16,71 @@ banner()
|
||||
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
|
||||
# choice for building Redox on BSDs (macOS, FreeBSD, etc.).
|
||||
@ -1068,6 +1133,12 @@ if [ "Darwin" == "$(uname -s)" ]; then
|
||||
else
|
||||
# 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
|
||||
if hash 2>/dev/null zypper; then
|
||||
suse "$emulator"
|
||||
@ -1086,9 +1157,6 @@ else
|
||||
# Arch Linux
|
||||
elif hash 2>/dev/null pacman; then
|
||||
archLinux "$emulator" "$noninteractive"
|
||||
# FreeBSD
|
||||
elif hash 2>/dev/null pkg; then
|
||||
freebsd "$emulator"
|
||||
# Unsupported platform
|
||||
else
|
||||
printf "\e[31;1mFatal error: \e[0;31mUnsupported platform, please open an issue\e[0m\n"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user