Skip to main content

Build Process

This page describes what happens internally when you run oidis install, oidis build, or related commands.


oidis install — Dependency & Environment Setup​

oidis install prepares the project for development. It runs the install task, which chains:

Production install (default — no option or option prod):

build-settings:prod
selfupdate:check ← check for newer builder version
wui-app-kill ← stop any running dev app
project-cleanup:build ← delete build/
project-cleanup:cache ← delete build_cache/
project-cleanup:source ← delete compiled JS in source/
project-cleanup:test ← delete test artifacts
project-cleanup:all ← full cleanup
install-local-script:force ← download deps + run install scripts (forced)

Dev / EAP install (options dev or eap):

build-settings:dev (or prod for eap)
selfupdate:check
wui-app-kill
project-cleanup:build
project-cleanup:source
project-cleanup:test
install-local-script ← download deps + run install scripts (if needed)

install-local-script performs:

  1. Resolve and download all dependencies from package.conf.jsonp (git clone, dir copy, or URL download)
  2. Run install-script for each dependency that specifies one (Node.js script)
  3. Set up node_modules (npm install for declared devDependencies)

Install does not touch ForceCompile.ts or the other generated code: interface registrations, namespace mappings and the ForceCompile.ts generated block are produced by the compile step of every build (see below).

tip

Run oidis install after pulling new changes or switching branches. If dependencies/ is empty, the builder auto-triggers install during the next build.


oidis build <type> — Full Build Flow​

oidis build <type> triggers the BuildExecutor task. The full flow:

1. builder-service:stop           ← stop any running Builder service

2. [if WUI modules needed]
wui-modules-download ← download Chromium / Connector / Launcher modules
wui-modules-download:force ← (prod) force re-download

3. project-cleanup:init ← init build state

4. For each release × platform:
product-settings:<index> ← apply release/platform overrides
build-machine:<type> ← run the full build machine for this product
[packaging tasks] ← toolchain-specific packaging

5. build-check:<type> ← validate build output exists

6. [if server required]
builder-service:start ← restart Builder service

build-machine — Per-Product Build Pipeline​

Each platform/release combination is built by build-machine:<type>. This is the core pipeline:

Pre-build​

build-check:pre-<type>            ← run registered pre-build checks

Compilation (compile:<type>)​

The compile task orchestrates language-specific compilation based on what source code the project has:

Variable substitution (always):

string-replace:var-replace        ← substitute @var expressions in source files

TypeScript (if projectHas.TypeScript.Source()):

Build typeTasks
devcache-manager:generate-ts → typescript-interfaces:source → typescript-mappings → typescript-reference:source → cache-manager:prepare-ts → typescript:source → copy-local-scripts:module-loader (ESM) or uglify:loader → cache-manager:finalize-ts → copy-local-scripts:declaration
prod / eapcache-manager:generate-prod-ts → cache-manager:prepare-ts → typescript-interfaces:source → typescript-mappings → typescript-reference:source → typescript:source → dev-blocks-cleanup → uglify:prod + uglify:loader (non-ESM) or copy-local-scripts:module-loader + cache-manager:finalize-prod-ts (ESM)

SASS (if projectHas.SASS()):

Build typeTasks
devsass-reference → cache-manager:generate-sass → sass-compile:source → cache-manager:finalize-sass
prod / eapsass-reference → sass-compile:dependencies → sass-compile:source → cssmin

C++ / XCpp (if projectHas.Cpp.Source()):

xcpp-interfaces:source
xcpp-reference:source
string-replace:xcpp
copy-staticfiles:targetresource
xcpp-compile:source
copy-staticfiles:targetresource-postbuild
copy-staticfiles:xcppresx
[xcpp-compile:unit] ← only for prod

Java (if projectHas.Java.Source()):

maven-env:init
maven-build
maven-env:clean

Python (if projectHas.Python.Source()):

python-compile

Markdown (if projectHas.Markdown()):

markdown-generate

Testing (test:<type>)​

Run after compilation if --with-test or build type is prod:

test:lint         ← all linters (TS, SASS, JS, C++, Java, Python)
test:unit ← unit tests (TS, C++, Python)
test:coverage ← code coverage (if prod)

Individual linters run per language:

  • TypeScript: typescript-lint:source (ESLint)
  • SASS: sass-lint:source (Stylelint)
  • JavaScript: jslint (ESLint)
  • C++: xcpp-lint:source (CppCheck)
  • Java: java-lint (Checkstyle)
  • Python: python-lint (Pylint)

Packaging​

After compilation, the builder packages the output based on toolchain:

ToolchainPackaging tasks
nodejs (app)nodejs-packaging → upx → code-sign
nodejs (shared)nodejs-packaging:shared → code-sign
chromium-re (app)var-replace → copy-local-scripts:target → cache-manager:finalize-chromium-re → wui-modules-release:chromium-re → upx → code-sign
gcc / clang / arm (app)upx → code-sign
gcc / clang / arm (shared/static)upx
jdkjava-packaging
pip (Python)python-packaging
installerselfextractor → upx → code-sign
phonegapphonegap-build

For prod/EAP builds:

project-cleanup:prod              ← remove dev-only files from target
compress:deploy ← create .zip archive for deployment
release-platform:<args> ← register the release platform

Multi-Platform & Multi-Release Builds​

target.platforms​

Define which platform targets to build. Each entry generates a separate product:

"target": {
"toolchain": "nodejs",
"platforms": [
"app-win-nodejs",
"app-linux-nodejs",
"app-mac-nodejs"
]
}

Platform string format: <type>-<os>-<toolchain>

TypeDescription
appFull executable application
sharedShared library
staticStatic library
pluginBrowser plugin
installerSelf-installer (Windows)
OSValues
Windowswin
Linuxlinux
macOSmac
ARMarm
ToolchainValues
Node.jsnodejs
GCCgcc
Clangclang
ARM cross-compileaarch32, aarch64
Javajdk, eclipse, idea
Pythonpip
Chromium Embeddedchromium-re

releases​

Multiple named releases can be produced from a single oidis build run. Each release inherits from target and can override any field:

"releases": {
"Win64": {
"platforms": ["app-win-gcc"],
"icon": "resource/graphics/icon-win.ico"
},
"Linux64": {
"platforms": ["app-linux-gcc"]
},
"ARM": {
"toolchain": "aarch64",
"platforms": ["app-arm-aarch64"]
}
}

A release can be skipped conditionally:

"ARM": {
"skipped": true,
"platforms": ["app-arm-aarch64"]
}

Build Type Differences​

Aspectdeveapprod
Optimization (UglifyJS)NoYesYes
Dev markers removedNoYesYes
Tests runNo (unless --with-test)NoYes
Source mapsYesNoNo
Type declarationsYesNoNo
Cache usageIncrementalFullFull
CoverageNoNoYes

Post-Build On-Close Tasks​

After all tasks complete (on any exit), the builder always runs cleanup:

CacheManager.ReferenceRollback()   ← revert TypeScript cache if build failed
DependenciesDownload.Rollback() ← revert partial dependency downloads
GitManager.StashRestore() ← restore git stash if used
EnvironmentArgs.UpdateMetadata() ← save build_cache/metadata.json

If --debug is active, a full task execution log is printed.


Cache Manager​

The builder uses a build cache (build_cache/) to avoid recompiling unchanged files. The cache works on SHA1 hashes of source files.

The cache is invalidated automatically when:

  • package.conf.jsonp configuration changes (tracked via hash in build_cache/metadata.json)
  • oidis install is run with forced cleanup
  • rebuild-* commands are used (always skip cache)

Incremental builds (dev type) use the cache heavily. Production builds always do a fresh compile.


See also: Module System | Tasks Reference | Force Compile