From ea43880d59da011b23e94cdb2aee87506152a173 Mon Sep 17 00:00:00 2001 From: Sergio Date: Fri, 21 Nov 2025 09:44:48 +0100 Subject: [PATCH] =?UTF-8?q?unificat=20el=20numero=20de=20versi=C3=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 12 +++++++++--- release/Info.plist | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 18b9be0..d72fe75 100644 --- a/Makefile +++ b/Makefile @@ -30,12 +30,12 @@ PACK_SOURCES := $(DIR_TOOLS)pack_resources/pack_resources.cpp source/core/reso PACK_INCLUDES := -Isource # ============================================================================== -# VERSION (automatic based on date) +# VERSION (extracted from defines.hpp) # ============================================================================== ifeq ($(OS),Windows_NT) - VERSION := $(shell powershell -Command "Get-Date -Format 'yyyy-MM-dd'") + VERSION := v$(shell powershell -Command "(Select-String -Path 'source/utils/defines.hpp' -Pattern 'constexpr const char\* VERSION = \"(.+?)\"').Matches.Groups[1].Value") else - VERSION := $(shell date +%Y-%m-%d) + VERSION := v$(shell grep 'constexpr const char\* VERSION' source/utils/defines.hpp | sed -E 's/.*VERSION = "([^"]+)".*/\1/') endif # ============================================================================== @@ -269,6 +269,12 @@ macos_release: cp LICENSE "$(RELEASE_FOLDER)" cp README.md "$(RELEASE_FOLDER)" +# Actualiza versión en Info.plist + @echo "Actualizando Info.plist con versión $(VERSION)..." + @RAW_VERSION=$$(echo "$(VERSION)" | sed 's/^v//'); \ + sed -i '' '/CFBundleShortVersionString<\/key>/{n;s|.*|'"$$RAW_VERSION"'|;}' "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Info.plist"; \ + sed -i '' '/CFBundleVersion<\/key>/{n;s|.*|'"$$RAW_VERSION"'|;}' "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Info.plist" + # Compila la versión para procesadores Intel clang++ $(ALL_SOURCES) $(INCLUDES) -DMACOS_BUNDLE -DRELEASE_BUILD -std=$(CPP_STANDARD) -Wall -Os -framework SDL3 -F ./Frameworks -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.15 diff --git a/release/Info.plist b/release/Info.plist index 8e95406..8ae1557 100644 --- a/release/Info.plist +++ b/release/Info.plist @@ -33,7 +33,7 @@ NSHighResolutionCapable NSHumanReadableCopyright - Copyright 2025 JailDesigner + Copyright 2022 JailDesigner NSPrincipalClass NSApplication SUPublicDSAKeyFile