# Studio Refresher

## Studio License Refresh (V15.02+)

The Studio License for Maya Groomer’s Tool assumes artists can access the internet from Maya and have read/write permission to the shared `license.json` (created on your first validation in the `xgtc` folder).

In stricter environments, that isn’t always the case. Artists may have limited internet access and studios may prefer centralized control of licensing. This guide outlines some alternatives to accommodate those policies and keep re-checks smooth.

This guide shows how to refresh a **Studio Tiered** license **without launching Maya**, using the Python **3.10** version of `XGT_Refresher` bundle throughout. (Py3.7, Py3.9, Py3.10, Py3.11 versions of the `XGT_Refreshers` are also available in your download page)

Using the `XGT_Refresher`, the refresher machine can run a different OS than the artists’ machines; it simply rewrites the shared `license.json`

{% hint style="success" %}
**Let Artist Machine Validate On Re-Check Days:**

* If artist machines have internet access and the central `license.json` is **writable**, no extra steps are needed. The first artist who opens the tool when a re-check is due will auto-validate and update the shared file.&#x20;
* Otherwise, if you’re keeping the central `license.json` as **read-only**, and prefer using a refresher machine, you can re-validate in Maya, via commands, or on a schedule as documented below.
  {% endhint %}

## Setting up XGT\_Refresher

* Check the Python version on the machine that you are going to use as the refresher machine.&#x20;
* Download the refresher bundle (with the same Py and Os build as your refresher machine). The files are located under a folder "XGT\_Refresher" in your content/download page.
* Unzip, and put the contents in a separate folder (one or two folder up from the `xgtc` folder would be nice and safe!)&#x20;
* For example, if you put Groomer's Tool's `xgtc` folder:

```
E:\3rdPartyTools\GroomersTool_2023_linux\xgtc\
```

* Create another folder and put the refresher folder in there (the folder from the refresher bundle is named as `xgt_refresher,` rename it to `xgt_refresher_<OS>_py310` , for example :

```
E:\3rdPartyRefresher\xgt_refresher_<OS>_py310\
```

Inside `\xgt_refresher_<OS>_py310\`:

```
--xgt_license_refresh.pyc
--xgt_license_core.pyc
--pyarmor_runtime_009008/
```

* Double make sure the  `license.json` already exists (launch Groomer’s Tool once and activate if it does not).
* Make sure your refresher machine has **read**/**write** access to the target `license.json`.

***

## Windows

### Example paths (Windows)

* **Refresher script:**

```
E:\3rdPartyRefresher\xgt_refresher_win_py310\xgt_license_refresh.pyc
```

* **Target artists license.json:**

```
E:\3rdPartyTools\GroomersTool_2023_win\xgtc\license.json
```

### Refresh with commands

```sh
# Point to refresher folder
$env:XGT_XGTC_SCRIPTS = "E:\3rdPartyRefresher\xgt_refresher_win_py310\"

# Real run (writes updated JSON)
py -3.10 E:\3rdPartyRefresher\xgt_refresher_win_py310\xgt_license_refresh.pyc `
  --path "E:\3rdPartyTools\GroomersTool_2023_win\xgtc\license.json" `
  --verbose
```

### **Expected success output (real run):**

```
[xgt] Loading license from: E:\3rdPartyTools\GroomersTool_2023_win\xgtc\license.json
[xgt] Calling Gumroad verify… (increment=False)
[xgt] Snapshot state: ('ok', {}); last_check=YYYY-MM-DD; is_studio=True
[xgt] License refreshed and written.

# .json must be set to "writable" to the refresh machine.
# you can check the license.json time stamp to see if it updates.
```

***

## Linux

### Example paths (Linux)

* **Refresher script:**

```
E:\3rdPartyRefresher\xgt_refresher_linux_py310\xgt_license_refresh.pyc
```

* **Target artists license.json:**

```
E:\3rdPartyTools\GroomersTool_2023_linux\xgtc\license.json
```

### Refresh with commands

```bash
# Point to refresher folder
export XGT_XGTC_SCRIPTS="E:/3rdPartyRefresher/xgt_refresher_linux_py310/"

# Real run (writes updated JSON)
python3.10 E:/3rdPartyRefresher/xgt_refresher_linux_py310/xgt_license_refresh.pyc \
  --path "E:/3rdPartyTools/GroomersTool_2023_linux/xgtc/license.json" \
  --verbose
```

### **Expected success output (real run):**

```
[xgt] Loading license from: E:\3rdPartyTools\GroomersTool_2023_win\xgtc\license.json
[xgt] Calling Gumroad verify… (increment=False)
[xgt] Snapshot state: ('ok', {}); last_check=YYYY-MM-DD; is_studio=True
[xgt] License refreshed and written.

# .json must be set to "writable" to the refresh machine.
# you can check the license.json time stamp to see if it updates.
```

***

### Duplicating Jobs for Multiple Targets

**Running Groomer's Tool on different projects (different OS/Maya)**

* Duplicate the task and change only the `--path` argument, e.g.:
  * `E:\3rdPartyTools\GroomersTool_2023_win\xgtc\license.json`
  * `E:\3rdPartyTools\GroomersTool_2024_linux\xgtc\license.json`&#x20;
  * Then, create additional tasks pointing at other versions/builds.

```bash
# Still using the same refresher path
export XGT_XGTC_SCRIPTS="E:/3rdPartyRefresher/xgt_refresher_linux_py310/"
# Refresh still runs the same Python3.10 (only need to match with refresher box)

# Refresh license.json (on a Maya 2023 Windows license)
python3.10 E:/3rdPartyRefresher/xgt_refresher_linux_py310/xgt_license_refresh.pyc \
  --path "E:/3rdPartyTools/GroomersTool_2023_win/xgtc/license.json" \
  --verbose
  
# Refresh license.json (on a Maya 2024 Linux license)
python3.10 E:/3rdPartyRefresher/xgt_refresher_linux_py310/xgt_license_refresh.pyc \
  --path "E:/3rdPartyTools/GroomersTool_2023_linux/xgtc/license.json" \
  --verbose
  
```

***

## Recommended Studio Refresher Schedule

To keep licenses up to date, while letting artists work offline, schedule the **Studio refresher** at these intervals:

* Monthly plans: Twice per week
* Quarterly / Bi-Annually / Yearly plans: Once per week

## Troubleshooting

| Symptom                                         | Likely cause                                                    | Fix                                                                                             |
| ----------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `ERROR: bad magic number in 'xgt_license_core'` | Python version mismatch for `.pyc`                              | Refresher machine must have the same matching Python version as the XGT\_Refresher bundle files |
| `Gumroad verify failed: ...`                    | Network block, wrong product ID, or license key missing in JSON | Allow outbound HTTPS; pass `--product-id`; confirm JSON has `license_key`.                      |
| `Permission denied` writing JSON                | Share not writable from scheduler box                           | Run on an IT/RW box; fix share perms; avoid read-only mounts.                                   |
| Written OK but artists don’t see change         | Artists looking at a different file/path                        | Ensure everyone points to the intended target path.                                             |
