GenericFolder icon 16x16portal64 -- ~zsh --
## I made this tutorial with <MacOS>
## I link to my sources but I do condense some commands and steps

dick@Mac ~ % uname -a
Darwin MacBookPro 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:27 PDT 2024; root:xnu-11215.41.3~2/RELEASE_X86_64 x86_64

## I link to my sources but I do condense some commands and steps
## <lambertjamesd>
## <mwpenny>/<portal64-still-alive>
## <crashoveride95>/<ModernSDK>
## <docker>/install/<macos>
## <Homebrew>


## Install <brew>
dick@Mac ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

## install Docker cask
dick@Mac ~ % brew install --cask docker

## clone the git repo and upon success <&&> move the Portal folder from ~ to portal64/vpk/
dick@Mac ~ % git clone https://github.com/mwpenny/portal64-still-alive.git $HOME/portal64&&mv $HOME/Portal $HOME/portal64/vpk/

## go to <mwpenny>/<docker_setup.md>
## follow the instructions to create the docker image and then to generate a <ROM>
dick@Mac ~ % docker build -t portal64 $HOME/portal64

## enter the docker to build the <ROM>
dick@Mac ~ % docker run --rm -v $HOME/portal64:/usr/src/app -it portal64 bash

## create the build folder
root@f693df8f682c:/usr/src/app# cmake -G "Ninja" -B build -S . -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-N64.cmake

## build the <ROM>
root@f693df8f682c:/usr/src/app# cmake --build build

## random hits
## git head
dick@Mac ~ % git -C $HOME/portal64 rev-parse HEAD

## just the tip
dick@Mac ~ % git -C $HOME/portal64 rev-parse --short HEAD

## I like to copy my <ROM> to Portal_[date]_[build].z64
dick@Mac ~ % cp -v $HOME/portal64/build/portal.z64 $HOME/Portal_$(date +%Y%m%d)_$(git -C $HOME/portal64 rev-parse --short HEAD).z64