Skip to content

Commit

Permalink
add resources, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaild committed Jan 28, 2015
1 parent 401b5d0 commit 3094912
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ tmp/
dist/
build/
cache/
resources/
resources/node-webkit/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ This is **NOT** an offical application. Its a simple node-webkit app which loads

Currently only built for Mac OSx, feel free to build for Win/Linux.

To build run: ```grunt build```
To build run: ```grunt dist-mac```

Grab Mac binary: https://github.com/ismaild/whatsapp-desktop/releases
13 changes: 7 additions & 6 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "whatsapp",
"main": "views/index.html",
"version": "0.0.1",
"version": "0.0.2",
"single-instance": true,
"window": {
"title": "WhatsApp",
"width": 650,
"height": 650,
"min_width": 650,
"min_height": 650,
"toolbar": false
"width": 900,
"height": 740,
"min_width": 220,
"min_height": 220,
"toolbar": false,
"position": "center"
}
}
40 changes: 40 additions & 0 deletions resources/mac/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>WhatsApp</string>
<key>CFBundleExecutable</key>
<string>node-webkit</string>

<key>CFBundleGetInfoString</key>
<string>© Ismail Dhorat, 2013</string>

<key>CFBundleIconFile</key>
<string>whatsapp.icns</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>WhatsApp</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.0</string>
<key>CFBundleVersion</key>
<string>0.0.0</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>175484</string>
</dict>
</plist>
40 changes: 40 additions & 0 deletions resources/mac/Info.plist.tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>WhatsApp</string>
<key>CFBundleExecutable</key>
<string>node-webkit</string>

<key>CFBundleGetInfoString</key>
<string>© Ismail Dhorat, 2013</string>

<key>CFBundleIconFile</key>
<string>nw.icns</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>WhatsApp</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string><%= version %></string>
<key>CFBundleVersion</key>
<string><%= version %></string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>175484</string>
</dict>
</plist>
Binary file added resources/mac/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions resources/mac/dmgStyler.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set appName to (system attribute "APP_NAME")
tell application "Finder"
tell disk appName
open
set current view of container window to icon view
set toolbar visible of container window to false
set statusbar visible of container window to false
set the bounds of container window to {100, 100, 640, 250}
set theViewOptions to the icon view options of container window
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 64
set background picture of theViewOptions to POSIX file ("/Volumes/" & appName & "/.background/background.png")
set position of item (appName & ".app") of container window to {225, 40}
set position of item "Applications" of container window to {375, 40}
set position of item ".DS_Store" of container window to {400, 400}
set position of item ".Trashes" of container window to {400, 400}
set position of item ".fseventsd" of container window to {400, 400}
set position of item ".background" of container window to {400, 400}
update without registering applications
close
end tell
end tell
13 changes: 13 additions & 0 deletions resources/mac/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

hdiutil create -srcfolder "dist/macOS/$1.app" -volname "$1" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW dist/macOS/$1.tmp.dmg
hdiutil attach -readwrite -noverify -noautoopen "dist/macOS/$1.tmp.dmg"
mkdir /Volumes/$1/.background
cp resources/mac/background.png /Volumes/$1/.background
chmod -Rf go-w /Volumes/$1
ln -sfn /Applications/ /Volumes/$1/Applications
export APP_NAME=$1
osascript resources/mac/dmgStyler.applescript
hdiutil detach /Volumes/$1
hdiutil convert "dist/macOS/$1.tmp.dmg" -format UDZO -imagekey zlib-level=9 -o "dist/macOS/$1.dmg" -puppetstrings
rm dist/macOS/$1.tmp.dmg
File renamed without changes.

0 comments on commit 3094912

Please sign in to comment.