diff --git a/Makefile b/Makefile index 7128eb7..6891060 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,13 @@ DIR_TOOLS := $(addsuffix /, $(DIR_ROOT)tools) # ============================================================================== # TARGET NAMES (extraídos de CMakeLists.txt) # ============================================================================== -TARGET_NAME := $(shell awk '/^project/ {gsub(/[)(]/, " "); print $$2}' CMakeLists.txt) -LONG_NAME := $(shell grep 'PROJECT_LONG_NAME' CMakeLists.txt | sed 's/.*"\(.*\)".*/\1/') +ifeq ($(OS),Windows_NT) + TARGET_NAME := $(shell powershell -Command "$$line = Get-Content CMakeLists.txt | Where-Object {$$_ -match '^project'}; if ($$line -match 'project\s*\x28(\w+)') { $$matches[1] }") + LONG_NAME := $(shell powershell -Command "$$line = Get-Content CMakeLists.txt | Where-Object {$$_ -match 'PROJECT_LONG_NAME'}; if ($$line -match '\"(.+)\"') { $$matches[1] }") +else + TARGET_NAME := $(shell awk '/^project/ {gsub(/[)(]/, " "); print $$2}' CMakeLists.txt) + LONG_NAME := $(shell grep 'PROJECT_LONG_NAME' CMakeLists.txt | sed 's/.*"\(.*\)".*/\1/') +endif TARGET_FILE := $(DIR_BIN)$(TARGET_NAME) APP_NAME := $(LONG_NAME) RELEASE_FOLDER := $(TARGET_NAME)_release @@ -180,7 +185,8 @@ windows: windows_debug: @echo off @echo Compilando version debug para Windows: "$(WIN_TARGET_FILE)_debug.exe" - g++ $(ALL_SOURCES) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(WIN_TARGET_FILE)_debug.exe" + windres release/$(TARGET_NAME).rc -O coff -o $(RESOURCE_FILE) + g++ $(ALL_SOURCES) $(RESOURCE_FILE) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(WIN_TARGET_FILE)_debug.exe" windows_release: @$(MAKE) pack_tool @@ -203,7 +209,7 @@ windows_release: powershell Copy-Item "LICENSE" -Destination "$(RELEASE_FOLDER)" powershell Copy-Item "README.md" -Destination "$(RELEASE_FOLDER)" powershell Copy-Item "gamecontrollerdb.txt" -Destination "$(RELEASE_FOLDER)" - powershell Copy-Item "release\*.dll" -Destination "$(RELEASE_FOLDER)" + powershell Copy-Item "release\dll\*.dll" -Destination "$(RELEASE_FOLDER)" # Compila (con icono) windres release/$(TARGET_NAME).rc -O coff -o $(RESOURCE_FILE) diff --git a/release/SDL3.dll b/release/dll/SDL3.dll similarity index 100% rename from release/SDL3.dll rename to release/dll/SDL3.dll diff --git a/release/dll/libwinpthread-1.dll b/release/dll/libwinpthread-1.dll new file mode 100644 index 0000000..500de9d Binary files /dev/null and b/release/dll/libwinpthread-1.dll differ diff --git a/source/project.h b/source/project.h index df3edfb..e62b036 100644 --- a/source/project.h +++ b/source/project.h @@ -5,5 +5,5 @@ constexpr const char* NAME = "pollo"; constexpr const char* LONG_NAME = "Los pollos hermanos"; constexpr const char* VERSION = "0.1"; constexpr const char* COPYRIGHT = "@2025 JailDesigner"; -constexpr const char* GIT_HASH = "cb26e71"; +constexpr const char* GIT_HASH = "ea30c24"; } // namespace Project