1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00

add git commit hash to mingw build as well

This commit is contained in:
FunkyFr3sh 2024-08-31 14:09:35 +02:00
parent 67e4c664f6
commit f3ba703444
4 changed files with 4 additions and 15 deletions

View File

@ -1,6 +1,8 @@
-include config.mk
TARGET = ddraw.dll
GIT_REV := $(shell git rev-parse --short @{0} || echo "UNKNOWN")
GIT_FILE := $(shell echo "#define GIT_COMMIT" $(GIT_REV) > inc/version_tmp.h)
LDFLAGS = -Wl,--enable-stdcall-fixup -s -static -shared
CFLAGS = -Iinc -O2 -march=i486 -Wall
LIBS = -lgdi32 -lwinmm -ldbghelp -lole32

View File

@ -2,7 +2,7 @@
REM
REM patch environment config
REM
set PATH=C:\w64devkit\bin
set PATH=C:\w64devkit\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw64\bin\
make clean
make
REM make DEBUG=1

6
res.rc
View File

@ -1,12 +1,6 @@
#include "inc/version.h"
#ifndef __GNUC__
#include "inc/version_tmp.h"
#endif
#ifndef GIT_COMMIT
#define GIT_COMMIT UNKNOWN
#endif
1 VERSIONINFO
FILEVERSION VERSION

View File

@ -8,15 +8,8 @@
#include "debug.h"
#include "hook.h"
#include "version.h"
#include "versionhelpers.h"
#ifndef __GNUC__
#include "version_tmp.h"
#endif
#ifndef GIT_COMMIT
#define GIT_COMMIT UNKNOWN
#endif
#include "versionhelpers.h"
double g_dbg_frame_time = 0;