This document describes how to build a standalone (not Chrome app) Signal desktop application for OS X, including packaging up the appropriate icons for the application.
Find latest version of the NW.js SDK from http://dl.nwjs.io, then download and unpack it:
wget http://dl.nwjs.io/v0.25.4/nwjs-sdk-v0.25.4-osx-x64.zip
unzip nwjs-sdk-v0.25.4-osx-x64.zip
Prepare a Signal.app
application folder by extracting the relevant NW.js
SDK template project:
mkdir Signal.app
unzip nwjs-sdk-v0.25.4-osx-x64.zip
(cd nwjs-sdk-v0.25.4-osx-x64/nwjs.app && tar fc - .) | (cd Signal.app && tar fxv -)
Download the latest Signal desktop app distribution, and unpack it into a new
app.nw
directory:
wget -O signal.zip https://j.mp/signal-desktop-crx
mkdir app.nw && (cd app.nw && unzip ../signal.zip)
There was a bug in the latest distribution (as of October 2017) where the directory permissions were all wrong. To fix directory permissions manually:
find app.nw -type d -exec chmod 0755 {} ';'
The default NW.js icon is very generic. Create an appropriate Signal iconset:
mkdir app.iconset
cp app.nw/images/icon_16.png app.iconset/icon_16x16.png
cp app.nw/images/icon_32.png app.iconset/icon_16x16@2x.png
cp app.nw/images/icon_32.png app.iconset/icon_32x32.png
sips -z 64 64 app.nw/images/icon_128.png app.iconset/icon_32x32@2x.png
sips -z 64 64 app.nw/images/icon_128.png --out app.iconset/icon_32x32@2x.png
cp app.nw/images/icon_128.png app.iconset/icon_128x128.png
cp app.nw/images/icon_256.png app.iconset/icon_128x128@2x.png
cp app.nw/images/icon_256.png app.iconset/icon_256x256.png
sips -z 512 512 app.nw/images/icon_256.png --out app.iconset/icon_256x256@2x.png
sips -z 512 512 app.nw/images/icon_256.png --out app.iconset/icon_512x512.png
sips -z 1024 1024 app.nw/images/icon_256.png --out app.iconset/icon_512x512@2x.png
Confirm that the icon file sizes are correct:
(cd app.iconset && ls -1 | sort -t_ -k2 -n | xargs sips -g pixelWidth -g pixelHeight)
Create an iconset file and replace the default app and document icons:
iconutil -c icns app.iconset
cp app.icns Signal.app/Contents/Resources/app.icns
cp app.icns Signal.app/Contents/Resources/document.icns
Move the Signal distribution into the right place in the application folder:
mv app.nw Signal.app/Contents/Resources/app.nw
Move the now-working application folder into /Applications
, or wherever
you plan to run the application from:
mv Signal.app /Applications