1: Install Node.js (also includes npm)

2: Create your app (requires index.html, main.js, package.json) [1]

3: Optionally mask your source files to an .asar file. [2]

3: Run npm install electron-packager -g to install the electron-packager [3]

4: Run electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> [optional flags...]

Examples:

electron-packager . --platform=win32 --arch=x64 --version="0.35.0" --out="App" asar="true"

electron-packager . --platform=win32 --arch=x64 --version="0.37.6" --out="App" 5.1.8

electron-packager . --platform=win32 --arch=x64 --appname="BinHexDec" --icon="monitoricon.ico" --version="0.37.6" --out="App" --version-string.FileDescription="Binary Hex Decimal Converter" --app-copyright="Teknix" --version-string.OriginalFilename="BinHexDec.exe" --version-string.CompanyName="Teknix" --version-string.ProductName="BinHexDec" --build-version="1.0.0" --app-version="1.0.0" BinHexDec-1.0.2

Sources:

[1] http://electron.atom.io/docs/latest/tutorial/quick-start/
[2] https://github.com/electron/asar
[3] https://www.npmjs.com/package/electron-packager


Next Post Previous Post