> ## Documentation Index
> Fetch the complete documentation index at: https://docs.directgvr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign a macOS launcher with codesign

> Use macOS codesign to sign your launcher, its helper apps and any custom libraries.

This page shows how to sign your macOS launcher, its helper apps and any custom libraries with Apple's `codesign` tool.

## Requirements

Compile your macOS launcher with [builder.py](https://docs.directgvr.com/release-automation/builder-script.md). It creates the launcher app with the helper apps and CEF framework in this structure:

```text theme={null}
Launcher.app/
  Contents/Frameworks/
    Launcher Helper.app
    Launcher Helper (GPU).app
    Launcher Helper (Renderer).app
    Chromium Embedded Framework.framework
```

If your launcher includes custom libraries, put them in the right folder now, for example `Launcher.app/Contents/MacOS/llama_wine`.

Note the path to the DirectGVR binaries for your Mac's architecture (ARM or x64), for example `/Users/<you>/direct/7.2.130/bin/macarm64/`. Its `bin` folder has three `.entitlements` files you use when signing.

## Sign the launcher

In Terminal, run these commands. Replace:

* `devid` with the name of your code-signing certificate.
* `directbin` with the path to the folder with the `.entitlements` files.
* Every `llama` name with your launcher's names and files.

```bash theme={null}
devid="Developer ID Application: <your company> (<team ID>)"
options="--timestamp --options runtime --force --verbose"
directbin="/Users/<you>/direct/7.2.130/bin/macarm64"
codesign -s "$devid" $options "./llama_launcher.app/Contents/MacOS/llama_wine"
codesign -s "$devid" $options --deep "./llama_launcher.app/Contents/Frameworks/Llama Launcher Helper.app"
codesign -s "$devid" $options --deep "./llama_launcher.app/Contents/Frameworks/Llama Launcher Helper (GPU).app" --entitlements "$directbin/host Helper (GPU).entitlements"
codesign -s "$devid" $options --deep "./llama_launcher.app/Contents/Frameworks/Llama Launcher Helper (Renderer).app" --entitlements "$directbin/host Helper (Renderer).entitlements"
codesign -s "$devid" $options --deep "./llama_launcher.app/Contents/Frameworks/Chromium Embedded Framework.framework"
codesign -s "$devid" $options "./llama_launcher.app" --entitlements "$directbin/host.entitlements"
```

## Check the signature

```bash theme={null}
codesign -vvv ./llama_launcher.app
```

If the app is signed correctly, the output ends with `satisfies its Designated Requirement` on any machine:

```text theme={null}
--prepared:/path/to/launcher.app/Contents/Frameworks/launcher Helper (Renderer).app
--validated:/path/to/launcher.app/Contents/Frameworks/launcher Helper (Renderer).app
...
/path/to/launcher.app: valid on disk
/path/to/launcher.app: satisfies its Designated Requirement
```

## Execute permissions

These files need execute permission on every machine that runs the launcher:

* `Launcher.app/Contents/MacOS/Launcher`
* `Launcher.app/Contents/Frameworks/Launcher Helper.app/MacOS/Launcher Helper`
* `Launcher.app/Contents/Frameworks/Launcher Helper (GPU).app/MacOS/Launcher Helper (GPU)`
* `Launcher.app/Contents/Frameworks/Launcher Helper (Renderer).app/MacOS/Launcher Helper (Renderer)`
* `Launcher.app/Contents/Frameworks/Chromium Embedded Framework.framework`

## Related

* [Host deployment steps](https://docs.directgvr.com/reference/client-skin-system/host-deployment-steps.md)
* [Set up launcher self-update](https://docs.directgvr.com/launcher-design/self-update.md)
* [DIRECT 6 to DIRECT 7 change list](https://docs.directgvr.com/releases/direct-6-to-7.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.