Skip to content

Parasol Cmd Tool

Paul Manias edited this page Dec 11, 2024 · 3 revisions

Parasol's main executable is located in the root folder of our distribution as parasol. This tool allows you to run Fluid scripts with the .fluid extension.

Run the tool with --help to see the available options and confirm that the install worked correctly. At the time of writing, this looks as follows:

This command-line program can execute Fluid scripts and PARC files developed for the Parasol framework.

   parasol [args] [script.ext] arg1 arg2=value arg3 ...

The following parameters can be used when executing script files:

 --procedure [n] The name of a procedure to execute.
 --time          Print the amount of time that it took to execute the program.

 --log-api       Activates run-time log messages at API level.
 --log-info      Activates run-time log messages at INFO level.
 --log-error     Activates run-time log messages at ERROR level.

Example scripts are provided in the examples folder of this distribution. We recommend starting with the widget example as follows, where install-path and source-path are replaced appropriately:

[install-path]/parasol --log-error [source-path]/examples/widgets.fluid

Tip

Try running a second time with --log-api to observe run-time log output while toying with the example. Try a few of the other examples to get a feel for what you can achieve, and load them into a text editor to see how they were created.

Auto Execution

If parasol is run without command-line arguments, it will check for the presence of a package.zip file in its folder, mount it as a filesystem named package: and then attempt to execute package:main.fluid. This behaviour makes it possible for you to distribute your scripts as portable projects with minimal effort. The parasol executable should be renamed to the name of your project so that your end users will associate the executable with your application.