开发者

GUI Application on Windows and Linux

I would like开发者_高级运维 to export the Bash Shell Automation Script Project to a GUI Project which can run in both Windows and Linux. Which Programming Language would be better suited for this?


Qt would be a very good choice.

Qt is basically a great tool for rapid GUI development across multiple platforms.

PLUS U get to code in C++ which, i am assuming, is what U would ideally use in ur project.

http://qt.nokia.com/

A good place to start would be "C++ GUI Programming with Qt 4, Second Edition"

( Google it to download a pdf version ;-) )

Good Luck!!


I wonder if Desktop Kornshell (DtKsh) is available for Linux and Windows.

Back in the 1990s, Desktop Kornshell became part of the CDE (Common Desktop Environment). This was an attempt by Unix systems to present a unified GUI desktop to compete with Windows. You know how well that worked.

Ksh 93 and BASH share about 99% of their syntax. (Heck, I even like Ksh better, but then I remember my first hard drive -- an amazing 20Mg model that was only 5" in size. How did they get them so small?). However, Desktop Kornshell adds a GUI layer on top of Ksh 93. You could take your standard Ksh script, add simply append a GUI layer right on top. I did it with a few of my Kornshell scripts. Even wrote a graphic mail program based upon Mail Handler(MH).

Unfortunately, the easiest way to get dtksh is to take a time machine back to 1994.

Short of that, I really don't know if DtKsh still available. I believe MKS Toolkit still comes with DtKsh. MSK Toolkit is like Cygwin if you charged several hundred dollars for Cygwin. I doubt Cygwin has a DtKsh package (maybe they do). Linux distros use to come with DtKsh packages, but those may have gone the way of the UUCP, SCCS, and RCS packages.

However, if DtKsh is available, it would be your best bet. You could easily modify your Bash scripts to provide a nice GUI interface.

I know someone mentioned Mono and C#, but that requires a .NET server. That means not only do you have to rewrite everything, but setup an IIS server too.

Java would probably be your first choice. Java is a powerful language, and Java developers are pretty easy to find. The Swing framework comes with Java and provides an adequate GUI. I have several Swing apps (like my LDAP Browser) that I use quite a bit. Unfortunately, most Java developers have never touched Swing.

Python also comes with a GUI shell, but there are probably fewer Python developers who've used the GUI shell than Java developers who've used Swing. Still, Python is a popular language and there are lots of resources and developers available. Also, knowing Python and Java developers, I'd say you might have better luck getting a Python developer to learn Python GUI programming than getting a Java developer to learn Swing.

So, your best bet is see if you can still get DtKsh. If not, I'd go with Java or Python.


Whichever one you feel most comfortable with. Mono allows C# to be used for this sort of thing; Java is supported on both platforms. I'm sure others can be suggested. But stick where you're most comfortable.


You can't really 'export' it. I don't know if you can really 'port' it without inheriting all the problems that non-trivial shell scripts usually accrue.

It's best you rewrite your application in a cross platform language like Python, Perl, Java etc. (choose what you're comfortable with as DAvid suggested). I'd recommend a 'scripting' language since the original script was in shell, it'll mirror it more closely rather than a compiled language like C or C++. For a cross platform GUI library, there's TK (ugly but quick to get working using Python or other such languages), WX (my recommendation) or Qt (as ChristopheD suggested).


hmmm BashScript with GUI? Yes, man, we are nuts.. =P

Take a look at my question, I done some research in this area...

How to bring an image inside a GUI? Its possible in BashScript or Let's learn a new language?

Guess you can code this inside the script. Or something very near to this.


Not sure if this really answers your question but...

If you are looking to develop a GUI application that will work cross platform that sounds like a good place for Java. The SWT platform (developed by the eclipse people) allows you to create a GUI that will look native on most platforms (windows, mac, many favors of Unix/Linux).

See:

http://www.developer.com/java/other/article.php/3330861/SWT-Programming-with-Eclipse.htm

But as the two other poster pointed out usually it is faster to work with what you know.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜