2022-03-08 19:44:07 +01:00
|
|
|
#! /bin/bash
|
|
|
|
set -e
|
2022-08-07 10:23:53 +02:00
|
|
|
set -x
|
2022-03-08 19:44:07 +01:00
|
|
|
[ -z "$1" ] && echo "Please specify 32 or 64 bits architectuure" && exit 1
|
|
|
|
echo "[Compiler] Adding more Kernel packages"
|
|
|
|
ARCH="$1"
|
|
|
|
W=$(realpath "$(dirname "$(realpath "$0")")/../")
|
|
|
|
BASE_DIR="$W/$ARCH"
|
|
|
|
rm "$BASE_DIR/tmp" -rf
|
|
|
|
mkdir -p "$BASE_DIR/tmp/"
|
|
|
|
cp "$BASE_DIR/bootstrap/bootstrap.image" "$BASE_DIR/tmp/diya.image"
|
|
|
|
cp "$W"/unicode/* "$BASE_DIR/tmp/"
|
|
|
|
cp -rf "$W"/fonts "$BASE_DIR"/tmp/
|
|
|
|
VM="$BASE_DIR/builder/pharo"
|
|
|
|
IMG="$BASE_DIR/tmp/diya.image"
|
|
|
|
SRC_IMG="$BASE_DIR/builder/Pharo.image"
|
|
|
|
|
|
|
|
if [ ! -e "$SRC_IMG" ]; then
|
|
|
|
mkdir -p "$BASE_DIR/builder/"
|
|
|
|
cd "$BASE_DIR/builder/"
|
|
|
|
curl "https://get.pharo.org/$ARCH/70+vm" | bash
|
|
|
|
cd "$W"
|
2022-08-12 12:28:18 +02:00
|
|
|
#find . -name "*SDL*.so*" -exec rm -f {} \;
|
2022-03-08 19:44:07 +01:00
|
|
|
fi
|
|
|
|
cp -rf "$W/fonts" "$BASE_DIR/builder/"
|
2022-08-07 11:10:09 +02:00
|
|
|
# chmod -R a+rw $BASE_DIR
|
2022-08-07 11:00:59 +02:00
|
|
|
$VM "$SRC_IMG" "$W/install.st" --quit
|
2022-03-08 19:44:07 +01:00
|
|
|
NAME="Diya-Bootstrap"
|
|
|
|
$VM "$SRC_IMG" "$W/export.st" "$BASE_DIR/tmp" "$NAME" --quit
|
|
|
|
echo "Creating image...."
|
|
|
|
|
|
|
|
$VM "$IMG"
|
|
|
|
$VM "$IMG" loadHermes "$BASE_DIR/bootstrap/Hermes-Extensions.hermes" \
|
|
|
|
"$BASE_DIR/bootstrap/TraitsV2.hermes" \
|
2022-08-08 16:37:24 +02:00
|
|
|
"$BASE_DIR/tmp/$NAME.hermes" --on-duplication=replace \
|
2022-08-07 11:00:59 +02:00
|
|
|
--no-fail-on-undeclared --save --quit
|
2022-03-08 19:44:07 +01:00
|
|
|
|
|
|
|
#init the image
|
|
|
|
$VM "$IMG" init --save
|