English | 简体中文
The production license service is https://update.opentest.com. There is no separate test server. Source-run examples select production; the retained test and production modes select local configuration and native materials. Both modes in the default packaging configuration connect to the same production service.
Base materials reside under native/<platform> within the resources root. Production overrides reside in that platform's prd subdirectory. <platform> is windows-amd64, linux-amd64, or macos-arm64. Dynamic libraries with the same names in the desktop algorithm module are supplied as a compatible set by their vendor. See ADR 0012 for selection rules; this page describes the current directory layout.
| Entry point | License mode and service URL configuration | Backend native materials |
|---|---|---|
pnpm dev, pnpm dev:backend, pnpm dev:desktop, pnpm start |
Explicit OPENTEST_ENV_FILE; otherwise .local/runtime.env, falling back to root runtime.env if absent |
test uses the selected native/<platform>; production copies its base materials into the runtime directory and applies its prd overrides |
pnpm dev:frontend |
Does not select a backend license mode; local configuration is optional | Does not load or prepare backend native materials |
pnpm package --mode test |
modes.test.licenseUrl in packaging.config.json |
Selected platform's base materials, excluding the prd subtree |
pnpm package --mode production |
modes.production.licenseUrl in packaging.config.json |
Copies the selected platform's base materials into packaging staging, then applies its prd overrides |
| Installed application | Mode and URL in the packaged opentest-build.json |
Packaged backend/native/ |
Before starting the backend or desktop, copy the root runtime.env.example to .local/runtime.env; root runtime.env is also supported. If local configuration already exists, check which file is selected before replacing it. The following fields are not required for a standalone frontend:
OPENTEST_LICENSE_ENVIRONMENT=production
OPENTEST_LICENSE_URL=https://update.opentest.com
# Optional; defaults to apps/backend/crydaq-server/src/main/resources
OPENTEST_NATIVE_MATERIALS_ROOT=OPENTEST_LICENSE_ENVIRONMENT accepts only test or production. Startup fails if either required field is missing or the URL is invalid. These two fields come exclusively from the selected file; existing process variables with the same names do not override them. An explicit OPENTEST_ENV_FILE takes priority, and a missing explicit file does not trigger fallback. Otherwise, only one of .local/runtime.env and root runtime.env is selected; their contents are not merged. These local files are ignored by Git. .local/service-environments.json is not a current configuration entry point.
OPENTEST_NATIVE_MATERIALS_ROOT points to the resources root of a material set. It must contain the selected native/<platform> and libraries referenced by native-libs-load-order.txt. Source runs select the runtime platform and architecture; WSL configured to launch Windows Java selects windows-amd64. Windows requires the base License.dat; production also requires that platform's prd/cry_analyst.dll and prd/License.dat. The two default licenses are tracked with their corresponding DLLs. Linux and macOS allow an absent license; a supplied license must be a nonempty regular file. Production still requires the selected platform's algorithm overrides, without fallback to another platform or base materials.
Each source startup in production mode creates a separate runtime/backend-native-production-* staging directory under the runtime root. Base materials are copied without the prd subtree, then the selected platform's prd overrides are applied. The root launcher and desktop child use the same staged path. Normal shutdown removes only that startup's directory; original files remain unchanged. test reads the selected platform's base directory directly and does not imply a separate test service. OPENTEST_NATIVE_DIR does not select the mode.
Public C++ source resides in apps/native; precompiled backend materials reside in apps/backend/crydaq-server/src/main/resources/native/<platform>. Mac/Linux packaging checks Java Native Interface (JNI) libraries for the com.opentest namespace and prepareManagedRuntime interface, plus the matching device host and algorithm libraries. JNI source is not in this repository, so packaging does not compile it. Preparation fails when matching materials or production overrides are missing. Platform operation and hardware compatibility still require testing on actual target machines. Native libraries use the main native-libs-load-order.txt manifest.
pnpm build only compiles source and does not select a license mode. Direct Java startup from an IDE is outside these launcher rules.
Select the packaging mode with --mode test|production or the corresponding shortcut. Both modes in packaging.config.json use https://update.opentest.com. Production delivery examples explicitly pass --mode production; an omitted mode still defaults to test. Packaging does not read the source environment file's license mode or URL, but loads other local settings such as JDK paths. Charts use a fixed artifact and need no runtime license. Delivery prechecks fail if the selected mode lacks licenseUrl; standalone native signing only needs the relevant material paths.
Use --config to override backendNativeMaterialsRoot, the selected mode's licenseUrl, and other delivery fields. The material root still points to resources. Windows installation, upgrade, and signing select its native/windows-amd64. The package writes the mode and URL to opentest-build.json, places selected materials directly in backend/native/ without platform or prd subtrees, and writes the URL to staged backend properties. Installed applications use their packaged declarations and materials, without reading the developer machine's runtime.env.
Both modes use the same installation identity, location, and user data directory. Account for their overwrite behavior before installation. Plugin packages do not contain these backend license materials; the host configuration supplies them.
Entry points check mode fields, basic URL syntax, native directory structure, and required files. They do not validate file fingerprints or compare source-run and packaging URLs. Maintainers must ensure that the chosen service and materials are compatible. Startup logs identify the selected mode, URL, and configuration file.
Machine offline certificates, online asset caches, and login recovery markers remain isolated by normalized service URL. This isolation is independent of shared installation identities and project data directories.
Targeted checks: node --test tools/__tests__/runtime.test.mjs tools/__tests__/service-environment.test.mjs tools/__tests__/packaging.test.mjs tools/__tests__/dev-backend.test.mjs.