The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
feat(windows): a "Concat (safe graphics)" Start menu entry, concat --software, for a window drawn as coloured squares (#389, #242, #449)
Jareer64e9dcdf28f4
diff --git a/assets/windows/concat.iss b/assets/windows/concat.issindex 95a4d379..7df73081 100644--- a/assets/windows/concat.iss+++ b/assets/windows/concat.iss@@ -109,6 +109,9 @@ Source: "..\icons\concat.ico"; DestDir: "{app}"; Flags: ignoreversion[Icons]Name: "{autoprograms}\Concat"; Filename: "{app}\concat.exe"; IconFilename: "{app}\concat.ico"+; The way in when a graphics driver draws the window as coloured squares:+; it turns off Settings > General > Draw on the GPU, which that window hides.+Name: "{autoprograms}\Concat (safe graphics)"; Filename: "{app}\concat.exe"; Parameters: "--software"; IconFilename: "{app}\concat.ico"Name: "{autodesktop}\Concat"; Filename: "{app}\concat.exe"; IconFilename: "{app}\concat.ico"; Tasks: desktopicon[Run]diff --git a/assets/windows/concat.wxs b/assets/windows/concat.wxsindex 510cb688..373d62b0 100644--- a/assets/windows/concat.wxs+++ b/assets/windows/concat.wxs@@ -55,6 +55,16 @@Target="[INSTALLFOLDER]concat.exe"WorkingDirectory="INSTALLFOLDER"Icon="concat.ico" />+ <!-- The way in when a graphics driver draws the window as coloured+ squares: it turns off Settings > General > Draw on the GPU,+ which that window hides. -->+ <Shortcut Id="SafeGraphicsShortcut"+ Name="Concat (safe graphics)"+ Description="Concat, drawn in software"+ Target="[INSTALLFOLDER]concat.exe"+ Arguments="--software"+ WorkingDirectory="INSTALLFOLDER"+ Icon="concat.ico" /><RemoveFolder Id="RemoveShortcutFolder" On="uninstall" /><RegistryValue Root="HKCU" Key="Software\Concat" Name="StartMenu" Type="integer" Value="1" KeyPath="yes" /></Component>diff --git a/src/crates/concat/src/launch.rs b/src/crates/concat/src/launch.rsindex a2ee7f16..78487b87 100644--- a/src/crates/concat/src/launch.rs+++ b/src/crates/concat/src/launch.rs@@ -6,13 +6,18 @@use std::ffi::OsString;use std::path::PathBuf;-const USAGE: &str = "usage: concat [--project <PROJECT_DIRECTORY> | --mcp [auto|window|headless] | --version | --smoke | --whisper-cpu]";+const USAGE: &str = "usage: concat [--project <PROJECT_DIRECTORY> | --software | --mcp [auto|window|headless] | --version | --smoke | --whisper-cpu]";/// What one run of the binary was asked to do.#[derive(Debug, PartialEq, Eq)]pub enum Launch {/// The window, on the launch screen or on the project it names.Normal(Option<PathBuf>),+ /// The window on the launch screen, drawn in software from now on: what+ /// the Start menu's "Concat (software drawing)" runs, for a driver that+ /// draws the window as coloured squares, where Settings' GPU switch+ /// cannot be seen to be turned off (#389, #242, #449).+ Software,/// Serve the Concat API to an AI agent as an MCP server on standard/// input and output, with no window: what an agent's configuration/// names (docs/MCP.md). The mode, when given: through the window's@@ -47,6 +52,8 @@ pub fn parse(args: impl IntoIterator<Item = OsString>) -> Result<Launch, String>Launch::Version} else if option == "--smoke" {Launch::Smoke+ } else if option == "--software" {+ Launch::Software} else if option == "--whisper-cpu" {Launch::WhisperCpu} else if option == "--mcp" {@@ -98,6 +105,7 @@ mod tests {fn version_and_smoke_take_no_arguments() {assert_eq!(parse_strs(&["--version"]).unwrap(), Launch::Version);assert_eq!(parse_strs(&["--smoke"]).unwrap(), Launch::Smoke);+ assert_eq!(parse_strs(&["--software"]).unwrap(), Launch::Software);assert_eq!(parse_strs(&["--whisper-cpu"]).unwrap(), Launch::WhisperCpu);for args in [vec!["--version", "--smoke"],diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rsindex 3d8dfcd5..e3110f95 100644--- a/src/crates/concat/src/lib.rs+++ b/src/crates/concat/src/lib.rs@@ -2471,6 +2471,27 @@ fn safe_start() -> (Option<concat_host::jobs::Tripwire>, bool) {(Some(concat_host::jobs::Tripwire::arm(&mark)), safe)}+/// `concat --software`: Settings > General's GPU switch turned off before+/// the window opens, so this launch and every one after it draws in+/// software - the way into a window that a driver draws as coloured+/// squares, where the switch itself cannot be seen. The switch turns it+/// back on. Nothing where [`safe_start`] has no software rasteriser.+pub fn draw_in_software() {+ if !cfg!(any(windows, target_os = "linux")) {+ log::warn!("start: --software has no software rasteriser to draw on here");+ return;+ }+ let Ok(dirs) = concat_host::AppDirs::locate() else {+ return;+ };+ let mut preferences = prefs::Preferences::load(&dirs);+ if !preferences.software_gpu {+ log::warn!("start: --software; drawing in software from now on");+ preferences.software_gpu = true;+ preferences.save(&dirs);+ }+}+/// Ends the process with `code`, the log flushed first, and the threads/// still running - the GPU's, the engine's, the audio output's - not/// waited on.diff --git a/src/crates/concat/src/main.rs b/src/crates/concat/src/main.rsindex 91cb743e..3690895f 100644--- a/src/crates/concat/src/main.rs+++ b/src/crates/concat/src/main.rs@@ -66,6 +66,10 @@ fn main() -> Result<(), slint::PlatformError> {Launch::Normal(project) => {concat::run_with_project(project).inspect_err(concat::report_startup_failure)}+ Launch::Software => {+ concat::draw_in_software();+ concat::run_with_project(None).inspect_err(concat::report_startup_failure)+ }// Logged and returned, never put up in a dialog: a smoke run is a// machine's, and a modal box with nobody to press OK would hang it// rather than fail it. Returning the error exits non-zero.