2021-06-17 21:32:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-06-10 03:10:05 +00:00
|
|
|
# Main Script
|
|
|
|
run() {
|
|
|
|
# Add ARM Repository
|
|
|
|
for arch in "$@"; do
|
|
|
|
sudo dpkg --add-architecture "${arch}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Update APT
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get dist-upgrade -y
|
|
|
|
|
|
|
|
# Install Everything In One Go
|
|
|
|
PKG_QUEUE=''
|
|
|
|
queue_pkg() {
|
|
|
|
PKG_QUEUE="${PKG_QUEUE} $@"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Build System
|
2022-03-09 23:47:31 +00:00
|
|
|
queue_pkg \
|
2022-06-10 03:10:05 +00:00
|
|
|
git \
|
|
|
|
cmake \
|
|
|
|
ninja-build \
|
|
|
|
nodejs
|
2022-03-10 02:23:41 +00:00
|
|
|
|
2022-06-10 03:10:05 +00:00
|
|
|
# Host Dependencies Needed For Compile
|
2022-03-10 02:23:41 +00:00
|
|
|
queue_pkg \
|
2022-06-10 03:10:05 +00:00
|
|
|
libwayland-bin \
|
|
|
|
libfreeimage-dev
|
2022-03-10 02:23:41 +00:00
|
|
|
|
2022-06-10 03:10:05 +00:00
|
|
|
# Host Dependencies Needed For Running
|
2022-03-10 02:23:41 +00:00
|
|
|
queue_pkg \
|
2022-06-10 03:10:05 +00:00
|
|
|
qemu-user \
|
|
|
|
patchelf
|
|
|
|
|
|
|
|
# Architecture-Specific Dependencies
|
|
|
|
architecture_specific_pkg() {
|
|
|
|
# Compiler
|
|
|
|
queue_pkg \
|
|
|
|
crossbuild-essential-$1
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
queue_pkg \
|
|
|
|
libfreeimage3:$1 \
|
|
|
|
libopenal-dev:$1
|
|
|
|
|
|
|
|
# GLFW Dependencies
|
|
|
|
queue_pkg \
|
|
|
|
libwayland-dev:$1 \
|
|
|
|
libxkbcommon-dev:$1 \
|
|
|
|
libx11-dev:$1 \
|
|
|
|
libxcursor-dev:$1 \
|
|
|
|
libxi-dev:$1 \
|
|
|
|
libxinerama-dev:$1 \
|
|
|
|
libxrandr-dev:$1 \
|
|
|
|
libxext-dev:$1
|
|
|
|
|
|
|
|
# Zenity Dependencies
|
|
|
|
queue_pkg \
|
|
|
|
libgtk-3-dev:$1 \
|
|
|
|
libglib2.0-dev:$1
|
|
|
|
}
|
|
|
|
for arch in "$@"; do
|
|
|
|
architecture_specific_pkg "${arch}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install appimagetool & appimage-builder Dependencies
|
2022-03-11 05:00:13 +00:00
|
|
|
queue_pkg \
|
2022-06-10 03:10:05 +00:00
|
|
|
python3-pip \
|
|
|
|
python3-setuptools \
|
|
|
|
python3-wheel \
|
|
|
|
patchelf \
|
|
|
|
desktop-file-utils \
|
|
|
|
libgdk-pixbuf2.0-dev \
|
|
|
|
fakeroot \
|
|
|
|
gtk-update-icon-cache \
|
|
|
|
shared-mime-info \
|
2022-06-11 01:59:57 +00:00
|
|
|
squashfs-tools \
|
|
|
|
zsync \
|
2022-06-10 03:10:05 +00:00
|
|
|
sed
|
|
|
|
|
|
|
|
# Install Queue
|
|
|
|
sudo apt-get install --no-install-recommends -y ${PKG_QUEUE}
|
|
|
|
|
|
|
|
# Install appimage-builder
|
|
|
|
sudo pip3 install 'git+https://github.com/AppImageCrafters/appimage-builder.git'
|
|
|
|
}
|
2022-03-09 23:47:31 +00:00
|
|
|
|
2022-06-10 03:10:05 +00:00
|
|
|
# Run
|
|
|
|
if [ "$#" -lt 1 ]; then
|
|
|
|
run "$(dpkg-architecture -qDEB_BUILD_ARCH)"
|
|
|
|
else
|
|
|
|
run "$@"
|
|
|
|
fi
|