[BUG] Cordova export

Discussion and feedback on Construct 2

Post » Mon Sep 26, 2016 11:22 pm

@Ashley
We need to push back on this - at least add some smarts. If the XDK files are already there, don't, or at least ask, if they should be over-written. As mentioned, it's next to impossible to export once and get it right. I just exported for all three platforms (iOS, Android, Windows), and each export took easily a half-dozen exports to work out the kinks for each mobile platform. There's no way I'd want to export fresh each time and re-import the dozens of image files, settings, etc, required for each (or even one) platform.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Tue Sep 27, 2016 11:35 am

BackendFreak wrote:Guys, as Intel XDK is the only one officially supported C2 wrapper

We also officially support PhoneGap Build, so you can try that as well. You're not forced to use just the XDK.

@xmnboy - if the problem is the .xdk file being overwritten, perhaps a simpler workaround is to export to a separate folder, then copy all the files over apart from the .xdk file? i.e. just update all the asset files and leave the same project file.

This problem is unfortunate but in this case it stems from a breaking change in iOS 10 and a lack of a reliable way to identify WKWebView - it's Apple who have put us in an awkward position over this :-\ We could add those old options back, but then apps are broken on iOS 10 again, so we would prefer to stick to WKWebView-only mode if possible - especially since it can be 2-3x faster!
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Tue Sep 27, 2016 1:01 pm

@Ashley
I think better to add back "Use new Intel XDK project format" option, to be able to disable. So it was easier to update an existing XDK project.
B
12
S
3
Posts: 115
Reputation: 1,434

Post » Tue Sep 27, 2016 1:22 pm

radbrothers wrote:@Ashley
I think better to add back "Use new Intel XDK project format" option, to be able to disable. So it was easier to update an existing XDK project.

That doesn't support WKWebView though, so right now that would produce iOS apps that don't work on iOS 10.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Tue Sep 27, 2016 5:49 pm

Ashley wrote:@xmnboy - if the problem is the .xdk file being overwritten, perhaps a simpler workaround is to export to a separate folder, then copy all the files over apart from the .xdk file? i.e. just update all the asset files and leave the same project file.

@Ashley -- that is the approach that should be taken: 1) export new project once then 2) export to a new location and copy updated files to the original project. This is a bit cumbersome and might be difficult for some developers to use or understand.

I'm thinking an approach that allows one to export only the www folder (call it an "update export") for delta updates. Perhaps if you detected an existing <project-name>.xdk file you automatically just update the www folder in the destination? I can show you how to detect if that <project-name>.xdk file has been processed and is now in use by the XDK.
Intel Corporation
B
13
S
3
Posts: 79
Reputation: 925

Post » Tue Sep 27, 2016 5:55 pm

@BackendFreak -- you could use links to do what you are trying to do.

For example:
  • export initial project (first time export)
  • open initial project in the XDK
  • export second time to a new location (preserving state of first export)
  • replace www in first project (the active XDK project) with a link to the second project's www folder
  • make subsequent exports to the second project
Now all subsequent updates from C2 go to the second location and only the www folder in your initial XDK project will be updated, leaving the <project-name>.xdk unchanged each time you export to the second project.

In this case your first project is the master XDK project, meaning it contains the plugins folder, the <project-name>.xdk file, etc. The second project is the master source code project, because it contains the www folder with all resources. This will work best with hard links, not soft links, which require that both projects exist on the same filesystem. Hard links are supported on Mac, Linux and Windows machines, so this solution applies regardless of the OS on your development system.
Intel Corporation
B
13
S
3
Posts: 79
Reputation: 925

Post » Thu Sep 29, 2016 4:58 pm

@Ashley and @BackendFreak -- I've tried to summarize how best to update an existing Intel XDK project using the "new" Construct2 export option, here > https://software.intel.com/en-us/forums ... pic/607195 <

@Ashley -- I'm not clear on how to refer to your "new" export process. Please read over what I have written to confirm that I have not left anything out and there is no confusion.
Intel Corporation
B
13
S
3
Posts: 79
Reputation: 925

Post » Tue Oct 04, 2016 11:39 am

Thanks @xmnboy. I had also some other problems with r236 so I just reverted to C2 r235 for now.
ImageImageImage
B
27
S
16
G
80
Posts: 1,014
Reputation: 44,747

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests