From: <ju...@ed...> - 2012-09-18 20:26:48
|
I am seeking some advice on how best to prepare our Android -> iOS conversion(s). We want to minimize effort and risk. I would like to create a **known good conversion** of each of the binary artifacts in our real-world situation. Here is a good description of our binaries: DESCRIPTION NOTES ARTIFACT =========== ===== ======== External Library : xstream-1.3.1-POS.jar OurOwnCustomClasses_1 : code that uses xstream -> Custom_1.jar OurOwnCustomClasses_2 : other code -> Custom_2.jar OurOwnAPKLib : Custom_1.jar + Custom_2.jar Custom.apklib OurOwnAPK : Custom.apklib + Android + AndroidDeriv Custom.apk After trying a few times with the big-bang approach to "convert 'Custom.apk' to 'Custom.iOS'", I realized that to make this actually work, i need to deal with each binary separately. In the big bang approach I got errors like: <quote> -xproject-create: [delete] Deleting directory /POC-1/build/.xcode [echo] Creating Xcode project with the C backend. [java] [09/17/12 10:29:09.620] ERROR: Couldn't create node for com.thoughtworks.xstream.XStream [java] [09/17/12 10:29:09.622] ERROR: Couldn't create node for com.thoughtworks.xstream.XStream [java] [09/17/12 10:29:17.120] ERROR: Vtable for com.thoughtworks.xstream.XStream not found! [java] [09/17/12 10:29:17.120] ERROR: Vtable for com.thoughtworks.xstream.XStream not found! </quote> Now, I immediately started to think about breaking the work down bc XStream is a rather complicated library. So, I attempted 2 conversions: [1] xmlvm --in=xstream-1.3.1-POS.jar --target=xmlvm --out=xmlvm-output/xmlvm [2] xmlvm --in=xstream-1.3.1-POS.jar --target=iphone --out=xmlvm-output/iphone And, I got no errors in each case ! Nice !! Here is a summary of the generated contents: xmlvm-output/xmlvm : from 342 class files in the xstream jar we ended up with 343 .xmlvm files xmlvm-output/iphone/build/xcode/src/app: from 342 class files in the xstream jar we ended up with 684 files (342 .h and 342 .m) So, the outputs look promising. Of course, I do not not which artifacts are the ones I should consider using :) So, my thought is to perform incremental xmlvm (and/or iphone) build working down the ARTIFACT list above. This would mean that xmlvm executions would successively have an increasingly larger number of 'pre-compiled' inputs. It also means I know where errors/issues are at the library level. (We would probably manage the 'successful pre-compiled derivates' with Maven - as we do our Java outputs and dependencies.) So, if you have experience of such an approach (not on the Maven side, we are ok with that), could you please advise me on how to structure my builds. I am guessing that care would need to be taken so as to avoid duplicates, and as I do not understand the internals of dependency/input management in xmlvm, I would need advice specifically on this and how to create meninful successive invocations of xmlvm. Best Regards Julian |