Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #4744 > unrolled thread

PC and Mac GUI?

Started byMark Storkamp <mstorkamp@yahoo.com>
First post2014-09-04 11:02 -0500
Last post2014-09-14 11:24 +0200
Articles 6 — 4 participants

Back to article view | Back to comp.programming


Contents

  PC and Mac GUI? Mark Storkamp <mstorkamp@yahoo.com> - 2014-09-04 11:02 -0500
    Re: PC and Mac GUI? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-09-04 17:19 +0100
      Re: PC and Mac GUI? Mark Storkamp <mstorkamp@yahoo.com> - 2014-09-08 08:17 -0500
    Re: PC and Mac GUI? Koneko <Koneko@idontwantspamfrom.net> - 2014-09-09 05:58 +0300
      Re: PC and Mac GUI? Mark Storkamp <mstorkamp@yahoo.com> - 2014-09-09 08:19 -0500
    Re: PC and Mac GUI? August Karlstrom <fusionfile@gmail.com> - 2014-09-14 11:24 +0200

#4744 — PC and Mac GUI?

FromMark Storkamp <mstorkamp@yahoo.com>
Date2014-09-04 11:02 -0500
SubjectPC and Mac GUI?
Message-ID<mstorkamp-DD3F1F.11023804092014@news.eternal-september.org>
I have a program written in C that gets run on both a Mac and a Windows 
PC. I wrote it to use the command line so I could easily compile for 
either environment.

The program has a dozen or so command line switches, then runs 
uninterrupted until it finishes its task.

It could really use a GUI front end to select the options on the command 
line before it runs. I could easily write that in Objective-C for the 
Mac, but then that wouldn't run on the PC. I haven't programmed Windows 
since 3.0 and I don't have the tools to it now anymore.

Is there some (probably interpreted) language that can run the same code 
on both Mac and PC, present the user with a dialog box for options, 
build up a command line, and then execute the existing command line 
program?

[toc] | [next] | [standalone]


#4745

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2014-09-04 17:19 +0100
Message-ID<87d2bbtl25.fsf@bsb.me.uk>
In reply to#4744
Mark Storkamp <mstorkamp@yahoo.com> writes:

> I have a program written in C that gets run on both a Mac and a Windows 
> PC. I wrote it to use the command line so I could easily compile for 
> either environment.
>
> The program has a dozen or so command line switches, then runs 
> uninterrupted until it finishes its task.
>
> It could really use a GUI front end to select the options on the command 
> line before it runs. I could easily write that in Objective-C for the 
> Mac, but then that wouldn't run on the PC. I haven't programmed Windows 
> since 3.0 and I don't have the tools to it now anymore.
>
> Is there some (probably interpreted) language that can run the same code 
> on both Mac and PC, present the user with a dialog box for options, 
> build up a command line, and then execute the existing command line 
> program?

I have found command-line driven dialog programs like zentity to be fine
for simple cases.  I've switched to "yad" for my own stuff because it
does a bit more and it does it a bit better but I don't think it's
available for Windows (zenity is).

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#4752

FromMark Storkamp <mstorkamp@yahoo.com>
Date2014-09-08 08:17 -0500
Message-ID<mstorkamp-B9ABB6.08173108092014@news.eternal-september.org>
In reply to#4745
In article <87d2bbtl25.fsf@bsb.me.uk>,
 Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:

> Mark Storkamp <mstorkamp@yahoo.com> writes:
> 
> > I have a program written in C that gets run on both a Mac and a Windows 
> > PC. I wrote it to use the command line so I could easily compile for 
> > either environment.
> >
> > The program has a dozen or so command line switches, then runs 
> > uninterrupted until it finishes its task.
> >
> > It could really use a GUI front end to select the options on the command 
> > line before it runs. I could easily write that in Objective-C for the 
> > Mac, but then that wouldn't run on the PC. I haven't programmed Windows 
> > since 3.0 and I don't have the tools to it now anymore.
> >
> > Is there some (probably interpreted) language that can run the same code 
> > on both Mac and PC, present the user with a dialog box for options, 
> > build up a command line, and then execute the existing command line 
> > program?
> 
> I have found command-line driven dialog programs like zentity to be fine
> for simple cases.  I've switched to "yad" for my own stuff because it
> does a bit more and it does it a bit better but I don't think it's
> available for Windows (zenity is).

Thanks, I looked into both of those and I don't think they would work 
well for me. But while looking into those, I ran across Python and 
Tkinter. Since it's already loaded on the Mac, and was easy to load on 
the PC, now I just have to learn to use them. Lots of good tutorials to 
play with too.

-- 
Mark

[toc] | [prev] | [next] | [standalone]


#4754

FromKoneko <Koneko@idontwantspamfrom.net>
Date2014-09-09 05:58 +0300
Message-ID<A1uPv.58496$SH2.21322@uutiset.elisa.fi>
In reply to#4744
Mark Storkamp wrote:
> I have a program written in C that gets run on both a Mac and a Windows
> PC. I wrote it to use the command line so I could easily compile for
> either environment.

I think you should check Qt since it's a multi-platform GUI toolkit. Qt 
has quite a bit benefits and only a few disadvantages. Alternatively you 
could take the GTK+ and use that. Tools for both of them are readily 
available and open source. Both feature biddings to various interpreted 
languages too.

Qt allows you to have effortlessly 99.9% native look for both OS X and 
Windows. With little effort you can make it behave natively in both 
environments too. There are C bindings for Qt. It's reasonably fast and 
easy to learn. And it's well documented. Qt is based on C++ but it only 
uses a subset of C++. It doesn't force you to use the obscure parts of 
C++ although if you want you can do that. Qt projects can become bit 
complex thought. But the tools used to build Qt applications are 
available for all platforms. And the "Qt Creator" is a very good IDE 
used to build Qt applications.

Advantages for GTK+ are that you can use just pure C. There are also C++ 
biddings for it. It's also really really fast. GTK+ probably is easier 
to learn than Qt but problem is that its documentation tends to be a 
mess. Disadvantages in a nutshell are that compiling on both Windows and 
OS X require extra effort. GTK+ programs also tend to look like GTK+ 
programs on any given platform unless effort is put into it. However 
it's possible to achieve both native look and behavior. GTK+ has bit 
better debugging capabilities but it stems for the fact that GTK+ has 
many moving parts and it's very easy to write *bad* GTK+ programs that 
just vomit "critical warnings" constantly (most of which are perfectly 
safe to actually just ignore). Not all GTK+ tools are available for all 
platforms but most of them are.

tl;dr: You should use Qt since it's most likely to fit your needs and 
purpose. But you might want to consider GTK+ because it's a very capable 
lean and mean toolkit.


-- 
Koneko

[toc] | [prev] | [next] | [standalone]


#4755

FromMark Storkamp <mstorkamp@yahoo.com>
Date2014-09-09 08:19 -0500
Message-ID<mstorkamp-F95790.08193509092014@news.eternal-september.org>
In reply to#4754
In article <A1uPv.58496$SH2.21322@uutiset.elisa.fi>,
 Koneko <Koneko@idontwantspamfrom.net> wrote:

> Mark Storkamp wrote:
> > I have a program written in C that gets run on both a Mac and a Windows
> > PC. I wrote it to use the command line so I could easily compile for
> > either environment.
> 
> I think you should check Qt since it's a multi-platform GUI toolkit. Qt 
> has quite a bit benefits and only a few disadvantages. Alternatively you 
> could take the GTK+ and use that. Tools for both of them are readily 
> available and open source. Both feature biddings to various interpreted 
> languages too.
> 

Thanks. I've started putting together a dialog with Python and Tkinter, 
but I do like the idea of it all being compiled into the C source so 
I'll definitely be looking into Qt as well.

-- 
Mark.

[toc] | [prev] | [next] | [standalone]


#4759

FromAugust Karlstrom <fusionfile@gmail.com>
Date2014-09-14 11:24 +0200
Message-ID<lv3mrt$p6e$1@dont-email.me>
In reply to#4744
On 2014-09-04 18:02, Mark Storkamp wrote:
> I have a program written in C that gets run on both a Mac and a Windows
> PC. I wrote it to use the command line so I could easily compile for
> either environment.
>
> The program has a dozen or so command line switches, then runs
> uninterrupted until it finishes its task.
>
> It could really use a GUI front end to select the options on the command
> line before it runs. I could easily write that in Objective-C for the
> Mac, but then that wouldn't run on the PC. I haven't programmed Windows
> since 3.0 and I don't have the tools to it now anymore.
>
> Is there some (probably interpreted) language that can run the same code
> on both Mac and PC, present the user with a dialog box for options,
> build up a command line, and then execute the existing command line
> program?
>

Another option is to transcompile the C program to Javascript (via LLVM) 
with Emscripten and create the GUI with HTML and CSS. Then it will work 
in any browser with Javascript support.

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Emscripten


-- August

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web