Re: [Libreoffice] iOS and convert to PDF
this isn't a suitable way to develop code. Indeed not. It is a way to experiment before some saner way exists, nothing more. Is that where you got the NSEnumerator stuff? Most likely, I can't remember writing anything such myself... I guess it's an antique like all the Mac stuff. Indeed. The Mac code uses APIs that were obsolete already in 10.4. It doesn't compile against the 10.7 SDK, for instance, because there these APIs have finally been removed altogether, under the assumption that developers have had several years to adapt. Hah. The sad fact for OOo/LO on the Mac is that if you want code that uses current Mac OS X functionality, you need to turn to NeoOffice. Their codebase is GPL, and thus we can't incorporate stuff from it into LibreOffice. (Also, the fact that somebody already has done the modernization work, makes it no fun to redo it just because of licensing issues.) --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
this isn't a suitable way to develop code. Indeed not. It is a way to experiment before some saner way exists, nothing more. Xcode has a way to import makefiles and turn them into projects. I've never used that feature but it might be a way to use the existing build system. http://developer.apple.com/library/mac/#documentation/Porting/Conceptual/PortingUnix/preparing/preparing.html Thanks, B -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3519703.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Is it possible that I don't need module tail_build? Anyway, that leads to my next question. How do I build an Xcode project that works like the project you show in your July blog post? Do I just add all the .a files from core/solver/unxiosr.pro/lib to the project? Is there an example project I can download from somewhere? I don't see it in the LO folder anywhere. I see what you're referring to in the vcl module. I see there's a custom UIApplication subclass and an app delegate and a bunch of other iOS code and most of it seems to be objective-C++. But I don't see main(). Thanks, Brian -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3516724.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Tor, I did a git pull to update my source and I get a different failure, although of the same kind. This fails: from /Users/brians/develop/libreOffice2/core/solver/unxiosr.pro/inc/sal/main.h:48, from /Users/brians/develop/libreOffice2/core/cpputools/source/regsingleton/regsingleton.cxx:32: because regsingleton.cxx is being compiled as C++ but it includes sal/main.h, which has Objective-C in it. I assume that this changed somehow in the last few days because I wasn't seeing this failure before. Is the iOS build simply broken because no one is using it? Is there a tag or branch I should be using that is more likely to work? Thanks, Brian -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3517017.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Is it possible that I don't need module tail_build? tail_build is a meta-module that actually builds most of the modules that have been migrated over to the new gnu make based build system. It includes all the business logic of Calc, Writer etc, so sure, stuff from it will be needed. Anyway, that leads to my next question. How do I build an Xcode project that works like the project you show in your July blog post? Ah, yes. I faked it from Xcode's point of view: I created one of the simple sample projects that Xcode offers, called it cppunittester, built it, and then replaced the actual executable inside with the totally unrelated sal_cppunittester_all (IIRC) executable built in LibreOffice. I.e. I Xcode did not do any compilation of LibreOffice code at all, I just used it to run such code in the simulator (or upload to and run on a device) and debug. Worked fine;) Note that the unit tester I ran does not have any GUI. Do I just add all the .a files from core/solver/unxiosr.pro/lib to the project? That would probably be possible, yes. Not all .a files, but the ones relevant for what the app in question does. I see what you're referring to in the vcl module. I see there's a custom UIApplication subclass and an app delegate and a bunch of other iOS code and most of it seems to be objective-C++. But I don't see main(). main() comes from the somewhat mysterious SAL_MAIN_IMPL etc macros in sal/inc/sal/main.h. In the cppunit case, the SAL_IMPLEMENT_MAIN macro is called in sal/cppunittester/cppunittester.cxx. (Don't look too closely at the iOS code in vcl yet, that is just some rough ideas, a start that has never been actually tried yet. Look at the Mac code in vcl, that at least works. (The iOS code is based on the Mac one.) The actual sequence how LibreOffice starts and gets its message / event loop going is a bit complex. It might suffer from organic evolution and over-engineering over time. Or maybe it really has to be like this. hard to say. Anyway, it is useful to compile at least sal, desktop and the stuff in vcl/aqua with debugging, and then on a Mac step through in the debugger (gdb, or I guess Xcode) what happens when then soffice.bin process starts. (Or on Linux, but there the sequence is a bit simpler; I assume what will be used on iOS matches better how it happens on the Mac.) --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
OK so I fixed the problem in bridges. The includes just needed to be modified like the mac version of that file. I'm still not getting a successful build but I'm a few steps closer. Some comments and questions: Needless to say there's no need to build the arm bridge if I'm trying to produce a Sim build. The reason it was trying to build the arm bridge (I think) is because the distro file for iOS specifies the host as the arm compiler. Maybe there needs to be a Sim distro. Env.Host.sh ends up with CPUNAME of ARM when I think it ought to be intel. Is this correct? Anyway, if I let it do that and go down that path to build I get compile errors when it tries to build module tail_build. The problem is that main.c and a couple of other C files #include the objective-C headers. I don't find a main.m or command line option to force the file to be compiled as Objective-C so I'm wondering how this is intended to work. My goal at this point is to get to the point you show in your blog entry from July where you're starting to debug. -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3513276.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Env.Host.sh ends up with CPUNAME of ARM when I think it ought to be intel. Well, CPUNAME or CPU aren't used for any deep magic, they are just strings used to form some directory names etc. I don't think we would win much by using a separate CPU and CPUNAME string for the iOS simulator. The only place I can think of where the architecture really matters, i.e. inline assembly code is used etc, is in bridges, and there we can then use #ifdef __arm__ . But yeah, I admit this is something I am not totally sure of. Still, I think we can continue as now, pretending that the iOS simulator also is ARM, until something definitely shows that it causes lots of complications. The problem is that main.c and a couple of other C files #include the objective-C headers. I don't find a main.m or command line option to force the file to be compiled as Objective-C so I'm wondering how this is intended to work. Which main.c in particular? We do have a couple of files with the .cxx extension that actually are Objective-C++ for iOS in vcl (and for Mac OS X we have many ), and there are makefile tweaks in place to make that work. At least it used to work last time I checked... --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
This one: [ build C ] desktop/source/app/main In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:9, from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:10, from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, from /Users/brians/develop/libreOffice2/core/solver/unxiosr.pro/inc/sal/main.h:48, from /Users/brians/develop/libreOffice2/core/desktop/source/app/main.c:30: And this one: In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:65, from /Users/brians/develop/libreOffice2/core/solver/unxiosr.pro/inc/sal/main.h:48, from /Users/brians/develop/libreOffice2/core/desktop/source/pkgchk/unopkg/unopkg_main.c:30: -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3513623.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
So - in terms of product shipment, you'll want to use the MPL license; currently that is not possible - but as/when Oracle have finally managed to get the code under AL2, we'll be applying all our work on top of that under MPL/LGPLv3+ Yes, MPL would work better for me. I thought that Oracle have placed all of the OO source under AL2. But the LO fork was done before that. Is there an announcement that I can read that describes this plan to place all of LO under MPL/LGPL3+? It's rather complicated (to me anyway). There is a hope that (by munging the code into a single large shared libary, and link-time-optimising it) that (if we can get the right constant propagation: no UI eg.) much of the bits we don't need will be auto-evaporated :-) Some set of or even a single static library that I could link to would what I need. If you're planning on releasing the productivity suite as a set of separate apps then you probably need to develop this anyway. Supporting the latest Apple toolchain would also be helpful. -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3506980.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Hi Brian, On Mon, 2011-11-14 at 06:31 -0800, BrianS wrote: Yes, MPL would work better for me. I thought that Oracle have placed all of the OO source under AL2. Well - that is ongoing :-) But the LO fork was done before that. Is there an announcement that I can read that describes this plan to place all of LO under MPL/LGPL3+? It's rather complicated (to me anyway). No announcement that I know of; but the intention has been to be a weak copy-left project from the beginning; this is why we as for all contributions under the MPL/LGPLv3+ dual license. OO.o had a non-copy-left license (SISSL) for much of it's early life and had a uniformly terrible experience of extracting code from some large users :-) Some set of or even a single static library that I could link to would what I need. If you're planning on releasing the productivity suite as a set of separate apps then you probably need to develop this anyway. Supporting the latest Apple toolchain would also be helpful. Yep; so clearly we're trying to head in the direction of a single large library even for the desktop case, for all manner of efficiency reasons. We should build with a recent LLVM too, though having a tinderbox setup to keep that working would be much appreciated if you have cycles (the tools for that live here: http://cgit.freedesktop.org/libreoffice/contrib/buildbot/ So - all in all, it is some work - but presuambly that's expected :-) and there are others working away at the same sorts of problems. All the best, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
I did a fresh get and I get this build error ./autogen.sh --with-distro=LibreOfficeiOS CXX=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk CC=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk CC_FOR_BUILD=ccache /Xcode3.2.6/usr/bin/gcc-4.0 CXX_FOR_BUILD=ccache /Xcode3.2.6/usr/bin/g++-4.0 --with-num-cpus=1 --with-max-jobs=1 --with-macos-version-min-required=10.4 --with-macos-version-max-allowed=10.4 --with-macosx-sdk=10.4 --disable-librsvg # Entering /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm Making:all_gcc3_uno.dpslo Compiling: bridges/unxiosr.pro/misc/gcc3_uno_version.c Compiling: bridges/source/cpp_uno/gcc3_ios_arm/except.cxx In file included from /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx:49: /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:76: error: redefinition of 'class __cxxabiv1::__fundamental_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:161: error: previous definition of 'class __cxxabiv1::__fundamental_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:87: error: redefinition of 'class __cxxabiv1::__array_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:172: error: previous definition of 'class __cxxabiv1::__array_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:98: error: redefinition of 'class __cxxabiv1::__function_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:183: error: previous definition of 'class __cxxabiv1::__function_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:114: error: redefinition of 'class __cxxabiv1::__enum_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:199: error: previous definition of 'class __cxxabiv1::__enum_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:125: error: redefinition of 'class __cxxabiv1::__pbase_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:210: error: previous definition of 'class __cxxabiv1::__pbase_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:167: error: redefinition of 'class __cxxabiv1::__pointer_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:252: error: previous definition of 'class __cxxabiv1::__pointer_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:192: error: redefinition of 'class __cxxabiv1::__pointer_to_member_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:277: error: previous definition of 'class __cxxabiv1::__pointer_to_member_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:219: error: redefinition of 'class __cxxabiv1::__base_class_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:304: error: previous definition of 'class __cxxabiv1::__base_class_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:253: error: redefinition of 'class __cxxabiv1::__class_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:338: error: previous definition of 'class __cxxabiv1::__class_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:346: error: redefinition of 'class __cxxabiv1::__si_class_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:431: error: previous definition of 'class __cxxabiv1::__si_class_type_info' /Users/brians/develop/libreOffice2/core/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx:382: error: redefinition of 'class __cxxabiv1::__vmi_class_type_info' /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/cxxabi.h:467: error: previous definition of 'class __cxxabiv1::__vmi_class_type_info' dmake: Error code 1, while making '../../../unxiosr.pro/slo/except.obj' # -- View this message in context:
Re: [Libreoffice] iOS and convert to PDF
I am sorry to say this, but it is fairly pointless to try to build for iOS at this stage if you are not also prepared to dig into the problems you will encounter and fix them, sorry. Nobody is actively working on the iOS port right now. (As for myself I am concentrating on the Android port at the moment. (Even if I personally like iOS more, and don't even have any Android device;) That's during work hours, and I don't have as much spare time and energy as I would like...) The error you see is in the C++/UNO bridge. It requires intimate knowledge of the implementation details of the GCC C++ ABI, RTTI and exception handling. (Knowledge that I for instance don't claim to have.) Or at least courage to make educated guesses. (That I am better at;) The data structures used for this stuff are not public in the sense that they would be defined in some header shipped with the SDK. One has to go looking in the compiler and/or C++ library sources for them. For instance http://www.opensource.apple.com/source/libcppabi/ . Etc. Sure, we could fake up or comment out stuff in the C++/UNO bridge for now, and get it to compile. But we would know that it will certainly not work then at run-time... As the C++/UNO bridge is needed for the even simplest use of LO APIs, only the lowest levels of sal cppunit testing can be run without a working C++/UNO bridge anyway. If the above is a surprise, it shouldn't be. That's what it means when I say a lot of work remains to be done. Anyway, I thought I left the bridges module in a compilable state last time I touched it, but apparently not then. I will try to have a look... --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
On Fri, 2011-11-11 at 08:30 -0800, BrianS wrote: I might be interested in including some LO source in my app, if that can be made to work technically and within License restrictions. So - in terms of product shipment, you'll want to use the MPL license; currently that is not possible - but as/when Oracle have finally managed to get the code under AL2, we'll be applying all our work on top of that under MPL/LGPLv3+ - that is expected to arrive post LibreOffice 3.5 - during 3.6 development; I anticipate that done dusted by the middle of next year. Since I'm mainly interested in converting documents is it possible to isolate that code to a small part of the codebase? There is a hope that (by munging the code into a single large shared libary, and link-time-optimising it) that (if we can get the right constant propagation: no UI eg.) much of the bits we don't need will be auto-evaporated :-) [ you can but hope ]. Failing that, a number of cuts to the code will have the same effect. HTH, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
I think I've read everything on this topic that Mr Google helped me to find. // This succeeded ./autogen.sh --with-distro=LibreOfficeiOS CXX=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk CC=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk CC_FOR_BUILD=ccache /Xcode3.2.6/usr/bin/gcc-4.0 CXX_FOR_BUILD=ccache /Xcode3.2.6/usr/bin/g++-4.0 --with-num-cpus=1 --with-max-jobs=1 --with-macos-version-min-required=10.6 --with-macos-version-max-allowed=10.6 --with-macosx-sdk=10.6 I get this build error: ### Entering /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm Compiling: bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx: In static member function 'static unsigned char* bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(bridges::cpp_uno::shared::VtableFactory::Slot**, unsigned char*, const typelib_InterfaceTypeDescription*, sal_Int32, sal_Int32, sal_Int32)': /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:491: error: 'arm' has not been declared /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:513: error: jump to case label /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:484: error: crosses initialization of 'typelib_InterfaceAttributeTypeDescription* pAttrTD' /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:522: error: 'arm' has not been declared /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:530: error: jump to case label /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:515: error: crosses initialization of 'typelib_InterfaceMethodTypeDescription* pMethodTD' /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:484: error: crosses initialization of 'typelib_InterfaceAttributeTypeDescription* pAttrTD' dmake: Error code 1, while making '../../../unxiosr.pro/slo/cpp2uno.obj' ### I have Xcode 4.2 in /Developer on Lion. I had tried a lot of different variations on the above but that's where I am now. Finally some small amount of wrapper logic to run the moral equivalent of: ./soffice --convert-to pdf foo.docx Yup. Something like that should be doable relatively soon, as the LibreOffice code obviously for such usage doesn't display anything or require any interactive input. But all the C++ and UNO stuff still needs to work, of course, and there is lots to do there. How do you imagine something like that working? As you probably know IPC on iOS is restricted in some ways. PasteBoard, custom URLs, UIDocumentInteractionController, and maybe sockets are ways that might work for this. I might be interested in including some LO source in my app, if that can be made to work technically and within License restrictions. Since I'm mainly interested in converting documents is it possible to isolate that code to a small part of the codebase? Thanks, Brian -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3500192.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
I get this build error: /Users/brians/develop/libreOffice/libo/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx:491: OK, I haven't actually compiled for the device much lately, only for the simulator, so some bit rot might have happened. I suggest you just compile for the simulator for now. ./soffice --convert-to pdf foo.docx Yup. Something like that should be doable relatively soon, How do you imagine something like that working? As you probably know IPC on iOS is restricted in some ways. I have no idea;) The command line above was just to give an idea of how such functionality can be invoked today on a normal desktop OS, not to suggest actually running a process with parameters like that. I don't know what IPC you mean here, an iOS app is just one process, it can't start subprocesses. DId you plan to create an app for document export to PDF, or is that just one functionality in some other app? Anyway, in either case, to use LibreOffice code to load some document and write it out in PDF, your code needs call LibreOffice's UNO-based APIs. (Note that figuring out how all the UNO component stuff should work on iOS where everything is statically linked into one binary is a work in progress...) I might be interested in including some LO source in my app, if that can be made to work technically and within License restrictions. Since I'm mainly interested in converting documents is it possible to isolate that code to a small part of the codebase? Not small. But large parts of the code will obviously not be needed for that. --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
./autogen.sh --with-distro=LibreOfficeiOS CXX=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk CC=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk CC_FOR_BUILD=ccache /Xcode3.2.6/usr/bin/gcc-4.0 CXX_FOR_BUILD=ccache /Xcode3.2.6/usr/bin/g++-4.0 --with-num-cpus=1 --with-max-jobs=1 --with-macos-version-min-required=10.4 --with-macos-version-max-allowed=10.4 --with-macosx-sdk=10.4 --disable-librsvg I get this linker error: Entering /Users/brians/develop/libreOffice/libo/l10ntools/source Making:all_transex.dpobj Compiling: l10ntools/source/export.cxx Compiling: l10ntools/source/export2.cxx Compiling: l10ntools/source/merge.cxx Compiling: l10ntools/source/srciter.cxx Compiling: l10ntools/source/xmlparse.cxx Compiling: l10ntools/source/helpmerge.cxx Compiling: l10ntools/source/helpex.cxx Compiling: l10ntools/source/file.cxx Compiling: l10ntools/source/directory.cxx Making:transex.lib Making:libtransex.a ar: creating archive ../unxiosr.pro/lib/libtransex.a flex -l -w -8 -o../unxiosr.pro/misc/src_yy.c srclex.l Compiling: l10ntools/source/src_yy_wrapper.c Making:transex3 Undefined symbols for architecture i386: MsLangId::getPlatformSystemUILanguage(), referenced from: ResMgr::GetLang(unsigned short, unsigned short)in libtllo.a(resmgr.o) ResMgrContainer::init() in libtllo.a(resmgr.o) MsLangId::convertLanguageToLocale(unsigned short, com::sun::star::lang::Locale), referenced from: ResMgrContainer::init() in libtllo.a(resmgr.o) _typelib_static_type_init, referenced from: comphelper::string::NaturalStringSorter::NaturalStringSorter(com::sun::star::uno::Referencecom::sun::star::uno::XComponentContext const, com::sun::star::lang::Locale const)in libcomphelpgcc3.a(string.o) com::sun::star::i18n::cppu_detail_getUnoType(com::sun::star::i18n::XBreakIterator const*)in libcomphelpgcc3.a(string.o) com::sun::star::i18n::cppu_detail_getUnoType(com::sun::star::i18n::XCollator const*)in libcomphelpgcc3.a(string.o) com::sun::star::lang::cppu_detail_getUnoType(com::sun::star::lang::XMultiComponentFactory const*)in libcomphelpgcc3.a(string.o) _uno_type_sequence_reference2One, referenced from: rtl::OUString* comphelper::stl_beginrtl::OUString(com::sun::star::uno::Sequencertl::OUString)in libcomphelpgcc3.a(string.o) _typelib_static_type_getByTypeClass, referenced from: comphelper::string::convertCommaSeparated(rtl::OUString const) in libcomphelpgcc3.a(string.o) rtl::OUString* comphelper::stl_beginrtl::OUString(com::sun::star::uno::Sequencertl::OUString)in libcomphelpgcc3.a(string.o) _typelib_static_sequence_type_init, referenced from: comphelper::string::convertCommaSeparated(rtl::OUString const) in libcomphelpgcc3.a(string.o) rtl::OUString* comphelper::stl_beginrtl::OUString(com::sun::star::uno::Sequencertl::OUString)in libcomphelpgcc3.a(string.o) _uno_type_sequence_construct, referenced from: comphelper::string::convertCommaSeparated(rtl::OUString const) in libcomphelpgcc3.a(string.o) _uno_type_destructData, referenced from: comphelper::string::convertCommaSeparated(rtl::OUString const) in libcomphelpgcc3.a(string.o) _uno_any_destruct, referenced from: comphelper::string::NaturalStringSorter::NaturalStringSorter(com::sun::star::uno::Referencecom::sun::star::uno::XComponentContext const, com::sun::star::lang::Locale const)in libcomphelpgcc3.a(string.o) _cppu_unsatisfied_iquery_msg, referenced from: comphelper::string::NaturalStringSorter::NaturalStringSorter(com::sun::star::uno::Referencecom::sun::star::uno::XComponentContext const, com::sun::star::lang::Locale const)in libcomphelpgcc3.a(string.o) _cppu_unsatisfied_iset_msg, referenced from: comphelper::string::NaturalStringSorter::NaturalStringSorter(com::sun::star::uno::Referencecom::sun::star::uno::XComponentContext const, com::sun::star::lang::Locale const)in libcomphelpgcc3.a(string.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status dmake: Error code 1, while making '../unxiosr.pro/bin/transex3' -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3501099.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
./soffice --convert-to pdf foo.docx Yup. Something like that should be doable relatively soon, How do you imagine something like that working? As you probably know IPC on iOS is restricted in some ways. I have no idea;) The command line above was just to give an idea of how such functionality can be invoked today on a normal desktop OS, not to suggest actually running a process with parameters like that. I don't know what IPC you mean here, an iOS app is just one process, it can't start subprocesses. iOS apps can communicate with other apps and can cause them to be launched by use of custom URLs. If you pass an http:// URL to the openURL API MobileSafari will be launched and will receive that URL. a mailto: URL will open mail.app. I think the Maps app has a google custom URL scheme and will be launched and show the location specified in the URL. Any app can register a custom URL with the OS and it will be launched or brought forward from the background when another app calls openURL: with its custom URL. So something like openURL: @soffice://--convert-to%20pdf%20foo.docx is possible. Because of sandboxing one app can't directly access a file that another app has written. The file data could be passed as part of the custom URL, or could be placed on the pasteBoard, or could be sent via a socket. Having a pair of custom URLs could allow app 1 to call app 2, app 2 processes the info, then app 2 calls back to app 1 to tell it that it's done and to send the results back. The Facebook app on iOS uses this scheme to provide a single-signon ability so a user only needs to sign on to FB once and other apps that access FB can access the security token that the FB app has stored. DId you plan to create an app for document export to PDF, or is that just one functionality in some other app? I have an existing app that uploads files and I want to allow conversion to pdf as a feature. It's not a file-conversion app. More of a communication app. Anyway, in either case, to use LibreOffice code to load some document and write it out in PDF, your code needs call LibreOffice's UNO-based APIs. (Note that figuring out how all the UNO component stuff should work on iOS where everything is statically linked into one binary is a work in progress...) I might be interested in including some LO source in my app, if that can be made to work technically and within License restrictions. Since I'm mainly interested in converting documents is it possible to isolate that code to a small part of the codebase? Not small. But large parts of the code will obviously not be needed for that. I have been reading through the OO documentation trying to figure out what parts I'd need. I guess you're saying that the importers, PDF exporter, and UNO are required. Thanks, Brian -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3501133.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Entering /Users/brians/develop/libreOffice/libo/l10ntools/source Ah OK, l10ntools. That is a module it shouldn't even be building for non-desktop OSes. It contains some command-line tools that make no sense on iOS (or Android). No libraries that actual LO code would use are built in l10ntools as far as I know. I see that in tail_build/prj/build.lst l10ntools wasn't prefixed with DESKTOP. Fixing that. --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] iOS and convert to PDF
Hi All, I'm interested in the possibility of using parts of LO to convert documents from .doc and related formats to .pdf on iOS. I know that the port of LO to iOS is underway but honestly I've had some difficulty building it. Is it likely to be possible to take a subset of LO for this purpose of converting files on iOS? Any guidance would be appreciated. Thanks, Brian -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3498093.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Hi Brian, On Thu, 2011-11-10 at 13:59 -0800, BrianS wrote: I'm interested in the possibility of using parts of LO to convert documents from .doc and related formats to .pdf on iOS. Great - sounds like it overlaps with Tor's Android work quite nicely, it'd be fantastic to have you working on that with us. I know that the port of LO to iOS is underway but honestly I've had some difficulty building it. That's quite normal, you've read README.cross ? :-) also more concrete details on the specific problems would be good. Is it likely to be possible to take a subset of LO for this purpose of converting files on iOS? Certainly - but there are a number of blockers, after the cross compilation - we need to do more work to statically link the whole beast into one big blob. Tor's also doing some nice work to shrink what is compiled and included by adding a DESKTOP flag that is not set on these devices - to shrink the big blob - help much appreciated there of course. Finally some small amount of wrapper logic to run the moral equivalent of: ./soffice --convert-to pdf foo.docx or whatever would be necessary. Any guidance would be appreciated. The field is wide open for hackers interested in helping out here and we'd love to mentor you get patches included etc. There is no out of the box solution (yet), and no ETA for this on iOS - but presumably Tor has mode details. HTH, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
Ok I have my confirmation of being removed from this list, why am I still receiving e-mails? On 11/10/2011 4:59 PM, BrianS wrote: Hi All, I'm interested in the possibility of using parts of LO to convert documents from .doc and related formats to .pdf on iOS. I know that the port of LO to iOS is underway but honestly I've had some difficulty building it. Is it likely to be possible to take a subset of LO for this purpose of converting files on iOS? Any guidance would be appreciated. Thanks, Brian -- View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3498093.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] iOS and convert to PDF
That's quite normal, you've read README.cross ? :-) also more concrete details on the specific problems would be good. Also, http://www.iki.fi/tml/libocon2011-xcompiling.pdf gives an overview of LibeOffice cross-compilation in general. I've had some difficulty building it. Please give more details. (On this list, not in private mail.) The master branch is obviously a moving target. For a month or so I haven't attempted iOS compilation, so some slight problem might have popped up. (I just tried to run autogen.sh for iOS and indeed noticed a problem in the checks for libxslt. Will fix up that.) Tor's also doing some nice work to shrink what is compiled and included by adding a DESKTOP flag that is not set [when compiling for] these devices - to shrink the big blob Well, the DESKTOP flag is more to just avoid wasting time on compiling completely unnecessary modules--- also in the parts that do get compiled now there surely is lots of stuff that doesn't make sense on portable devices. Finally some small amount of wrapper logic to run the moral equivalent of: ./soffice --convert-to pdf foo.docx Yup. Something like that should be doable relatively soon, as the LibreOffice code obviously for such usage doesn't display anything or require any interactive input. But all the C++ and UNO stuff still needs to work, of course, and there is lots to do there. --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice