Application Packaging
Relevant source files
The following files were used as context for generating this wiki page:
Application packaging in OpenHWP involves transforming the Deno-based source code and the rhwp document engine into platform-specific binaries and installers. The process relies on the deno desktop toolchain to bundle a native webview shell with the application logic, ensuring cross-platform compatibility across macOS, Windows, and Linux.
The packaging strategy emphasizes a thin platform shell that delegates document processing to WebAssembly modules. This approach allows for a unified distribution model where the rendering backend (CEF/Chromium) is consistent across different operating systems.
Sources: README.en.md:12-22, README.md:13-23
Packaging Architecture
OpenHWP's packaging architecture is designed around the Deno 2.9+ runtime. It uses a single toolchain to handle dependencies, development, and the final production of binaries.
Build Components
| Component | Description |
|---|---|
| Deno Toolchain | Handles linting, testing, and the deno desktop build command. |
| CEF (Chromium) | The mandatory rendering backend to ensure identical UI/UX across platforms. |
| Standalone Binary | The output of the initial build phase, containing the Deno runtime and app code. |
| Platform Installers | Final distribution formats like .dmg, .msi, and .deb. |
Sources: README.en.md:17-19, README.en.md:54-61, CONTRIBUTING.md:14-16
Build Pipeline Flow
The following diagram illustrates the transition from source code to a distributed application package.
The diagram shows how the deno desktop command consumes the source files and backend configuration to produce platform-specific installers.
Sources: README.en.md:54-65, README.md:56-67
Distribution Formats
OpenHWP targets major desktop operating systems with native installer formats. The roadmap includes automated packaging in Continuous Integration (CI) environments, incorporating signing and notarization for secure distribution.
Target Formats by Platform
| Platform | Installer Format | Security Requirements |
|---|---|---|
| macOS | .dmg | Signing and Notarization |
| Windows | .msi | Signing |
| Linux | .deb, .AppImage, .rpm | Standard Package Management |
Sources: README.en.md:68-71, README.md:70-73
Build Configuration and Commands
The packaging process is driven by the deno desktop command, which utilizes configuration defined in the project's deno.json file.
CLI Usage
To produce a standalone binary with the specific Chromium backend:
deno desktop main.ts --backend cef
Sources: README.en.md:58-59, README.md:60-61
To generate platform-specific installers as defined in the desktop.output configuration:
deno desktop main.ts
Sources: README.en.md:61-62, README.md:63-64
Dependencies and Environment
The packaging environment requires Deno version 2.9.0 or later to support the desktop subcommand. Workspace setup is managed via scripts that ensure local configurations and dependencies are cached before the build process begins.
This sequence highlights the dependency on the deno.json configuration for defining output targets.
Sources: CONTRIBUTING.md:11-16, orca.yaml:14-18, README.en.md:51-52
Summary
Application packaging in OpenHWP is a streamlined process facilitated by Deno's native desktop support. By utilizing the CEF backend and standardizing on platform-native installers like .dmg and .msi, the project ensures a consistent and secure user experience. The roadmap focuses on automating these builds within CI to include necessary security signatures and notarizations for production releases.
Sources: README.en.md:68-71, README.md:70-73