I was feeling a little depressed last night, thought I’d wallow in the understanding that I was going to end up, moving on…
I’m working away, (again), at the moment. So I left my hotel and went for a walk, then into town to get something to eat. Found a nice homely Italian restaurant, and settled on some pasta, and beer, and wine, and desert, and Limoncello, and coffee…
I got back to the hotel and decided to Kickstart the ZX Spectrum Next. I figured that I might have a play around with it when it comes out. Started to think about finishing off the OpenSourceing of the codebase that I started previsouly. I then decided that I needed to give Timbles one last chance. I’d been unable to build LoM and DDR as 64 bit, but hadn’t tried Timbles. It failed! BUT, it failed differently. Hmmm… interesting.
Marmalade uses a project file called an MKB. The cross platform nature of it means that you create the actual project from the MKB file. So if I’m developing on Mac under XCode, I don’t hand the XCode project to someone developing on Windows, just the files and the MKB. From the MKB file they will be able to create a Visual Studio project.
This would be the only thing that would affect the build process of the different Apps. I took a look through the MKB file and found a couple of odd entries, entries that looked like they pertained to processor. These entries were in the iOS section. Now, I didn’t think there was anything in the project file for processor selection, that happens as part of the build process, AND I didn’t recognise the config options, I certainly hadn’t put them there. Now, I’ve had this before when an older version of Marmalade has added some options, or the options were necessary at some stage, but the system has evolved – yet the project has not been cleaned up.
I deleted the options and rebuilt… Success!
Quickly loaded the app onto my device… fail!
Not disheartended though, the failure was a memory issue. A quick check of my memory configs and I noticed that I don’t have enough memory allocated against the new devices ( as decided by screen resolution ). I’m testing on an iPhone7. Change, compile, deploy… fail!
It got further though… This time it is complaining that the TME databse is invalid. The MagicNo that I used to identify the database and to check endianness, is wrong. I figure that this is a 64 bit issue… I check my definitions of u32 ( being an unsigned 32 bit ) and the definition is unsigned long. Longs change to 64 bit, so I’m reading 8 bytes for the MagicNo and not 4 bytes, I should have used int. I check all the type definitions, check all the places that I’m using longs in the project. Change, compile, deploy… fail!
This time no error message, just crash straight out. So I add more logging and identify the image cache sorting routine. It’s using the c++ qsort function to sort a series of pointers to objects… in the code I noticed some funky casting going on, which happens to be using *(u32*) – that should be using longs. Change, compile, deploy… fail!
Hmmm… more tracing and I find another sort routine! So I change that and then search the code for any code that is doing a similar thing. Change, compile, deploy… success!
A quick play through and everything looks ok!
I upload to app store and the upload fails. It doesn’t like the binary. The reaon – it’s because the payload has the iTunesArtwork embedded in it, and Apple stopped doing that a while ago. Change, deploy, upload… success!
Download the app and everything is ok. So I push a version to external testing. This requires Apple to review and clear it. At 1:45 the app is cleared. I’m now ready to externally test. I really need to test against all the new devices that have been released by Apple over the last few years. Resolution will be the issue…
But… we’re on. This means that I can now push a new version of LoM and DDR out and buy myself a lot more time to transition to a new system.