Skip to content

Commit def2a63

Browse files
committed
Update files
1 parent c56443d commit def2a63

21 files changed

Lines changed: 161 additions & 217 deletions

File tree

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: desktop
1+
name: one
22

33
on:
44
push:
55
tags:
6-
- 'desktop-v*'
6+
- 'one-v*'
77
workflow_dispatch:
88
inputs:
99
release:
@@ -65,13 +65,13 @@ jobs:
6565

6666
- uses: Swatinem/rust-cache@v2
6767
with:
68-
workspaces: apps/objectos-desktop/src-tauri
68+
workspaces: apps/objectos-one/src-tauri
6969

7070
- name: Install workspace deps
7171
run: pnpm install --frozen-lockfile
7272

7373
- name: Stage Node runtime
74-
run: pnpm --filter @objectos/desktop stage
74+
run: pnpm --filter @objectos/one stage
7575

7676
- name: Build Tauri bundle
7777
env:
@@ -85,26 +85,26 @@ jobs:
8585
# Tauri updater key (optional).
8686
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
8787
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
88-
run: pnpm --filter @objectos/desktop tauri build --target ${{ matrix.target }}
88+
run: pnpm --filter @objectos/one tauri build --target ${{ matrix.target }}
8989

9090
- name: Upload artifacts
9191
uses: actions/upload-artifact@v4
9292
with:
93-
name: objectos-desktop-${{ matrix.target }}
93+
name: objectos-one-${{ matrix.target }}
9494
path: |
95-
apps/objectos-desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.dmg
96-
apps/objectos-desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.app
97-
apps/objectos-desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.exe
98-
apps/objectos-desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.msi
99-
apps/objectos-desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.deb
100-
apps/objectos-desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.AppImage
101-
apps/objectos-desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.sig
95+
apps/objectos-one/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.dmg
96+
apps/objectos-one/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.app
97+
apps/objectos-one/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.exe
98+
apps/objectos-one/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.msi
99+
apps/objectos-one/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.deb
100+
apps/objectos-one/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.AppImage
101+
apps/objectos-one/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.sig
102102
if-no-files-found: warn
103103

104104
release:
105105
name: Draft release
106106
needs: build
107-
if: startsWith(github.ref, 'refs/tags/desktop-v') || inputs.release
107+
if: startsWith(github.ref, 'refs/tags/one-v') || inputs.release
108108
runs-on: ubuntu-22.04
109109
steps:
110110
- uses: actions/download-artifact@v4
@@ -115,5 +115,5 @@ jobs:
115115
with:
116116
draft: true
117117
generate_release_notes: true
118-
name: ObjectOS Desktop ${{ github.ref_name }}
118+
name: ObjectOS One ${{ github.ref_name }}
119119
files: artifacts/**/*

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ coverage/
1717
docker/artifacts/*
1818
!docker/artifacts/.gitkeep
1919
.cache/
20-
apps/objectos-desktop/runtime/
21-
apps/objectos-desktop/src-tauri/runtime/
22-
apps/objectos-desktop/src-tauri/target/
23-
apps/objectos-desktop/src-tauri/gen/
20+
apps/objectos-one/runtime/
21+
apps/objectos-one/src-tauri/runtime/
22+
apps/objectos-one/src-tauri/target/
23+
apps/objectos-one/src-tauri/gen/
24+
.objectstack/
Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
# `apps/objectos-desktop`
1+
# `apps/objectos-one`
22

3-
**ObjectOS Desktop** — a [Tauri](https://tauri.app) v2 shell that wraps
4-
the `@objectos/app` Node runtime as a sidecar and exposes it through a
5-
native WebView. The goal is a "download → double‑click → ready to use"
6-
experience for end users on macOS, Windows and Linux.
3+
**ObjectOS the all-in-one local distribution of ObjectOS. AOne**
4+
[Tauri](https://tauri.app) v2 shell that wraps the `@objectos/app` Node
5+
runtime as a sidecar and exposes it through a native WebView. The goal
6+
ready to use" experience on macOS,
7+
Windows and no Node, no database, no extra dependencies toLinux
8+
install.
79

810
## Architecture
911

1012
```
11-
┌──────────────────────────────────────────┐
12-
Tauri shell (Rust)
13-
│ ├── splash WebView (src/index.html)
14-
│ ├── system tray (open / restart / data
15-
folder / quit)
16-
│ ├── waits for sidecar port
17-
│ └── navigates to http://localhost:N
18-
19-
Sidecar: bundled Node runs
20-
apps/objectos/desktop.mjs
21-
│ → objectstack serve --port N
22-
│ → SQLite + uploads under
23-
$OBJECTOS_HOME
24-
└──────────────────────────────────────────┘
13+
14+
Tauri shell (Rust)
15+
splash WebView (src/index.html)
16+
system tray (open / restart / data
17+
folder / quit)
18+
waits for sidecar port
19+
navigates to http://localhost:N
20+
21+
Sidecar: bundled Node runs
22+
apps/objectos/one.mjs
23+
objectstack serve --port N
24+
SQLite + uploads under
25+
$OBJECTOS_HOME
26+
2527
```
2628

2729
The Node tree is staged under `runtime/` by
@@ -43,8 +45,8 @@ clean uninstall is just deleting that directory.
4345

4446
## Prerequisites
4547

46-
- Node ≥ 20 + pnpm 10
47-
- Rust (stable) — `curl https://sh.rustup.rs -sSf | sh`
48+
- 20 + pnpm 10Node
49+
- Rust ( `curl https://sh.rustup.rs -sSf | sh`stable)
4850
- macOS: Xcode Command Line Tools
4951
- Windows: WebView2 (preinstalled on Win10+) + MSVC build tools
5052
- Linux: `libwebkit2gtk-4.1-dev`, `build-essential`, `libssl-dev`,
@@ -54,17 +56,17 @@ clean uninstall is just deleting that directory.
5456

5557
```bash
5658
pnpm install
57-
pnpm desktop:dev # = pnpm --filter @objectos/desktop dev
59+
pnpm one:dev # = pnpm --filter @objectos/one dev
5860
```
5961

60-
First run builds Rust dependencies (~2–4 min). Subsequent runs are
62+
First run builds Rust dependencies (~4 min). Subsequent runs are2
6163
fast. The window opens on a splash page; once the sidecar is ready it
6264
navigates to the live Studio URL.
6365

6466
## Build distributables
6567

6668
```bash
67-
pnpm desktop:build
69+
pnpm one:build
6870
```
6971

7072
Output lands in `src-tauri/target/release/bundle/`:
@@ -77,13 +79,13 @@ Output lands in `src-tauri/target/release/bundle/`:
7779

7880
## CI
7981

80-
`.github/workflows/desktop.yml` builds all four platforms in parallel
82+
`.github/workflows/one.yml` builds all four platforms in parallel
8183
(macOS arm64, macOS x64, Windows x64, Linux x64). Trigger:
8284

83-
- Push a tag matching `desktop-v*` full build + draft GitHub release
84-
- Manual `workflow_dispatch` artifacts only
85+
full build + draft GitHub release
86+
artifacts only
8587

86-
The workflow is wired for code signing — provide the secrets below to
88+
The workflow is wired for code provide the secrets below tosigning
8789
enable. Without secrets the builds still succeed (unsigned binaries,
8890
end users will see OS warnings on first launch).
8991

@@ -99,8 +101,8 @@ Required repo secrets:
99101
| `APPLE_CERTIFICATE_PASSWORD` | the export password |
100102
| `APPLE_SIGNING_IDENTITY` | `Developer ID Application: Company (TEAMID)` |
101103
| `APPLE_ID` | Apple ID email used for notarization |
102-
| `APPLE_PASSWORD` | App‑specific password (appleid.apple.com → security) |
103-
| `APPLE_TEAM_ID` | 10char team ID from Apple Developer portal |
104+
security) |
105+
| `APPLE_TEAM_ID` | 10-char team ID from Apple Developer portal |
104106

105107
Tauri picks these up automatically and runs `codesign` + `notarytool`
106108
during `tauri build`.
@@ -113,20 +115,20 @@ during `tauri build`.
113115
| `WINDOWS_CERTIFICATE_PASSWORD` | export password |
114116

115117
Then in `tauri.conf.json` set `bundle.windows.certificateThumbprint`
116-
to the SHA1 thumbprint (or extend the workflow to import the .pfx
117-
and sign postbuild with `signtool`).
118+
to the SHA-1 thumbprint (or extend the workflow to import the .pfx
119+
and sign post-build with `signtool`).
118120

119121
### Tauri updater key (optional)
120122

121-
To enable inapp autoupdate:
123+
To enable in-app auto-update:
122124

123125
```bash
124126
pnpm tauri signer generate -w ~/.tauri/objectos.key
125127
```
126128

127129
Set `TAURI_SIGNING_PRIVATE_KEY` (file contents) and
128130
`TAURI_SIGNING_PRIVATE_KEY_PASSWORD` in CI, paste the public key into
129-
`tauri.conf.json → plugins.updater.pubkey`, and flip
131+
plugins.updater.pubkey`, and flip
130132
`plugins.updater.active` to `true`.
131133

132134
## Comparison with the portable zip
@@ -135,8 +137,8 @@ Set `TAURI_SIGNING_PRIVATE_KEY` (file contents) and
135137
|---|---|---|
136138
| Brand | none (terminal) | dock icon, menu, tray |
137139
| Size | ~110 MB zip | ~140 MB installer (signed) |
138-
| Autoupdate | no | yes (Tauri updater) |
139-
| Code signing | manual | firstclass |
140+
| Auto-update | no | yes (Tauri updater) |
141+
| Code signing | manual | first-class |
140142
| Dev effort | tiny | moderate (Rust toolchain) |
141143

142-
Both share `desktop.mjs`, so the runtime behaviour is identical.
144+
Both share `one.mjs`, so the runtime behaviour is identical.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "@objectos/desktop",
2+
"name": "@objectos/one",
33
"version": "0.0.0",
44
"private": true,
55
"license": "AGPL-3.0",
6-
"description": "ObjectOS Desktop — Tauri shell wrapping the @objectos/app Node runtime.",
6+
"description": "ObjectOS Oneall-in-one local distribution (Tauri shell + bundled Node runtime + DB).",
77
"type": "module",
88
"scripts": {
99
"stage": "node scripts/stage-runtime.mjs",

apps/objectos-desktop/scripts/stage-runtime.mjs renamed to apps/objectos-one/scripts/stage-runtime.mjs

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/usr/bin/env node
22
/**
33
* Stage the Node runtime + @objectos/app tree under
4-
* `apps/objectos-desktop/runtime/`, so Tauri's resource bundler can ship it.
4+
* `apps/objectos-one/runtime/`, so Tauri's resource bundler can ship it.
55
*
6-
* Reuses the same bits scripts/build-desktop.sh produces, but in-tree
6+
* Reuses the same bits scripts/build-one.sh produces, but in-tree
77
* (no zipping). Idempotent; re-run after changing @objectos/app.
88
*
99
* runtime/
1010
* node | node.exe
1111
* app/
12-
* desktop.mjs
12+
* one.mjs
1313
* package.json
1414
* dist/objectstack.json
1515
* node_modules/
@@ -25,7 +25,7 @@ const PKG = resolve(HERE, '..');
2525
const REPO = resolve(PKG, '../..');
2626
const APP = resolve(REPO, 'apps/objectos');
2727
const RUNTIME = resolve(PKG, 'src-tauri/runtime');
28-
const NODE_VERSION = process.env.NODE_VERSION ?? '20.18.1';
28+
const NODE_VERSION = process.env.NODE_VERSION ?? '22.22.0';
2929

3030
const osName = ({ darwin: 'darwin', linux: 'linux', win32: 'win' })[platform()];
3131
const archName = ({ x64: 'x64', arm64: 'arm64' })[arch()];
@@ -114,18 +114,13 @@ if (!existsSync(join(APP, 'dist/objectstack.json'))) {
114114
rmSync(RUNTIME, { recursive: true, force: true });
115115
mkdirSync(join(RUNTIME, 'app/dist'), { recursive: true });
116116
copyFileSync(join(APP, 'package.json'), join(RUNTIME, 'app/package.json'));
117-
copyFileSync(join(APP, 'desktop.mjs'), join(RUNTIME, 'app/desktop.mjs'));
117+
copyFileSync(join(APP, 'one.mjs'), join(RUNTIME, 'app/one.mjs'));
118118
copyFileSync(join(APP, 'dist/objectstack.json'), join(RUNTIME, 'app/dist/objectstack.json'));
119119

120-
sh(
121-
'npm install --omit=dev --no-audit --no-fund --loglevel=error --legacy-peer-deps better-sqlite3@^12.9.0',
122-
{ cwd: join(RUNTIME, 'app') }
123-
);
124-
125-
// 3b. slim node_modules: drop source maps, docs, tests, .d.ts — these
126-
// are useless at runtime and bloat the installer by ~30%.
127-
slim(join(RUNTIME, 'app', 'node_modules'));
128-
120+
// 3. Download the target Node first so native modules (better-sqlite3,
121+
// libsql, etc.) can be installed against the *exact* ABI that ships
122+
// in the bundle. Otherwise, building against the host Node (e.g. v22)
123+
// yields a NODE_MODULE_VERSION mismatch at runtime.
129124
const cache = resolve(REPO, '.cache/node');
130125
mkdirSync(cache, { recursive: true });
131126
const ext = osName === 'win' ? 'zip' : osName === 'linux' ? 'tar.xz' : 'tar.gz';
@@ -140,6 +135,27 @@ if (!existsSync(extractDir)) {
140135
else if (ext === 'tar.xz') sh(`tar -xJf "${tarball}" -C "${cache}"`);
141136
else sh(`cd "${cache}" && unzip -q "${tarball}"`);
142137
}
138+
139+
// 4. npm install — force prebuilt download for the bundled Node ABI,
140+
// not the host's. node-gyp / prebuild-install read these flags.
141+
const installEnv = {
142+
...process.env,
143+
npm_config_target: NODE_VERSION,
144+
npm_config_target_arch: archName,
145+
npm_config_target_platform: osName === 'win' ? 'win32' : osName,
146+
npm_config_runtime: 'node',
147+
npm_config_disturl: 'https://nodejs.org/dist',
148+
npm_config_build_from_source: 'false',
149+
};
150+
sh(
151+
'npm install --omit=dev --no-audit --no-fund --loglevel=error --legacy-peer-deps better-sqlite3@^12.9.0',
152+
{ cwd: join(RUNTIME, 'app'), env: installEnv }
153+
);
154+
155+
// 3b. slim node_modules: drop source maps, docs, tests, .d.ts — these
156+
// are useless at runtime and bloat the installer by ~30%.
157+
slim(join(RUNTIME, 'app', 'node_modules'));
158+
143159
if (osName === 'win') {
144160
copyFileSync(join(extractDir, 'node.exe'), join(RUNTIME, 'node.exe'));
145161
} else {
File renamed without changes.

apps/objectos-desktop/src-tauri/Cargo.toml renamed to apps/objectos-one/src-tauri/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
name = "objectos-desktop"
2+
name = "objectos-one"
33
version = "0.0.0"
4-
description = "ObjectOS Desktop shell"
4+
description = "ObjectOS One shell"
55
edition = "2021"
66
rust-version = "1.77"
77

88
[lib]
9-
name = "objectos_desktop_lib"
9+
name = "objectos_one_lib"
1010
crate-type = ["staticlib", "cdylib", "rlib"]
1111

1212
[build-dependencies]

apps/objectos-desktop/src-tauri/capabilities/default.json renamed to apps/objectos-one/src-tauri/capabilities/default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../gen/schemas/desktop-schema.json",
33
"identifier": "default",
4-
"description": "Default capabilities for ObjectOS Desktop",
4+
"description": "Default capabilities for ObjectOS One",
55
"windows": ["main"],
66
"permissions": [
77
"core:default",
File renamed without changes.

0 commit comments

Comments
 (0)