Skip to content

Support macOS 12 (both Intel CPU and Apple Silicon)#15

Merged
78 merged 18 commits into
mainfrom
intel
Mar 12, 2026
Merged

Support macOS 12 (both Intel CPU and Apple Silicon)#15
78 merged 18 commits into
mainfrom
intel

Conversation

@78
Copy link
Copy Markdown
Owner

@78 78 commented Mar 12, 2026

This pull request introduces significant improvements to TenBox's macOS build and packaging process, focusing on universal binary (arm64 + x86_64) support, streamlined resource handling, and enhanced documentation. The changes modernize the build pipeline, automate universal app creation, and clarify user-facing documentation.

macOS Universal Binary Build and Packaging:

  • scripts/build-macos.sh:

    • Overhauled to build both arm64 and x86_64 binaries, merging them into a universal app using lipo. The script now pre-generates resources (icons, Metal shaders), builds each architecture in isolation, and assembles a single universal .app and .zip for Sparkle updates. Codesigning and Sparkle integration are improved for the universal binary. [1] [2] [3]
    • Updated comments and output to reflect universal binary support and clarify build steps. [1] [2]
  • scripts/make-dmg.sh:

    • Refactored to detect and package the universal app by default, with support for custom app/output paths. Now always presents the DMG as "TenBox.app" regardless of build naming, and automates codesigning and notarization for the universal binary. [1] [2] [3] [4] [5]

Build System and Entitlements:

  • CMakeLists.txt:

    • Sets CMAKE_OSX_DEPLOYMENT_TARGET to 12.0 and ensures correct processor detection for cross-compiling on macOS. Adds -fcommon to non-MSVC builds for compatibility. [1] [2]
  • runtime.entitlements:

    • Adds a new entitlements file granting the Hypervisor entitlement for macOS.

Documentation and Versioning:

  • README.md:

    • Updates the project description to emphasize TenBox's secure AI agent isolation, improving clarity for new users.
  • VERSION:

    • Bumps the version from 0.4.1 to 0.4.2.

These changes collectively modernize the macOS build pipeline, automate universal binary creation, and clarify both internal and external documentation for developers and users.

Xiaoxia and others added 18 commits March 12, 2026 10:06
- Updated the macOS minimum version requirement to 12.0 in Package.swift and Info.plist.
- Simplified the configuration logic in VirtioInputDevice to improve clarity and maintainability.
- Introduced new binding methods in AppState for better tab management in the UI.
- Refactored ContentView to utilize a more concise approach for displaying VM details and actions.
- Enhanced CreateVmDialog and EditVmDialog with improved layout and form handling for better user experience.
- Added support for macOS in the i8254 PIT implementation, including timer management using dispatch queues.
- Updated ACPI power management to measure TSC frequency on both Windows and macOS platforms.
- Improved CMOS RTC register reading with platform-specific handling for time conversion.
- Refactored VM creation logic to accommodate macOS-specific requirements for vCPU management.
- Enhanced error handling in the VM startup process to provide user feedback on failures.
- Introduced Local APIC support for interrupt handling and timer management, enabling better CPU coordination.
- Updated the i8254 PIT implementation to utilize dispatch queues for timer operations on macOS.
- Enhanced CMake configuration to conditionally link libraries based on the target platform.
- Added MMIO address checking in the address space management for improved device interaction.
- Refactored VM creation logic to accommodate new LAPIC features and ensure compatibility across architectures.
- Revised README to emphasize AI agent functionality and privacy features.
- Updated English and Chinese localization files to reflect new descriptions and feature titles, enhancing clarity on security and usability aspects.
- Added a new security feature icon in the FeaturesSection component for better visual representation.
- Bumped version numbers for OpenClaw and OpenClaw ARM64 to 2026.3.11.
- Updated download URLs, SHA256 hashes, and file sizes for the new image versions.
- Revised updated_at dates to reflect the latest changes.
- Implemented TCP and UDP packet routing to the host's loopback address when the destination is the gateway IP.
- Added logic to create and manage NAT entries for gateway-local traffic, improving packet handling efficiency.
- Updated the ReverseRewrite function to conditionally rewrite source IP based on gateway-local status.
- Enhanced the NetBackend class to support new NAT entry attributes for better traffic management.
…king

- Updated include paths for AArch64 hypervisor files to reflect new directory structure.
- Enhanced vCPU thread function to conditionally set the current CPU for macOS x86_64.
- Added exit statistics tracking in HvfVCpu, enabling detailed monitoring of vCPU exit reasons and actions.
- Implemented logic to enable exit statistics for AArch64 hypervisors during VM creation.
- Improved handling of virtual timer interrupts and exceptions with additional logging for better debugging.
- Updated conditional compilation directives to include Windows support alongside macOS x86_64 for VM architecture.
- Adjusted include paths to ensure proper machine model creation across different platforms.
- Enhanced vCPU thread function to set the current CPU for both Windows and macOS x86_64 environments.
- Changed default NAT setting in VmSpec to true for improved network functionality.
- Introduced debug_mode flag in VmSpec for enhanced debugging capabilities.
- Updated CMakeLists.txt to reflect new disk image source paths, improving organization.
- Refactored ACPI table building to include APIC IDs for better CPU management.
- Implemented disk image management with asynchronous I/O operations for improved performance.
- Added support for qcow2 and raw disk image formats, enhancing flexibility in disk handling.
- Changed the debug mode label in English and Chinese localization files to "Linux kernel debug log" for clarity.
- Enabled the debug input field in the VM edit dialog when the VM is not running.
- Removed debug-related labels from the info tab layout and updated the detail rows count accordingly.
- Updated CoPaw and CoPaw ARM64 versions to 0.0.7, including new download URLs, SHA256 hashes, and file sizes.
- Revised updated_at dates to reflect the latest changes.
- Bumped TenBox version to 0.4.2 with updated release notes and download information.
- Changed the exit statistics setting from true to false in the CreateHypervisor function to prevent unnecessary tracking during VM initialization.
- Changed the download URL and SHA256 hash for TenBox version 0.4.2a in the version.json file to reflect the latest release information.
…nchronization

- Modified the default command line for AArch64 VMs to include a quiet mode when not in debug mode.
- Removed the cmdline property from VmInfo and related classes to streamline VM configuration.
- Enhanced the boot process synchronization by ensuring vCPU 0 sets its own boot registers on its thread, improving compatibility with HVF requirements.
- Updated comments for clarity regarding the boot process and vCPU setup.
- Added .id(tag) to both cached and online image rows in the SelectImagePage to ensure unique identification for better state management.
…chitecture support

- Set minimum macOS deployment target to 12.0 in CMakeLists.txt.
- Modified build-macos.sh to support building for both arm64 and x86_64 architectures in a single run, including pre-compilation of Metal shaders and AppIcon generation.
- Updated Info.plist to version 0.4.2.
- Added dependency for lwipcore in tenbox_core CMake configuration on Apple platforms.
…ary support

- Enhanced .gitignore to exclude build artifacts.
- Modified CMakeLists.txt to set the system processor for cross-compilation on macOS.
- Updated build-macos.sh to compile a universal binary for both arm64 and x86_64 architectures, including improved error handling and resource management.
- Adjusted make-dmg.sh to support auto-detection of the universal app and added notarization steps.
- Updated appcast.xml and version.json for the new version 0.4.2 release, reflecting changes in release notes and download URLs.
@78 78 merged commit 736c656 into main Mar 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant