diff --git a/.gitignore b/.gitignore index bc87829c..a7038bda 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ node_modules npm-debug.log domain.json -yarn.lock +dist // osx garbage *.DS_Store diff --git a/app/main/index.js b/app/main/index.js index 2110a7ba..03208b40 100644 --- a/app/main/index.js +++ b/app/main/index.js @@ -62,7 +62,8 @@ function checkWindowURL() { const APP_ICON = path.join(__dirname, '../resources', 'Icon'); -const spellDict = path.join(__dirname, '../../node_modules/simple-spellchecker/dict'); +const spellDict = path.join(__dirname, '../node_modules/simple-spellchecker/dict'); + const iconPath = () => { return APP_ICON + (process.platform === 'win32' ? '.ico' : '.png'); diff --git a/app/package.json b/app/package.json new file mode 100644 index 00000000..453df62f --- /dev/null +++ b/app/package.json @@ -0,0 +1,34 @@ +{ + "name": "Zulip-Desktop", + "productName": "Zulip", + "version": "0.5.0", + "description": "Zulip Desktop App", + "license": "MIT", + "author":"Zulip Inc", + "repository": { + "type": "git", + "url": "https://github.com/zulip/zulip-electron.git" + }, + "bugs": { + "url": "https://github.com/zulip/zulip-electron/issues" + }, + "main": "main/index.js", + "keywords": [ + "Zulip", + "Group Chat app", + "electron-app", + "electron" + ], + "dependencies": { + "configstore": "^2.0.0", + "dialogs": "1.1.14", + "electron-context-menu": "0.4.0", + "electron-debug": "^1.0.0", + "electron-dl": "^0.2.0", + "electron-localshortcut": "^0.6.1", + "node-json-db": "^0.7.2", + "request": "^2.74.0", + "simple-spellchecker": "^0.9.0", + "wurl": "^2.1.0" + } +} diff --git a/build/Icon.icns b/build/Icon.icns new file mode 100644 index 00000000..62803092 Binary files /dev/null and b/build/Icon.icns differ diff --git a/build/Icon.ico b/build/Icon.ico new file mode 100644 index 00000000..e01df290 Binary files /dev/null and b/build/Icon.ico differ diff --git a/build/Icon.png b/build/Icon.png new file mode 100644 index 00000000..b68444a6 Binary files /dev/null and b/build/Icon.png differ diff --git a/build/config.gypi b/build/config.gypi new file mode 100644 index 00000000..bebcf829 --- /dev/null +++ b/build/config.gypi @@ -0,0 +1,156 @@ +# Do not edit. File was generated by node-gyp's "configure" step +{ + "target_defaults": { + "cflags": [], + "default_configuration": "Release", + "defines": [], + "include_dirs": [], + "libraries": [] + }, + "variables": { + "asan": 0, + "debug_devtools": "node", + "host_arch": "x64", + "icu_data_file": "icudt57l.dat", + "icu_data_in": "../../deps/icu-small/source/data/in/icudt57l.dat", + "icu_endianness": "l", + "icu_gyp_path": "tools/icu/icu-generic.gyp", + "icu_locales": "en,root", + "icu_path": "deps/icu-small", + "icu_small": "true", + "icu_ver_major": "57", + "llvm_version": 0, + "node_byteorder": "little", + "node_enable_d8": "false", + "node_enable_v8_vtunejit": "false", + "node_install_npm": "true", + "node_module_version": 48, + "node_no_browser_globals": "false", + "node_prefix": "/", + "node_release_urlbase": "https://nodejs.org/download/release/", + "node_shared": "false", + "node_shared_cares": "false", + "node_shared_http_parser": "false", + "node_shared_libuv": "false", + "node_shared_openssl": "false", + "node_shared_zlib": "false", + "node_tag": "", + "node_use_bundled_v8": "true", + "node_use_dtrace": "true", + "node_use_etw": "false", + "node_use_lttng": "false", + "node_use_openssl": "true", + "node_use_perfctr": "false", + "node_use_v8_platform": "true", + "openssl_fips": "", + "openssl_no_asm": 0, + "target_arch": "x64", + "uv_parent_path": "/deps/uv/", + "uv_use_dtrace": "true", + "v8_enable_gdbjit": 0, + "v8_enable_i18n_support": 1, + "v8_inspector": "true", + "v8_no_strict_aliasing": 1, + "v8_optimized_debug": 0, + "v8_random_seed": 0, + "v8_use_snapshot": "true", + "want_separate_host_toolset": 0, + "xcode_version": "7.0", + "nodedir": "/Users/akka/.electron-gyp/.node-gyp/iojs-1.4.3", + "copy_dev_lib": "true", + "standalone_static_library": 1, + "dry_run": "", + "legacy_bundling": "", + "save_dev": "", + "browser": "", + "only": "", + "viewer": "man", + "also": "", + "rollback": "true", + "usage": "", + "runtime": "electron", + "globalignorefile": "/Users/akka/.nvm/versions/node/v6.3.1/etc/npmignore", + "init_author_url": "", + "maxsockets": "50", + "shell": "/bin/zsh", + "parseable": "", + "shrinkwrap": "true", + "init_license": "ISC", + "if_present": "", + "init_author_email": "", + "cache_max": "Infinity", + "sign_git_tag": "", + "cert": "", + "git_tag_version": "true", + "local_address": "", + "long": "", + "fetch_retries": "2", + "npat": "", + "registry": "https://registry.npmjs.org/", + "key": "", + "message": "%s", + "versions": "", + "globalconfig": "/Users/akka/.nvm/versions/node/v6.3.1/etc/npmrc", + "always_auth": "", + "cache_lock_retries": "10", + "global_style": "", + "heading": "npm", + "fetch_retry_mintimeout": "10000", + "proprietary_attribs": "true", + "access": "", + "json": "", + "description": "true", + "engine_strict": "", + "https_proxy": "", + "init_module": "/Users/akka/.npm-init.js", + "userconfig": "/Users/akka/.npmrc", + "node_version": "6.3.1", + "user": "501", + "target": "1.4.3", + "editor": "subl", + "save": "", + "tag": "latest", + "global": "", + "progress": "true", + "optional": "true", + "bin_links": "true", + "force": "", + "searchopts": "", + "depth": "Infinity", + "rebuild_bundle": "true", + "searchsort": "name", + "unicode": "true", + "fetch_retry_maxtimeout": "60000", + "ca": "", + "save_prefix": "^", + "strict_ssl": "true", + "tag_version_prefix": "v", + "dev": "", + "fetch_retry_factor": "10", + "group": "20", + "save_exact": "", + "cache_lock_stale": "60000", + "version": "", + "disturl": "https://atom.io/download/atom-shell", + "cache_min": "10", + "cache": "/Users/akka/.npm", + "searchexclude": "", + "color": "true", + "save_optional": "", + "user_agent": "npm/3.10.3 node/v6.3.1 darwin x64", + "ignore_scripts": "", + "cache_lock_wait": "10000", + "production": "", + "save_bundle": "", + "init_version": "1.0.0", + "umask": "0022", + "init_author_name": "", + "git": "git", + "scope": "", + "onload_script": "", + "tmp": "/var/folders/7p/vgpm72y16_s0ltwzdf6hrzx00000gn/T", + "unsafe_perm": "true", + "link": "", + "prefix": "/Users/akka/.nvm/versions/node/v6.3.1" + } +} diff --git a/build/zulip.png b/build/zulip.png new file mode 100644 index 00000000..1f3938c3 Binary files /dev/null and b/build/zulip.png differ diff --git a/package.json b/package.json index a18982ca..4cf36641 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Zulip-Desktop", "productName": "Zulip", - "version": "0.4.2", + "version": "0.5.0", "description": "Zulip Desktop App", "license": "MIT", "repository": { @@ -11,41 +11,40 @@ "bugs": { "url": "https://github.com/zulip/zulip-electron/issues" }, - "main": "app/main/index.js", "scripts": { - "start": "electron .", + "start": "electron ./app/main", + "postinstall": "install-app-deps", "test": "gulp test && xo", "dev": "gulp dev", - "build:osx": "electron-packager . --out=dist --app-version=$npm_package_version --prune --asar --icon=app/resources/Icon.icns --overwrite --platform=darwin --arch=x64", - "build": "electron-packager . --out=dist --app-version=$npm_package_version --prune --asar --overwrite --all", + "pack": "build --dir", + "dist": "build", "travis": "cd ./scripts && ./travis-build-test.sh" }, + "build": { + "appId": "dev.zulip", + "asar": "true", + "mac": { + "category": "public.app-category.productivity" + }, + "win": { + "iconUrl": "https://raw.githubusercontent.com/zulip/zulip-electron/master/app/resources/Icon.ico" + } + }, "keywords": [ "Zulip", "Group Chat app", "electron-app", "electron" ], - "dependencies": { - "configstore": "^2.0.0", - "dialogs": "1.1.14", - "electron-context-menu": "0.4.0", - "electron-debug": "^1.0.0", - "electron-dl": "^0.2.0", - "electron-localshortcut": "^0.6.1", - "node-json-db": "^0.7.2", - "request": "^2.74.0", - "simple-spellchecker": "^0.9.0", - "wurl": "^2.1.0" - }, "devDependencies": { + "assert": "^1.4.1", "devtron": "^1.1.0", "electron": "1.4.3", - "assert": "^1.4.1", - "gulp-mocha": "^3.0.1", + "electron-builder": "^7.14.1", "electron-connect": "^0.4.6", "electron-packager": "^7.0.0", "gulp": "^3.9.1", + "gulp-mocha": "^3.0.1", "spectron": "^3.3.0", "xo": "*" },