The Big NW.js Roundup - News & Tips

From the Asset Store
Jump over the small square and avoid hitting it as long as you can!
  • Do not run it every tick, it will kill performance.

    Yeah it was just for testing purposes.

    I'll try the workaround for the overlay not refreshing, but I already have objects moving on and out of screen (namely one tiledbackgound looping infinitely), so I'm not expecting too much ^^

    I will see if that works and come back to share the results.

  • > Do not run it every tick, it will kill performance.

    Yeah it was just for testing purposes.

    I'll try the workaround for the overlay not refreshing, but I already have objects moving on and out of screen (namely one tiledbackgound looping infinitely), so I'm not expecting too much ^^

    I will see if that works and come back to share the results.

    Make sure you have the right chromium args as well. If nothing else works, you'd have up upload something for me to test with the given NWjs version.

  • Hey there, is there a way to disable the Alt+Space windows menu?

  • Hey there, is there a way to disable the Alt+Space windows menu?

    I know which menu you mean and I could reproduce in both windowed and even fullscreen mode. I'm currently not aware of a way to disable it but I'm sure it's technically possible.

    I've asked in their Google Group for NWjs related questions.

    (Topic: groups.google.com/forum )

  • Guys, I thought I'd share with you the best signing and notarizing method for MacOS, since it's now the only way to distribute your apps on Mac.

    I found it right here https://github.com/nwjs/nw.js/issues/7117#issuecomment-581738908.

    You have to create a NWsign.sh file that contains this code :

    #!/usr/bin/env node
    
    const APP = "path/to/your/app.app";
    const IDENTITY = "identity of Developer ID cert";
    
    /****************************************************************************/
    
    console.log("### finding things to sign");
    
    const fs = require('fs');
    const child_process = require('child_process');
    
    const items = [];
    
    const frameworksDir = `${APP}/Contents/Frameworks/nwjs Framework.framework`;
    
    let currentVersionDir;
    for (const dir of fs.readdirSync(`${frameworksDir}/Versions`)) {
     if (fs.statSync(`${frameworksDir}/Versions/${dir}`).isDirectory) {
     currentVersionDir = `${frameworksDir}/Versions/${dir}`;
     break;
     }
    }
    if (!currentVersionDir) {
     console.error(`couldn't find "${frameworksDir}/Versions/[version]"`);
     process.exit(1);
    }
    for (const file of fs.readdirSync(`${currentVersionDir}`)) {
     if (file.endsWith('.dylib')) {
     items.push(`${currentVersionDir}/${file}`);
     }
    }
    for (const file of fs.readdirSync(`${currentVersionDir}/Helpers`)) {
     if (/^[a-z0-9_]*$/.test(file) || file.endsWith('.app')) {
     items.push(`${currentVersionDir}/Helpers/${file}`);
     }
    }
    for (const file of fs.readdirSync(`${currentVersionDir}/Libraries`)) {
     if (file.endsWith('.dylib')) {
     items.push(`${currentVersionDir}/Libraries/${file}`);
     }
    }
    for (const file of fs.readdirSync(`${currentVersionDir}/XPCServices`)) {
     if (file.endsWith('.xpc')) {
     items.push(`${currentVersionDir}/XPCServices/${file}`);
     }
    }
    items.push(frameworksDir);
    
    /****************************************************************************/
    
    console.log("");
    console.log("### signing");
    
    function exec(cmd) {
     console.log(cmd);
     const result = child_process.spawnSync(cmd, {shell: true, stdio: 'inherit'});
     if (result.status !== 0) {
     console.log(`Command failed with status ${result.status}`);
     if (result.error) console.log(result.error);
     process.exit(1);
     }
    }
    
    for (const item of items) {
     exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements neededToRun.entitlements "${item}"`);
    }
    
    exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements neededToRun.entitlements "${APP}"`);
    
    /****************************************************************************/
    
    console.log("");
    console.log("### verifying signature");
    
    exec(`codesign --verify -vvvv "${APP}"`);

    You just have to change the two first const

    1. with your app's path

    2. with the Developer ID Application of your developer.apple.com account. (you have to have this certificate installed in your mac keychain.)

    Then create another file :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
     <key>com.apple.security.automation.apple-events</key>
     <true/>
     <key>com.apple.security.cs.allow-dyld-environment-variables</key>
     <true/>
     <key>com.apple.security.cs.allow-jit</key>
     <true/>
     <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
     <true/>
     <key>com.apple.security.cs.disable-executable-page-protection</key>
     <true/>
     <key>com.apple.security.cs.disable-library-validation</key>
     <true/>
     </dict>
    </plist>

    Place it in the same folder and name it "neededToRun.entitlements"

    Once it's ready, go in the terminal and launch the NWsign.sh command.

    And VOILÀ your app is now signed and ready to notarize.

    If you need further help (on notarization for example), feel free to ask.

    Cheers guys !

  • The percentage of MacOS users on steam is so low ... in my opinion it's not worth publishing a MacOS version and taking the trouble.

    But of course thanks for the information, it sure works for many users.

  • The percentage of MacOS users on steam is so low ... in my opinion it's not worth publishing a MacOS version and taking the trouble.

    Who's talking about Steam ? NWJS is not only steam oriented, it concerns anybody wishing to distribute apps on Mac, Linux and Windows.

    And even if the user base is low, this thread helped me a lot in the early days of building desktop apps, that's why I want to contribute in any way possible.

  • Guys, I thought I'd share with you the best signing and notarizing method for MacOS, since it's now the only way to distribute your apps on Mac. ...

    Thanks a lot of providing this info!

    I feel like this would be better off as a tutorial. It would reach a lot more people and you'd have several options to simplify it even further. I'll link to it if you decide to create it.

    No updates for the "Alt+Space context menu", "Icon low quality again" and "Steam Overlay rendering above window bar" issues. Will try to keep everyone posted.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a lot of providing this info!

    I feel like this would be better off as a tutorial. It would reach a lot more people and you'd have several options to simplify it even further. I'll link to it if you decide to create it.

    Hi TheRealDannyyy

    I wish I had time to create a complete tutorial, but it'll be complicated, especially considering the time I lost to figure how to do this. Moreover, Apple's constant attempts to complicate their authorizations could make this procedure quickly obsolete.

    Nonetheless, I will consider doing this once the task list is complete.

  • No updates for the "Alt+Space context menu", "Icon low quality again" and "Steam Overlay rendering above window bar" issues. Will try to keep everyone posted.

    Thank you, that issue can be a bit annoying since many games use Alt and Space as default buttons, and pressing them together can happen.

  • > The percentage of MacOS users on steam is so low ... in my opinion it's not worth publishing a MacOS version and taking the trouble.

    Who's talking about Steam ? NWJS is not only steam oriented, it concerns anybody wishing to distribute apps on Mac, Linux and Windows.

    And even if the user base is low, this thread helped me a lot in the early days of building desktop apps, that's why I want to contribute in any way possible.

    Well ... I'm talking about Steam myself.

    Your motives seem good to me.

    I only said my opinion about publishing a version of a macOS game on Steam.

  • Thank you, that issue can be a bit annoying since many games use Alt and Space as default buttons, and pressing them together can happen.

    I think the problem is that this context menu is deeply integrated into the whole build process of Windows applications itself. If the question board leads nowhere, I could try to create an issue and request that it's at least disabled in full screen mode.

  • You could try and report it as a bug since it's caused by Construct but I already did in the past and it got denied because that's how it's supposed to work.

    lol I know in almost all communities, it is really frowned upon when a developer says "that's how it's supposed to work" to an obvious problem in their software and that it's everyone else's fault (Steam's fault in this case) and they expect everyone else to work around them. I tried reporting C3 crashes frequently when Tiled is open, and was told it's only Tiled's fault even though you'd think it's technically the fault of both developers and they need to communicate with each other and figure out the conflict that happened through coincidence.

    I personally know how one guy became a giant pariah for how his game had a bunch of obvious issues, but "that's how it's supposed to work". The difference is he made a game no one cares about, while Construct 3 actually could be really useful to countless people.

  • The low quality window icon issue has been fixed in the latest NWjs v0.46.1 release.

  • So, I'm still getting the occasional hiccup where I will try to preview the game in NW.js and the loading bar will just freeze. After closing the NW.js window the computer will seize up as if its CPU is maxed out.

    This happens maybe every ~5 times I start up NW.js. It used to be a chronic problem before update 0.30.4. (IIRC), so whatever was done in that update helped, but seems I'm still having intermittent issues. What to do?

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)