Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d435540
feat: integrate Flutter connection gateway
LuckZAE Aug 31, 2026
ae4f17e
fix: stabilize Flutter gateway integration
LuckZAE Sep 1, 2026
c72ddae
feat: migrate query_machine_info to connection gateway via GatewayDevice
SukiSunYuhang Sep 3, 2026
ccdd4ef
refactor: move device ownership to the connection gateway
LuckZAE Sep 10, 2026
0b90b76
fix: align gateway preprint store contract
LuckZAE Sep 11, 2026
d627cf6
Add platform-aware snapmaker_connection CLI support
Sep 15, 2026
b4bd747
Fetch device info via gateway HTTP API and keep nozzle sync off the U…
LuckZAE Sep 15, 2026
3aab57c
Force-restart stale connection CLI on reconnect failure
LuckZAE Sep 15, 2026
33a7b2d
Replace SSWCP login flow with gateway account subscription
LuckZAE Sep 16, 2026
a4808c6
Remove obsolete login-token guard leftovers
LuckZAE Sep 16, 2026
034ccb2
Start gateway without blocking app startup
LuckZAE Sep 16, 2026
cb74bd0
Restore upstream Flutter web URLs
LuckZAE Sep 16, 2026
84c3e09
Use gateway locale and health URLs
LuckZAE Sep 17, 2026
cc66e34
Log connection gateway startup URLs
LuckZAE Sep 17, 2026
c4a0127
Freeze main frame until startup tab settles
LuckZAE Sep 17, 2026
06e1d44
Fix gateway lifecycle and CI builds
LuckZAE Sep 17, 2026
65f5bae
Fetch device snapshots from /api/cache/all
LuckZAE Sep 17, 2026
a1ee996
Harden gateway UI and parsing paths
LuckZAE Sep 18, 2026
187ee60
Match gateway tab names case-insensitively
LuckZAE Sep 18, 2026
5a940f6
Package and uninstall shared Snapmaker Connect
LuckZAE Sep 20, 2026
66fecc5
Move local HTTP ports for legacy compatibility
LuckZAE Sep 21, 2026
def6588
Update Snapmaker Connect bundle to v1.3.2
LuckZAE Sep 21, 2026
4ec76ec
Update Snapmaker Connect bundle to v1.3.5 and use /api/health
LuckZAE Sep 23, 2026
d2cc63d
Preserve WebView2 engine user agent
LuckZAE Sep 24, 2026
1ca3fe5
Expose gateway pages after health check
LuckZAE Sep 24, 2026
60f6f28
fix: populate preprint filament mapping on first print
LuckZAE Sep 24, 2026
e6559f5
Apply gateway device deltas to cached machine state
LuckZAE Sep 24, 2026
c65285f
Update Snapmaker Connect bundle to v1.4.1
LuckZAE Sep 24, 2026
d71bd41
Fix gateway JSON optional conversion
LuckZAE Sep 25, 2026
d77a517
Fix repeated Gateway device tab reload
LuckZAE Sep 28, 2026
7bbda28
Simplify gateway machine info syncing
LuckZAE Sep 28, 2026
4160855
Simplify gateway device synchronization
LuckZAE Sep 29, 2026
cd807f6
Update Snapmaker Connect CLI to v1.4.6
LuckZAE Sep 29, 2026
abb5e67
Update Snapmaker Connect CLI to v1.4.7
LuckZAE Sep 30, 2026
f77c82a
Update Snapmaker Connect CLI to v1.5.4
LuckZAE Oct 7, 2026
bc1b57f
Fix gateway account integration after main rebase
LuckZAE Oct 8, 2026
14ae993
Update Snapmaker Connect CLI to v1.6.0
LuckZAE Oct 8, 2026
5ac9116
Kill child processes during uninstall
LuckZAE Oct 10, 2026
a5322e3
Harden gateway service lifecycle and parsing
LuckZAE Oct 10, 2026
0fa5264
Fix connect CLI packaging lifecycle
LuckZAE Oct 10, 2026
7481b83
Add firewall rules for Snapmaker Connect discovery
LuckZAE Oct 11, 2026
69cf161
Update Snapmaker Connect CLI to v1.6.6
LuckZAE Oct 11, 2026
e3d8161
Relocate Paho licenses in Windows installer
LuckZAE Oct 11, 2026
f576cbc
Fix gateway websocket startup race
LuckZAE Oct 12, 2026
d1c5233
Preserve Flatpak user locale
LuckZAE Oct 12, 2026
e539452
Update Flutter CLI region after setup wizard
LuckZAE Oct 13, 2026
69429ff
Bind local HTTP server to loopback
LuckZAE Oct 13, 2026
d67d853
Update Snapmaker Connect CLI to v1.7.0
LuckZAE Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/connect-bundle.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"releaseTag": "v1.7.0",
"sha256": {
"windows-x64": "348763829380b453948d626c706351b1187de145a784cb17d82c33bdf497e61a",
"windows-arm64": "b579dd3ecd483035fcef37a355b8c74233f442b9ab2668dc52fe671edbf3bf28",
"macos-x64": "5fe64de2d4b04243e57dd26805fc009f3d06e05f64002850b3f5c71f6a4c0ef9",
"macos-arm64": "eaa08813e2305ee818881b7fd2460892182ea5abb90dac0abd643d75cc8381a8",
"linux-x64": "2e9588135c2b43e4b80395896b3290bc0527a26f42cb264db9fd4c71e68c5ff0",
"linux-arm64": "e647b6f9062f712d35c66f7ace4eb6ec37553ed29b78555828b5cd0b72a2964d"
}
}
12 changes: 12 additions & 0 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ jobs:
run:
rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*"
- uses: actions/checkout@v5
- name: "Stage connect bundle"
shell: bash
run: |
case "${{ matrix.variant.arch }}" in
x86_64) platform="linux-x64" ;;
aarch64) platform="linux-arm64" ;;
*) echo "Unsupported Flatpak architecture: ${{ matrix.variant.arch }}" >&2; exit 1 ;;
esac
python3 scripts/packaging/stage_connect_bundle.py \
--lock .github/connect-bundle.lock.json \
--platform "$platform" \
--resources-dir resources
- name: Get the version and date
run: |
ver_pure=$(grep 'set(Snapmaker_VERSION' version.inc | cut -d '"' -f2)
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ Orca-deps-wxWidgets/
sentry-native/
.claude/
.hermes/
CLAUDE.md
CLAUDE.md
# snapmaker_connection CLI binaries are placed into resources/ locally per platform/architecture and are not tracked
/resources/snapmaker_connection*
25 changes: 22 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,9 @@ endif()

# Resources install target, configure fhs.hpp on UNIX
if (WIN32)
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "./resources")
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "./resources"
PATTERN "*/gw_cache" EXCLUDE
)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ".")
Expand All @@ -947,6 +949,7 @@ elseif (SLIC3R_FHS)
set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/Snapmaker_Orca")
install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES}
PATTERN "*/udev" EXCLUDE
PATTERN "snapmaker_control_linux_*" PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(FILES src/dev-utils/platform/unix/Snapmaker_Orca.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
foreach(SIZE 32 128 192)
Expand Down Expand Up @@ -994,15 +997,31 @@ set (CPACK_NSIS_DEFINES "!define MUI_STARTMENUPAGE_DEFAULTFOLDER \"${CPACK_PACKA
# .nsi template must stay ASCII -- the Chinese/English prompt texts therefore
# live in the separate UTF-8 BOM .nsh instead of this inline block.
file(READ "${CMAKE_SOURCE_DIR}/cmake/nsis/SnapmakerURLProtocols_install.nsh" CPACK_NSIS_EXTRA_INSTALL_COMMANDS)
file(READ "${CMAKE_SOURCE_DIR}/cmake/nsis/SnapmakerConnectFirewall_install.nsh" _snapmaker_connect_firewall_install)
string(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS "\n${_snapmaker_connect_firewall_install}")
file(READ "${CMAKE_SOURCE_DIR}/cmake/nsis/SnapmakerURLProtocols_uninstall.nsh" _snapmaker_nsis_uninst_url)
set(_snapmaker_nsis_uninst_kill [=[
nsExec::Exec 'taskkill /F /IM snapmaker-orca.exe /T'
nsExec::Exec 'taskkill /F /T /IM snapmaker-orca.exe'
Pop $0
nsExec::Exec 'taskkill /F /T /IM Snapmaker_Orca.exe'
Pop $0
nsExec::Exec 'taskkill /F /T /IM snapmaker_control_windows_x64.exe'
Pop $0
nsExec::Exec 'taskkill /F /T /IM snapmaker_control_windows_arm64.exe'
Pop $0
nsExec::Exec 'taskkill /F /T /IM snapmaker_connection_windows_x64.exe'
Pop $0
nsExec::Exec 'taskkill /F /IM Snapmaker_Orca.exe /T'
nsExec::Exec 'taskkill /F /T /IM snapmaker_connection_windows_arm64.exe'
Pop $0
]=])
string(CONCAT CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
"${_snapmaker_nsis_uninst_kill}" "${_snapmaker_nsis_uninst_url}")
# Wait briefly for the connect CLI to release its executable after the forced
# termination above before generated files are removed.
file(READ "${CMAKE_SOURCE_DIR}/cmake/nsis/SnapmakerConnect_uninstall.nsh" _snapmaker_connect_uninstall)
string(APPEND CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "\n${_snapmaker_connect_uninstall}")
file(READ "${CMAKE_SOURCE_DIR}/cmake/nsis/SnapmakerConnectFirewall_uninstall.nsh" _snapmaker_connect_firewall_uninstall)
string(APPEND CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "\n${_snapmaker_connect_firewall_uninstall}")
# Auto-close the uninstall details page so the wizard advances to the custom
# finish page as soon as the uninstall section finishes (no extra click).
string(APPEND CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " SetAutoClose true\n")
Expand Down
18 changes: 18 additions & 0 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,24 @@ if [[ -n "${BUILD_DEPS}" ]] ; then
fi

if [[ -n "${BUILD_ORCA}" ]] ; then
echo "Staging snapmaker_connect..."
case "$(uname -m)" in
x86_64)
CONNECT_BUNDLE_PLATFORM="linux-x64"
;;
aarch64|arm64)
CONNECT_BUNDLE_PLATFORM="linux-arm64"
;;
*)
echo "Error: unsupported architecture $(uname -m) for snapmaker_connect."
exit 1
;;
esac
python3 ./scripts/packaging/stage_connect_bundle.py \
--lock .github/connect-bundle.lock.json \
--platform "${CONNECT_BUNDLE_PLATFORM}" \
--resources-dir "${SCRIPT_PATH}/resources"

echo "Configuring Snapmaker_Orca..."
if [[ -n "${CLEAN_BUILD}" ]] ; then
rm -fr build
Expand Down
6 changes: 6 additions & 0 deletions build_release_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ function pack_deps() {
}

function build_slicer() {
echo "Staging snapmaker_connect..."
python3 "${PROJECT_DIR}/scripts/packaging/stage_connect_bundle.py" \
--lock "${PROJECT_DIR}/.github/connect-bundle.lock.json" \
--platform macos-universal \
--resources-dir "${PROJECT_DIR}/resources"

# iterate over two architectures: x86_64 and arm64
for _ARCH in x86_64 arm64; do
# if ARCH is universal or equal to _ARCH
Expand Down
3 changes: 3 additions & 0 deletions build_release_vs2022.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ cd %WP%
mkdir %build_dir%
cd %build_dir%

python ..\scripts\packaging\stage_connect_bundle.py --lock ..\.github\connect-bundle.lock.json --platform windows-x64 --resources-dir ..\resources
if errorlevel 1 exit /b 1

echo on
cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DOPENSSL_ROOT_DIR="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./Snapmaker_Orca" -DCMAKE_BUILD_TYPE=%build_type% -DWIN10SDK_PATH="%WindowsSdkDir%Include\%WindowsSDKVersion%\"
cmake --build . --config %build_type% --target ALL_BUILD -- -m
Expand Down
17 changes: 17 additions & 0 deletions cmake/nsis/SnapmakerConnectFirewall_install.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; The connect CLI uses mDNS on UDP 5353 and transient UDP ports for LAN device
; discovery. Remove any prior user-created Block rule for this program path,
; then add a deterministic allow rule after the executable has been installed.
IfFileExists "$INSTDIR\resources\snapmaker_control_windows_x64.exe" 0 SnapmakerConnectFirewall_arm64
nsExec::ExecToLog 'netsh advfirewall firewall delete rule name=all program="$INSTDIR\resources\snapmaker_control_windows_x64.exe"'
Pop $0
nsExec::ExecToLog 'netsh advfirewall firewall add rule name="Snapmaker Control (x64)" dir=in action=allow program="$INSTDIR\resources\snapmaker_control_windows_x64.exe" enable=yes protocol=udp profile=any'
Pop $0

SnapmakerConnectFirewall_arm64:
IfFileExists "$INSTDIR\resources\snapmaker_control_windows_arm64.exe" 0 SnapmakerConnectFirewall_done
nsExec::ExecToLog 'netsh advfirewall firewall delete rule name=all program="$INSTDIR\resources\snapmaker_control_windows_arm64.exe"'
Pop $0
nsExec::ExecToLog 'netsh advfirewall firewall add rule name="Snapmaker Control (ARM64)" dir=in action=allow program="$INSTDIR\resources\snapmaker_control_windows_arm64.exe" enable=yes protocol=udp profile=any'
Pop $0

SnapmakerConnectFirewall_done:
6 changes: 6 additions & 0 deletions cmake/nsis/SnapmakerConnectFirewall_uninstall.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; Remove both managed rules and legacy user-created Block rules scoped to the
; installed CLI paths. Filtering by program avoids removing unrelated rules.
nsExec::ExecToLog 'netsh advfirewall firewall delete rule name=all program="$INSTDIR\resources\snapmaker_control_windows_x64.exe"'
Pop $0
nsExec::ExecToLog 'netsh advfirewall firewall delete rule name=all program="$INSTDIR\resources\snapmaker_control_windows_arm64.exe"'
Pop $0
33 changes: 33 additions & 0 deletions cmake/nsis/SnapmakerConnect_uninstall.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
; Wait for the connect CLI to release its executable after the installer has
; force-terminated it. Exact installed paths are checked for compatibility.
Push $R0
StrCpy $R0 40

SnapmakerConnectUninstall_wait:
Delete "$INSTDIR\resources\snapmaker_connection_windows_x64.exe"
Delete "$INSTDIR\resources\snapmaker_connection_windows_arm64.exe"
Delete "$INSTDIR\resources\snapmaker_control_windows_x64.exe"
Delete "$INSTDIR\resources\snapmaker_control_windows_arm64.exe"
IfFileExists "$INSTDIR\resources\snapmaker_connection_windows_x64.exe" SnapmakerConnectUninstall_retry
IfFileExists "$INSTDIR\resources\snapmaker_connection_windows_arm64.exe" SnapmakerConnectUninstall_retry
IfFileExists "$INSTDIR\resources\snapmaker_control_windows_x64.exe" SnapmakerConnectUninstall_retry
IfFileExists "$INSTDIR\resources\snapmaker_control_windows_arm64.exe" SnapmakerConnectUninstall_retry
Goto SnapmakerConnectUninstall_done

SnapmakerConnectUninstall_retry:
Sleep 1000
IntOp $R0 $R0 - 1
IntCmp $R0 0 SnapmakerConnectUninstall_timeout SnapmakerConnectUninstall_timeout SnapmakerConnectUninstall_wait

SnapmakerConnectUninstall_timeout:
IfSilent SnapmakerConnectUninstall_silent SnapmakerConnectUninstall_failed
SnapmakerConnectUninstall_silent:
SetErrorLevel 8
Abort
SnapmakerConnectUninstall_failed:
MessageBox MB_OK|MB_ICONSTOP "The Snapmaker Connect executable is still locked.$\nMake sure Snapmaker Orca is closed, check antivirus or indexing software, then run the uninstaller again."
Abort

SnapmakerConnectUninstall_done:
ClearErrors
Pop $R0
41 changes: 41 additions & 0 deletions cmake/nsis/SnapmakerPreinstall.nsh.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ SnapmakerOrcaPre_try_legacy:
Pop $0
IntCmp $0 0 SnapmakerOrcaPre_in_use SnapmakerOrcaPre_idle SnapmakerOrcaPre_idle
SnapmakerOrcaPre_idle:
; The detached connect CLI can outlive the app and lock the old executable.
; This is the common cleanup point for overwrite and uninstall-first upgrades.
nsExec::Exec 'taskkill /F /T /IM snapmaker_control_windows_x64.exe'
Pop $0
nsExec::Exec 'taskkill /F /T /IM snapmaker_control_windows_arm64.exe'
Pop $0
nsExec::Exec 'taskkill /F /T /IM snapmaker_connection_windows_x64.exe'
Pop $0
nsExec::Exec 'taskkill /F /T /IM snapmaker_connection_windows_arm64.exe'
Pop $0
Goto SnapmakerOrcaPre_done
SnapmakerOrcaPre_in_use:
IfSilent SnapmakerOrcaPre_silent SnapmakerOrcaPre_prompt
Expand Down Expand Up @@ -136,6 +146,37 @@ SnapmakerOrcaPre_do_trim_slash:
Goto SnapmakerOrcaPre_trim_inst_slash
SnapmakerOrcaPre_trim_slash_done:
IfFileExists "$0" 0 SnapmakerOrcaPre_uninst_launch_failed
; The CLI was force-terminated above. Wait on the exact installed files while
; antivirus software, indexers, and the OS release terminated-process handles.
StrCpy $4 40
SnapmakerOrcaPre_connect_wait:
Delete "$3\resources\snapmaker_connection_windows_x64.exe"
Delete "$3\resources\snapmaker_connection_windows_arm64.exe"
Delete "$3\resources\snapmaker_control_windows_x64.exe"
Delete "$3\resources\snapmaker_control_windows_arm64.exe"
IfFileExists "$3\resources\snapmaker_connection_windows_x64.exe" SnapmakerOrcaPre_connect_retry
IfFileExists "$3\resources\snapmaker_connection_windows_arm64.exe" SnapmakerOrcaPre_connect_retry
IfFileExists "$3\resources\snapmaker_control_windows_x64.exe" SnapmakerOrcaPre_connect_retry
IfFileExists "$3\resources\snapmaker_control_windows_arm64.exe" SnapmakerOrcaPre_connect_retry
Goto SnapmakerOrcaPre_connect_done
SnapmakerOrcaPre_connect_retry:
Sleep 1000
IntOp $4 $4 - 1
IntCmp $4 0 SnapmakerOrcaPre_connect_timeout SnapmakerOrcaPre_connect_timeout SnapmakerOrcaPre_connect_wait
SnapmakerOrcaPre_connect_timeout:
IfSilent SnapmakerOrcaPre_connect_silent SnapmakerOrcaPre_connect_failed
SnapmakerOrcaPre_connect_silent:
SetErrorLevel 8
Quit
SnapmakerOrcaPre_connect_failed:
StrCmp $LANGUAGE ${LANG_SIMPCHINESE} 0 SnapmakerOrcaPre_connect_failed_en
MessageBox MB_OK|MB_ICONSTOP "Snapmaker Connect 的可执行文件仍被占用。请确认 Snapmaker Orca 已关闭,检查杀毒软件或索引程序后重新运行安装程序。"
Abort
SnapmakerOrcaPre_connect_failed_en:
MessageBox MB_OK|MB_ICONSTOP "The Snapmaker Connect executable is still locked. Make sure Snapmaker Orca is closed, check antivirus or indexing software, then run the installer again."
Abort
SnapmakerOrcaPre_connect_done:
ClearErrors
; Same as CMake CPack NSIS.template.in and NSIS maintainer guidance: use _?=$DIR with NO
; extra quotes around the directory. _?="C:\Program Files\..." breaks parsing (log shows
; _?="C:\Program Fil...) and causes uninstall failure. See NSIS forums t-212468.
Expand Down
6 changes: 0 additions & 6 deletions localization/i18n/zh_CN/Snapmaker_Orca_zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -7130,12 +7130,6 @@ msgstr "请在打印机屏幕上确认。"
msgid "Log in failed. Please check the Pin Code."
msgstr "登录失败,请检查Pin码。"

msgid "Log in"
msgstr "登录"

msgid "Are you sure you want to log in?"
msgstr "确定要登录吗?"

msgid "Log in printer"
msgstr "登录打印机"

Expand Down
53 changes: 52 additions & 1 deletion scripts/flatpak/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,57 @@
grep -q org.freedesktop.Platform.GL.nvidia /.flatpak-info && export WEBKIT_DISABLE_DMABUF_RENDERER=1

# Work-around https://github.com/bambulab/BambuStudio/issues/3440
export LC_ALL=C.UTF-8
canonical_locale() {
case "${1%%.*}" in
""|"C"|"POSIX") return 1 ;;
esac

LC_ALL=C locale -a | awk -v requested="$1" '
BEGIN {
requested = tolower(requested)
gsub(/-/, "", requested)
}
{
available = tolower($0)
gsub(/-/, "", available)
if (available == requested || available == requested ".utf8") {
print $0
exit
}
}
'
}

app_locale=
language=
for candidate in "${LC_ALL:-}" "${LC_MESSAGES:-}" "${LANG:-}"; do
[ -n "$language" ] || language=$candidate
app_locale=$(canonical_locale "$candidate")
[ -n "$app_locale" ] && break
done

if [ -n "$app_locale" ]; then
export LANG="$app_locale"
language=$app_locale
else
export LANG=C.UTF-8
language=${LANGUAGE:-$language}
fi

language=${language%%:*}
language=${language%%.*}
language=${language%%@*}
case "$language" in
""|"C"|"C".*|"POSIX"|"POSIX".*) language=en_US ;;
esac
printf '%s\n' "$language" | grep -Eq '^[[:alpha:]]{2,8}(_[[:alpha:]]{2,8})*$' || language=en_US
export LANGUAGE="$language"

unset LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC
unset LC_TIME LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION

# Use LC_NUMERIC instead of LC_ALL to prevent decimal separator issues
# while preserving the user's language/locale for translations.
export LC_NUMERIC=C

exec /app/bin/snapmaker-orca "$@"
Loading
Loading