Run interactive setup wizard for compiler paths. Args: config_manager: Configuration manager instance Returns: True if setup completed, False if cancelled
(config_manager: ConfigManager)
| 17 | |
| 18 | |
| 19 | def run_setup_wizard(config_manager: ConfigManager) -> bool: |
| 20 | """ |
| 21 | Run interactive setup wizard for compiler paths. |
| 22 | |
| 23 | Args: |
| 24 | config_manager: Configuration manager instance |
| 25 | |
| 26 | Returns: |
| 27 | True if setup completed, False if cancelled |
| 28 | """ |
| 29 | console.clear() |
| 30 | console.print("\n[nvidia]🔧 COMPILER SETUP WIZARD[/nvidia]\n") |
| 31 | console.print("[dim]Configure compiler paths for CUDA development[/dim]\n") |
| 32 | |
| 33 | # Auto-detect all compilers |
| 34 | console.print("[nvidia]▸[/nvidia] Auto-detecting compilers...\n") |
| 35 | detector = ToolchainDetector() |
| 36 | tools = detector.get_all_tools() |
| 37 | |
| 38 | # Show detection results |
| 39 | _show_detection_results(tools) |
| 40 | |
| 41 | # Ask if user wants to configure paths |
| 42 | console.print() |
| 43 | choice = Prompt.ask( |
| 44 | "[nvidia]Configure compiler paths?[/nvidia]", |
| 45 | choices=["yes", "no", "cancel"], |
| 46 | default="yes" |
| 47 | ) |
| 48 | |
| 49 | if choice == "cancel": |
| 50 | show_warning("Setup cancelled") |
| 51 | return False |
| 52 | |
| 53 | if choice == "no": |
| 54 | show_success("Using auto-detected paths") |
| 55 | return True |
| 56 | |
| 57 | # Interactive path configuration |
| 58 | console.print("\n[nvidia]CONFIGURE PATHS[/nvidia]") |
| 59 | console.print("[dim]Press Enter to use auto-detected path, or enter custom path[/dim]\n") |
| 60 | |
| 61 | paths = {} |
| 62 | |
| 63 | # NVCC |
| 64 | paths['nvcc'] = _configure_path( |
| 65 | "NVCC (CUDA Compiler)", |
| 66 | tools['nvcc'], |
| 67 | "nvcc.exe" if detector.platform == "Windows" else "nvcc" |
| 68 | ) |
| 69 | |
| 70 | # C++ Compiler |
| 71 | paths['cl'] = _configure_path( |
| 72 | "C++ Compiler (cl.exe/g++)", |
| 73 | tools['cpp_compiler'], |
| 74 | "cl.exe" if detector.platform == "Windows" else "g++" |
| 75 | ) |
| 76 |
no test coverage detected