Help with building a "release" zip
Hi, I’m interested in making some changes to Septerra Core. I’ve forked the repo, but I’m not sure how to build it to see my changes in the game.
Could you give me a quick rundown on how to build the project to test my changes? I've read the various readmes within the repo, but it seems I'm still missing some information to get to what's in the released zip files.
Also thanks for maintaining this cool project!
Here are the required steps to create the Septerra Core executable (provided that you have all necessary programs and libraries):
- compile udis86-1.7.2 in SRW
a) go to directory
SR/SRW/udis86-1.7.2b) run./configure(or./configure --with-python=python3if you don't have python2) c) runmake - compile SRW
a) go to directory
SR/SRWb) runsconsc) that should create the fileSRW.exe, which you should copy to directorySR/SRW-games/Septerra Core/SRW - decompile the original executable
a) copy the original executable
Septerra104.exeinto directorySR/SRW-games/Septerra Core/SRWb) go to direcorySR/SRW-games/Septerra Core/SRWc) run./build-x86.shd) that should create filesSepterra.asm,seg01.inc,seg02.inc,seg03.inc,seg04.inc, which you should copy into directorySR/games/Septerra Core/SR-Septerra/x86 - compile new Septerra Core executable
a) go to directory
SR/games/Septerra Core/SR-Septerrab) runsconsc) that should create the fileSR-Septerra, which is the new Septerra Core executable
@M-HT do you have any guidance for building on macOS/arm64? I'm stumbling through these instructions and have things almost working, but not quite.
@catskull When compiling for arm64, you need following changes in the instructions:
- before running
sconsin 2b) make following change in fileSR_defs.h: change line#define OUTPUT_TYPE OUT_X86to#define OUTPUT_TYPE OUT_LLASM - in 3c) run
./build-llasm.shinstead of./build-x86.sh - in 3d) copy files to
SR/games/Septerra Core/SR-Septerra/llasminstead ofSR/games/Septerra Core/SR-Septerra/x86 - I have no experience with macOS, so you might need to adjust file
SConstructwhen runningsconsin 4b)
The bigest issue however is, that the original code is 32-bit and when recompiling it to 64-bit, it only works when the code (and all data it uses) is loaded at memory adresses 0-2GB (pointers must fit into signed 32-bit integer).
On Linux this is achieved using SR64-loader which reserves all memory adresses above 2GB, then loads the program below 2GB and runs it. This way the program and all libraries can only use memory adresses below 2GB.
I don't know if this can be done on macOS (it doesn't work on Windows) and if yes, then how. Unless you can figure this out, you won't be able to run the game in 64-bit macOS.
Thank you for the reply! I was able to get it running in a linux VM pretty well so I'll probably go that route. This is a very cool project!