correccions en el Makefile de windows
This commit is contained in:
14
Makefile
14
Makefile
@@ -9,8 +9,13 @@ DIR_TOOLS := $(addsuffix /, $(DIR_ROOT)tools)
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# TARGET NAMES (extraídos de CMakeLists.txt)
|
# TARGET NAMES (extraídos de CMakeLists.txt)
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
TARGET_NAME := $(shell awk '/^project/ {gsub(/[)(]/, " "); print $$2}' CMakeLists.txt)
|
ifeq ($(OS),Windows_NT)
|
||||||
LONG_NAME := $(shell grep 'PROJECT_LONG_NAME' CMakeLists.txt | sed 's/.*"\(.*\)".*/\1/')
|
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)
|
TARGET_FILE := $(DIR_BIN)$(TARGET_NAME)
|
||||||
APP_NAME := $(LONG_NAME)
|
APP_NAME := $(LONG_NAME)
|
||||||
RELEASE_FOLDER := $(TARGET_NAME)_release
|
RELEASE_FOLDER := $(TARGET_NAME)_release
|
||||||
@@ -180,7 +185,8 @@ windows:
|
|||||||
windows_debug:
|
windows_debug:
|
||||||
@echo off
|
@echo off
|
||||||
@echo Compilando version debug para Windows: "$(WIN_TARGET_FILE)_debug.exe"
|
@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:
|
windows_release:
|
||||||
@$(MAKE) pack_tool
|
@$(MAKE) pack_tool
|
||||||
@@ -203,7 +209,7 @@ windows_release:
|
|||||||
powershell Copy-Item "LICENSE" -Destination "$(RELEASE_FOLDER)"
|
powershell Copy-Item "LICENSE" -Destination "$(RELEASE_FOLDER)"
|
||||||
powershell Copy-Item "README.md" -Destination "$(RELEASE_FOLDER)"
|
powershell Copy-Item "README.md" -Destination "$(RELEASE_FOLDER)"
|
||||||
powershell Copy-Item "gamecontrollerdb.txt" -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)
|
# Compila (con icono)
|
||||||
windres release/$(TARGET_NAME).rc -O coff -o $(RESOURCE_FILE)
|
windres release/$(TARGET_NAME).rc -O coff -o $(RESOURCE_FILE)
|
||||||
|
|||||||
BIN
release/dll/libwinpthread-1.dll
Normal file
BIN
release/dll/libwinpthread-1.dll
Normal file
Binary file not shown.
@@ -5,5 +5,5 @@ constexpr const char* NAME = "pollo";
|
|||||||
constexpr const char* LONG_NAME = "Los pollos hermanos";
|
constexpr const char* LONG_NAME = "Los pollos hermanos";
|
||||||
constexpr const char* VERSION = "0.1";
|
constexpr const char* VERSION = "0.1";
|
||||||
constexpr const char* COPYRIGHT = "@2025 JailDesigner";
|
constexpr const char* COPYRIGHT = "@2025 JailDesigner";
|
||||||
constexpr const char* GIT_HASH = "cb26e71";
|
constexpr const char* GIT_HASH = "ea30c24";
|
||||||
} // namespace Project
|
} // namespace Project
|
||||||
|
|||||||
Reference in New Issue
Block a user