rgbds-live icon indicating copy to clipboard operation
rgbds-live copied to clipboard

Patches for few major rgbds releases with current html

Open SelvinPL opened this issue 7 months ago • 0 comments

Just for some tests I did set of patches for different rgbds version

With build-rgbds.sh like this

#!/bin/bash

set -eu

if [[ "$(which emmake)" == "" ]]; then
    echo "I need emscripten sdk active, see https://emscripten.org/docs/getting_started/downloads.html"
    exit 1
fi

cd rgbds

if ! [ -r ".rgbds_patched" ]; then
    RGBDS_VERSION="$(git describe --tags --always 2>/dev/null)"
    PATCH_FILE="../patches/rgbds${RGBDS_VERSION}.patch"
    echo "${PATCH_FILE}"
    if ! [ -r $PATCH_FILE ]; then
        PATCH_FILE="../patches/rgbds.patch"
    fi
    if [ -r $PATCH_FILE ]; then
        patch -p1 --no-backup-if-mismatch < $PATCH_FILE
        >.rgbds_patched
    fi
fi

MAKE_ARGS="Q= PNGCFLAGS= PNGLDFLAGS= PNGLDLIBS="
CXXFLAGS="-O3 -flto -DNDEBUG -s USE_LIBPNG"
LDFLAGS="-s EXPORT_ES6=1 -s ALLOW_MEMORY_GROWTH=1 -s ENVIRONMENT=web -s MODULARIZE=1 -s EXPORTED_RUNTIME_METHODS=['FS']"
emmake make ${MAKE_ARGS} CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS} -s 'EXPORT_NAME=createRgbAsm'" rgbasm
emmake make ${MAKE_ARGS} CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS} -s 'EXPORT_NAME=createRgbLink'" rgblink
emmake make ${MAKE_ARGS} CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS} -s 'EXPORT_NAME=createRgbFix'" rgbfix

and set of patches:

Image

You can simply build rgbds-live for different versions fx for v0.9.2 just call

cd rgbds && git clean -ffxd && git reset --hard && git checkout v0.9.2 && cd .. && ./build.sh

I can to PR if you wana (it doesn't distrupt github actions)

SelvinPL avatar May 06 '25 15:05 SelvinPL