mak3r-hub
Version:
Universal Claude Code force multiplier for website development
68 lines (54 loc) âĸ 2.51 kB
JavaScript
const { execSync } = require('child_process');
const fs = require('fs-extra');
const path = require('path');
const os = require('os');
const chalk = require('chalk');
console.log(chalk.blue('đ MAK3R-HUB Post-Installation Setup'));
async function postInstall() {
try {
// Check if running on Windows and .NET is available
const isWindows = os.platform() === 'win32';
if (isWindows) {
console.log(chalk.yellow('đĻ Checking for .NET runtime...'));
try {
// Check if dotnet is available
execSync('dotnet --version', { stdio: 'ignore' });
console.log(chalk.green('â
.NET runtime found'));
// Check if C# engine already exists
const enginePath = path.join(__dirname, '..', 'src-csharp', 'MAK3R.Core', 'bin', 'Debug', 'net9.0', 'win-x64', 'MAK3R.Core.exe');
if (!fs.existsSync(enginePath)) {
console.log(chalk.yellow('đ§ Building C# automation engine...'));
// Build the C# project
const csharpDir = path.join(__dirname, '..', 'src-csharp', 'MAK3R.Core');
if (fs.existsSync(csharpDir)) {
execSync('dotnet build', {
cwd: csharpDir,
stdio: 'inherit'
});
console.log(chalk.green('â
C# automation engine built successfully'));
} else {
console.log(chalk.yellow('â ī¸ C# source not found - engine will be built on first use'));
}
} else {
console.log(chalk.green('â
C# automation engine already available'));
}
} catch (error) {
console.log(chalk.yellow('â ī¸ .NET not found - C# automation features will be unavailable'));
console.log(chalk.gray(' Install .NET 6+ from https://dotnet.microsoft.com/download'));
}
} else {
console.log(chalk.gray('âšī¸ Non-Windows platform detected - C# automation features not available'));
}
console.log(chalk.green('â
MAK3R-HUB installation complete!'));
console.log(chalk.blue('đ¯ Run "mak3r-hub doctor" to verify installation'));
} catch (error) {
console.log(chalk.red('â Post-install setup failed:'), error.message);
console.log(chalk.yellow(' MAK3R-HUB will still work but some features may be limited'));
}
}
// Only run if this script is executed directly (not required)
if (require.main === module) {
postInstall();
}
module.exports = { postInstall };