Export only the Runtime File

Discussion and feedback on Construct 2

Post » Fri Mar 02, 2012 11:23 am

Hey all,

I was thinking, it would be great if there was a checkbox on the export options to only export the c2runtime.js file. This will save a lot of time if you already have all your sprites but only want to test out changes in the runtime file.

B
16
S
2
G
4
Posts: 67
Reputation: 3,295

Post » Fri Mar 02, 2012 12:27 pm

Exporting is nearly instantaneous if you skip PNG recompression. Have you tried that?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Fri Mar 02, 2012 12:31 pm

Ah gotcha, was being a der brain. Thanks Ashley.
B
16
S
2
G
4
Posts: 67
Reputation: 3,295

Post » Wed Aug 15, 2012 10:41 am

Bringing a thread back from the grave here.

Searching the forums for something like this brought me here. I got the same issue that exporting takes quite some time and in most of the cases I just made changes in the event sheets.
I've turned off png recompression and minify script when I do an export for testing purposes but it still takes a couple of minutes.

So in the end I would still be pleased with a 'just export c2runtime' functionality.

p.s. reason I'm exporting for testing purposes is because I use AJAX which needs te be executed from my testserver.
B
57
S
3
G
4
Posts: 23
Reputation: 4,219

Post » Wed Aug 15, 2012 10:53 am

[QUOTE=Bicky]p.s. reason I'm exporting for testing purposes is because I use AJAX which needs te be executed from my testserver. [/QUOTE]
ajax should work just fine in preview mode if you send a Access-Control-Allow-Origin: * header with your server file. maybe that will help.
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Wed Aug 15, 2012 4:22 pm

doesnt that mean any site can then call your page? That could be really really bad for php
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Aug 16, 2012 12:39 pm

@Aridale you can allow specific sites to have access instead of all sites(*).

I decided to upgrade my addon so it works with the preview as well. Although the Access Control is working now for some reason it doesn't save the SESSIONID in a cookie. Strange part is that it does save the ID after an export.
Only answers I got from google was that it should work straight away. I also added the 'Access-Control-Allow-Credentials: true' header.
It's kind of driving me crazy, any clue what it could be?
B
57
S
3
G
4
Posts: 23
Reputation: 4,219

Post » Thu Aug 16, 2012 3:38 pm

so for that to work wouldnt you have to put your ip in for the allowed site? Would that also mean c2 would have to run in preview on lan mode instead of just local.

Im thinkin about it so I can test from preview but its kinda seemin like more hassle than its worth vs just copyin over a file or two on export in filezilla
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Aug 16, 2012 5:31 pm

Testing from preview is really straightforward, you just need any pages you AJAX request to respond with the HTTP header (as documented:

Access-Control-Allow-Origin: *

This will allow AJAX requests to work from localhost and is a lot easier in the long run than trying to publish to your site repeatedly. When you're done though, you should remove that header for security reasons.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468


Return to Construct 2 General

Who is online

Users browsing this forum: anty21ro, mystazsea, nimos100 and 12 guests