Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions desktop/windows/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ resources/win-ocr-helper/*.pdb
src/main/automation/helper/bin/
src/main/automation/helper/obj/
resources/win-automation-helper/*.pdb

# .NET build artifacts (win-update-helper)
src/main/update/win-update-helper/bin/
src/main/update/win-update-helper/obj/
resources/win-update-helper/*.pdb
8 changes: 8 additions & 0 deletions desktop/windows/dev-app-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Lets electron-updater run against GitHub Releases from an UNPACKED build
# (`npm run build:unpack`) when you also set `autoUpdater.forceDevUpdateConfig`,
# so the update round-trip can be exercised without a full install. Excluded from
# the packaged app (the real app-update.yml is generated from electron-builder.yml).
provider: github
owner: andermont
repo: omi-windows
updaterCacheDirName: omi-windows-updater
30 changes: 27 additions & 3 deletions desktop/windows/electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
appId: com.omiwindows.app
productName: Omi for Windows
productName: Omi
# Auto-update source: the official monorepo's GitHub Releases. electron-builder
# embeds an app-update.yml pointing here, so installed apps check BasedHardware/omi.
publish:
provider: github
owner: BasedHardware
repo: omi
directories:
buildResources: build
files:
Expand All @@ -19,16 +25,34 @@ asarUnpack:
# koffi loads its native .node at runtime, resolved relative to its own package
# dir — it must live outside the asar archive or the foreground monitor fails.
- node_modules/koffi/**
# koffi 3.x ships the actual prebuilt binary in a SEPARATE per-platform package
# (@koromix/koffi-win32-x64/win32_x64/koffi.node), which koffi's loader resolves
# as a sibling under node_modules. It must be present AND unpacked, or the
# packaged app crashes on launch with "Cannot find the native Koffi module".
# (It's pinned as a direct dependency so electron-builder reliably bundles it.)
- node_modules/@koromix/**
# Belt-and-suspenders: never leave any native binary stranded inside the asar.
- '**/*.node'
win:
executableName: omi-windows
executableName: omi
# The packaged exe / installer / Start-menu icon. Without this electron-builder
# falls back to the default Electron icon. 256x256 PNG → electron-builder makes
# the .ico. (The running window icon is set separately via nativeImage in main.)
icon: resources/icon.png
target:
- target: nsis
arch: [x64]
nsis:
# Assisted installer so the FIRST install offers a folder choice. Auto-updates
# are still silent (no wizard) because the app calls quitAndInstall(isSilent=true),
# which runs this installer with /S and reuses the registered install dir.
oneClick: false
perMachine: false
allowToChangeInstallationDirectory: true
artifactName: ${productName}-Setup-${version}.${ext}
# Static installer filename with no version, so the downloaded file is just
# "omi.exe". electron-updater keys off the version inside latest.yml, not the
# filename, so a constant name is fine across releases.
artifactName: omi.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
Expand Down
10 changes: 7 additions & 3 deletions desktop/windows/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "omi-windows",
"version": "1.0.0",
"version": "1.1.4",
"description": "An Electron application with React and TypeScript",
"main": "./out/main/index.js",
"author": "example.com",
"author": "Ander Mont",
"homepage": "https://electron-vite.org",
"scripts": {
"format": "prettier --write .",
Expand All @@ -16,9 +16,11 @@
"build": "npm run typecheck && electron-vite build",
"rebuild:sqlite": "electron-rebuild -f -w better-sqlite3",
"build:ocr-helper": "powershell -ExecutionPolicy Bypass -File scripts/build-ocr-helper.ps1",
"postinstall": "electron-builder install-app-deps && electron-rebuild -f -w better-sqlite3 && node scripts/ensure-ocr-helper.mjs",
"build:update-helper": "powershell -ExecutionPolicy Bypass -File scripts/build-update-helper.ps1",
"postinstall": "electron-builder install-app-deps && electron-rebuild -f -w better-sqlite3 && node scripts/ensure-ocr-helper.mjs && node scripts/ensure-update-helper.mjs",
"build:unpack": "npm run build && electron-builder --dir",
"build:win": "npm run build && electron-builder --win --x64",
"release:win": "npm run build && electron-builder --win --x64 --publish always",
"build:mac": "electron-vite build && electron-builder --mac",
"build:linux": "electron-vite build && electron-builder --linux",
"test": "vitest run",
Expand All @@ -29,6 +31,7 @@
"dependencies": {
"@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
"@koromix/koffi-win32-x64": "3.0.2",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-scroll-area": "^1.2.10",
Expand All @@ -42,6 +45,7 @@
"clsx": "^2.1.1",
"d3-force": "^3.0.0",
"d3-force-3d": "^3.0.6",
"electron-updater": "^6.8.9",
"firebase": "^12.13.0",
"koffi": "^3.0.2",
"lucide-react": "^1.16.0",
Expand Down
Loading
Loading