Skip to content
This repository was archived by the owner on Apr 8, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ prime
stage
*.snap
*.log

*.sublime-project

*.sublime-workspace
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Then run the following...
```
npm install webpack -g
npm run-script install-all
npm run-script rebuild:electron
npm start
```

Expand Down
30 changes: 21 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
{
"name": "openwmail",
"humanName": "openWMail",
"version": "1.0.0",
"version": "1.0.1",
"prerelease": false,
"description": "The missing desktop client for Gmail and Google Inbox",
"scripts": {
"rebuild:electron": "electron-rebuild -f -m src/app -v 1.8.8 -t prod,optional",
"prestart": "webpack",
"start": "electron bin/app/index.js",
"test": "standard",
"package:darwin": "node packager --platform=darwin",
"package:linux": "node packager --platform=linux",
"package:win32": "node packager --platform=win32",
"package": "node packager --distribution",
"package:darwin:distrib": "node packager --platform=darwin --distribution",
"package:linux:distrib": "node packager --platform=linux --distribution",
"package:win32:distrib": "node packager --platform=win32 --distribution",
"package:finalise": "node packager --finalise",
"package:darwin:finalise": "node packager --platform=darwin --finalise",
"package:linux:finalise": "node packager --platform=linux --finalise",
"package:win32:finalise": "node packager --platform=win32 --finalise",
"install-all": "echo ':wmail' && npm install && cd src/app && echo ':wmail-app' && npm install && cd ../../src/scenes/mailboxes && echo ':wmail-scenes-mailboxes' && npm install",
"outdated-all": "echo ':wmail' && npm outdated && cd src/app && echo ':wmail-app' && npm outdated && cd ../../src/scenes/mailboxes && echo ':wmail-scenes-mailboxes' && npm outdated",
"dev:platform": "webpack --task=platform && electron bin/app/index.js",
"dev:app": "webpack --task=app && electron bin/app/index.js",
"dev:mailboxes": "webpack --task=mailboxes && electron bin/app/index.js",
"dev:assets": "webpack --task=assets && electron bin/app/index.js",
"dev:run": "electron bin/app/index.js"
"dev:run": "electron bin/app/index.js",
"clean": "rimraf \"node_modules/!(rimraf|.bin)\""
},
"keywords": [],
"author": {
Expand All @@ -34,20 +42,24 @@
"appdmg": "0.4.5"
},
"dependencies": {
"babel": "6.23.0",
"babel-cli": "^6.26.0",
"babel-core": "6.23.1",
"babel-loader": "6.3.2",
"babel-preset-es2015": "6.22.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "6.23.0",
"babel-preset-stage-0": "6.22.0",
"babelify": "^10.0.0",
"browserify": "^16.2.3",
"clean-webpack-plugin": "0.1.15",
"copy-webpack-plugin": "4.0.1",
"css-loader": "0.26.1",
"electron": "1.6.6",
"extract-zip": "=1.6.0",
"electron-packager": "8.5.1",
"electron": "1.8.8",
"electron-packager": "12.2.0",
"electron-rebuild": "^1.8.4",
"extract-text-webpack-plugin": "1.0.1",
"extract-zip": "=1.6.7",
"file-loader": "0.10.0",
"graceful-fs": "4.1.11",
"json-loader": "0.5.4",
"jsx-loader": "0.13.2",
"less": "2.7.2",
Expand All @@ -57,8 +69,8 @@
"recursive-readdir": "2.1.0",
"style-loader": "0.13.1",
"temp": "0.8.3",
"uglify-js": "mishoo/UglifyJS2#3ee46e91e802fb8bf20656bce115375c5f624052",
"url-loader": "0.5.7",
"uglify-js": "3.4.9",
"url-loader": "1.1.2",
"uuid": "3.0.1",
"webpack": "1.14.0",
"webpack-target-electron-renderer": "0.4.0",
Expand Down
25 changes: 11 additions & 14 deletions packager/ElectronBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const packager = require('electron-packager')
const TaskLogger = require('./TaskLogger')
const path = require('path')
const { ROOT_PATH } = require('./constants')
const { rebuild } = require('electron-rebuild')
const { serialHooks } = require('electron-packager/hooks')

const PLATFORM_ARCHES = {
darwin: ['x64'],
Expand Down Expand Up @@ -43,19 +45,7 @@ class ElectronBuilder {
'/openWMail-darwin-x64'
]

// Spellchecker
const wmailSpellcheckerPath = path.join(ROOT_PATH, 'bin/app/node_modules/wmail-spellchecker')
const wmailSpellchecker = require(path.join(wmailSpellcheckerPath, 'package.json'))
const wmailSpellcheckerIgnores = Object.keys(wmailSpellchecker.wmailPlatformCode)
.map((platformArch) => `${platform}_${arch}` === platformArch ? undefined : platformArch)
.filter((platformArch) => !!platformArch)
.map((platformArch) => {
const ignorePath = path.join(wmailSpellcheckerPath, wmailSpellchecker.wmailPlatformCode[platformArch])
return '/' + path.relative(ROOT_PATH, ignorePath)
})

const allIgnores = ignores.concat(wmailSpellcheckerIgnores)
return '^(' + allIgnores.join('|') + ')'
return '^(' + ignores.join('|') + ')'
}

/**
Expand Down Expand Up @@ -89,7 +79,14 @@ class ElectronBuilder {
'extend-info': {
'CFBundleURLSchemes': ['mailto']
},
ignore: ElectronBuilder.packagerIgnoreString(platform, arch)
ignore: ElectronBuilder.packagerIgnoreString(platform, arch),
tmpdir: false,
afterCopy: [serialHooks([
(buildPath, electronVersion, platform, arch) => {
const buildNativePath = path.join(buildPath, 'bin/app')
rebuild({ buildNativePath, electronVersion, arch })
}
])]
}, function (err, appPath) {
if (err) {
reject(err)
Expand Down
Loading