1. Plugins
  2. ToDesktop Exec

Plugins

ToDesktop Exec

Bundle and execute exec files.

Installation

Install @todesktop/client-exec in your client-side application using

        npm install @todesktop/client-exec

      

Installation of the plugin package is also necessary. Using the ToDesktop Builder interface, navigate to Plugins. Click on the Explore button for "File Exec" and install the package.

Usage

subscribe

Listen to debug, stdout, or stderr logs from your executable.

        import < subscribe > from "@todesktop/client-exec";

subscribe((message) => {
  if (message.type === "debug") {
    // todesktop process log
  } else if (message.type === "stdout") {
    // stdout from executable
  } else if (message.type === "stderr") {
    // stderr from exectuable
  }
});

      

execute

Calling execute will execute the file. Make sure to call subscribe before execution if you would like to see the execution logs.

        import < execute > from "@todesktop/client-exec";

await execute();