Permalink
Browse files

Fix: final steps to making appjs a (functional) global binary script …

…on osx
  • Loading branch information...
1 parent 4aa736c commit 445962628a840bff1c28bb8eca60f2303239db13 @tmpvar tmpvar committed Jul 22, 2012
Showing with 17 additions and 4 deletions.
  1. +4 −1 bin/appjs
  2. +6 −0 binding.gyp
  3. +7 −3 data/mac/index.js
View
@@ -7,9 +7,12 @@ dir=`dirname "$0"`
target=`readlink "$0"`
target_dir=`dirname "$target"`
appjs_path="$dir/$target_dir/.."
-node_path="$appjs_path/node_modules/node-osx/bin/node"
+node_path="$appjs_path/app/data/bin/node"
node_args="--harmony"
+# TODO: this script will work on linux if we test for existence of
+# the app directory
+
# launch the 32bit node with the incoming args
$node_path $node_args $appjs_path/bin/app.js $@
View
@@ -71,6 +71,12 @@
],
},
{
+ 'destination': '<(module_root_dir)/app/data/bin/',
+ 'files': [
+ '<(module_root_dir)/node_modules/node-osx/bin/node',
+ ]
+ },
+ {
'destination': '<(module_root_dir)/app/data/bin/Contents/',
'files': [
'<(module_root_dir)/deps/cef/Release/Resources/'
View
@@ -1,9 +1,13 @@
var path = require('path');
-module.exports = require('./build/Release/appjs.node');
+try {
+ module.exports = require('./build/Release/appjs.node');
+} catch (e) {
+ module.exports = require(__dirname + '/../../build/Release/appjs.node');
+}
module.exports.initConfig = {
- localsPakPath: path.resolve(__dirname, 'data/pak/locales'),
- chromePakPath: path.resolve(__dirname, 'data/pak/chrome.pak'),
+ localsPakPath: __dirname + '/../../app/data/bin/Contents/Resources',
+ chromePakPath: path.join(__dirname, 'data/pak/chrome.pak'),
jsFlags: ' --harmony_proxies --harmony_collections --harmony_scoping'
};

0 comments on commit 4459626

Please sign in to comment.