build_app() with unified input validation, R runtime
version tolerance, and automatic exclusion of build-time header packages
(LinkingTo) to avoid missing dependency errors for packages
like dplyr and cpp11.rdesk_open_window() with robust processx
pipes, READY handshakes, and native process lifetime
controls.rdesk_auto_update() with installer invocation, safe
temporary staging, and version comparisons.%LOCALAPPDATA%, %APPDATA%) with
fallback tempdir validation for restricted permission environments.R_BUNDLE_ROOT, avoiding startup failures
caused by differing R -f and source() call
stacks across execution contexts.tryCatch(..., finally=) rather than calling
on.exit() outside a function.rdesk_watch()
to dynamically watch and load changes in UI assets (www/)
and R scripts (R/) during development without restarting
the app.async_progress() wrapper enabling background tasks to
securely communicate progress updates back to the WebView2 loading
screen.rdesk_storage() key-value managers (app$prefs,
app$recent, app$shared) automatically mapping
settings to %APPDATA%, %LOCALAPPDATA%, and
%PROGRAMDATA% with permissions checks and temp
fallbacks.build_app() now strips development artifacts from the
bundled app/ directory before packaging. Previously, if the
developer’s workspace contained an renv setup, the bundled
.Rprofile would source renv/activate.R on
startup, hijacking .libPaths() away from the bundle’s
packages/library/ and causing an immediate Error
Code 1 crash. The following paths are now permanently excluded
from the bundle: .Rprofile, .Renviron,
renv/, renv.lock, .git/,
.gitignore, .gitattributes,
.Rproj.user/, .Rhistory, .RData,
tests/, .DS_Store. A message is printed during
build listing what was excluded. Apps built without these artifacts are
unaffected.build_app() now copies the developer’s currently
running R installation as the app runtime by default
(runtime_dir = NULL). Previously it downloaded a fixed R
4.4.2 portable build which caused crashes in distributed apps when
packages had been compiled for a newer R version (e.g. 4.5.x via
renv). The version mismatch between the downloaded runtime
and the bundled packages produced a cryptic shared-library ABI error on
launch.
Added rdesk_detect_r_home() (internal) which
resolves the developer’s R installation path via R.home()
with a clear error if it is not found.
Added rdesk_copy_r_runtime() (internal) which
selectively copies bin/, library/,
etc/, modules/, and include/ from
the source R installation into the bundle staging directory.
The legacy download behaviour is preserved for CI environments or
air-gapped scenarios via runtime_dir = "download". A
warning is printed advising users to prefer the default to avoid version
mismatch.
\dontrun{} with
if(interactive()){} or \donttest{} as
appropriate. Functions that open native windows are now wrapped in
if(interactive()){}.R CMD check.tempdir().
No default paths write to the user’s home filespace.on.exit() added immediately after every
setwd() and options() call inside
build_app().installed.packages() calls with
requireNamespace() or system.file().Authors@R with cph roles: Serge Zaitsev
(webview.h), Niels Lohmann (nlohmann/json), Microsoft Corporation
(WebView2 SDK). Created inst/COPYRIGHTS.app$set_size(), app$set_position(),
app$minimize(), app$maximize(),
app$restore(), app$fullscreen(), and
app$always_on_top().app$dialog_folder(), app$message_box()
(OK/Yes/No/Cancel with icons), and app$dialog_color().app$set_tray_menu() for native right-click
interaction.app$register_hotkey() for system-wide keyboard
shortcuts.app$clipboard_read()
and app$clipboard_write().app$on_close() to intercept or cancel window exit
attempts.%LOCALAPPDATA%/RDesk.app$check_update()
to detect and link to remote application updates.renv.lock for
reproducible distribution.build_app(dry_run = TRUE) for rapid
environment validation.App.R so packaged apps no longer try to write to a null
window process handle.window.R.build_app() package bundling, temp cleanup,
empty-directory copies, and added explicit portable-R strategies via
portable_r_method and runtime_dir.