## I made this tutorial with <Ubuntu > 24.04.1
## I can only assume it also works with 22.04+
## I link to my sources but I do condense some commands and steps
dick@hardpillU:~ $ uname -a
Linux hardpillu 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
## <lambertjamesd >
## <mwpenny >/<portal64-still-alive >
## <crashoveride95 >/<ModernSDK >
## <docker >/install/<ubuntu >
## start by cloning the repo
select
dick@hardpillU:~ $ git -C $XDG_PROJECTS_DIR clone https://github.com/mwpenny/portal64-still-alive.git portal64
## install docker, docker-buildx is optional
select
dick@hardpillU:~ $ sudo apt -y install docker.io docker-buildx
## add docker to your groups
select
dick@hardpillU:~ $ sudo usermod -aG docker $USER
## you can logout and back in or use newgrp
select
dick@hardpillU:~ $ newgrp docker
## build the docker image
select
dick@hardpillU:~ $ docker build -t portal64 $XDG_PROJECTS_DIR/portal64
## enter your newly created docker
select
dick@hardpillD:~ $ docker run --rm -itv $XDG_PROJECTS_DIR/portal64:/usr/src/app \
-v /etc/localtime:/etc/localtime:ro \
-v $HOME/.local/share/Steam/steamapps/common/Portal:/usr/src/app/vpk/Portal \
portal64:latest bash
## create the build folder
select
root@fb2e2937eb93:/usr/src/app# cmake -G "Ninja" -B build -S . -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-N64.cmake
## build the rom
select
root@fb2e2937eb93:/usr/src/app# cmake --build build
## random hits
## you can verify if you are in the docker group with the groups command
## I like to use grep to refine the results
select
dick@hardpillU:~ $ groups|grep -o docker
## git head
select
dick@hardpillU:~ $ git -C $XDG_PROJECTS_DIR/portal64 rev-parse HEAD
## just the tip
select
dick@hardpillU:~ $ git -C $XDG_PROJECTS_DIR/portal64 rev-parse --short HEAD
## I like to copy my <ROM> to Portal_[date]_[build].z64
select
dick@hardpillU:~ $ cp -v $XDG_PROJECTS_DIR/portal64/build/portal.z64 $HOME/Portal_$(date +%Y%m%d)_$(git -C $XDG_PROJECTS_DIR/portal64 rev-parse --short HEAD).z64