Command line export failing to exit

What do you want to achieve? I want to be able to export my UI/C files via the Squareline command line interface. The export works correctly however the process never exits so I cannot automate the export, I have to force kill the task

What have you tried so far?

I have tried the command below, with both -quit and -nographics and together, the export works but the command hangs as per log

/Applications/SquareLine_Studio.app/Contents/MacOS/SquareLine_Studio -batchmode -logFile - -projectfile "~/project/example.spj" -exportfolder "/tmp/squareline-project-export" -ui_exportfolder "/tmp/squareline-ui-export" -quit

Screenshot or video

[====================] 100% - Generating components (1/1)
[====================] 100% - Generating screens (4/4)
[====================] 100% - Code generation complete
Export finished successfully.
[OK] Export completed in 0.1 seconds.

Connection closed
StopServer

Others

  • SquareLine Studio version: 1.6.2
  • Operating system: macOS Tahoe 26.6.2 (25G83)
  • Target hardware: above?

Hi, thanks for the report — this is a bug on macOS (and Linux) in 1.6.2: after a successful CLI export we call Environment.Exit(), which in a Unity player runs a full runtime shutdown from inside the frame loop and can deadlock, so the process stays alive even though the export is complete. The Windows build uses a different exit path, which is why it only shows up on macOS. We’ll fix it in the next release.

Note that -quit and -nographics are Unity Editor arguments and have no effect on the standalone player, so those won’t help. Until the fix, you can wrap the call in your CI and terminate it once the completion line appears — the export itself is already fully written to disk at that point:

#!/usr/bin/env bash
LOG=$(mktemp)
/Applications/SquareLine_Studio.app/Contents/MacOS/SquareLine_Studio -batchmode -logFile -
-projectfile “$HOME/project/example.spj”
-exportfolder “/tmp/squareline-project-export”
-ui_exportfolder “/tmp/squareline-ui-export” >“$LOG” 2>&1 &
PID=$!
for _ in $(seq 1 300); do
grep -q “Export finished successfully.” “$LOG” && break
kill -0 “$PID” 2>/dev/null || break
sleep 1
done
kill -9 “$PID” 2>/dev/null
cat “$LOG”
grep -q “Export finished successfully.” “$LOG” # exit code for CI