TUI #1
@ -5,11 +5,7 @@ use std::process::{Command, Stdio};
|
|||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
|
|
||||||
pub mod gui;
|
pub mod gui;
|
||||||
|
pub mod tui;
|
||||||
fn run_tui(root_path: std::path::PathBuf) -> Result<(), Box<dyn Error>> {
|
|
||||||
println!("Starting the TUI editor at {:?}", root_path);
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Command line interface IDE with full GUI and headless modes.
|
/// Command line interface IDE with full GUI and headless modes.
|
||||||
/// If no flags are provided the GUI editor is launched in a separate process.
|
/// If no flags are provided the GUI editor is launched in a separate process.
|
||||||
@ -46,7 +42,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
true => gui::run(root_path),
|
true => gui::run(root_path),
|
||||||
false => match args.tui {
|
false => match args.tui {
|
||||||
// Open the TUI editor if requested, otherwise use the QML GUI by default.
|
// Open the TUI editor if requested, otherwise use the QML GUI by default.
|
||||||
true => run_tui(root_path),
|
true => tui::run(root_path),
|
||||||
false => {
|
false => {
|
||||||
// Relaunch the CLIDE GUI in a separate process.
|
// Relaunch the CLIDE GUI in a separate process.
|
||||||
Command::new(std::env::current_exe()?)
|
Command::new(std::env::current_exe()?)
|
||||||
|
|||||||
6
src/tui.rs
Normal file
6
src/tui.rs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
use std::error::Error;
|
||||||
|
|
||||||
|
pub fn run(root_path: std::path::PathBuf) -> Result<(), Box<dyn Error>> {
|
||||||
|
println!("Starting the TUI editor at {:?}", root_path);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user