From c2b27fd2a1124efddeb0ec4e13613c764582d7f6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 18 Dec 2024 15:04:34 -0500 Subject: [PATCH] Find git on Windows --- porymap.pro | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/porymap.pro b/porymap.pro index 611b6179..6e117257 100644 --- a/porymap.pro +++ b/porymap.pro @@ -20,10 +20,12 @@ QMAKE_CXXFLAGS += -std=c++17 -Wall QMAKE_TARGET_BUNDLE_PREFIX = com.pret # Get latest commit hash if we can (to display alongside version information). -GIT_PATH = $$system(which git) -!isEmpty(GIT_PATH) { - LATEST_COMMIT = $$system($$GIT_PATH rev-parse --short HEAD 2>/dev/null) +win32 { + LATEST_COMMIT = $$system(git rev-parse --short HEAD 2> nul) +} else { + LATEST_COMMIT = $$system(git rev-parse --short HEAD 2>/dev/null) } + DEFINES += PORYMAP_LATEST_COMMIT=\\\"$$LATEST_COMMIT\\\" VERSION = 5.4.1