Building an only-one binary application
I find mysef with an unusual requirement. I am in need of creating a Linux application that should run on any distribution without any instalation.
I am thinking that I need a way of creating an aplication that can be compiled in one binary with all the dependencies resolved and static-compiled. Like a MacOS X app, or a Klik app which are just one file (but no Klik since it needs Klik to be installed and that doesnt happen in nowadays Linux Distributions).
My next thought is a Java app released in one JAR. That could work but I am looking for something more Linux like.
Just for the sake of completeness, the application must index a large amount of PDF articles which you can then search upon them. It is a little searcher for PDF articles. This app must run from a CD that is delivered in a magazine, so thats why it shouldn't be installed. Just run and use.
Thanks for everything.
If you don't need a GUI, then it shouldn't be a problem cause most anything you need would already be on the system. Less common libs can be put on the CD or statically linked. If you need a GUI, GTK+ is fairly universal.
thanks for the reply :)
I forgot to mention it but the GUI is fundamental (or they'll hang me from my toes ;) )
I do also know that GTK are fairly universal but the point is that I cant assume whats on the otherside. Thats why I need a way of having it all in the CD. I am not really familiarized with the GTK+ programming, so I dont know if I can compiling all the GTK+ statically to my program (but I am thinking it is kinda crazy, isn't it? )
You absolutely want to go with Java. And you'll want to include at least three JRE's: one for Linux/x86, one for MacOS, and one for Windows.
IMHO .. PSM
Umm... If this is only for x86/Linux, Java is kinda top-heavy. I'd like to point out that many CDs have dependencies on them, like Adobe Reader of Flash. Some version of the dependency is still on the disk. This is for PDFs, right? You'll need some sort of PDF viewer to actually look at the PDFs. Another UI option is curses, kind of a cross between straight command-line and GTK+. It is even more universal than GTK+.
Hi and thanks again.
I am still researching, but I am leaning over Java. I found two things:
1) PDFBox which lets me read all the PDF data. Since the main thing my app needs to do is searching, the most important part is to get the textdata, rather than displaying the PDF (but they told me that if it could also display the pdf would be good :) )
2) Lucene which is a project that lets you index and search any kind of data. Plus, I read that PDFBox has already a converter for Lucene (so it adapts directly to de Lucene format).
I am going to test this things today to see if they are good to go.
I have also read something about JPedal for showing the PDF, but I still have no idea whatsoever (i'll keep you posted ).
I do agree with tuxdev that have is kinda top-heavy but, oddly enough, I cant find a way of deploying an app for linux which doesnt requires anything (curses are forbiden for me, since they have to be GUI).
I have also tried RealBasic which generates a binary for every major OS (Windows, GNU/Linux, MacOSX) and it worked, but the IDE is just a trial and it is too expensive for me :(
But it was kinda strange since I build a linux binary from Windows (ie the IDE had no idea which Linux I had installed) and magicaly worked.
Well thanks again for spending your time in this post. When I find a solution (or give in, or still open to new ideas ;) ) I let you know.
Java may win out here because of its portability if you do need it to run on all major platforms. The full 200% kinda over-the-top solution is to modify a live-cd distro like Slax to do what you want it to.
as I promised I'll tell you what conclusion I've arrived.
First of all, PDF is great to show documents... but not so great for the rest jajaja
It is possible to get the text out of a PDF file, but it wont come out the same way you see it on the screen, because internally a PDF file is organized diferently.
And as far as text retrieval thats as far as you can get if you plan staying a human. It's extremely complicated to get the fonts for a text.
So, for retreiving the text PDFBox works well. And Lucene works well to for indexing and searching (though PDFBox (1.X) doesnt work out of the box with the latest version of Lucene (2.X), so you have to build it yourself (not to complicated anyway)).
So, you as you might have guessed, I leaned to Java. I am hoping it turns out right jajajaja
Hope this is usefull for someone else too :)
And thanks all for the time
|All times are GMT -5. The time now is 11:42 AM.|