Add a "-launch--options", or, if they exist, sorry i didn't found guide for use them..
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I couldn't find a guide for launch options, in my case, I want to have a portable USB with .md guide, and have a .ink shortcut to open README with my settings.
Describe the solution you'd like A clear and concise description of what you want to happen. Add, or if launch options already exist, refer to wiki, maybe?
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
For a USB stick, use the portable build (Markpad_x.y.z_x64.exe, or _arm64.exe) from the releases page. It needs no install.
There's no separate launch-options feature, but you don't need one to open a file. Markpad treats every argument as a file path:
Markpad.exe README.md
Relative paths resolve against the working directory, so in a .lnk set "Start in" to the folder that holds README.md. On a USB stick the drive letter changes between machines, which breaks a .lnk's absolute target, so a .cmd file next to the exe is more reliable:
start "" "%~dp0Markpad.exe" "%~dp0README.md"
Settings don't travel with the exe yet, even with the portable build. They're stored per user in %APPDATA%, so on another machine Markpad starts with defaults.
Notes for maintainers: what a portable mode would take
Markpad writes to the host in two places today, and both would have to move:
- Rust side:
app.path().app_config_dir()(%APPDATA%\com.alecdotdev.markpad). Nine call sites:app.rs:176,commands.rs:505/636/657/676/688/705,window_runtime.rs:91. - WebView2 user data (localStorage, cache), default
%LOCALAPPDATA%\com.alecdotdev.markpad\EBWebView. Nothing setsdata_directory, so it stays on the host even if (1) moves.
A minimal version, following how other portable apps do it:
- Trigger on a marker next to the exe (
std::env::current_exe()), not a flag, since a double-click passes no arguments. - Route every
app_config_dir()call through one helper that returns<exe dir>\datawhen the marker exists. - Call
.data_directory(<exe dir>\data\webview)on bothWebviewWindowBuilders (app.rs:73,window_runtime.rs:637). WebView2 expects all webviews in one process to share a user data folder, so missing one breaks the transfer window.
How other apps trigger it:
- VS Code: a
datafolder next toCode.exe. User data and extensions go under it. - Notepad++: a
doLocalConf.xmlnext to the exe. Config is kept in the exe's folder. - KeePass 2 (ZIP package): settings in
KeePass.config.xmlin the app folder. - Chrome/Electron:
--user-data-dir=<path>/app.setPath('userData'), set by a launcher. - PortableApps.com: a wrapper copies settings into
%APPDATA%before launch and back after exit. The app itself is unaware.