Minor script updates to maybe support x86 builds.

This commit is contained in:
casey langen 2023-09-10 00:06:43 -07:00
parent 4f44829cda
commit 81b75182c5
3 changed files with 12 additions and 3 deletions

View File

@ -34,6 +34,10 @@ if [[ $CROSSCOMPILE == rpi-* ]]; then
FRIENDLY_ARCH_NAME="armv6"
fi
STRIP="/build/x-tools/${XTOOLS_NAME}/${XTOOLS_NAME}/bin/strip"
elif [[ $CROSSCOMPILE == "x86" ]]; then
VENDOR=${CROSSCOMPILE}
FRIENDLY_ARCH_NAME="x86"
DEB_ARCH="x86"
elif [[ $FRIENDLY_ARCH_NAME == "x86_64" ]]; then
DEB_ARCH="amd64"
fi
@ -112,7 +116,7 @@ cp bin/themes/*.json $OUTDIR/themes
cp -rfp bin/share/terminfo/* $OUTDIR/share/terminfo/
if [[ $CROSSCOMPILE == rpi-* ]]; then
printf "\n\n\n ***** CROSSCOMPILE DETECTED, **NOT** SCANNING DEPENDENCIES! *****\n\n\n"
printf "\n\n\n ***** RPI CROSSCOMPILE DETECTED, **NOT** SCANNING DEPENDENCIES! *****\n\n\n"
sleep 1
else
printf "\n\n\n ***** SCANNING DEPENDENCIES *****\n\n\n"

View File

@ -108,6 +108,12 @@ function configure_crosscompile_if_necessary() {
GENERIC_CONFIGURE_FLAGS="--build=x86_64-pc-linux-gnu --host=${XTOOLS_TOOLCHAIN_NAME} --with-sysroot=${XTOOLS_SYSROOT}"
FFMPEG_CONFIGURE_FLAGS="--arch=${ARCH} --target-os=linux --enable-cross-compile --sysroot=${XTOOLS_SYSROOT} --cross-prefix=${XTOOLS_TOOLCHAIN_NAME}-"
fi
if [[ $CROSSCOMPILE == "x86" ]]; then
OPENSSL_TYPE="linux-x86"
CFLAGS="$CFLAGS -I/usr/include/i386-linux-gnu/"
CXXFLAGS="$CXXFLAGS -I/usr/include/i386-linux-gnu/"
fi
}
function print_build_configuration() {

View File

@ -10,7 +10,6 @@ during app build-time. */
const { promisify } = require('util');
const exec = promisify(require('child_process').exec);
const fs = require('fs');
const rm = promisify(fs.rm);
const unlink = promisify(fs.unlink);
const symlink = promisify(fs.symlink);
@ -111,7 +110,7 @@ const rebuildSymlinks = async () => {
const [src, dst] = symlinks[i];
console.log('removing symlink:', `${path}/${dst}`);
try {
await rm(`${path}/${dst}`);
await exec(`rm ${path}/${dst}`);
} catch (e) {}
try {
await unlink(`${path}/${dst}`);