"Exported games won't work until you upload them" with NW.js

Get help using Construct 3!

Post » Sat Jul 22, 2017 1:12 am

Hi there,
When I export a simple test game with just a text box and no events to 'Desktop (NW.js)' it runs fine. However, when I export first do 'Web (HTML5)' and then run it through WebDGap, the resulting Desktop app runs fine, but shows during startup an alert "Exported games won't work until you upload them. [...]" which seems to come from Scirra. Is there a way to suppress this alert?
Thanks
Ueli
B
21
S
5
Posts: 23
Reputation: 1,207

Post » Sat Jul 22, 2017 11:05 am

It's in the exported index.html file, line 48–57. Removing this should remove the warning.
Code: Select all
   <script>
   // Issue a warning if trying to preview an exported project on disk.
   (function(){
      // Check for running exported on file protocol
      if (window.location.protocol.substr(0, 4) === "file")
      {
         alert("Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)");
      }
   })();
   </script>
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Sat Jul 22, 2017 11:48 am

Actually, thanks to your hint I found it in the exported c2runtime.js.
In which index.html did you fin it?
Thanks!
B
21
S
5
Posts: 23
Reputation: 1,207


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 0 guests