Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/smogon/pokemon-showdown-client/llms.txt

Use this file to discover all available pages before exploring further.

The Pokémon Showdown desktop application is built on top of NW.js (formerly known as Node-WebKit), which bundles a Chromium browser and a Node.js runtime into a single native executable. The desktop/ directory contains all the packaging assets — index.html, package.json, installer scripts, and icons — needed to ship the client as a standalone app on Windows and macOS.

Application Structure

The desktop app configuration lives entirely inside desktop/:
desktop/
├── DESKTOP.md               # Packaging instructions
├── Info.plist               # macOS app metadata template
├── index.html               # App entry point
├── package.json             # NW.js app manifest
├── icons/                   # Platform-specific icons
│   ├── icon_32x32.png       # PNG icon (used on Windows for window chrome)
│   ├── installerbg.bmp      # Background image for the NSIS installer
│   └── pokemonshowdown.ico  # Windows executable icon (applied via Resource Hacker)
├── make-nsis-script.js      # Generates the NSIS installer script
├── nwjs-entitlements.entitlements  # macOS Hardened Runtime entitlements
├── pokemonshowdown.nsi      # NSIS installer script (Windows)
└── sign-mac-app             # Shell script for macOS code signing
The desktop/package.json manifest tells NW.js how to launch the app:
{
  "name": "Pokemon Showdown",
  "version": "0.3.0",
  "main": "index.html",
  "node-remote": "https://play.pokemonshowdown.com/*",
  "window": {
    "icon": "icons/icon_32x32.png",
    "title": "Loading...",
    "toolbar": false,
    "show": false
  },
  "webkit": {
    "plugin": true
  }
}
NW.js does not support normal window icons on Windows (the icon shown in the title bar and taskbar). A PNG icon is used instead to avoid ugly scaling artefacts. The .ico file is only applied to the executable itself via Resource Hacker.
For performance, the app assets are not zipped on either platform. On Windows, index.html and package.json are dropped directly into the install directory. On macOS, they go inside Resources/app.nw.

Platform Icons

The graphics-src directory at the repository root contains the authoritative icon sources:
  • showdown.ico — Windows executable icon (multi-size .ico file)
  • showdown.icns — macOS app icon bundle
These are used whenever platform-native icons are needed during the packaging steps below. The desktop/icons/pokemonshowdown.ico file (used in the Windows packaging step) is a copy derived from graphics-src/showdown.ico.

Packaging

The Windows build produces a .exe installer built with NSIS. The steps below assume you have already built the client with node build.
1

Copy NW.js into the desktop folder

Download the NW.js prebuilt binary from nwjs.io and extract it into the desktop/ folder. The folder should now contain nw.exe alongside index.html and package.json.
2

Rename the executable

Rename nw.exe to pokemonshowdown.exe:
mv desktop/nw.exe desktop/pokemonshowdown.exe
3

Replace the icon with Resource Hacker

Open pokemonshowdown.exe in Resource Hacker and replace the embedded NW.js icon with icons/pokemonshowdown.ico (located inside the desktop/icons/ folder). Save the file.
Resource Hacker is a Windows-only GUI tool. This step cannot be automated without additional tooling.
4

Update the NSIS script if necessary

If the file layout of the desktop/ folder has changed since the last release, update pokemonshowdown.nsi accordingly. Refer to make-nsis-script.js to regenerate the script:
node desktop/make-nsis-script.js
5

Build the installer with NSIS

Compile the installer using NSIS:
makensis desktop/pokemonshowdown.nsi
This produces the final .exe installer that users can download and run.

Build docs developers (and LLMs) love