afegit resources.pack y prefixe a les rutes de recursos

This commit is contained in:
2025-12-08 21:48:52 +01:00
parent 4b7cbd88bb
commit a41e696b69
21 changed files with 1066 additions and 36 deletions

View File

@@ -58,6 +58,20 @@ else
UNAME_S := $(shell uname -s)
endif
# ==============================================================================
# PACKING TOOL
# ==============================================================================
PACK_TOOL := tools/pack_resources/pack_resources
.PHONY: pack_tool resources.pack
pack_tool:
@$(MAKE) -C tools/pack_resources
resources.pack: pack_tool
@echo "Creating resources.pack..."
@./$(PACK_TOOL) data resources.pack
# ==============================================================================
# TARGETS
# ==============================================================================
@@ -87,7 +101,7 @@ debug:
# macOS Release (Apple Silicon)
.PHONY: macos_release
macos_release:
macos_release: pack_tool resources.pack
@echo "Creating macOS release - Version: $(VERSION)"
# Check/install create-dmg
@@ -104,8 +118,8 @@ macos_release:
@$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
@$(MKDIR) Frameworks
# Copy resources
@cp -r resources "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources/"
# Copy resources.pack to Resources
@cp resources.pack "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources/"
@ditto release/frameworks/SDL3.xcframework/macos-arm64_x86_64/SDL3.framework "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks/SDL3.framework"
@ditto release/frameworks/SDL3.xcframework/macos-arm64_x86_64/SDL3.framework Frameworks/SDL3.framework
@@ -313,6 +327,8 @@ else
@$(RMFILE) $(TARGET_FILE) $(TARGET_FILE)_debug
@$(RMDIR) build $(RELEASE_FOLDER)
@$(RMFILE) *.dmg *.zip *.tar.gz 2>/dev/null || true
@$(RMFILE) resources.pack 2>/dev/null || true
@$(MAKE) -C tools/pack_resources clean 2>/dev/null || true
endif
@echo "Clean complete"