LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2006, 04:29 PM   #1
demon_vox
Member
 
Registered: May 2006
Location: Argentina
Distribution: SuSE 10
Posts: 173

Rep: Reputation: 30
Question Building an only-one binary application


Hello everyone,

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.
 
Old 05-30-2006, 05:13 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
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.
 
Old 05-30-2006, 08:42 PM   #3
demon_vox
Member
 
Registered: May 2006
Location: Argentina
Distribution: SuSE 10
Posts: 173

Original Poster
Rep: Reputation: 30
Hi,
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? )

Thanks again!
 
Old 05-31-2006, 09:54 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

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
 
Old 05-31-2006, 12:17 PM   #5
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
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+.
 
Old 05-31-2006, 03:11 PM   #6
demon_vox
Member
 
Registered: May 2006
Location: Argentina
Distribution: SuSE 10
Posts: 173

Original Poster
Rep: Reputation: 30
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.
 
Old 05-31-2006, 03:43 PM   #7
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
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.
 
Old 06-02-2006, 09:11 PM   #8
demon_vox
Member
 
Registered: May 2006
Location: Argentina
Distribution: SuSE 10
Posts: 173

Original Poster
Rep: Reputation: 30
Hi everyone,
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: When is an application not an application? LXer Syndicated Linux News 0 04-26-2006 04:33 AM
kubuntu: problem building QT4 application eantoranz Ubuntu 1 01-23-2006 11:39 AM
how to link helpblocks application to gtk application m.harshavardhan Linux - Software 0 08-16-2005 08:39 AM
Building Binary LFS Tuvok Linux From Scratch 10 03-20-2005 07:09 PM
how i migrate windows application to Linux base application vandarakalpesh Linux - Software 0 06-26-2004 03:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration