From: Miggi <mig...@go...> - 2011-02-14 11:01:46
|
Hello Panayotis Sorry, but I'm too blind to see it. I can't find any solution for my problem in the documentation. The only thing that I can find is the way how to compile Java-classes into Objective-C and this is exactly the way I've done it. Perhaps my problem was not described clear enough: The process to cross-compile Java-classes into Objective-C-classes works absolutly fine. Theres no error message or something like that. But I don't know how to make a project out of the cross-compiled files on Mac-site. The result of cross-compiling the classes is a folder full of .m and .h-files. So can you tell me how I can get a complete project out of these files? And it's not an iPhone-app what I want to create, if you think so. If there's a fitting part in the documentation, so I wasn't able to find it. So can you please give me another hint? ;) Thank you and sorry to cause you inconvenience. Miggi Am 13.02.2011 19:51, schrieb xml...@li...: > Send xmlvm-users mailing list submissions to > xml...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > or, via email, send a message with subject or body 'help' to > xml...@li... > > You can reach the person managing the list at > xml...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of xmlvm-users digest..." > > > Today's Topics: > > 1. Re: Few Bugs in Buffers - Patching? (Kevin Glass) > 2. Cross-compiling Java-classes into Objective-C (Miggi) > 3. Re: Cross-compiling Java-classes into Objective-C > (Panayotis Katsaloulis) > 4. Re: Cross-compiling Java-classes into Objective-C (Arno Puder) > 5. Error in WebOsOutputProcess (Mario Heidenreich) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 13 Feb 2011 12:26:35 +0000 > From: Kevin Glass<ke...@co...> > Subject: Re: [xmlvm-users] Few Bugs in Buffers - Patching? > To: Arno Puder<ar...@pu...> > Cc: "xml...@li..." > <xml...@li...> > Message-ID: > <AANLkTik7-8xUnCk8w5=ih5...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > Thats what I tried yep. Was building a largeish library plus some example > code. I'll get the specifics of the errors when I'm back on the mac but > there were 100s > > Kev > > On 12 February 2011 18:22, Arno Puder<ar...@pu...> wrote: > >> Yes, the --target=iphonec instruction I mentioned below should work. Is >> that what you tried? What kind of Xcode errors do you get? >> >> Arno >> >> >> On Feb 12, 2011, at 2:10 AM, Kevin Glass<ke...@co...> wrote: >> >> I'm working off the trunk at the moment, is that up to date with the latest >> backend. I just tried to build a project with the iphonec backend and ended >> up with xcode project with a lot of errors. It it expected to work out of >> the box yet? >> >> Kev >> >> On 11 February 2011 20:43, Arno Puder< <ar...@pu...>ar...@pu...>wrote: >> >>> Kevin, >>> >>> things are changing in XMLVM. We are in the middle of transitioning to >>> the new C backend which will make the Objective-C backend obsolete. One >>> benefit is that we can cross-compile Apache Harmony, so there is no >>> longer the need for hand-writing J2SE classes in Objective-C (which >>> means, the java.nio.Buffer bug will go away with the C backend). >>> >>> There is still API missing from both the Objective-C and the C backend. >>> Patches are certainly more than welcome, however, I would prefer if you >>> submitted patches for the C backend, since we will deprecate the >>> Objective-C backend soon. >>> >>> To get you started: >>> - add the missing Cocoa API in xmlvm/src/xmlvm2obj/compat-lib/java >>> - run "ant gen-c-wrappers" >>> - this will generate C wrappers in src/xmlvm2c/compat-lib/iphone >>> - provide implementation in those wrappers between the special >>> //XMLVM_BEGIN_ and //XMLVM_END_ markers >>> >>> If you want to use the C backend to cross-compile iFireworks, you can do >>> the following: >>> >>> java -Xmx700m -jar dist/xmlvm.jar --target=iphonec \ >>> --in=demo/iphone/ifireworks/build/classes/ \ >>> --resource=demo/iphone/ifireworks/res/ \ >>> --app-name=iFireworks --out=out >>> >>> There are also some slides in xmlvm/doc/slides that give a quick >>> overview of the C backend (in the middle of the slide deck). >>> >>> When you have a patch, you can upload it to our review system as >>> described here:<http://xmlvm.org/contribute/> >>> http://xmlvm.org/contribute/ >>> >>> Arno >>> >>> >>> >>> >>> On 2/11/11 7:03 AM, Kevin Glass wrote: >>>> There's a couple of bugs in the java.nio.Buffer implementations for >>>> ObjC. There's also a method on CGFont (CopyFullName) that'd be really >>>> useful given the changes in iOS 4 - how do I go about submitting patches >>>> for things these days? >>>> >>>> Kev >>>> >>>> >>>> >>>> >>> ------------------------------------------------------------------------------ >>>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio >>> XE: >>>> Pinpoint memory and threading errors before they happen. >>>> Find and fix more than 250 security defects in the development cycle. >>>> Locate bottlenecks in serial and parallel code that limit performance. >>>> <http://p.sf.net/sfu/intel-dev2devfeb> >>> http://p.sf.net/sfu/intel-dev2devfeb >>>> >>>> >>>> _______________________________________________ >>>> xmlvm-users mailing list >>>> <xml...@li...>xml...@li... >>>> <https://lists.sourceforge.net/lists/listinfo/xmlvm-users> >>> https://lists.sourceforge.net/lists/listinfo/xmlvm-users >>> >>> >>> ------------------------------------------------------------------------------ >>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >>> Pinpoint memory and threading errors before they happen. >>> Find and fix more than 250 security defects in the development cycle. >>> Locate bottlenecks in serial and parallel code that limit performance. >>> <http://p.sf.net/sfu/intel-dev2devfeb> >>> http://p.sf.net/sfu/intel-dev2devfeb >>> _______________________________________________ >>> xmlvm-users mailing list >>> <xml...@li...>xml...@li... >>> <https://lists.sourceforge.net/lists/listinfo/xmlvm-users> >>> https://lists.sourceforge.net/lists/listinfo/xmlvm-users >>> >> > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Sun, 13 Feb 2011 15:37:28 +0100 > From: Miggi<mig...@go...> > Subject: [xmlvm-users] Cross-compiling Java-classes into Objective-C > To: XMLVM User<xml...@li...> > Message-ID:<4D5...@go...> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > Hi there > > I've some problems with cross-compiling Java-files into Objective-C. > When I tried it, I got a .h and .m for every .class file. That's ok. But > when I tried to build it in Xcode, I got several errors because things > like java.lang.Object or java.lang.String couldn't be found. What did I > wrong that such simple and basic classes weren't found? > > The way I've cross-compiled the classes were: > java -jar<path to xmlvm.jar> --in=<path to folder with java-files> > --out=<path to an empty folder> --target=objc > > Do I have to add something? Or isn't it possible to copy the resulting > files in an empty Xcode-project and to build it? > > Thanks for your answers. > > Miggi > > > > ------------------------------ > > Message: 3 > Date: Sun, 13 Feb 2011 18:12:56 +0200 > From: Panayotis Katsaloulis<pan...@pa...> > Subject: Re: [xmlvm-users] Cross-compiling Java-classes into > Objective-C > To: XMLVM User<xml...@li...> > Message-ID:<1E5...@pa...> > Content-Type: text/plain; charset=us-ascii > > > On Feb 13, 2011, at 4:37 PM, Miggi wrote: > >> Hi there >> >> I've some problems with cross-compiling Java-files into Objective-C. >> When I tried it, I got a .h and .m for every .class file. That's ok. But >> when I tried to build it in Xcode, I got several errors because things >> like java.lang.Object or java.lang.String couldn't be found. What did I >> wrong that such simple and basic classes weren't found? >> >> The way I've cross-compiled the classes were: >> java -jar<path to xmlvm.jar> --in=<path to folder with java-files> >> --out=<path to an empty folder> --target=objc >> >> Do I have to add something? Or isn't it possible to copy the resulting >> files in an empty Xcode-project and to build it? >> >> Thanks for your answers. >> >> Miggi > > I believe if you have a look at the documentation > http://www.xmlvm.org/documentation/ > you will be able to solve your problem. > > > > > ------------------------------ > > Message: 4 > Date: Sun, 13 Feb 2011 08:43:00 -0800 > From: Arno Puder<ar...@pu...> > Subject: Re: [xmlvm-users] Cross-compiling Java-classes into > Objective-C > To: xml...@li... > Message-ID:<4D5...@pu...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > note that --target=objc only cross-compiles to Objective-C, nothing > else. The dependent classes (such as the ones you've mentioned) will not > be copied to the --out directory. The other targets (such as 'iphone') > will do this. > > Arno > > > On 2/13/11 6:37 AM, Miggi wrote: >> Hi there >> >> I've some problems with cross-compiling Java-files into Objective-C. >> When I tried it, I got a .h and .m for every .class file. That's ok. But >> when I tried to build it in Xcode, I got several errors because things >> like java.lang.Object or java.lang.String couldn't be found. What did I >> wrong that such simple and basic classes weren't found? >> >> The way I've cross-compiled the classes were: >> java -jar<path to xmlvm.jar> --in=<path to folder with java-files> >> --out=<path to an empty folder> --target=objc >> >> Do I have to add something? Or isn't it possible to copy the resulting >> files in an empty Xcode-project and to build it? >> >> Thanks for your answers. >> >> Miggi >> >> ------------------------------------------------------------------------------ >> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >> Pinpoint memory and threading errors before they happen. >> Find and fix more than 250 security defects in the development cycle. >> Locate bottlenecks in serial and parallel code that limit performance. >> http://p.sf.net/sfu/intel-dev2devfeb >> _______________________________________________ >> xmlvm-users mailing list >> xml...@li... >> https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > > ------------------------------ > > Message: 5 > Date: Sun, 13 Feb 2011 19:32:08 +0100 > From: Mario Heidenreich<ma...@de...> > Subject: [xmlvm-users] Error in WebOsOutputProcess > To: xml...@li... > Message-ID:<4D5...@de...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi XMLVM list, > > i'm playing with the JavaScript/ Qooxdoo/ WebOs backend and i finally > managed to run a simple AWT program on a palm simulator. Any way, there > seems to be a error in the WebOsOutputProcess during the project > generation. The stage-assistant.js and the index.html templates are not > found, due to wrong paths and the getResourceAsStream method. > I rewrote those 2 lines with help of UniversalFiles and attached my > changes as patch, in case anyone is interested :o) > > Greetings, > Mario > > > > Index: src/xmlvm/org/xmlvm/proc/out/WebOsOutputProcess.java > =================================================================== > --- src/xmlvm/org/xmlvm/proc/out/WebOsOutputProcess.java (revision 1502) > +++ src/xmlvm/org/xmlvm/proc/out/WebOsOutputProcess.java (working copy) > @@ -33,6 +33,7 @@ > import org.xmlvm.proc.XmlvmProcessImpl; > import org.xmlvm.util.FileUtil; > import org.xmlvm.util.InputReaderThread; > +import org.xmlvm.util.universalfile.UniversalFile; > import org.xmlvm.util.universalfile.UniversalFileCreator; > > /** > @@ -173,14 +174,15 @@ > return false; > } > > + /** The path to the XMLVM emulation library. */ > + UniversalFile assistantTemplate = > UniversalFileCreator.createFile("/xmlvm2js" > + + STAGE_ASSISTANT_TEMPLATE, "./src/xmlvm2js" + > STAGE_ASSISTANT_TEMPLATE); > // Read template we use to create a custom stage assistant file. > - InputStream stageAssistantTemplate = WebOsOutputProcess.class > - .getResourceAsStream(STAGE_ASSISTANT_TEMPLATE); > - if (stageAssistantTemplate == null) { > + if (assistantTemplate == null) { > Log.error("Stage assistant template file could not be > read."); > return false; > } > - String stageAssistantContent = > FileUtil.readStringFromStream(stageAssistantTemplate); > + String stageAssistantContent = > assistantTemplate.getFileAsString(); > > if (stageAssistantContent.isEmpty()) { > Log.error("Could not read contents of stage assistant > file."); > @@ -258,15 +260,14 @@ > } > > // Read template we use to create a custom stage assistant file. > - InputStream indexHtmlTemplate = WebOsOutputProcess.class > - .getResourceAsStream(INDEX_HTML_TEMPLATE); > - > - if (indexHtmlTemplate == null) { > + UniversalFile indexTemplate = > UniversalFileCreator.createFile("/xmlvm2js" > + + INDEX_HTML_TEMPLATE, "./src/xmlvm2js" + > INDEX_HTML_TEMPLATE); > + if (indexTemplate == null) { > Log.error("Could not read index.html template for Palm Pre > project."); > return false; > } > > - String indexHtmlContent = > FileUtil.readStringFromStream(indexHtmlTemplate); > + String indexHtmlContent = indexTemplate.getFileAsString(); > if (indexHtmlContent.isEmpty()) { > Log.error("Could not read contents of index.html template > file for Palm Pre project."); > return false; > > > > > ------------------------------ > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > > ------------------------------ > > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > > End of xmlvm-users Digest, Vol 20, Issue 6 > ****************************************** |