Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Not generating valid app on OSX #58

Closed
konsumer opened this Issue Feb 15, 2014 · 10 comments

Comments

Projects
None yet
3 participants

the downloaded runtime is 0.8.4, which generates a Mac app that won't open. If I take the app.nw folder (under "show package contents") and put it along with the Info.plist in a fresh 0.9.1 runtime, it works fine.

Silly me, version seems to to the trick:

'nodewebkit': {
    'options': {
        'version':'0.9.1',
        'mac': true,
    },
    'src': ['.tmp/desktop/www/**/*']
}

Scratch that. It doesn't appear that it is generating functional Mac builds. I can manually take the node-webkit in the cache, and put my webroot in Contents/Resources/app.nw and it works fine.

The first thing I discovered is permission problem. I fixed with this:

chmod +x Mine.app/Contents/Frameworks/node-webkit

next, when I run it I get LaunchProcess: failed to execvp

Contributor

steffenmllr commented Mar 13, 2014

Can you please post your dir structure and your grunt file?

Also can you tell me if this works for you:

git clone git@github.com:mllrsohn/grunt-node-webkit-builder.git
cd grunt-node-webkit-builder/exmaple
npm install
cd public && npm install && cd ..
grunt

and tell me if it produces a valid mac build?

Contributor

steffenmllr commented Mar 13, 2014

@konsumer did you follow the steps above? and could you please show me some more infos

Yep, sorry deleted post was before I saw your reply. Example nw-demo works.
Here is my gruntfile:

Dir structure:

app/ - site source
app/bower_components/ - bower dependencies
webroot/- built/minified site
release/ - released installers go here for iOS, android, and node-webkit
.tmp/ - stuff gets built here then processed/copied to release
  • I am auto-generating webroot from bower-install + usemin. This part works well.
  • I copy webroot to .tmp/desktop/www/
  • I generate node-webkit .tmp/desktop/www/package.json from options.
  • I run nodewebkit with these options:
'nodewebkit': {
    'options': {
        'version':'0.9.2',
        'build_dir': '.tmp/desktop',
        'mac': true,
        'win': false,
        'linux32': false,
        'linux64': false,
        'app_name': pkg.friendlyname
    },
    'src': ['.tmp/desktop/www/**/*']
},
  • I copy release files from .tmp/desktop/releases/ into releases/
  • pkg.friendlyname has spaces,it's just what I want to show up in menu & help dialogs,and the name of the nodewebkit exectuable files.
  • files are created correctly, including release/mac/{{pkg.friendlyname}}.app/Contents/Resources/app.nw/ webroot
  • If I run in console release/mac/{{pkg.friendlyname}}.app/Contents/MacOS/node-webkit I get this error:
LaunchProcess: failed to execvp:
/Users/konsumer/Desktop/project/release/mac/{{pkg.friendlyname}}.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper
LaunchProcess: failed to execvp:
/Users/konsumer/Desktop/project/release/mac/{{pkg.friendlyname}}.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper

Hmm, maybe it is a problem with copy. If I generate package.json in webroot, and use src: 'webroot/**/* and build_dir: 'release', it works fine.

So, at this point, I guess the issue is "what is wrong with copying the build folder?"

Contributor

gabepaez commented Aug 2, 2014

@konsumer this project has undergone some major refactoring. Could you try updating and if you still have the issue could you please repost it to the new parent module https://github.com/mllrsohn/node-webkit-builder/issues? Thanks!

@gabepaez gabepaez closed this Aug 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment