---
name: "clrwrap"
section: "1"
platform: "linux"
package: "pnet-interpreter"
version: "0.6.12-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/clrwrap"
---

# clrwrap(1)

wrap a CLR-compatible executable

## NAME

clrwrap - wrap a CLR-compatible executable

## SYNOPSIS

**clrwrap** \[ --clr=*CLRNAME* \] *script* ...

## DESCRIPTION

**Clrwrap** is used to make an IL program Unix-friendly by placing a small wrapper script in the same directory as the IL \`.exe' file. It also makes the choice of Common Language Runtime (CLR) dynamic, so that the same installed application can be invoked by multiple CLR implementations.  The wrapper script contains something like:

```
#!/usr/bin/env clrwrap
program.exe
```

where \``program.exe`' is the name of the \`.exe' file, relative to the location of the script.  Remaining lines in the wrapper script are ignored, and are reserved for future use.  Comment lines may appear in the wrapper script, beginning with \``#`'.  Empty lines are also comment lines.

If the wrapper script does not specify a \`.exe' file, then the IL program is assumed to be \``script.exe`' where \``script`' is the name of the script.

When the **clrwrap** program runs, it searches for an appropriate CLR as follows:

- 1\.

  Look for the \`**--clr=***CLRNAME*' option on the command-line.  This option is removed from the command-line and *CLRNAME* is invoked as the CLR.

- 2\.

  Look for the `CLR_PROGRAM` environment variable.

- 3\.

  Use `/etc/alternatives/clr` if it is present (for Debian compatibility).

- 4\.

  Use the compiled-in default (normally **ilrun**).

The **clrwrap** program can also be used to launch ordinary IL binaries. For example:

```
clrwrap program.exe
```

The same sequence as above is used to detect the user's preferred CLR, and no wrapper script is required.  The **clrwrap** program automatically detects whether it is supplied a wrapper script or a real IL executable.

## OPTIONS

- **--clr=*CLRNAME***

  Specify the name of the Common Language Runtime to use to execute the program.  \[Windows only: if *CLRNAME* is \`**ms**', then use the native Microsoft CLR.\]

## AUTHOR

Written by Southern Storm Software, Pty Ltd.

http://www.southern-storm.com.au/

## SEE ALSO

[ilrun(1)](/ilrun/1.md)
