Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script Runner — Tauri Desktop App A cross-platform desktop tool to register scripts (.vbs on Windows, plus .ps1, .bat, .py, .sh, .js), configure typed arguments (string / number / boolean / file / folder), mark one argument as the log file, then run and livestream both the process output and the log file in real time.

Stack: Tauri 2 (Rust) + React 18 + Vite 6. Type: Bricolage Grotesque + JetBrains Mono. Palette: sage + off-white.

  1. Prerequisites — install once, with verification For each tool: check first → install if missing → verify. Run everything below in PowerShell (Win + R → powershell → Enter).

Quick lane (Windows, winget one-shot). If you trust the defaults:

winget install OpenJS.NodeJS.LTS winget install Rustlang.Rustup winget install Microsoft.VisualStudio.2022.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows11SDK.22621" winget install Microsoft.EdgeWebView2Runtime

then in a NEW PowerShell window:

npm install -g yarn Reboot once after the Build Tools install. Skip to §2 if all four checks below pass.

1.1 Node.js 18+ and Yarn Check

node -v # expect v18.x or higher yarn -v # expect 1.22.x or higher 'node' is not recognized → not installed v16.x or lower → upgrade 'yarn' is not recognized → install yarn separately Install Node

winget: winget install OpenJS.NodeJS.LTS or download the LTS .msi from https://nodejs.org and run it with defaults Install Yarn (after Node works)

npm install -g yarn Verify (in a new PowerShell window so PATH refreshes)

node -v ; yarn -v 1.2 Rust (stable toolchain + Cargo) Check

rustc --version cargo --version 'rustc' is not recognized → not installed.

Install

winget: winget install Rustlang.Rustup or download rustup-init.exe from https://www.rust-lang.org/tools/install → run → press 1 for the default install Verify (new PowerShell)

rustc --version cargo --version rustup show # host should be x86_64-pc-windows-msvc 1.3 Microsoft C++ Build Tools (the linker Rust needs) Check — the surest test is compiling a throwaway crate:

cargo new --bin _linkertest ; cd _linkertest ; cargo build ; cd .. ; Remove-Item -Recurse -Force _linkertest Builds cleanly → ✅ Error mentions link.exe or Microsoft Visual C++ Build Tools → install You can also detect existing installs:

Get-ChildItem "C:\Program Files (x86)\Microsoft Visual Studio*\BuildTools\VC\Tools\MSVC" -ErrorAction SilentlyContinue Get-ChildItem "C:\Program Files\Microsoft Visual Studio*\BuildTools\VC\Tools\MSVC" -ErrorAction SilentlyContinue Any directory in the output = installed.

Install

winget (silent): winget install Microsoft.VisualStudio.2022.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows11SDK.22621" or download from https://visualstudio.microsoft.com/visual-cpp-build-tools/ → tick Desktop development with C++ → ensure MSVC v143 x64/x86 build tools and a Windows SDK are selected → install (~3–6 GB) Reboot afterwards so PATH and registry updates settle in Verify — repeat the cargo new _linkertest test above. It should now succeed.

1.4 WebView2 Runtime (renders the UI on Windows) Check

$reg = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" (Get-ItemProperty $reg -Name pv -ErrorAction SilentlyContinue).pv A version string like 121.0.2277.106 → ✅. Empty/error → install it. Windows 11 ships with it. Most Windows 10 machines also have it; older ones may not.

Install

winget: winget install Microsoft.EdgeWebView2Runtime or the Evergreen Standalone Installer (x64) from https://developer.microsoft.com/microsoft-edge/webview2/ Verify — re-run the registry check; a version should appear.

1.5 Final end-to-end check node -v ; yarn -v ; rustc --version ; cargo --version All four print versions → you're ready for §2.

macOS: xcode-select --install, then brew install node yarn rustup-init && rustup-init -y. Linux: install Node 18, Yarn, Rust, plus libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev. Full list at https://v2.tauri.app/start/prerequisites/.

  1. Install JS dependencies cd desktop yarn install

  2. Run in development (hot reload) yarn tauri dev The first run downloads Rust crates and compiles the backend (3–8 minutes). Subsequent runs are fast. Edits to React hot-reload; edits to Rust trigger an automatic rebuild.

  3. Build the Windows .exe / .msi Build on Windows itself. Cross-compiling Tauri to Windows from macOS/Linux is supported but finicky — easiest is to run the next command on a Windows machine, a Windows VM, or via GitHub Actions.

yarn tauri build Outputs (under desktop/src-tauri/target/release/):

script-runner.exe — the standalone executable bundle/msi/Script Runner_0.1.0_x64_en-US.msi — MSI installer bundle/nsis/Script Runner_0.1.0_x64-setup.exe — NSIS installer Pick whichever you want to distribute. The portable .exe runs on any modern Windows machine (Win 10 1803+) with WebView2.

Build for macOS / Linux Same command, run on the target OS:

macOS → .dmg + .app under bundle/dmg/ and bundle/macos/ Linux → .deb, .rpm, .AppImage under bundle/ Note: .vbs only executes on Windows (uses cscript.exe). .py, .sh, .js, .ps1 (via pwsh) work cross-platform.

  1. (Optional) Regenerate the app icons Icons live in src-tauri/icons/. If you want a custom icon:

yarn tauri icon ./path/to/source-1024x1024.png This produces every required size (.png, .ico, .icns).

  1. Where is config saved? Saved scripts live in config.json inside the OS app-data directory:

OS Path Windows %APPDATA%\dev.scriptrunner.app\config.json macOS ~/Library/Application Support/dev.scriptrunner.app/config.json Linux ~/.config/dev.scriptrunner.app/config.json Portable backup: just copy this file.

  1. Argument assembly rules Each argument has an optional flag and a value:

Flag style Result empty positional: value ends in = or : joined: --out=value, /log:C:\path anything else two tokens: --out value, -v 1 type=boolean true → emits flag (or "true" if no flag); false → omitted empty value argument skipped The argument marked log file (must be type file) is also tailed in real time and appears in the log stream tagged as file.

  1. Supported script types Extension Interpreter .vbs, .vbe cscript //nologo (Windows only) .ps1 powershell on Windows, pwsh elsewhere .bat, .cmd cmd /C .py python on Windows, python3 elsewhere .sh bash .js, .mjs, .cjs node anything else executed directly
  2. Troubleshooting Blank window on Windows 10 → install WebView2 Runtime. cscript: not found → VBS only runs on Windows. Use .py or .sh cross-platform. Log pane shows nothing → confirm the script actually writes to the path you marked as log file. Tailing begins from the end of file at run time, so existing content is not replayed. Long build time on first yarn tauri dev → normal; Rust compiles ~400 crates once. error: linker link.exe not found → install Microsoft C++ Build Tools.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages