diff --git a/Makefile b/Makefile index e00d09f..861948a 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,8 @@ endif # Nombres para los ficheros de lanzamiento WINDOWS_RELEASE := $(TARGET_NAME)-$(VERSION)-win32-x64.zip -MACOS_INTEL_RELEASE := $(TARGET_FILE)-$(VERSION)-macos-intel.dmg -MACOS_APPLE_SILICON_RELEASE := $(TARGET_FILE)-$(VERSION)-macos-apple-silicon.dmg +MACOS_INTEL_RELEASE := $(TARGET_NAME)-$(VERSION)-macos-intel.dmg +MACOS_APPLE_SILICON_RELEASE := $(TARGET_NAME)-$(VERSION)-macos-apple-silicon.dmg LINUX_RELEASE := $(TARGET_FILE)-$(VERSION)-linux.tar.gz RASPI_RELEASE := $(TARGET_FILE)-$(VERSION)-raspberry.tar.gz @@ -194,6 +194,12 @@ macos_release: force_resource_pack $(RMFILE) "$(MACOS_INTEL_RELEASE)" $(RMFILE) "$(MACOS_APPLE_SILICON_RELEASE)" +# Limpia archivos temporales de create-dmg y desmonta volúmenes + @echo "Limpiando archivos temporales y volúmenes montados..." + @rm -f rw.*.dmg 2>/dev/null || true + @hdiutil detach "/Volumes/$(APP_NAME)" 2>/dev/null || true + @hdiutil detach "/Volumes/ViBe3 Physics" 2>/dev/null || true + # Crea la carpeta temporal para hacer el trabajo y las carpetas obligatorias para crear una app de macos $(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks" $(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS" @@ -211,8 +217,8 @@ macos_release: force_resource_pack cp LICENSE "$(RELEASE_FOLDER)" cp README.md "$(RELEASE_FOLDER)" -# Crea enlaces - ln -s /Applications "$(RELEASE_FOLDER)"/Applications +# NOTA: create-dmg crea automáticamente el enlace a /Applications con --app-drop-link +# No es necesario crearlo manualmente aquí # Compila la versión para procesadores Intel ifdef ENABLE_MACOS_X86_64 @@ -223,7 +229,7 @@ ifdef ENABLE_MACOS_X86_64 # Empaqueta el .dmg de la versión Intel con create-dmg @echo "Creando DMG Intel con iconos de 96x96..." - create-dmg \ + @create-dmg \ --volname "$(APP_NAME)" \ --window-pos 200 120 \ --window-size 720 300 \ @@ -235,8 +241,14 @@ ifdef ENABLE_MACOS_X86_64 --app-drop-link 115 102 \ --hide-extension "$(APP_NAME).app" \ "$(MACOS_INTEL_RELEASE)" \ - "$(RELEASE_FOLDER)" || true - @echo "Release Intel creado: $(MACOS_INTEL_RELEASE)" + "$(RELEASE_FOLDER)" + @if [ -f "$(MACOS_INTEL_RELEASE)" ]; then \ + echo "✓ Release Intel creado exitosamente: $(MACOS_INTEL_RELEASE)"; \ + else \ + echo "✗ Error: No se pudo crear el DMG Intel"; \ + exit 1; \ + fi + @rm -f rw.*.dmg 2>/dev/null || true endif # Compila la versión para procesadores Apple Silicon @@ -247,7 +259,7 @@ endif # Empaqueta el .dmg de la versión Apple Silicon con create-dmg @echo "Creando DMG Apple Silicon con iconos de 96x96..." - create-dmg \ + @create-dmg \ --volname "$(APP_NAME)" \ --window-pos 200 120 \ --window-size 720 300 \ @@ -259,8 +271,14 @@ endif --app-drop-link 115 102 \ --hide-extension "$(APP_NAME).app" \ "$(MACOS_APPLE_SILICON_RELEASE)" \ - "$(RELEASE_FOLDER)" || true - @echo "Release Apple Silicon creado: $(MACOS_APPLE_SILICON_RELEASE)" + "$(RELEASE_FOLDER)" + @if [ -f "$(MACOS_APPLE_SILICON_RELEASE)" ]; then \ + echo "✓ Release Apple Silicon creado exitosamente: $(MACOS_APPLE_SILICON_RELEASE)"; \ + else \ + echo "✗ Error: No se pudo crear el DMG Apple Silicon"; \ + exit 1; \ + fi + @rm -f rw.*.dmg 2>/dev/null || true # Elimina las carpetas temporales $(RMDIR) Frameworks