# Desktop Builds {#desktop-builds}


Building desktop applications for Windows, macOS, and Linux.


## Build Tools {#build-tools}


| Tool                 | Purpose                      |
| -------------------- | ---------------------------- |
| **NX**               | Task orchestration and build |
| **electron-builder** | Packaging and distribution   |
| **Angular CLI**      | Frontend build               |
| **TypeScript**       | Compilation                  |


## Build Process {#build-process}


```
1. TypeScript Compilation (core packages)
2. Angular Build (desktop UI)
3. NestJS Build (embedded API, for server apps)
4. Electron Build (packaging)
5. Code Signing (platform-specific)
6. Publishing (GitHub Releases)
```


## Build Commands {#build-commands}



### Desktop Timer {#desktop-timer}


```bash
# Development
yarn start:desktop-timer

# Production build
yarn build:desktop-timer

# Package for distribution
yarn package:desktop-timer
```


### Desktop Server {#desktop-server}


```bash
# Development
yarn start:server

# Production build
yarn build:server

# Package for distribution
yarn package:server
```


## Output Formats {#output-formats}


| Platform | Format         | Extension   |
| -------- | -------------- | ----------- |
| Windows  | NSIS installer | `.exe`      |
| Windows  | Portable       | `.exe`      |
| macOS    | DMG            | `.dmg`      |
| macOS    | pkg            | `.pkg`      |
| Linux    | AppImage       | `.AppImage` |
| Linux    | DEB            | `.deb`      |
| Linux    | RPM            | `.rpm`      |


## electron-builder Configuration {#electron-builder-configuration}


```yaml
# electron-builder.yml
appId: com.ever.gauzy.desktop.timer
productName: Gauzy Desktop Timer

directories:
  output: dist/packages/desktop-timer

files:
  - dist/**/*
  - node_modules/**/*
  - package.json

win:
  target:
    - nsis
    - portable
  icon: assets/icons/icon.ico

mac:
  target:
    - dmg
    - pkg
  icon: assets/icons/icon.icns
  hardenedRuntime: true
  entitlements: build/entitlements.mac.plist

linux:
  target:
    - AppImage
    - deb
  icon: assets/icons
  category: Office
```


## Code Signing {#code-signing}



### Windows {#windows}


Requires an Authenticode certificate:

```bash
CSC_LINK=path/to/certificate.pfx
CSC_KEY_PASSWORD=certificate-password
```


### macOS {#macos}


Requires Apple Developer ID and notarization:

```bash
CSC_LINK=path/to/certificate.p12
CSC_KEY_PASSWORD=certificate-password
APPLE_ID=your-apple-id@example.com
APPLE_ID_APP_PASSWORD=app-specific-password
APPLE_TEAM_ID=your-team-id
```


## Related Pages {#related-pages}


- [Desktop Overview](https://sourcey-gauzy.pages.dev/desktop/desktop-overview/index.md)
- [Auto-Updater](https://sourcey-gauzy.pages.dev/desktop/auto-updater/index.md) — update distribution
- [GitHub Actions](https://sourcey-gauzy.pages.dev/deployment/ci-cd/github-actions/index.md) — CI builds
