REPO: Add support for building QuakeC on macOS natively

This commit is contained in:
MotoLegacy 2023-11-05 08:48:53 -05:00
parent bcc6131f2e
commit 4ac95c5be1
3 changed files with 26 additions and 2 deletions

View file

@ -17,10 +17,10 @@ Here is a brief explanation for each of the (sub)directories in this repository:
While it's usually recommended to stay on the QuakeC version provided with your build of NZ:P, you may want to update it to the current development builds to test new features and changes. To do this, navigate to the [Releases](https://github.com/nzp-team/quakec/releases/tag/bleeding-edge) page and follow the instructions there for downloading and installing.
## Building (Beginner Friendly)
There are no prerequisites or dependancies needed to build QuakeC other than a working Windows or Linux-based machine (MacOS is **not** natively supported, but you can use [WINE](https://www.winehq.org/)).
There are no prerequisites or dependancies needed to build QuakeC other than a working Windows, MacOS, or Linux-based machine.
Before you can build the NZ:P QuakeC, you must either [download](https://github.com/nzp-team/quakec/archive/refs/heads/main.zip) this repository (easy) or [clone it](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) (for developers).
To build, simply navigate to the `tools` directory and run the `qc-compiler-*` script for your platform. If unfamiliar with executing shell (`.sh`) scripts on Linux systems, give this [itsFOSS article](https://itsfoss.com/run-shell-script-linux/) a read.
After having done this, a `build` directory will have been created, and inside of it will be more directories named after every platform. Copy the contents of the platform directories into your `nzp` game directory. (Example: For PSP, copy `progs.dat` and `progs.lno` from `build/handheld` to `PSP/GAME/nzportable/nzp`).
After having done this, a `build` directory will have been created, and inside of it will be more directories named after every platform. Copy the contents of the platform directories into your `nzp` game directory. (Example: For PSP, copy `progs.dat` and `progs.lno` from `standard/handheld` to `PSP/GAME/nzportable/nzp`).

BIN
bin/fteqcc-cli-mac Executable file

Binary file not shown.

24
tools/qc-compiler-mac.sh Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
cd ../
# create build directories
mkdir -p build/{fte,standard}
cd bin/
echo ""
echo "========================"
echo " compiling FTE CCQC "
echo "========================"
echo ""
./fteqcc-cli-mac -srcfile ../progs/fte-client.src
echo ""
echo "========================"
echo " compiling FTE SSQC "
echo "========================"
echo ""
./fteqcc-cli-mac -srcfile ../progs/fte-server.src
echo ""
echo "========================"
echo " compiling STANDARD QC "
echo "========================"
echo ""
./fteqcc-cli-mac -O2 -srcfile ../progs/standard.src