7.1 KiB
4DSTAR Bundle Manager .pkg Installer Guide
Overview
The 4DSTAR Bundle Manager now includes a professional macOS .pkg installer that provides a seamless installation experience with automatic file association setup and dependency guidance.
What's Included
📦 Professional Installer Package
- Native macOS
.pkginstaller format - Automatic Launch Services refresh
- File association setup
- Custom icon registration
- Dependency information dialogs
🔧 Automatic Post-Install Setup
- Launch Services database refresh
- File association registration
- Icon cache clearing
- Finder restart for immediate functionality
📋 User Guidance
- Welcome dialog explaining system requirements
- Clear distinction between basic and advanced usage
- Optional dependency installation instructions
- Conclusion dialog with next steps
Installation Experience
1. Welcome Screen
Users see a comprehensive welcome dialog that explains:
- Basic Usage: No dependencies required for bundle management
- Advanced Usage: Docker and Meson needed for plugin building
- System Requirements: macOS 10.12+ minimum
- What's Included: App, file associations, custom icons
2. Standard macOS Installation
- License agreement (if configured)
- Installation destination (defaults to /Applications)
- Administrator password prompt
- Installation progress
3. Automatic Post-Install
The installer automatically:
- Refreshes Launch Services database
- Registers file associations for .fbundle and .opat files
- Clears icon caches
- Restarts Finder
- Logs all operations to
/tmp/4dstar-postinstall.log
4. Conclusion Screen
Users see a success dialog with:
- Installation confirmation
- Getting started instructions
- Optional dependency installation commands
- Troubleshooting information
File Associations
Supported File Types
.fbundle: 4DSTAR Plugin Bundle Files.opat: OPAT Data Files
What Works After Installation
- ✅ Double-click files to open in 4DSTAR Bundle Manager
- ✅ Right-click → "Open with 4DSTAR Bundle Manager"
- ✅ Custom file icons in Finder
- ✅ Proper file type descriptions
- ✅ Immediate functionality (no restart required)
Dependencies
Required (Always)
- macOS 10.12 or later
- No additional dependencies for basic bundle management
Optional (Advanced Features)
- Docker Desktop: For cross-platform plugin builds
- Meson Build System: For native plugin compilation
- Xcode Command Line Tools: For C++ compilation
Installation Commands (Optional)
# Install Xcode Command Line Tools
xcode-select --install
# Install Meson via Homebrew
brew install meson
# Download Docker Desktop
# Visit: https://docker.com/products/docker-desktop
Build Configuration
Package.json Configuration
{
"build": {
"mac": {
"target": [
{ "target": "dmg", "arch": ["x64", "arm64"] },
{ "target": "pkg", "arch": ["x64", "arm64"] },
{ "target": "zip", "arch": ["x64", "arm64"] }
]
},
"pkg": {
"scripts": "installer-scripts",
"welcome": "installer-resources/welcome.html",
"conclusion": "installer-resources/conclusion.html",
"installLocation": "/Applications",
"mustClose": ["com.fourdst.bundlemanager"]
}
}
}
File Structure
electron/
├── installer-scripts/
│ └── postinstall # Post-install script
├── installer-resources/
│ ├── welcome.html # Welcome dialog
│ └── conclusion.html # Conclusion dialog
├── icons/
│ ├── app-icon.icns # Main app icon
│ ├── fbundle-icon.icns # .fbundle file icon
│ └── opat-icon.icns # .opat file icon
└── package.json # Build configuration
Building the Installer
Generate All Installers
npm run build
Generate Only .pkg
npx electron-builder --mac pkg
Output Files
dist/4DSTAR Bundle Manager-1.0.0.pkg(x64)dist/4DSTAR Bundle Manager-1.0.0-arm64.pkg(ARM64)- Plus traditional .dmg and .zip files
Post-Install Script Details
What It Does
#!/bin/bash
# Reset Launch Services database
lsregister -kill -r -domain local -domain system -domain user
# Register the app bundle
lsregister -f "/Applications/4DSTAR Bundle Manager.app"
# Clear icon caches
rm -rf ~/Library/Caches/com.apple.iconservices.store
rm -rf /Library/Caches/com.apple.iconservices.store
# Restart Finder
killall Finder
Logging
All operations are logged to /tmp/4dstar-postinstall.log for troubleshooting.
Troubleshooting
If File Associations Don't Work
- Check post-install log:
cat /tmp/4dstar-postinstall.log - Manually refresh:
npm run refresh-icons - Right-click file → Get Info → Change default app
If Icons Don't Appear
- Wait 2-3 minutes for macOS to update
- Log out and back in
- Restart the Mac
- Check icon cache clearing in post-install log
If Installation Fails
- Ensure you have administrator privileges
- Close any running instances of the app
- Check available disk space (>200MB required)
- Try installing from a different location
Developer Notes
Testing the Installer
- Build the .pkg installer
- Test on a clean macOS system or VM
- Verify file associations work immediately
- Check that icons appear in Finder
- Test with both .fbundle and .opat files
Customizing Dialogs
- Edit
installer-resources/welcome.htmlfor welcome content - Edit
installer-resources/conclusion.htmlfor conclusion content - HTML/CSS styling is supported
- Keep content concise and user-friendly
Modifying Post-Install Script
- Edit
installer-scripts/postinstall - Ensure script remains executable:
chmod +x postinstall - Test thoroughly on different macOS versions
- Add logging for all operations
Distribution
Recommended Distribution Method
- Primary:
.pkginstaller for best user experience - Alternative:
.dmgfor users who prefer disk images - Developer:
.zipfor automated deployment
Code Signing (Production)
For production distribution:
- Obtain Apple Developer ID certificate
- Configure code signing in package.json
- Notarize the installer with Apple
- Test on systems with Gatekeeper enabled
User Support
Common User Questions
Q: Do I need Docker to use the app? A: No, Docker is only needed for building plugins. Basic bundle management works without any additional software.
Q: Why do I need administrator privileges? A: The installer needs to install the app to /Applications and register file associations system-wide.
Q: Can I install to a different location? A: The .pkg installer installs to /Applications by default. Use the .dmg version for custom locations.
Q: Will this work on older Macs? A: Yes, the app supports macOS 10.12 and later on both Intel and Apple Silicon Macs.
This comprehensive installer solution provides a professional, user-friendly installation experience that handles all technical setup automatically while clearly communicating optional dependencies to users.