> ## 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.

# Compile launchers with the builder script

> Use builder.py to compile and sign Windows and macOS launchers.

The `builder.py` script uses the DirectGVR Console tools to compile and sign a launcher: `launcher.exe` on Windows or the `launcher.app` folder on macOS. It takes options from the command line, a JSON configuration file or both. For every option, see [builder.py](https://docs.directgvr.com/release-automation/deployment-scripts.md#builder-py).

## Required options

* `target_os`: for example `win64`, `mac64` or `macarm64`.
* `skin_directory`: full path to the folder with your launcher skin files.
* `launcher_path`: full path for the compiled launcher.

## Options you'll want

These don't stop a build, but you need them to sign the launcher with your code-signing certificate and to copy the CEF libraries next to it. Use either the certificate path and password or the certificate identity and store, not both.

* `cef_source_directory`: full path to the folder with the CEF binaries. It's different for Windows and macOS.
* `timestamp_service_url`: timestamp server for signing. It's different for Windows and macOS.
* `certificate_path`: full path to your code-signing certificate.
* `certificate_password`: password for the certificate.
* `certificate_identity`: usually the certificate's common name in your certificate store.
* `certificate_store`: the store the certificate is in, for example `user` or `machine`.

These rarely change, so put them in a JSON configuration file for each operating system.

## Optional options

These appear in the launcher's file properties. In the sample skin, they also decide where the [debug log](https://docs.directgvr.com/troubleshooting/debug-mode.md) is written on the player's machine.

* `launcher_company`
* `launcher_copyright`
* `launcher_product_name`
* `launcher_version`

## Build for Windows

This configuration sets the options that rarely change between builds:

```json build_windows.json theme={null}
{
  "target_os": "win64",
  "skin_directory": "D:/SSN/DIRECT/llamagames/skins/launcher/",
  "launcher_path": "D:/SSN/DIRECT/llamagames/output/gamelauncher.exe",
  "cef_source_directory": "D:/SSN/DIRECT/llamagames/cef/<cef-version>/win64/",
  "launcher_company": "Llama Games Inc",
  "launcher_copyright": "2020",
  "launcher_product_name": "Llama Launcher",
  "launcher_version": "1.2.3",
  "certificate_store": "user",
  "certificate_identity": "<your certificate common name>",
  "timestamp_service_url": "http://timestamp.digicert.com/#authenticode"
}
```

```bash theme={null}
builder.py --config=D:\SSN\DIRECT\llamagames\samples\config\build_windows.json
```

The script puts the signed `gamelauncher.exe` in the folder you set, next to the CEF libraries it needs.

## Build for macOS

```json build_mac.json theme={null}
{
  "target_os": "mac64",
  "skin_directory": "D:/SSN/DIRECT/llamagames/skins/launcher/",
  "launcher_path": "D:/SSN/DIRECT/llamagames/output_macOS/gamelauncher.app",
  "cef_source_directory": "D:/SSN/DIRECT/llamagames/cef/<cef-version>/mac64/",
  "launcher_company": "Llama Games Inc",
  "launcher_copyright": "2020",
  "launcher_product_name": "Llama Launcher",
  "launcher_version": "1.2.3",
  "certificate_store": "user",
  "certificate_identity": "Developer ID Application: <your company> (<team ID>)",
  "timestamp_service_url": "http://timestamp.apple.com/ts01"
}
```

```bash theme={null}
builder.py --config=D:\SSN\DIRECT\llamagames\samples\config\build_mac.json
```

The script puts the signed `gamelauncher.app` in the folder you set. The app folder contains the CEF libraries it needs.

> [!TIP]
>
> You can build launchers for Windows or macOS on either operating system. To sign a macOS app on Windows, export your Apple Developer code-signing certificate first. See the Signer console in [Deployment Console tools](https://docs.directgvr.com/reference/deployment-console-tools.md).

## Related

* [Build your launcher](https://docs.directgvr.com/quick-start/build-launcher.md)
* [Sign a macOS launcher with codesign](https://docs.directgvr.com/launcher-design/codesign-macos.md)
* [Deployment scripts](https://docs.directgvr.com/release-automation/deployment-scripts.md)


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