Ashley's Recent Forum Activity

  • Right, I think the problem is NW.js 0.22 is actually the first version that started using symlinks, and Windows has no concept of these symlinks at all, so they are completely lost via any way you try to copy the files. That's new and very awkward, since I'm not sure there's anything C2 itself can do to work around it...

    Still, I found a workaround: on the Mac itself, download NW.js directly from https://nwjs.io/downloads/. (You should be able to do this with any version for the OS X export.) Extract the NW.js download on the Mac. It should run because it has preserved the file permissions, since you did everything on the Mac. Then export with C2 and copy the files over to the Mac any way, it doesn't matter how any more. You can open the app folder by right-clicking and selecting "Show Package Contents". Using that, you can open the C2 exported app, and copy the Contents/Resources folder. Then open the NW.js download and delete the Contents/Resources folder, and paste in the one from C2.

    That basically copies the C2 game data in to an ordinary NW.js download. It seems to make a working macOS app for me which runs the game OK. It's a bit of a bigger file since C2 strips out some stuff it doesn't need, like the pnacl stuff. You can delete it yourself by going to a path in the package like Contents/Versions/<version>/nwjs Framework.framework/Internet Plug-Ins and delete the contents of that folder (a .nexe file and pnacl). That should strip ~20mb or so.

  • I just tested C3's export and that works on OS X even with NW.js 0.23. It uses the same set as files as the C2 NW.js export so I'm pretty sure this is still a file permission related issue and not that NW.js itself is broken. I'm not sure what would have changed, but it's pretty difficult to get files from Windows to Mac while preserving permissions since Windows doesn't understand or care about some important file permissions that are needed on OS X. C3 works around it with some byzantine tweaking of the zip format. Not sure what the best solution for C2 is. Maybe we just need to publish a script to run through the whole app folder and set the right permissions where they need to be...

  • Symlinks need permissions that other files shouldn't have, so you can't recursively apply the same permissions to an entire OS X NW.js app and get something that works, you will either break the symlinks or make normal files in to symlinks which breaks them.

  • FYI OS X apps are a whole folder with lots of files inside that all need the correct permissions, so simply changing the permission on the .app folder won't fix broken permissions if they were lost in the transfer. There's a number of internal symlinks that need to be preserved, for example. Anyways I'll try to look in to this some more today.

  • I think you might only be able to go to a URL in a new window to open the browser. Otherwise I think you'll need to specifically whitelist every URL or origin you want to be able to navigate to in Cordova.

    Come to think of it, I'm not sure if such apps are actually allowed on the app stores. I think iOS in particular has restrictions on this. If it loads from the web then there's zero guarantee that what the app reviewers see is what will actually be in the app when it's published, so they may block that.

  • I didn't realise there wasn't anywhere visible in the UI to zoom! I've added options to the 'View' menu for the next build. However you can use Ctrl + mousewheel like you can in C2, as well as the + and - keys while holding Ctrl, and Ctrl + 0 to reset.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
    • Post link icon

    Closing, please only post in English on the forum.

  • I'm not sure I understand. I was answering this:

    Is it possible that my games be able to work like how C3 works using something like service worker?

    This is already the case. C2 and C3 games already work offline using the same service worker the C3 editor uses. Of course making a Cordova app is another alternative to that. If you find a bug with that at any point, please just file a report as usual following all the guidelines.

  • The Greenworks C3 plugin is already implemented, it's just we've had literally no time to test it and release it. I've switched the status back to "planned" until we get round to finishing that.

  • Are you sure you're not accidentally trashing the OS X file permissions on Windows? Your described steps of zipping the app on Windows will cause this, and break the app once transferred to OS X. This is documented here: https://www.scirra.com/tutorials/1276/exporting-desktop-apps-with-node-webkit

    You need to copy the files via the Mac to preserve file permissions.

  • C2 and C3 exported games already work offline. In fact, the C3 editor itself uses the same Service Worker developed for C2 games to run offline, which we recently introduced as the replacement for AppCache.

  • You'd have to ask the site author where the data is sourced from. AFAIK it's international but I don't know in what kind of proportion each country is represented.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,831,346 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x6
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs