Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

136 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AtomicDEX Legacy Builder

Note

Tag-based releases auto-create GitHub Releases with a PROVENANCE.md manifest and SHA256 values in the release body table. See STATUS.md for current state.

CI release surfaces:

  • KDF binaries: Linux x86_64, macOS Intel/x86_64, Windows x86_64
  • Desktop wallets: Linux AppImage (~187 MB), macOS Intel DMG (~146 MB), Windows x86_64 portable ZIP (~186 MB)
  • WASM artifact: atomicdex-kdf-wasm-bundle.zip containing the full wasm-pack runtime output needed by mm2.js (mm2.js, mm2_bg.wasm, package.json, README.txt, and generated snippets/ when emitted)

Portable build scripts for producing verified Komodo/AtomicDEX legacy artifacts:

  • KDF engine from KomodoPlatform/komodo-defi-framework
  • Desktop wallet from cipig/komodo-wallet-desktop (nogeo)
  • Optional KDF WebAssembly build

The native platform scripts are the source of truth for build behavior. On Linux, the command wrapper prefers Docker for clean-room builds when it is available; macOS and Windows default to their native scripts.

Proven Linux build: KDF engine (~65 MB) and desktop AppImage (~187 MB) built from cipig/nogeo on ubuntu:22.04 / glibc 2.35. The artifacts run on Debian 12+ and modern Linux systems.

Tested macOS builds: Intel/x86_64 desktop app, plus native arm64 / Apple Silicon desktop app on Mac mini M2. The native arm64 path disables the QtWebEngine-dependent chart/price widget because Homebrew qt@5 does not ship QtWebEngine on arm64.

Tested Windows build: Full KDF + desktop wallet build on Windows 10+ x86_64 with VS Build Tools 2022, Qt 5.15.2, and vcpkg. Detailed walkthrough in WINDOWS.md.


Quick start

Use the command wrapper unless you have a reason to call a platform script directly:

# Auto-detect build path
# - Linux: prefers Docker when available, otherwise native
# - macOS / Windows: prefers native
./commands/build/command.sh

# Build one target
./commands/build/command.sh kdf
./commands/build/command.sh desktop
./commands/build/command.sh wasm

# Force native scripts instead of Docker
./commands/build/command.sh native
./commands/build/command.sh native kdf
./commands/build/command.sh native desktop

# Clean generated artifacts
./commands/build/command.sh clean
./commands/build/command.sh clean --all   # also prune Docker BuildKit cache

Artifacts land in:

Linux:    output/linux/
Windows:  output/windows/
WASM:     output/wasm/
macOS:    output/mac-intel/ or output/mac-arm/

WASM build output in the workspace is the raw wasm-pack bundle:

output/wasm/mm2.js
output/wasm/mm2_bg.wasm
output/wasm/package.json
output/wasm/snippets/   # present when generated by wasm-pack

GitHub Releases package that runtime bundle as atomicdex-kdf-wasm-bundle.zip for cleaner downloads.

Logs land in:

Linux:    logs/linux/
Windows:  logs/windows/
WASM:     logs/wasm/
macOS:    logs/mac-intel/ or logs/mac-arm/

Common workflows

1. Build everything on Linux

./commands/build/command.sh

On Linux, if Docker is running, the wrapper uses the clean-room Docker path. If Docker is unavailable, it falls back to the native Linux script.

To force native:

./commands/build/command.sh native

2. Build only KDF

./commands/build/command.sh kdf

Native equivalent:

src/build-linux.sh --kdf-only

3. Build only the desktop AppImage

./commands/build/command.sh desktop

Native equivalent:

src/build-linux.sh --desktop-only

Desktop builds expect KDF to already be available from a prior run.

4. Run the built Linux desktop wallet

chmod +x output/linux/atomicdex-desktop-linux-x86_64.AppImage
./output/linux/atomicdex-desktop-linux-x86_64.AppImage

5. Trigger GitHub Actions builds manually

./commands/trigger-ci/command.sh linux
./commands/trigger-ci/command.sh linux wasm
./commands/trigger-ci/command.sh all --no-wait

This fires the build.yml workflow in Canada-eCoin/legacy-atomicdex-builder and optionally polls until the run completes. Requires the GitHub CLI (gh) and authentication with permission to dispatch workflows.


Native build scripts

Call these directly when you want full control or platform-specific flags.

Linux

src/build-linux.sh                  # full build: KDF + desktop
src/build-linux.sh --kdf-only       # KDF only (~5 min cached)
src/build-linux.sh --desktop-only   # desktop only (~8 min cached, longer first run)
src/build-linux.sh --yes            # skip consent prompts
src/build-linux.sh --dry-run        # check dependencies and print plan
src/build-linux.sh --install-deps   # install missing dependencies only

The Linux script detects apt, dnf, pacman, or zypper, explains missing dependencies, and asks before installing anything unless --yes or BUILD_YES=1 is set.

macOS

src/build-mac.sh                    # wrapper: host default (Intel on x86_64, arm on arm64)
src/build-mac.sh --arch intel       # force Intel/x86_64 desktop path
src/build-mac.sh --arch arm         # force native arm64 desktop path
src/build-mac-intel.sh              # direct Intel/x86_64 path
src/build-mac-arm.sh                # direct native arm64 path
src/build-mac.sh --yes              # skip consent prompts
src/build-mac.sh --dry-run          # check dependencies and print plan

Requires Xcode CLI tools. The Intel/x86_64 path builds the full QtWebEngine desktop shape. The native arm64 / Apple Silicon path is tested on Mac mini M2 and disables the QtWebEngine-dependent chart/price widget because Homebrew qt@5 does not provide QtWebEngine on arm64.

Windows

src/build-windows.ps1               # full: KDF + desktop guidance
src/build-windows.ps1 -KdfOnly      # KDF only
src/build-windows.ps1 -Yes          # skip prompts
src/build-windows.ps1 -DryRun       # check dependencies and print plan

If you're running from Git Bash / MSYS / Cygwin, the command wrapper now forwards native Windows builds to PowerShell:

./commands/build/command.sh native
./commands/build/command.sh native kdf
./commands/build/command.sh native desktop --dry-run

KDF builds natively with Rust. Desktop wallet builds with Qt5 + MSVC; full walkthrough in WINDOWS.md.


Docker clean-room builds

Docker is the clean-room path for Linux artifacts. The Dockerfile lives at src/Dockerfile, so direct Docker commands must pass -f src/Dockerfile. macOS and Windows default to their native build scripts in auto mode. Builder base images are pinned in config/toolchains.json, so direct Docker use should derive and pass them explicitly:

export KDF_BASE_IMAGE="$(jq -r '.builder_bases.linux_kdf.source + ":" + .builder_bases.linux_kdf.tag' config/toolchains.json)"
export DESKTOP_BASE_IMAGE="$(jq -r '.builder_bases.linux_desktop.source + ":" + .builder_bases.linux_desktop.tag' config/toolchains.json)"

# KDF only
docker build --build-arg KDF_BASE_IMAGE="$KDF_BASE_IMAGE" --build-arg DESKTOP_BASE_IMAGE="$DESKTOP_BASE_IMAGE" \
  --target kdf \
  -f src/Dockerfile \
  -o output/linux \
  .

# Desktop AppImage
docker build --build-arg KDF_BASE_IMAGE="$KDF_BASE_IMAGE" --build-arg DESKTOP_BASE_IMAGE="$DESKTOP_BASE_IMAGE" \
  --target desktop \
  -f src/Dockerfile \
  -o output/linux \
  .

# Everything
docker build --build-arg KDF_BASE_IMAGE="$KDF_BASE_IMAGE" --build-arg DESKTOP_BASE_IMAGE="$DESKTOP_BASE_IMAGE" \
  --target all \
  -f src/Dockerfile \
  -o output/linux \
  .

WASM uses a separate Dockerfile:

export WASM_KDF_BASE_IMAGE="$(jq -r '.builder_bases.wasm_kdf.source + ":" + .builder_bases.wasm_kdf.tag' config/toolchains.json)"
export BINARYEN_REPO="$(jq -r '.dependencies.binaryen.repo' config/sources.json)"
export BINARYEN_TAG="$(jq -r '.dependencies.binaryen.tag' config/sources.json)"

docker build --build-arg WASM_KDF_BASE_IMAGE="$WASM_KDF_BASE_IMAGE" \
  --build-arg BINARYEN_REPO="$BINARYEN_REPO" \
  --build-arg BINARYEN_TAG="$BINARYEN_TAG" \
  -f src/Dockerfile.kdf-wasm \
  -o output/wasm \
  .

In normal use, prefer the wrapper:

./commands/build/command.sh wasm

src/docker-build.sh is the inner script called by the Dockerfile. You usually do not run it directly.


GitHub Actions CI

A starter workflow now lives at:

.github/workflows/build.yml

Current CI is manual-only via workflow_dispatch for development, and tag-triggered for releases. Nothing runs on push to main.

Development builds — from the Actions tab or CLI:

./commands/ci/trigger.sh linux          # Linux only
./commands/ci/trigger.sh linux wasm     # Linux + WASM
./commands/ci/trigger.sh all            # everything
./commands/ci/trigger.sh windows --no-wait  # fire and forget

Release builds — push a version tag, all four platforms build and a GitHub Release is created automatically:

git tag v0.1.0 && git push --tags

The release includes individual artifacts with platform-prefixed names, SHA256 checksums, and a full provenance table listing every pinned upstream source.

Current CI shape:

  • Linux: full Docker build → KDF + AppImage (output/linux/)
  • macOS Intel: native build → KDF + DMG (output/mac-intel/)
  • Windows: full native build → KDF + portable ZIP (output/windows/)
  • WASM: Docker build via wasm-pack (output/wasm/, including generated snippets/ when emitted)

Notes:

  • Tag pushes (v*) trigger all four platforms + a GitHub Release automatically.
  • Manual dispatch respects platform toggles — uncheck what you want to skip.
  • All four platform toggles default to on for manual runs.
  • Each CI job uploads both its output/<platform>/ artifacts and logs/<platform>/ build logs.
  • macOS CI is pinned to an Intel runner (macos-15-intel); the native ARM path has a QtWebEngine limitation (see STATUS.md).

For forks

If you fork this repo and want CI to work, you need to:

  1. Enable Actions — GitHub disables Actions on forks by default. Go to your fork → Settings → Actions → General → "Allow all actions".

  2. Actions permissions — the workflow uses actions: write for the BuildKit GHA cache backend. Under Settings → Actions → General → Workflow permissions, select "Read and write permissions".

  3. Windows builds need GITHUB_TOKEN — the Windows job passes GITHUB_TOKEN to the build script for authenticated git clone of the upstream KDF repo. Without this, shared GitHub runner IPs hit unauthenticated rate limits and the clone fails. Forks get this automatically (GitHub provides secrets.GITHUB_TOKEN to all repos), but you must have Actions enabled per step 1 above.

  4. macOS runners — the macOS Intel job runs on macos-15-intel. If your fork/account doesn't have access to macOS runners (private repos on free plans), that job will stay queued indefinitely. Uncheck macos when triggering, or remove the job from your fork's copy of the workflow.

Current cache posture

  • Linux + WASM Docker builds: BuildKit GHA cache backend via docker-container driver with --cache-to type=gha,mode=max. Heavy layers (Cargo registry, KDF target dir, apt packages, wasm-pack) persist across runs when upstream sources haven't changed.
  • Windows: Qt 5.15.2 is cached via install-qt-action (~330 MB). Cargo/vcpkg are currently cold-start each run.
  • macOS: no cross-run caching yet; Cargo, vcpkg, and Homebrew deps are cold-start.

Target roadmap

Platform Arch Current shape Eventual targets
Linux x86_64 KDF + AppImage + CI KDF, Qt desktop, AppImage, checksums
macOS x86_64 KDF + DMG + CI KDF, Qt desktop, DMG, checksums
macOS arm64 native path with QtWebEngine limitation KDF, Qt desktop, DMG, checksums
Windows x86_64 KDF + portable ZIP + CI KDF, Qt desktop, portable ZIP, installer EXE, checksums
Windows arm64 roadmap KDF, Qt desktop, portable ZIP, installer EXE, checksums
KDF wasm CI green + in releases wasm KDF artifact, checksums

Recommended landing order:

  1. Linux x86_64 CI green
  2. Windows x86_64 KDF CI green
  3. macOS Intel CI green
  4. KDF wasm CI added
  5. Windows x86_64 desktop packaging
  6. macOS arm64 polish
  7. Windows ARM64 KDF
  8. Windows ARM64 desktop packaging
  9. signing / reproducibility / manifests
  10. Windows installer EXE / macOS .pkg

What the build does

  1. Detects platform, package manager, and architecture.
  2. Checks required dependencies and explains what is missing.
  3. Requests consent before installing dependencies, unless consent is pre-approved.
  4. Clones pinned upstream repositories from config/sources.json.
  5. Builds the requested target with numbered progress steps.
  6. Writes artifacts and checksums to platform-specific output directories (output/linux/, output/windows/, output/wasm/, output/mac-intel/, output/mac-arm/).
  7. Writes logs and install breadcrumbs to matching platform-specific log directories (logs/linux/, logs/windows/, logs/wasm/, logs/mac-intel/, logs/mac-arm/).

Output

Typical Linux output:

output/linux/
├── atomicdex-kdf-linux-x86_64                65 MB   KDF engine
├── atomicdex-kdf-linux-x86_64.sha256
├── atomicdex-desktop-linux-x86_64.AppImage   187 MB  desktop wallet
├── atomicdex-desktop-linux-x86_64.AppImage.sha256
└── atomicdex-desktop-linux-x86_64             25 MB   raw binary fallback

Verify a checksum:

cat output/linux/atomicdex-kdf-linux-x86_64.sha256
sha256sum output/linux/atomicdex-kdf-linux-x86_64

The two hashes should match.


Configuration

Copy the sample environment file when you need overrides:

cp env.sample .env

Common variables:

Variable Default Purpose
BUILD_YES unset Set to 1 to skip consent prompts.
BUILD_CPUS auto CPU cores for compilation. Linux defaults to about 1/3 of cores.
OUTPUT_DIR ./output Artifact directory. Platform is appended by scripts.
LOG_DIR ./logs Build log directory. Platform is appended by scripts.
BUILD_DIR ./.build Upstream clone and compile cache.
INSTALL_PREFIX ~/.local Install prefix used by commands/install.
KDF_REPO / KDF_COMMIT config/sources.json Override KDF source pin.
DESKTOP_REPO / DESKTOP_COMMIT config/sources.json Override desktop source pin.
SOURCE_DATE_EPOCH current time Set for reproducible byte-identical output.

See env.sample for all supported variables and platform-specific settings.


Source pins

Current source pins are in config/sources.json.

Primary upstream sources

Component Source Kind Pin
KDF KomodoPlatform/komodo-defi-framework git commit 30c877c5
Desktop cipig/komodo-wallet-desktop, branch nogeo git commit 0d333c5

Supporting dependency revisions

Component Source Kind Pin
Qaterial OlivierLDff/Qaterial git commit c2f32d2
Coin configs cipig/coins, branch nogeo git commit 6d0db32
vcpkg baseline microsoft/vcpkg git commit 36393d1ca008d0086488a9041afac26ed3b8edb9
libwally-core ElementsProject/libwally-core git tag release_0.9.2
binaryen WebAssembly/binaryen git tag version_120

Toolchain pins

Current toolchain and builder-base pins are in config/toolchains.json.

Component Source Kind Pin
Qt (windows) download.qt.io/archive/qt/5.15/5.15.2/ version 5.15.2
Qt (macOS Intel) download.qt.io/archive/qt/5.15/5.15.2/ version 5.15.2
Linux KDF builder base docker.io/library/rust image tag 1.84.0-bookworm
Linux desktop builder base docker.io/library/ubuntu image tag 22.04 (glibc 2.35)
WASM KDF builder base docker.io/library/rust image tag 1.84.0-bookworm

Native macOS arm64 remains host-driven: the build expects a usable local Qt5 installation (typically Homebrew qt@5) and does not treat that surface as a fully pinned reproducible toolchain.

Environment variables can override these pins for local experiments or CI.


Repository layout

atomicdex-legacy-builder/
├── commands/
│   ├── build/command.sh         main entry point
│   └── trigger-ci/command.sh    dispatch GitHub Actions builds
├── config/
│   ├── sources.json             pinned upstream repos and dependency revisions
│   └── toolchains.json          pinned Qt + Docker builder-base versions
├── src/
│   ├── build-linux.sh           native Linux build
│   ├── build-mac.sh             macOS build dispatcher
│   ├── build-mac-intel.sh       Intel/x86_64 macOS build
│   ├── build-mac-arm.sh         native arm64 macOS build
│   ├── build-windows.ps1        native Windows build
│   ├── _build-lib.sh            shared shell helpers
│   ├── docker-build.sh          inner Docker build script
│   ├── Dockerfile               Linux multi-stage Docker build
│   └── Dockerfile.kdf-wasm      KDF → WebAssembly build
├── output/                      build artifacts, gitignored
├── logs/                        build logs, gitignored
├── .build/                      upstream clones/cache, gitignored
├── env.sample                   documented environment variables
├── README.md                    primary operator guide
├── STATUS.md                    current build and release state
└── WINDOWS.md                   detailed native Windows build guide

Design principles

  • Native first: platform scripts are the source of truth; Docker wraps the Linux path for clean-room builds.
  • Pinned inputs: upstream repos and dependency revisions live in config/sources.json; toolchain and builder-base pins live in config/toolchains.json.
  • Keep the surface small: prefer pinning and wrapper changes over carrying extra local overlay machinery.
  • Human-readable failure: scripts explain missing tools and suggested fixes.
  • Consent before install: dependency installation is explicit unless --yes / BUILD_YES=1 is used.
  • Visible progress: long builds print numbered steps and write logs.
  • Verifiable output: artifacts ship with sha256 files for independent rebuild comparison.

Security software false positives

Windows Defender and some other AV products may flag komodo-wallet.exe and/or atomicdex-kdf-windows-x86_64.exe as suspicious. These are false positives — our binaries are unsigned, which inflates machine-learning classifier scores. See WINDOWS.md § Windows Defender false positives for the full explanation, SHA256 verification steps, and instructions for submitting a false-positive report to Microsoft.

Quick trust path

Every artifact ships with a .sha256 file. Verify before your AV quarantines it:

# Windows (PowerShell)
Get-FileHash .\komodo-wallet.exe -Algorithm SHA256
# Compare against the published value in the GitHub Release body
# Linux / macOS
sha256sum atomicdex-desktop-linux-x86_64.AppImage
# Compare against the published value in the GitHub Release body

If the hash matches the release table, the binary is exactly what we built — regardless of what your antivirus says.


Troubleshooting

Symptom Fix
cmake: command not found src/build-linux.sh --install-deps && src/build-linux.sh
qtbase5-dev not found Re-run with --install-deps. Qt5 is large; the script explains before installing.
GLIBC_2.38 not found Rebuild on ubuntu:22.04 / glibc 2.35 for wider compatibility.
Build uses too much CPU Set a lower cap: BUILD_CPUS=2 src/build-linux.sh.
Docker out of disk Run docker system prune -a if you are comfortable deleting Docker cache/images.
macOS: xcode-select error Run xcode-select --install.
Windows: Qt/WebEngine link errors See WINDOWS.md troubleshooting — most common causes are MSVC toolset version mismatch and libsodium overlay port path.
Windows Defender flags wallet as Trojan False positive — see Security software false positives above.

See also

  • https://kingofalldata.com/juno/briefs/2026-06-09-ecoincore-exchange-sovereign-dex-arc.md — master architecture brief

About

Portable build system for legacy Komodo/AtomicDEX artifacts. It pins upstream sources, builds KDF, desktop AppImage, and optional WASM via native scripts or Docker, then outputs verifiable binaries, hashes, logs, and install commands.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages