diff --git a/CMakeLists.txt b/CMakeLists.txt index 448c2fea..fe0c9500 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,12 @@ execute_process(COMMAND git rev-parse --short HEAD if(NOT VERSION_HASH) set(VERSION_HASH "unknown") endif() + +# Provenance, printed by --version and at startup (port/src/main.c): a build +# keeps pointing at this repository no matter who compiles or renames it. +set(VERSION_CODENAME "larkspur") +set(ORIGIN_URL "https://github.com/jkdansereau/goldeneye-pc-port") + configure_file( "${CMAKE_SOURCE_DIR}/port/include/versioninfo.h.in" "${CMAKE_BINARY_DIR}/port/include/versioninfo.h" @ONLY) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46a76632..a15b7689 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,6 +32,24 @@ keep the port faithful to the original game. - Port-layer code is plain C11 / C++17, SDL2 + OpenGL, no extra dependencies. - Keep commits focused and describe *why*, not just *what*. +## Forks and derivative works + +Fork away — the code is MIT and the `port/` layer exists to be extended. +Rebranding, localizing and extending are all welcome, and none of them need +permission. If you carry the work forward under your own name, please keep +two things: + +- **Attribution.** A clear statement, in your README and about page, that the + project derives from this one — with a link. The engine prints its origin at + startup and in its `--version` output; keeping that intact is part of the + ask. +- **The record.** `docs/dev/` (the finding log, porting notes, per-level + status) is the engineering record behind every fix. Derivative projects are + asked to preserve or link to it rather than fork-and-forget. + +Stripping the attribution is the one thing that turns a fork into something +we no longer recognize as a descendant of this project. + ## Where to look - `docs/internals.md` — how the port is structured. diff --git a/port/include/versioninfo.h.in b/port/include/versioninfo.h.in index ea7f379b..a643387b 100644 --- a/port/include/versioninfo.h.in +++ b/port/include/versioninfo.h.in @@ -4,6 +4,8 @@ /* Generated by CMake from versioninfo.h.in — do not edit. */ #define GE007_VERSION_HASH "@VERSION_HASH@" +#define GE007_VERSION_CODENAME "@VERSION_CODENAME@" +#define GE007_ORIGIN_URL "@ORIGIN_URL@" #define GE007_TARGET_PLATFORM "@TARGET_PLATFORM@" #define GE007_ROMID "@ROMID@" #define GE007_IS_PAL @VERSION_IS_PAL@ diff --git a/port/src/main.c b/port/src/main.c index daa3ae76..e01b972e 100644 --- a/port/src/main.c +++ b/port/src/main.c @@ -54,8 +54,10 @@ static void portPrintVersion(void) printf("GoldenEye 007 PC port\n" " rom : %s\n" " platform : %s\n" - " build : %s\n", - GE007_ROMID, GE007_TARGET_PLATFORM, GE007_VERSION_HASH); + " build : %s (%s)\n" + " origin : %s\n", + GE007_ROMID, GE007_TARGET_PLATFORM, GE007_VERSION_HASH, + GE007_VERSION_CODENAME, GE007_ORIGIN_URL); } static void portPrintHelp(const char *argv0) @@ -95,7 +97,9 @@ int main(int argc, char **argv) } sysLogPrintf(LOG_INFO, "GoldenEye 007 PC port starting " - "(%s, %s)", GE007_ROMID, GE007_VERSION_HASH); + "(%s, %s %s) -- %s", + GE007_ROMID, GE007_VERSION_HASH, GE007_VERSION_CODENAME, + GE007_ORIGIN_URL); /* Crash handler first, so any failure below is debuggable. */ crashInit();