Export - HTML not working without server

0 favourites
  • 8 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • Hi all,

    I probably have a unique problem. I would like to use Construct to make programs that run on desktop computers as part of our existing win32 software. The export to exe presents problems including the size, 33-40MB for a simple program is excessive. Also the exe is not going to work as I need to read some data out of the registry, including the students Name, ID etc.

    Then I thought I hit on a marvellous solution.

    Create a an embedded chromium webpage within a win32 Delphi program and just open the html on the local machine. (The local machine does not have internet). This way I only need to include the embedded Chrome once and the HTML files are not so large.

    The snag is that for some reason if you export a project to HTML files it need to be put onto a server. If I double click the index.html I get a message and black screen.

    Can someone explain that requirement? Is it by design to limit use or is there a real reason for it?

    Is there a work around that I could use?

  • Web pages don't work when run from disk due to security limitations in browsers. So you have to run them from a server. This is why Construct 2 also previews via a localhost server rather than just opening files on disk.

    Maybe Construct 2 is not the right tool for the job - it's a game engine.

  • Ashley

    It certainly is the right tool for the job, construct 2 is brilliant and we are already using it for a online project. It is so right for the job that I want to use it in more ways, I may have to look at setting up a server within each centre that hosts the software.


  • I meant we currently have no support for things like reading out the registry or file I/O, so if you need other application-oriented features you might struggle with Construct 2.

  • Granted but there are ways I can send info from win32 app to webpage so I may look into it again at a later date when I am experienced with Construct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • czar : your win32 Delphi program doesn't need to use an embedded webkit, but an embedded webserver. That way, your user can access your page from their browser, and the win32 code can access I/O, registry, etc.

    If you don't want the user to use its own browser, you can then integrate an embedded webkit next to the embedded browser.

    Your browser will serve the page on http://localhost:The_port_you_want_to_use, and the embedded webkit will read http://localhost:The_port_you_want_to_use

  • Pode

    Good idea. I will investigate. You have got me thinking.

    Loving this forum. Lots of people, lots of great ideas.

  • Just an update if anyone has a similar question/problem in the future.

    I have used the Delphi source code from TinyWeb (http://www.ritlabs.com/en/products/tinyweb/) to set up my server and then I am using embedded Chrome to view my files. It looks like this will be a viable solution for me.

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