ollama/app
Daniel Hiltgen a84b315e7b
test: harden flaky updater and transfer unit tests (#17378)
app/updater: TestBackgoundChecker / TestAutoUpdateDisabledSkipsDownload hit 'TempDir RemoveAll cleanup: directory not empty' on macOS because the background checker goroutine keeps writing staged files into UpdateStageDir while t.TempDir cleanup runs. The checker's context is cancelled by the time cleanup runs, and after cancellation a new download cannot reach the filesystem (DownloadNewRelease aborts at its HEAD request before any write), so it suffices to wait for any in-flight download to drain. Add a test-only waitDownloadIdle helper (polls the existing cancelDownload sentinel under its lock) and register it via t.Cleanup so TempDir cleanup runs after staged-file handles close. No production code changes.

x/transfer: TestDownloadParallelism asserted elapsed <= 1s against 50ms-per-blob delays, too tight for Windows hosted runners' ~15ms timer granularity and shared-runner jitter. Each blob costs two server sleeps (resolve GET + body GET), so model the serial baseline from the deterministic request count, raise per-blob latency to 100ms so timer quantization is a small fraction of each delay, and key the budget to 75% of the serial baseline so the check still proves parallelism while tolerating jitter.
2026-07-24 13:23:30 -07:00
..
assets app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
auth app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
cmd app: remove ollama update url env var used for testing (#15905) 2026-04-30 13:14:08 -07:00
darwin/Ollama.app/Contents app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
dialog tidy up lint warnings on windows (#13430) 2025-12-12 11:43:35 -05:00
format app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
logrotate app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
server Kill llama-server during Windows cleanup (#16458) 2026-06-03 10:25:12 -07:00
store launch: codex app integration (#16120) 2026-05-13 17:11:52 -07:00
tools More harden app markdown URL handling (#16436) 2026-06-02 11:46:14 -07:00
types/not app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
ui launch: rename Codex App integration to ChatGPT (#17161) 2026-07-13 14:34:17 -07:00
updater test: harden flaky updater and transfer unit tests (#17378) 2026-07-24 13:23:30 -07:00
version app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
webview app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
wintray app: add upgrade configuration to settings page (#13512) 2026-02-23 18:08:52 -05:00
.gitignore app: add code for macOS and Windows apps under 'app' (#12933) 2025-11-04 11:40:17 -08:00
ollama.iss Kill llama-server during Windows cleanup (#16458) 2026-06-03 10:25:12 -07:00
ollama.rc update installer and app.exe metadata 2024-02-15 05:56:45 +00:00
README.md build: add -O3 optimization to CGO flags (#13877) 2026-01-24 10:55:38 -08:00

Ollama for macOS and Windows

Download

Development

Desktop App

go generate ./... &&
go run ./cmd/app

UI Development

Setup

Install required tools:

go install github.com/tkrajina/typescriptify-golang-structs/tscriptify@latest

Develop UI (Development Mode)

  1. Start the React development server (with hot-reload):
cd ui/app
npm install
npm run dev
  1. In a separate terminal, run the Ollama app with the -dev flag:
go generate ./... &&
OLLAMA_DEBUG=1 go run ./cmd/app -dev

The -dev flag enables:

Build

Windows

Dependencies - either build a local copy of ollama, or use a github release

# Local dependencies
.\scripts\deps_local.ps1

# Release dependencies
.\scripts\deps_release.ps1 0.6.8

Build

.\scripts\build_windows.ps1

macOS

CI builds with Xcode 14.1 for OS compatibility prior to v13. If you want to manually build v11+ support, you can download the older Xcode here, extract, then mv ./Xcode.app /Applications/Xcode_14.1.0.app then activate with:

export CGO_CFLAGS="-O3 -mmacosx-version-min=12.0"
export CGO_CXXFLAGS="-O3 -mmacosx-version-min=12.0"
export CGO_LDFLAGS="-mmacosx-version-min=12.0"
export SDKROOT=/Applications/Xcode_14.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
export DEVELOPER_DIR=/Applications/Xcode_14.1.0.app/Contents/Developer

Dependencies - either build a local copy of Ollama, or use a GitHub release:

# Local dependencies
./scripts/deps_local.sh

# Release dependencies
./scripts/deps_release.sh 0.6.8

Build

./scripts/build_darwin.sh