Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
This is insane. My build script was not broken all this time. Tiger bash has the most obscure bug that triggers with this.

---------------------------------------------------
Build script layout:

build_ffmpeg()

compile_deps() - this compiles everything, and at the end calls build_ffmpeg() multiple times to create a fat ppc750/ppc7400/ppc7450

(execution actually starts here, because we need to define functions above us to call them)

sets bash shell $PATH to search through /Applications/PPCMC.app/bin and the source tree's deps/bin folder.

compiles newer build tools such as the latest GNUMake (which is needed to run compile_deps() successfully). It installs them into the source tree in a 'deps' folder, so it is self contained. So you have like the source tree and then a deps/bin/make command inside of it.

Then I call compile_deps() with the panther arg, and then with the tiger arg to generate releases.
--------------------------------------------------------
THE BUG

compile_deps() calls build_ffmpeg() but doesn't inherit the $PATH variable set IF the script has been executing for multiple hours. So it uses the ancient Tiger shipped original make which can't handle building FFmpeg and errors out. I forgot what this looks like because I hadn't encountered since 2020 when I started building my own GNUMake to build FFmpeg.

I came up with a debug test that built only FFmpeg after a failed build of FFmpeg occurred in the last execution of ./build (so all build dependencies and libraries were there to compile it still, not a clean build) and it worked. build_ffmpeg() inherited the correct environment and the $PATH told it to use our new GNUMake and it builds.

So if you define variables after you define functions you'll use later, call a function, that function runs for hours with the variables inherited, and then calls another function, that other function wont inherit the variables.

THE FIX

Set $PATH variables at start of execution and in build_ffmpeg().
It bloody works release day tomorrow. Tommrow will be a good day no matter what 🤣

Code:
#!/bin/bash

version=7.2.7
app=/Applications/PPCMC.app

set_env()
{
    # Very important we set this with build_ffmpeg(), because it won't inherit it if we do normal execution->compile_deps()->build_ffmpeg(). Only compile_deps() will inherits it if do a full compile_deps() in that chain of logic, and then we don't get our required up to date GNU Make... If we only do normal execution->compile_deps() and have only_build_ffmpeg=true it does work, but it looses the plot if we compile everything like normal! UGH this is what delayed version 7.2.7 by 7 days.
    cd "$(dirname "$0")"
    cd "$(pwd -P)"
    this_dir=$(PWD)
    # Use a hardcoded default MAC OS X Tiger path appended to $app/bin + deps/bin.
    # This avoid MacPorts and similar things that have modified the $PATH.
    # ONLY uses dependencies of PPCMC.app, our build dependencies, and Xcode.
    PATH="/bin:/sbin:/usr/bin:/usr/sbin"
    PATH="$app/bin:$this_dir/deps/bin"${PATH:+:${PATH}}
}

# If always_compile_build_dependencies=true, they will be rebuilt even if deps/bin/make exists. It also deletes the deps dir at the end.
always_compile_build_dependencies=false

# The create_file_and_directory_time_stamps value generates timestamp files if they don't already exist. We have a safe-guard below that prevents garbage time stamps from overwriting our known good ones. When create_file_and_directory_time_stamps=true, we check if a time stamp txt file exists. Only then do we generate it.
create_file_and_directory_time_stamps=false

# Dev mode sets this to true and changes into the build directory if it is not empty (because compilation stopped for whatever reason).
keep_tmp=false

m4=m4-1.4.19
libtool=libtool-2.52.2
pkg_config=pkg-config-0.29.2
# While perl 5.32.1 is the last that builds, make test fails which seems kinda bad. It technically works fine, but we can just use what OpenSSL requires as the minimum version. Reasonably sure that make test succeeds, but since it is like an 80 minute thing for perl-5.32.1 I didn't bother yet to see.
perl=perl-5.32.1
make=make-4.4.1
libtool=libtool-2.5.3
cert=cacert-2024-09-24.pem
youtube_dl=youtube-dl-master-c5098961b04ce83f4615f2a846c84f803b072639
youtube_dlp=yt-dlp-master-b6dc2c49e8793c6dfa21275e61caf49ec1148b81
gas_preprocessor=gas-preprocessor.pl

# About extraction/copying of automake/autoconf projects: https://www.gnu.org/software/automake/manual/1.7.4/html_node/maintainer_002dmode.html

# If we cared to not trigger the above, we can do special handling. Tar preserves time stamps, so we just need to tar extract with either args zxvf (.gz verbose) or tar jxvf (.bz2 verbose). Then we use cp -Rp (recursive keep permissions/time stamps) to copy the source directory into our temp directory. -R (recursive, supports copying actual symlinks rather then creating hard links) -p (preserve time stamps and permissions) is valid for the BSD derived cp in Tiger. For GNU core utils cp, I think -rp is the equivalent (but we don't use GNU core utils cp).

# We don't care to do the above because when we upload to github we destroy the file and directory time stamps. So instead, we disable AM_MAINTAINER_MODE if it present in the program to compile, which ignores file and directory time stamps. If AM_MAINTAINER_MODE is not present, we need to restore the timestamps from the original tarball pre upload with git to work around it.

restore_file_and_directory_time_stamps()
{
    echo "Restoring file and directory time stamps for $1..."
    cp $1-time-stamps.txt $tmp/$1
    ( cd $tmp/$1 && while IFS= read -r line; do touch -t "$(date -r "$(echo "$line" | awk '{print $1}')" +"%Y%m%d%H%M")" "$(echo "$line" | cut -d' ' -f2-)"; done < $1-time-stamps.txt )
}

generate_file_and_directory_time_stamps()
{
    if [ ! -f "$1-time-stamps.txt" ]; then
        echo "Generating file and directory time stamps for $1..."
        cd $1
        find . \( -type f -o -type d \) -exec stat -f "%m %N" {} \; > ../$1-time-stamps.txt
        cd ../
    else
        # This is incredibly important when release=false is set. This prevents us from overwriting the known good file and directory time stamp files with garbage due to github upload or whatever. The benefit with release=false is that if we add or update any programs, the timestamp file won't exist, but it will have actual good time stamps since it has obviously just been extracted into the source tree from a good tarball and hasn't been uploaded to git yet because it's in the middle of a development release.
        echo "$1-time-stamps.txt already exists and will not be regenerated."
    fi
}

# Since compilation takes such a long time, you may want to only build certain programs.
# You can only do this is if:
# 1) The dependencies required for that specific program have already been built, or are still set to "true".
# 2) You have changed the build_xyz values (i.e. build_panther_sdl2=false) corresponding to the specific program below to false.
# 3) You have set the "delete_app" value below to "false".
delete_app=true

# Note: the following are in the order that they are compiled.

# Builds with 10.3.9 SDK without any 10.4 only features needed.
libiconv_for_panther=libiconv-1.11.1
build_libiconv_for_panther=true

# Requires GNU libtool (not tiger shipped one from Xcode).
libiconv_for_tiger=libiconv-1.17
build_libiconv_for_tiger=true

# Used by FFMpeg.
# Depends: none.
panther_sdl2=panther_sdl2-20210624
build_panther_sdl2=true

# Used by FFMpeg.
# Depends: none.
lame=lamevmx-master-93b8707c0b2bc4f1fdd4c05e3e8de81e76a5dbba
build_lame=true

# Enables YouTube-dl/YouTube-dlp to embeds artwork into music files.
# Depends: none.
atomic_parsley=atomic-parsley-0.9.0
build_atomic_parsley=true

# Required for Python, OpenSSL, FFmpeg, cURL.
# Depends: none.
zlib=zlib-1.3.1
build_zlib=true

# Used by FFMpeg, Python, cURL.
# Depends: Perl, Zlib.
openssl=openssl-1.1.1w
build_openssl=true

# Required to build Python 3.10.15.
# Depends: None.
libffi=libffi-3.4.5
build_libffi=true

# Enables YouTube-dlp to work (currently requires Python 3.10.15). YouTube-dl also works with this. Tiger only, can't build this for Panther at the moment.
# Depends: LibFFI, Zlib, OpenSSL. Tiger or newer required.
python_for_tiger=python-3.10.15
build_python_for_tiger=true

# Python version for Panther builds. While this can't use YouTube-dlp, but YouTube-dl works great.
# Depends: Zlib, OpenSSL. Used for Panther build.
python_for_panther=python-3.6.15
build_python_for_panther=true

# cURL expects this by default during building. While it can be disabled and built without this library, we can just build it no problem and give cURL what it wants.
# Depends: Python 3, libiconv. Used in cURL.
libpsl=libpsl-0.21.5
build_libpsl=true

# cURL is used for updating YouTube-dlp and YouTube-dl.
# Depends: OpenSSL, Zlib, libspl.
curl=curl-8.10.1
build_curl=true

# Later FFmpeg versions require C11. Need to find the absolute last C99 version. But this version of FFmpeg is very polished and works amazing.
# Depends: OpenSSL, Zlib, GNU Make, panther_sdl2.
ffmpeg=ffmpeg-4.4.5
build_ffmpeg=true

# For easy test of FFmpeg compilation.
only_build_ffmpeg=false
if [ $only_build_ffmpeg = "true" ];then
    # Assumes we got to where we can build FFmpeg in Dev mode (every other dependency already compiled at this point).
    always_compile_build_dependencies=false
    delete_app=false
    build_libiconv_for_tiger=false
    build_libiconv_for_panther=false
    build_panther_sdl2=false
    build_lame=false
    build_atomic_parsley=false
    build_zlib=false
    build_openssl=false
    build_libffi=false
    build_python_for_tiger=false
    build_python_for_panther=false
    build_libpsl=false
    build_curl=false
fi

build_start=$(date)

tmp=$(mktemp -d /var/tmp/ppcmc7-build-system.XXX)
# Because this isn't /tmp, we need to make it rwx:
chmod -R 777 $tmp

# When this script exits, automatically delete the temp directory.
cleanup()
{
    if [[ -e $tmp ]]; then
        if [ $keep_tmp = "true" ]; then
            if [ "$(ls -A "$tmp")" ]; then
                cd $var/$tmp
                echo $PWD
            else
                echo "Build temp directory is empty and has been cleared."
            fi
        fi
    else
        echo "Clearing temp files..."
        rm -rf $tmp  
    fi
}
trap cleanup EXIT

set -e

generate_app () {
    mkdir -p $app

    # Update AppleScript. Useful to update the Apple Script in the releases after building the whole thing.
    if [ ! -d PPCMC.app/Contents/Resources ]; then
        echo "Could not find PPCMC.app. To compile all of these dependencies you need to first compile the PPCMC.scpt file as an Apple Script Application Bundle named PPCMC.app, with the startup screen option disabled. To do so, open the PPCMC.scpt file in the Apple Script Editor and save it as an Application bundle in this directory as PPCMC.app. After doing so, run sudo ./build again to continue building."
        exit 1
    fi
   
    cp -R PPCMC.app /Applications
    # Add app icon.
    cp applet.icns $app/Contents/Resources

    # Reset preferences
    rm -f $app/vp-pref
    rm -f $app/yt-pref
   
    # Set permissions.
    chmod -R 777 $app
    echo "Updated $app"
}

generate_release() {
    # Update AppleScript. Useful to update the Apple Script in the releases after building the whole thing.
    if [ ! -d PPCMC.app/Contents/Resources ]; then
        echo "Could not find PPCMC.app. To compile all of these dependencies you need to first compile the PPCMC.scpt file as an Apple Script Application Bundle named PPCMC.app, with the startup screen option disabled. To do so, open the PPCMC.scpt file in the Apple Script Editor and save it as an Application bundle in this directory as PPCMC.app. After doing so, run sudo ./build again to continue building."
        exit 1
    fi
   
    cp -R PPCMC.app ppcmc-v$version-$1
    # Add app icon.
    cp applet.icns ppcmc-v$version-$1/PPCMC.app/Contents/Resources

    # Update docs
    mkdir -p ppcmc-v$version-$1/licenses
    cp -R readme.md changelog.md build.md credits.md ppcmc-v$version-$1
    cp unlicense.md ppcmc-v$version-$1/licenses/ppcmc.md

    # Copy licenses of all programs distributed in the app (not build dependencies).
    cp $atomic_parsley/COPYING ppcmc-v$version-$1/licenses/atomic-parsley.md
    cp $curl/COPYING ppcmc-v$version-$1/licenses/curl.md
    cp $ffmpeg/LICENSE.md ppcmc-v$version-$1/licenses/ffmpeg.md
    cp $libffi/LICENSE ppcmc-v$version-$1/licenses/libffi.md
    cp $libiconv_for_tiger/COPYING ppcmc-v$version-$1/licenses/libiconv.md
    cp $libpsl/COPYING ppcmc-v$version-$1/licenses/libpsl.md
    cp $panther_sdl2/COPYING.txt ppcmc-v$version-$1/licenses/panther-sdl2.md
    cp $python_for_tiger/LICENSE ppcmc-v$version-$1/licenses/python.md
    cp $youtube_dl/LICENSE ppcmc-v$version-$1/licenses/youtube-dl.md
    cp $youtube_dlp/LICENSE ppcmc-v$version-$1/licenses/youtube-dlp.md
    cp $zlib/LICENSE ppcmc-v$version-$1/licenses/zlib.md
    chmod -R 777 ppcmc-v$version-$1
   
    # Zip.
    rm -f ppcmc-v$version-$1.zip
    zip -r ppcmc-v$version-$1.zip ppcmc-v$version-$1
}

build_ffmpeg() {

    set_env
    cp -R $ffmpeg $tmp

    # Doesn't use AM_MAINTAINER_MODE.
    if [ $create_file_and_directory_time_stamps = "true" ]; then
        generate_file_and_directory_time_stamps $ffmpeg
    fi

    restore_file_and_directory_time_stamps $ffmpeg

    # LameVMX was forked before pkg-config was added: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829326 .
    # We specify --extra-ldflags=-L$app/lib to make sure it is picked up.
    # Note: we have sdl2-config in our $PATH and pkg-config .pc file so it finds it just fine.

    if [ $1 = "ppc750" ]; then
        ( cd $tmp/$ffmpeg && ./configure --disable-debug --prefix=$app --disable-altivec --enable-libmp3lame --enable-zlib --enable-openssl --enable-static --enable-sdl --enable-outdev=sdl2 --disable-htmlpages --disable-bzlib --extra-ldflags=-L$app/lib )
    else
        ( cd $tmp/$ffmpeg && ./configure --disable-debug --prefix=$app --enable-altivec --enable-libmp3lame --enable-zlib --enable-openssl --enable-static --enable-sdl --enable-outdev=sdl2 --disable-htmlpages --disable-bzlib --extra-ldflags=-L$app/lib )
    fi

    make -C $tmp/$ffmpeg install DESTDIR=$tmp/ffmpeg_build_$1
    # This isn't readable/writable by lipo afterwards.
    chmod -R 777 $tmp/ffmpeg_build_$1

    rm -rf $tmp/$ffmpeg
}

compile_deps () {
    # Start with clean slate.
    if [ $delete_app = "true" ]; then
        rm -rf $app
    fi
   
    generate_app

    # Update certificates for OpenSSL.
    mkdir -p $app/certs
    cp $cert $app/certs/cacert.pem
   
    # Update Youtube-dl.
    mkdir -p $app/bin
    rm -rf $app/bin/youtube-dl-master
    cp -R $youtube_dl $app/bin/youtube-dl-master

    # Update YouTube-dlp, only if this is Tiger.
    if [ $1 = "tiger" ]; then
        rm -rf $app/bin/yt-dlp-master
        cp -R $youtube_dlp $app/bin/yt-dlp-master
    fi

    # Update web interface files.
    cp -R web-interface $app

    if [ $1 = "panther" ]; then
        # Can't build with 10.4 SDK @10.3 deployment target or 10.3.9 SDK.
        build_libffi=false
        build_python_for_tiger=false
        build_libiconv_for_tiger=false
    else
        # We have a better python we can build on Tiger.
        build_python_for_panther=false
        # Latest libiconv works fine on Tiger.
        build_libiconv_for_panther=false
    fi
   
    if [ $1 = "panther" ]; then
        ./bselect 4.0 10.3.9 ppc 10.3
    elif [ $1 = "tiger" ]; then
        ./bselect 4.0 10.4u ppc 10.4
    fi

    # We need to build with the 10.3.9 SDK to ensure we are not using features first available in 10.4 (used by it's libiconv not present in 10.3.9)
    if [ $libiconv_for_panther = "true" ]; then
        echo -e "\nBuilding $libiconv_for_panther..."
        cp -R $libiconv_for_panther $tmp
       
        ( cd $tmp/$libiconv_for_panther && ./configure --prefix=$app --disable-maintainer-mode )
        make -C $tmp/$libiconv_for_panther install
        strip -S $app/bin/iconv
    elif [ $libiconv_for_tiger = "true" ]; then
        echo -e "\nBuilding $libiconv_for_tiger..."
        cp -R $libiconv_for_tiger $tmp
       
        ( cd $tmp/$libiconv_for_tiger && ./configure --prefix=$app --disable-maintainer-mode )
        make -C $tmp/$libiconv_for_tiger install
        # libtool: warning: remember to run 'libtool --finish /Applications/PPCMC.app/lib'. That doesn't work though? We do need a newer lib tool!
        libtool --finish $app/lib
        strip -S $app/bin/iconv
    fi

    # From now on use the 10.4u SDK for Panther @10.3 API level.
    if [ $1 = "panther" ]; then
        ./bselect 4.0 10.4u ppc 10.3
    fi

    if [ $build_panther_sdl2 = "true" ]; then
        echo -e "\nBuilding $panther_sdl2..."
        cp -R $panther_sdl2 $tmp

        # Doesn't have AM_MAINTAINER_MODE.
        if [ $create_file_and_directory_time_stamps = "true" ]; then
            generate_file_and_directory_time_stamps $panther_sdl2
        fi

        restore_file_and_directory_time_stamps $panther_sdl2

        ( cd $tmp/$panther_sdl2 && ./configure --exec-prefix=$app --prefix=$app --without-x --disable-joystick --disable-haptic )
        make -C $tmp/$panther_sdl2 install
        rm -r $tmp/$panther_sdl2
    fi

    if [ $build_lame = "true" ]; then
        echo -e "\nBuilding $lame..."
        cp -R $lame $tmp

        # Front-end requires libiconv and links with ncurses 5.4 dylib, no fix yet for ncurses when targeting panther.
        ( cd $tmp/$lame && ./configure --prefix=$app --exec-prefix=$app --disable-maintainer-mode --disable-frontend )
        make -C $tmp/$lame install
        rm -r $tmp/$lame
    fi

    if [ $build_atomic_parsley = "true" ]; then
        echo -e "\nBuilding $atomic_parsley..."

        cp -R $atomic_parsley $tmp
        ( cd $tmp/$atomic_parsley && ./build )
        cp $tmp/$atomic_parsley/AtomicParsley $app/bin
        strip -S $app/bin/AtomicParsley
        rm -r $tmp/$atomic_parsley
    fi
   
    if [ $build_zlib = "true" ]; then
        echo -e "\nBuilding $zlib..."
        cp -R $zlib $tmp

        # Does not use autoconf/automake. Configure is a bash script.
        ( cd $tmp/$zlib && ./configure --prefix=$app --eprefix=$app )
        make -C $tmp/$zlib install
        rm -r $tmp/$zlib
    fi

    if [ $build_openssl = "true" ]; then
        echo -e "\nBuilding $openssl..."
        cp -R $openssl $tmp
        # MacPorts patch for older Mac OS X versions.
        cp patch-crypto-rand-tiger.diff $tmp/$openssl
        # OpenSSL doesn't use autoconf/automake. Configure is a perl script.
        # OpenSSL doesn't use pkg-config with Configure so we set CFLAGS and LDFLAGS as Configure arguments in order to pick up our new zlib.
        # We specify zlib-dynamic to ensure Python can also link with the shared zlib referenced from the shared libssl.
        if [ $1 = "panther" ]; then
            # Threads require features first available on Mac OS X 10.4 Tiger
            # Async require features first available on Mac OS X 10.5 Leopard
            ( cd $tmp/$openssl && patch -p0 < patch-crypto-rand-tiger.diff && ./Configure CFLAGS=-I$app/include LDFLAGS=-L$app/lib enable-shared zlib-dynamic no-async no-threads --openssldir=$app --prefix=$app darwin-ppc-cc )
        elif [ $1 = "tiger" ]; then
            # Async require features first available on Mac OS X 10.5 Leopard
            ( cd $tmp/$openssl && patch -p0 < patch-crypto-rand-tiger.diff && ./Configure CFLAGS=-I$app/include LDFLAGS=-L$app/lib enable-shared zlib-dynamic no-async --openssldir=$app --prefix=$app darwin-ppc-cc )
        fi
       
        make -C $tmp/$openssl install
        strip -S $app/bin/openssl
        rm -r $tmp/$openssl
    fi

    if [ $build_libffi = "true" ]; then
        cp -R $libffi $tmp
        ( cd $tmp/$libffi && ./configure --prefix=$app --disable-maintainer-mode )
        make -C $tmp/$libffi install
    fi

    # Requires libffi.
    if [ $build_python_for_tiger = "true" ]; then
        echo -e "\nBuilding $python_for_tiger..."
        cp -R $python_for_tiger $tmp

        # Python doesn't use AM_MAINTAINER_MODE as of Sat May 10 18:44:50 1997 (see ./Modules/_ctypes/libffi/ChangeLog.v1).
        if [ $create_file_and_directory_time_stamps = "true" ]; then
            generate_file_and_directory_time_stamps $python_for_tiger
        fi

        restore_file_and_directory_time_stamps $python_for_tiger

        # MacPorts patches: https://github.com/macports/macports-ports/tree/master/lang/python310/files
        cp -R \
        dangling-symlinks.patch \
        libedit-types.patch \
        patch-Lib-cgi.py.diff \
        patch-Lib-ctypes-macholib-dyld.py.diff \
        patch-configure-xcode4bug.diff \
        patch-configure.diff \
        patch-no-copyfile-on-Tiger.diff \
        patch-setup.py.diff \
        patch-threadid-older-systems.diff \
        sysconfig.py.patch \
        $tmp/$python_for_tiger
        # We can't enable optimizations because we need llvm-profdata.
        # MacPorts edits pyconfig.h to fix polling on 10.8 and older.
        # MacPorts says that pkg-config removes -I flags for paths in CPATH, which confuses python.
        # Fix up prefix for /Applications/PPCMC.app
       
        ( cd $tmp/$python_for_tiger && \
        patch -p0 < dangling-symlinks.patch && \
        patch -p0 < libedit-types.patch && \
        patch -p0 < patch-Lib-cgi.py.diff && \
        patch -p0 < patch-Lib-ctypes-macholib-dyld.py.diff && \
        patch -p0 < patch-configure-xcode4bug.diff && \
        patch -p0 < patch-configure.diff && \
        patch -p0 < patch-no-copyfile-on-Tiger.diff && \
        patch -p0 < patch-setup.py.diff && \
        patch -p0 < patch-threadid-older-systems.diff && \
        patch -p0 < sysconfig.py.patch && \
        sed -i '' "s|@@PREFIX@@|/Applications/PPCMC.app|g" Lib/ctypes/macholib/dyld.py && \
        env PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 SETUPTOOLS_USE_DISTUTILS=stdlib ./configure --prefix=$app --exec-prefix=$app && \
        md5 pyconfig.h && \
        sed -E -i '' 's/.*(HAVE_POLL[_A-Z]*).*/\/\* #undef \1 \*\//g' pyconfig.h && \
        md5 pyconfig.h )
        make -C $tmp/$python_for_tiger install
        strip -S $app/bin/python3.10
        rm -r $tmp/$python_for_tiger
    elif [ $build_python_for_panther = "true" ]; then
        # We can't build Python 3.10.15 targeting Panther because we can't build a threaded OpenSSL which is required.
        echo -e "\nBuilding $python_for_panther..."
        cp -R $python_for_panther $tmp

        # Python doesn't use AM_MAINTAINER_MODE as of Sat May 10 18:44:50 1997 (see ./Modules/_ctypes/libffi/ChangeLog.v1).
        if [ $create_file_and_directory_time_stamps = "true" ]; then
            generate_file_and_directory_time_stamps $python_for_panther
        fi

        restore_file_and_directory_time_stamps $python_for_panther

        ( cd $tmp/$python_for_panther && ./configure -prefix=$app --exec-prefix=$app --prefix=$app )
        make -C $tmp/$python_for_panther install
        strip -S $app/bin/python3.6
        rm -r $tmp/$python_for_panther
    fi

    # Needs libiconv and newer Python.
    if [ $build_libpsl = "true" ]; then
        echo -e "\nBuilding $libpsl..."
        cp -R $libpsl $tmp

        # Doesn't use AM_MAINTAINER_MODE.
        if [ $create_file_and_directory_time_stamps = "true" ]; then
            generate_file_and_directory_time_stamps $libpsl
        fi

        restore_file_and_directory_time_stamps $libpsl

        ( cd $tmp/$libpsl && ./configure --prefix=$app )
        make -C $tmp/$libpsl install
        rm -r $tmp/$libpsl
    fi

    if [ $build_curl = "true" ]; then
        echo -e "\nBuilding $curl..."
        cp -R $curl $tmp

        ( cd $tmp/$curl && ./configure --prefix=$app --exec-prefix=$app --with-ssl=$app --with-ca-bundle=$app/certs/cacert.pem --disable-maintainer-mode --disable-debug --enable-optimize --disable-docs )
        make -C $tmp/$curl install
        rm -r $tmp/$curl
    fi

    # FFmpeg needs pretty up to date GNU GAS definitions for altivec optimizations. We use https://github.com/peter-iakovlev/ffmpeg/blob/master/gas-preprocessor.pl, which is an updated version of the original https://github.com/yuvi/gas-preprocessor/blob/master/gas-preprocessor.pl that does work with FFmpeg 4.4.1 (and our current 4.4.5)! ASM lets go.
    # See https://stackoverflow.com/questions/4293015/compiling-ffmpeg-and-using-gas-preprocessor-on-tiger
    # The gas-preprocessor.pl was put into the $PATH when we did the intial build dependnecies.
    if [ $build_ffmpeg = "true" ]; then
        echo -e "\nBuilding $ffmpeg..."
       
        if [ $1 = "panther" ]; then
            # PowerPC G3.
            ./bselect 4.0 10.4u ppc750 10.3
            build_ffmpeg ppc750
           
            # PowerPC G4.
            ./bselect 4.0 10.4u ppc7400 10.3
            build_ffmpeg ppc7400
           
            # PowerPC newer G4.
            ./bselect 4.0 10.4u ppc7450 10.3
            build_ffmpeg ppc7450
        elif [ $1 = "tiger" ]; then
            # PowerPC G3.
            ./bselect 4.0 10.4u ppc750 10.4
            build_ffmpeg ppc750
           
            # PowerPC G4.
            ./bselect 4.0 10.4u ppc7400 10.4
            build_ffmpeg ppc7400

            # PowerPC newer G4.
            ./bselect 4.0 10.4u ppc7450 10.4
            build_ffmpeg ppc7450
        fi

        # FFmpeg fat binary (arches ppc, ppc750, ppc7400, ppc7450).
        lipo -create $tmp/ffmpeg_build_ppc7450$app/bin/ffmpeg $tmp/ffmpeg_build_ppc7400$app/bin/ffmpeg $tmp/ffmpeg_build_ppc750$app/bin/ffmpeg -o $app/bin/ffmpeg
        # FFprobe fat binary (arches ppc, ppc750, ppc7400, ppc7450).
        lipo -create $tmp/ffmpeg_build_ppc7450$app/bin/ffprobe $tmp/ffmpeg_build_ppc7400$app/bin/ffprobe $tmp/ffmpeg_build_ppc750$app/bin/ffprobe -o $app/bin/ffprobe
        # FFplay fat binary (arches ppc, ppc750, ppc7400, ppc7450).
        lipo -create $tmp/ffmpeg_build_ppc7450$app/bin/ffplay $tmp/ffmpeg_build_ppc7400$app/bin/ffplay $tmp/ffmpeg_build_ppc750$app/bin/ffplay -o $app/bin/ffplay
       
        rm -r $tmp/ffmpeg_build_ppc*
    fi

    # Create release directory.
    rm -rf ppcmc-v$version-$1
    mkdir ppcmc-v$version-$1

    # Copy PPCMC.app.
    chmod -R 777 $app
    cp -R $app ppcmc-v$version-$1
    generate_release $1
}

clear
echo "*******PowerPC Media Center v$version Build System*******"

create_tiger_build=true
create_panther_build=true

set_env

if [ "$#" -eq 1 ] || [ "$#" -eq 2 ]; then
    for argv in "$@"; do
        if [ "$argv" = "-a" ]; then
            generate_app
            exit 0
        elif [ "$argv" = "-r" ]; then
            if [ -d "ppcmc-v$version-panther" ]; then
                generate_release panther
            fi

            if [ -d "ppcmc-v$version-tiger" ]; then
                generate_release tiger
            fi
           
            exit 0

        elif [ "$argv" = "-c" ]; then
            rm -rf ppcmc-v$version-panther
            rm -rf ppcmc-v$version-tiger
            rm -rf /Applications/PPCMC.app
            # If keep_tmp is true this could still exist.
            rm -rf /var/tmp/ppcmc7-build-system.*

        elif [ "$argv" = "-d" ]; then
            echo "Building in dev mode."

            if [ $only_build_ffmpeg = "false" ]; then
                always_compile_build_dependencies=true
            fi          
           
            create_file_and_directory_time_stamps=true
           
            keep_tmp=true
        elif [ "$argv" = "-p" ]; then
                echo "Building only for Panther."
                create_tiger_build=false

        elif [ "$argv" = "-t" ]; then
            echo "Building only for Tiger."
            create_panther_build=false

        elif [ "$argv" = "--help" ]; then
            echo -e "
Usage:
   
    build   Build Tiger and Panther releases.

    build -a    Only update Apple Script at /Applications/PPCMC.app.

    build -r    Only update the releases in the source directory.

    build -c    Clean source tree. Deletes all builds, temp build directories left by dev mode, and /Applications/PPCMC.app,

    build -d        Build in dev mode. Dev mode forces build dependencies to be compiled when they have been already. It also checks for new programs or versions of programs and will generate time-stamp.txt files if needed. Lastly, if the build temp directory is not empty it will change into said directory and not delete it. The build temp directory can be cleared by executing ./build -c.

    build -p    Only build the Panther release for Mac OS X 10.3.9.

    build -t    Only build the Tiger release for Mac OS X 10.4.x.

    build --help    Display this text.

While no arguments to build are required, up to 2 can be given when applicable. I.e. build -d -p (dev mode panther only build).

            "
            exit 0
        fi
    done
fi

if [ $create_panther_build = "true" ] && [ ! -d /Developer/SDKs/MacOSX10.3.9.sdk ]; then
    echo "Error: Could not find the Mac OS X 10.3.9 SDK at /Developer/SDKs/MacOSX10.3.9.sdk"
    exit 1
else
    echo "Found the Mac OS X 10.3.9 SDK at /Developer/SDKs/MacOSX10.3.9.sdk."
fi

if [ $create_tiger_build = "true" ] && [ ! -d /Developer/SDKs/MacOSX10.4u.sdk ]; then
    echo "Error: Could not find the Mac OS X 10.4u SDK at /Developer/SDKs/MacOSX10.4u.sdk."
    exit 1
else
    echo "Found the Mac OS X 10.4u SDK at /Developer/SDKs/MacOSX10.4u.sdk."
fi

if [ ! -d "$HOME/Library/Preferences/build_select" ]; then
    echo "Build Select is not currently installed on your mac, but is required. Installing now..."
    ./bselect -i
fi

echo -e "Path:\n$PATH\n"

# Compile build dependencies. We need a newer M4, GNU Make, Perl, and GNU libtool.
# We check for deps/bin/make because if that is installed everything else has been for deps as well.
if [ "$always_compile_build_dependencies" = true ] || [ ! -f deps/bin/make ]; then
    ./bselect 4.0 10.4u ppc 10.4

    if [ $delete_app = "true" ]; then
        rm -rf $app
    fi
   
    if [ -d deps ]; then
        chmod -R 777 deps
        rm -rf deps
    fi

    mkdir -p deps/bin
    cp $gas_preprocessor deps/bin
    chmod 777 deps/bin/$gas_preprocessor

    echo "Compiling build dependencies..."

    echo -e "\nBuilding $m4..."
    cp -R $m4 $tmp
    # Tiger needs older regnames.
    cp patch-m4-use-older-regnames-on-tiger.diff $tmp/$m4
   
    # Doesn't have AM_MAINTAINER_MODE.
    if [ $create_file_and_directory_time_stamps = "true" ]; then
        generate_file_and_directory_time_stamps $m4
    fi

    restore_file_and_directory_time_stamps $m4

    ( cd $tmp/$m4 && patch -p1 < patch-m4-use-older-regnames-on-tiger.diff && ./configure --prefix=$this_dir/deps )
    make -C $tmp/$m4 install
    rm -rf $tmp/$m4

    # Requires M4.
    echo -e "\nBuilding $libtool..."
    cp -R $libtool $tmp
   
    # Doesn't have AM_MAINTAINER_MODE.
    if [ $create_file_and_directory_time_stamps = "true" ]; then
        generate_file_and_directory_time_stamps $libtool
    fi

    restore_file_and_directory_time_stamps $libtool
   
    ( cd $tmp/$libtool && ./configure --prefix=$this_dir/deps )
    make -C $tmp/$libtool install
    rm -rf $tmp/$libtool

    # Doesn't have AM_MAINTAINER_MODE in the glib subdir (we do in the actual pkg-config dir) so we need to restore the original time stamps.
    echo -e "\nBuilding $pkg_config..."
    cp -R $pkg_config $tmp

    # Doesn't have AM_MAINTAINER_MODE.
    if [ $create_file_and_directory_time_stamps = "true" ]; then
        generate_file_and_directory_time_stamps $pkg_config
    fi

    restore_file_and_directory_time_stamps $pkg_config

    ( cd $tmp/$pkg_config && ./configure --prefix=$this_dir/deps --with-pc-path=$app/lib/pkgconfig --with-internal-glib )
    make -C $tmp/$pkg_config install
    rm -rf $tmp/$pkg_config

    echo -e "\nBuilding $perl..."
    cp -R $perl $tmp
    # Does not use autoconf/automake. Configure is a bash script.
    ( cd $tmp/$perl && ./Configure -des -Dprefix=$this_dir/deps )
    # generating t/01_test.t - t/01_test.t: Permission denied . Error with release tarball directly from perl...
    chmod -R 777 $tmp/$perl
    make -C $tmp/$perl install
    rm -rf $tmp/$perl

    echo -e "\nBuilding $make..."
    cp -R $make $tmp

    # Doesn't have AM_MAINTAINER_MODE.
    if [ $create_file_and_directory_time_stamps = "true" ]; then
        generate_file_and_directory_time_stamps $make
    fi

    restore_file_and_directory_time_stamps $make
    ( cd $tmp/$make && ./configure --prefix=$this_dir/deps )
    make -C $tmp/$make install
    rm -rf $tmp/$make

    # Allow for deletion, installs as read only.
    chmod -R 777 deps
fi

# Display updated build dependencies.
which pkg-config
pkg-config --version
which make
make --version
which perl
perl --version
libtool --version
which libtool

if [ $create_panther_build = "true" ]; then
    echo -e "\nGenerating Mac OS X Panther 10.3.9 build..."
    compile_deps panther
fi

if [ $create_tiger_build = "true" ]; then
    echo -e "\nGenerating Mac OS X Tiger 10.4.x build..."
    compile_deps tiger
fi

if [ $always_compile_build_dependencies = "true" ]; then
    rm -rf deps
fi

# Reset compiler to default.
./bselect 4.0 10.4u ppc 10.4

echo -e "\nBuilding started at "$build_start".\nBuilding ended on $(date)."
 

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
It's the #1 feature that will make my PPC Macs exciting again.
It is soo important to me to preserve the jobs-era apple hardware AND software. Apple doing things like:

1) Requiring online activation of the OS on installation.
2) Making unsigned code damn near impossible.
3) GateKeeper (first introduced after jobs death in 10.8)
3) Making hardware un-repairable (that M4 Mac is sick until your soldered flash storage dies and you can't use a solder iron).
4) Death of jailbreaking (REAL jailbreaks like iOS 9.0.2 untether released 1 month after iOS 9 released).
5) iOS progressivly getting worse (janky touch responsiveness worse then iPhone 2G and iPhone 4).
6) Deactiving/blocking iOS 9 devices (haha we have bootrom exploits now though).

Makes me want to prove to everyone wrong about old apple stuff and keep this it going more then ever!

My first Mac was a MacBook 2,1 mid 2007 BLACK 2.16GHz. Just after the PowerPC transition. It was running Tiger until it "broke". My mother made a deal, if I can fix it I can have it. Then I reinstalled snow leopard and I got it in 2013. I really hope I can get one again just to relive the ancient wine days running unreal (1998) on Tiger and Snow Leopard with the horrible GMA 950. That's really how I got into 90s PC games, wine was so limited back then and my GPU was soo bad it was all I could do. I remmeber struggling with Max Payne 2 (2004) via wine!

I got into PowerPC much later, but again it's early Mac OS X AND iOS which I think is truely something special. Software and hardware... I think it is even more special that it gets soo much love from developers like kencu and the MacPorts people. I don't think it can possibly ever truely die. With everything against it even.
 

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
Need to compile a new bash this is a mess with global variables and functions.

Edit: Yup, Bash 5 fixes it this is the way. The build script compiles bash using the tiger bash and then calls itself with the newer bash for the rest haha.
Screenshot from 2024-11-06 17-28-46.png
 
Last edited:

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360

Version 7.2.7 (11/7/2024)​

Changes:

  • Can choose from YouTube-dl or YouTube-dlp when setting your preferences on Tiger and Leopard. For Panther only YouTube-dl is available and you are not prompted for this selection. YouTube-dlp is currently more advanced then YouTube-dl and can download many more different formats and resolutions then the original YouTube-dl can.
  • Updates either YouTube-dl or YouTube-dlp with cURL pointed to the latest commit. Get the fastest fixes and improvements as they are committed to the source tree, before any release is even put out with said changes.
  • Updated the included YouTube-dl and YouTube-dlp in the app to the latest commits.
  • Removed git, cdrdao, and CD burning features.
  • Smaller app size due to implementing executable stripping of debug symbols (or configuration for building without them when possible).
  • Updated python to version 3.10.15 for the Tiger build.
  • Updated python to version 3.6.15 for the Panther build.
  • Updated OpenSSL to version 1.1.1w.
  • Updated SSL certificates to the latest 9/24/2024 extraction.
  • Updated cURL to the latest version, 8.10.1.
  • Updated FFmpeg/FFplay/FFprobe to version 4.4.5.
  • Added the latest version of LibPSL, 0.21.5. Used by cURL.
  • Added the latest version of libiconv, 1.17 for the Tiger build.
  • Added libiconv version 1.11.1 for the Panther build.
  • Added the latest version of libFFI, v3.4.5 for the Tiger build.
  • Updated Zlib to the latest version, 1.3.1.
  • Fixed multiple GUI bugs that did not have a default selection highlighted.
  • Cleaned up and simplified apple script code.
  • Better default options selected in GUI menus.
  • FFplay now detaches from PPCMC.app for local media file playback.
  • Simplified YouTube streaming options to not ask for a resolution, since only 360p is possible to stream. Other resolutions can be downloaded still.
  • Improved FFplay args. -fast is now used. -autoexit is also used to close the player when playback is complete automatically.
  • Improved local file name handling for playing media files. Many more local video files will now open correctly with i.e. FFplay.
  • Fixed web interface to work with Python 3.6.15 (Panther) and Python 3.10.15 (Tiger).
  • Web interface now offers 360p H.264 MP4 and 720p H.264 MP4 options. Great for ancient iOS devices.
  • Improved web interface installer/uninstaller and wcli.
  • Web interface now supports multiple concurrent connections at one time.
  • Rewritten build system.
  • Build system no longer requires sudo or root privileges at all.
  • Build system now works even if MacPorts is installed (MacPorts is neither required or used by the PPCMC 7 custom build system).
  • Enabled all arches in LameVMX.
  • Documentation rewritten in markdown.

Fast G4 with 512MBs of RAM or better is recommended.

 
Last edited:

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
TIL you can use the "Download SoundCloud MP3" option to download vimeo videos that play in FFplay. Might need to rename that to "General Website Downloader".
 

mectojic

macrumors 65816
Dec 27, 2020
1,333
2,530
Sydney, Australia
Just managed to log into Macrumors, download PPCMC, then download a Youtube video in 360p and play it back with PPCMC, all on my B&W G4/400. Amazing!
The downloading part ("Downloading player... downloading m3u8 info etc") too a very long time, but the actual download of the file was fast enough. I like that it didn't have to download video/audio separately.

Great work!!
 

Dronecatcher

macrumors 603
Jun 17, 2014
5,249
7,888
Lincolnshire, UK
Sterling work as ever @alex_free - I’m finding a ten second lead on execution vs my existing setup, however, legacy mplayers still have at least 10% better CPU efficiency over the bundled FFplay.

Having said that, the hard framedrop settings for the low end G4 playback are quite brutal and return a really crazy low CPU use!

As before, PPCMC7 is an essential Swiss Army Knife for PowerPC users.

I don’t know what everyone else is using to obtain their Youtube URLs but often that’s the big stumbling block as opening a Youtube page is so demanding.

Currently I use OneWindowBrowser that opens with a Google video search page - not ideal but barely uses any CPU.

You could also utilise Links2 in Terminal as long as you know what you’re looking for (no thumbnails.)
 

ervus

macrumors 6502
Apr 3, 2020
415
312
I don’t know what everyone else is using to obtain their Youtube URLs...

I typically use invidious. For a long time that also worked to watch or download videos. It's a continuous cat and mouse thing with Alphabet Inc. though, so sometimes it's broken for a bit.
 
  • Like
Reactions: Dronecatcher

Dronecatcher

macrumors 603
Jun 17, 2014
5,249
7,888
Lincolnshire, UK
I typically use invidious. For a long time that also worked to watch or download videos. It's a continuous cat and mouse thing with Alphabet Inc. though, so sometimes it's broken for a bit.
Yes, I used to use that too but I found even it's url links weren't working at one point so just gave up on it.
 

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
Sterling work as ever @alex_free - I’m finding a ten second lead on execution vs my existing setup, however, legacy mplayers still have at least 10% better CPU efficiency over the bundled FFplay.

Having said that, the hard framedrop settings for the low end G4 playback are quite brutal and return a really crazy low CPU use!

As before, PPCMC7 is an essential Swiss Army Knife for PowerPC users.

I don’t know what everyone else is using to obtain their Youtube URLs but often that’s the big stumbling block as opening a Youtube page is so demanding.

Currently I use OneWindowBrowser that opens with a Google video search page - not ideal but barely uses any CPU.

You could also utilise Links2 in Terminal as long as you know what you’re looking for (no thumbnails.)
Thank you! Let me tell you what I've been using for getting links.

1) My Linux gaming laptop. I have a tab open of the PPCMC Web Interface and a tab of YouTube. I can download videos with the web interface and then use the Desktop symlink 'ppcmcw-dl' (created by the new web interface automatically on install) to play videos with FFplay after they have been downloaded super easily.

2) Same as above but with my iPhone 15 Plus.

3) Good old Google.com and Safari Tiger with the Safari integration (YouTube videos still load enough for this to work but it is jankier then ever to get it to the 2 line page URL load.

Somethings I want to implement relevant to the URL problem:

1) A Web Interface feature that allows you to copy the URL to the Mac clipboard. This way you could send the URL and then just Open PPCMC.app and it's already ready. Obv using pbpaste.

2) A Web Interface feature that is very similar to the above, but skips the whole needing to open the PPCMC.app thing and just starts streaming for you. Imagine having a PowerPC Mac connected to a TV in a room just waiting for your phone to start up a video on the TV via the web interface.

Besides playing back video on a PPC Mac, I've also been having a blast streaming HD video from my PPC Mac with my iOS 4.1 iPhone 4 using the web interface.

I forget how the Links 2 GUI mode handled this stuff. That is next on my list of PowerPC stuff, but I will certainly be taking a bit of a break before getting that update out after this🤣

=====================================
On the alphabet Cat & Mouse game:

* We have YouTube-dlp AND YouTube-dl with this. Currently DLP requires Python v3.9, WHEN they decided to require Python 3.11 and break everything DL will still work. On my end though that will force me to use a newer compiler then what Apple shipped in Xcode v2.5 for Tiger (unless I start rewritting C11 code to C99).

* This is the best updater for YouTube-dl and YouTube-dlp. It pulls the latest commits from github directly as soon as they are commited to the source tree. Every fix pushed to the source tree is available to be used via the updater immedietly, without having to wait for an official release from either YouTube-dl or YouTube-dlp.

=====================================
On FFplay arguments:

* I plan to make it easier to edit this in the GUI itself, and to make more things optional built-ins if desired. For example I think you should be able to turn off the loop filter, or choose if you want framedrop or not. What we have now with the defaults (detected by CPU subtype) is pretty great though as it is.

=====================================
Other formats and resolutions:

* With 360p as the only thing streamable, I want to add a 'download n play' preference option. So when you use any of the download features, the video starts up right after without needing to open anything else. 480p downloaded videos are great on a fast PowerPC G4.

* I really need to implement a M4A and OPUS audio streaming option, displaying waveform in FFplay.

* The Download MP3 option could use OPUS audio as source for possibly better quality in resulting output.
 
Last edited:
  • Like
Reactions: Dronecatcher

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
@mectojic definitely try the download and convert options for MPEG 4 Part 2 240p and the 240p MP1 For 300MHZ G3 as well. You should be able to get full 30fps playback of the resulting file in i.e. QuickTime 6 on Mac OS 9 or QuickTime 7.3.1 on OS X. Will take an incredibly long time on your Mac no doubt though since those download and convert video.
 
  • Like
Reactions: TheShortTimer

barracuda156

macrumors 68020
Sep 3, 2021
2,326
1,535
Simplified YouTube streaming options to not ask for a resolution, since only 360p is possible to stream. Other resolutions can be downloaded still.

This is apparently this bug: https://github.com/mps-youtube/yewtube/issues/942 (there are some PRs intending to address it too).
And everyone suffers. Same issue with `smtube`, and I thought something is broken on my end.

If you come up with a solution, please ping me. It is desirable to fix all related apps.
 
  • Like
Reactions: mectojic

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
This is apparently this bug: https://github.com/mps-youtube/yewtube/issues/942 (there are some PRs intending to address it too).
And everyone suffers. Same issue with `smtube`, and I thought something is broken on my end.

If you come up with a solution, please ping me. It is desirable to fix all related apps.
It's not a bug AFAICT. At one time YouTube offered multiple audio+video MP4 formats fot various resolutions. Most notable was format 22 (720p audio+video single file MP4).

YouTube then introduced video only formats in addition. I think the idea with this is (with the website and a browser) you can keep streaming i.e. format 140 regardless for audio but you can switch various resolutions on the fly (poor network speed/signal strength gets you a lower resolution, etc). Totally guessing but it makes sense to me.

Then they slowly stopped offering the single file audio+video formats like format 22. They only encoded new videos in the video only formats, still offering the seperate audio formats like they have since I've been paying attention (2019?). Old videos still had multiple single file formats (1080p, 720p for sure).

Then they retroactivly removed all the single file audio+video formats except 360p. I belive this is for compatibility with legacy devices /old apps.

Confusingly towards the tail end of 2021 they brought back format 22 and some other single file audio+video formats. At some point though between now and 2022 they removed them. Only 360p video+audio file single file format remains.


So in order to stream anything above or below 360p, you need to figure out how to stream a seperate audio url and video url sources and mix them at the same time. That does cost more CPU then if it was just a single file containing both. But it is 'possible'.

I think streaming is kinda overrated. Just download the file which takes 10 seconds more in whatever resolution you want (480p is highly underrated for fast G4s).

Of course, not every resolution is available for every video, even in seprate video only files. Some videos are only available at 360p because they were uploaded in 2010. Some videos don't have 480p available. The only thing I've found to always be depended on however is that 360p single file audio+video will be offered. Every other format (single file audio+video or video only no audio) is a total toss up. I actually didn't document it, but there is a new option in PPCMC v7.2.7 that will take the URL you give it and tell you what formats are available.

Something else, I don't think the problem is being able to 'see' the old formats and it truly is they just don't exist anymore. YouTube-dl for example can see all the formats that still exist just fine, but can't handle downloading almost any of them except 360p reliably. 480p sometimes works, but YouTube-dlp always can download all the formats YouTube-dl struggles with. They both can 'see' the same formats though

Something else, there was a 144p single file audio+video 3GP format too at one point which was great for slower PPC Macs but AFAICT that's gone. That was always @Dronecatcher 's specialty.
 

barracuda156

macrumors 68020
Sep 3, 2021
2,326
1,535
I think streaming is kinda overrated. Just download the file which takes 10 seconds more in whatever resolution you want (480p is highly underrated for fast G4s).

Well, that makes sense if it is a FHD music video which one intends to watch more than once. Otherwise downloading, watching, deleting is a hassle. Better of course, than not being able to watch at all, but I found it pretty frustrating with smtube.
 

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
Well, that makes sense if it is a FHD music video which one intends to watch more than once. Otherwise downloading, watching, deleting is a hassle. Better of course, than not being able to watch at all, but I found it pretty frustrating with smtube.
As a data hoarder I never thought about that. That is easy to fix. Going back to what I want to implement in the next version (a preference option to play videos after downloading them) that could also be implemented (download into temp dir, play, delete after play).
 

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
I feel like there is a lot of mystery about how PPCMC 7 works. Would anyone be interested in a write up of how it works? I would basically be explaining this and this. I think I am the only developer making application in this decade with solely the original Xcode v2.5 for tiger and its compilers.
 
Last edited:

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
Recently upgraded from an iPhone 15 Plus to an iPhone 6S Plus. When I'm at home the PowerPC Media Center Web Interface is used instead of YouTube via iOS 15 safari with ad blocker extension, because:
1) 720p playback (360p is only offered in Safari!).
2) Video pop out has no restrictions unlike official youtube.com that you have to fight with a race condition to even get background playback.

Gotta add 1080p and 480p options to the web interface in the next version.
 
  • Like
Reactions: TheShortTimer

mectojic

macrumors 65816
Dec 27, 2020
1,333
2,530
Sydney, Australia
Recently upgraded from an iPhone 15 Plus to an iPhone 6S Plus. When I'm at home the PowerPC Media Center Web Interface is used instead of YouTube via iOS 15 safari with ad blocker extension, because:
1) 720p playback (360p is only offered in Safari!).
2) Video pop out has no restrictions unlike official youtube.com that you have to fight with a race condition to even get background playback.

Gotta add 1080p and 480p options to the web interface in the next version.
Hey, I did the same! Going from an iPhone 15 to a 6S is definitely an upgrade... you get back the headphone jack, and a much thinner/lighter design.

When you refer to using the PPCMC web interface, are you hosting that from a fairly powerful PPCMC Mac?
 
  • Love
Reactions: alex_free

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,106
2,360
Hey, I did the same! Going from an iPhone 15 to a 6S is definitely an upgrade... you get back the headphone jack, and a much thinner/lighter design.

When you refer to using the PPCMC web interface, are you hosting that from a fairly powerful PPCMC Mac?
If one can say an iBook G4 1.33GHZ 1.5GB RAM w/40GB original 2005 HDD is powerful. YES!

I am in love with this phone. This and my iPhone 4 are my favorite models of all time. This is the phone I always wanted in my high school days, and I've daily drove it in many points between then and now,,, I had an iPhone 4 throughmost of highschooll however, wanting this phone the whole time.

I miss real jailbreaks and this has one, Besides that, the 5,5 inch 1080p display and even bettter performance then when I used one in 2020, the hardware itself is insanely notstalgic to me. Even more crazy is that all my apps still work as of exactly right now!. I saw this as my last chance to use one of my favorite phones and took the plunge, netting $400 selling my current iPhone 15 Plus and getting what I reallly want, To everyone who says I am crazy, do you like using your current phone? Are you comprimising? I am NOT. I have what I always wanted, and I am helping getting out of finacnial ruin with decisions like this. I bought this phone for $50 and sold my iPhone 15 Plus for 500$.

Was great that my headphone notficiation disabler still works!
 
Last edited:

mectojic

macrumors 65816
Dec 27, 2020
1,333
2,530
Sydney, Australia
If one can say an iBook G4 1.33GHZ 1.5GB RAM w/40GB original 2005 HDD is powerful. YES!

I am in love with this phone. This and my iPhone 4 are my favorite models of all time. This is the phone I always wanted in my high school days, and I've daily drove it in many points between then and now,,, I had an iPhone 4 throughmost of highschooll however, wanting this phone the whole time.

I miss real jailbreaks and this has one, Besides that, the 5,5 inch 1080p display and even bettter performance then when I used one in 2020, the hardware itself is insanely notstalgic to me. Even more crazy is that all my apps still work as of exactly right now!. I saw this as my last chance to use one of my favorite phones and took the plunge, netting $400 selling my current iPhone 15 Plus and getting what I reallly want, To everyone who says I am crazy, do you like using your current phone? Are you comprimising? I am NOT. I have what I always wanted, and I am helping getting out of finacnial ruin with decisions like this. I bought this phone for $50 and sold my iPhone 15 Plus for 500$.
Awesome story! My dream phone is the 1st Gen SE, which I used on/off from 2017-2024; but with time it's suffered too many battery drains/replacements, with websites being very hard to navitage on the old 4-inch screen.
I love the iPhone 4 almost as much. Back when the 3G networks were still up (2022), I also used just an iPhone 4 for months; I only gave it up when I got a job that required "the apps"...

Tried going 'mainstream' last year with an iPhone 15, but ultimately it didn't stick. Recently got my current 6S+ with a 100% battery health (replaced by previous owner), and no joke this battery life is doing better than my wife's 15 Pro, and overheating is hardly as bad.
The 6S will surely hold on for a few more years... literally yesterday I got locked out of the AirBNB app, which now requires iOS 16, so I just switched to the web app in Safari and hardly blinked.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.