comp.lang.ada
 help / color / mirror / Atom feed
* can one make a static build Ada+GUI GTK application?
@ 2013-02-17 16:39 Nasser M. Abbasi
  2013-02-17 17:04 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Nasser M. Abbasi @ 2013-02-17 16:39 UTC (permalink / raw)


ref: http://libre.adacore.com/tools/gtkada/

Just a basic question: Is it possible to build
a standalone .exe that is linked completely
statically which includes all libraries needed to make an Ada
with GUI front end using, I assume GTK since
that is the most complete GUI API for Ada.

i.e. If I do such an app, and send it to someone,
I'd like them to be able to run it on their PC
without having to install anything on their end.

(I understand the .exe will be large in this case,
but that is ok).

Nothing commercial, just academic. I'd like to build
it for windows and Linux also.

If this is possible, any good links on the steps to that?

thanks
--Nasser



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-17 16:39 can one make a static build Ada+GUI GTK application? Nasser M. Abbasi
@ 2013-02-17 17:04 ` Dmitry A. Kazakov
  2013-02-18 23:30   ` Randy Brukardt
  2013-02-22  4:56 ` Patrick
  2013-02-23 12:47 ` Dirk Heinrichs
  2 siblings, 1 reply; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-02-17 17:04 UTC (permalink / raw)


On Sun, 17 Feb 2013 10:39:01 -0600, Nasser M. Abbasi wrote:

> Just a basic question: Is it possible to build
> a standalone .exe that is linked completely
> statically which includes all libraries needed to make an Ada
> with GUI front end using, I assume GTK since
> that is the most complete GUI API for Ada.

Normally GTK does not support static linking. E.g.

https://mail.gnome.org/archives/gtk-app-devel-list/2007-April/msg00039.html

Furthermore, it would be useless anyway, because GTK needs many other files
installed on various locations in order to function properly.

In short, if you use GTK (and so GtkAda), you should package your software
properly for the target where you are going to deploy it.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-17 17:04 ` Dmitry A. Kazakov
@ 2013-02-18 23:30   ` Randy Brukardt
  2013-02-19  4:33     ` Nasser M. Abbasi
  0 siblings, 1 reply; 32+ messages in thread
From: Randy Brukardt @ 2013-02-18 23:30 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:1mxlt8oowbpgg$.1id16hhd6omlz.dlg@40tude.net...
> On Sun, 17 Feb 2013 10:39:01 -0600, Nasser M. Abbasi wrote:
>
>> Just a basic question: Is it possible to build
>> a standalone .exe that is linked completely
>> statically which includes all libraries needed to make an Ada
>> with GUI front end using, I assume GTK since
>> that is the most complete GUI API for Ada.
>
> Normally GTK does not support static linking. E.g.
>
> https://mail.gnome.org/archives/gtk-app-devel-list/2007-April/msg00039.html

Of course, you can do this for Windows using Claw (or probably other Windows 
interfaces). Usually, its not necessary to "install" or "package" anything 
on Windows; this is one place where Windows definitely is preferable to 
Linux (but that isn't much of a reason to use Windows, IMHO). I hate the 
fact that slow installers have taken over Windows, especially as most of 
them do little of value. (The fact that we need one for Janus/Ada shows me 
more that we have usability problems with the product than any value for 
installers.)

                                            Randy.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-18 23:30   ` Randy Brukardt
@ 2013-02-19  4:33     ` Nasser M. Abbasi
  2013-02-19 20:47       ` slos
  0 siblings, 1 reply; 32+ messages in thread
From: Nasser M. Abbasi @ 2013-02-19  4:33 UTC (permalink / raw)


On 2/18/2013 5:30 PM, Randy Brukardt wrote:

>
> Of course, you can do this for Windows using Claw (or probably other Windows
> interfaces).

Thanks, I did not know that. Will look at Claw then.

For windows only is ok, after all, windows still has
about 90% market share of the desktop.

My main goal is to see if I can make a simple GUI with
Ada, but having it all be self contained one .exe file just
to make it easier to distribute.

--Nasser



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-19  4:33     ` Nasser M. Abbasi
@ 2013-02-19 20:47       ` slos
  0 siblings, 0 replies; 32+ messages in thread
From: slos @ 2013-02-19 20:47 UTC (permalink / raw)
  Cc: nma

Le mardi 19 février 2013 05:33:17 UTC+1, Nasser M. Abbasi a écrit :
> On 2/18/2013 5:30 PM, Randy Brukardt wrote:
> 
> 
> 
> >
> 
> > Of course, you can do this for Windows using Claw (or probably other Windows
> 
> > interfaces).
> 
> 
> 
> Thanks, I did not know that. Will look at Claw then.
> 
> 
> 
> For windows only is ok, after all, windows still has
> 
> about 90% market share of the desktop.
> 
> 
> 
> My main goal is to see if I can make a simple GUI with
> 
> Ada, but having it all be self contained one .exe file just
> 
> to make it easier to distribute.
> 
> 
> 
> --Nasser

IMHO, the installation should not drive your choice about the graphic toolkit;
It is rather simple to use one of the free soft installers available out there like http://nsis.sourceforge.net or http://www.jrsoftware.org/isinfo.php
Have a look to http://en.wikipedia.org/wiki/List_of_installation_software
Inno Setup has Pascal scripting, not Ada though.

Stéphane



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-17 16:39 can one make a static build Ada+GUI GTK application? Nasser M. Abbasi
  2013-02-17 17:04 ` Dmitry A. Kazakov
@ 2013-02-22  4:56 ` Patrick
  2013-02-22 23:29   ` Nasser M. Abbasi
  2013-02-23 12:47 ` Dirk Heinrichs
  2 siblings, 1 reply; 32+ messages in thread
From: Patrick @ 2013-02-22  4:56 UTC (permalink / raw)
  Cc: nma

Hi Nasser

Have you looked at FLTK? It's statically linked by default. It's C++ so there is going to be some work to get it to work with Ada.



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-22  4:56 ` Patrick
@ 2013-02-22 23:29   ` Nasser M. Abbasi
  2013-02-23  8:06     ` Simon Wright
  0 siblings, 1 reply; 32+ messages in thread
From: Nasser M. Abbasi @ 2013-02-22 23:29 UTC (permalink / raw)


On 2/21/2013 10:56 PM, Patrick wrote:
> Hi Nasser
>
> Have you looked at FLTK? It's statically linked by default. It's C++ so
>there is going to be some work to get it to work with Ada.
>

Thanks. I think I looked at FLTK someone time ago. There are
number of GUI frameworks for use with C++. I looked also
at Qt with c++, but it is almost impossible to build
static app with Qt from what I found reading on it.

I downloaded an FLTK app, a nice one, and it was just ONE
single .exe file. This is what I want. No dll's and no
shared libraries to worry about. One file to move around.

Java has Jar files where one can pack everything in there,
but it needs a run-time library installed, or one must include
the JRE as well.

So that is another possibility to make small GUI app which
is one file that includes everything. But I think Java
is in a downwards slope now, with all the viruses that
are affecting it, so I am not interested in Java much
these days. Too bad, Java used to be called a safe
language, now all what you hear about Java is news and
information on how to uninstall it and remove it from the
PC due to risks in using it.

--Nasser

  




^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-22 23:29   ` Nasser M. Abbasi
@ 2013-02-23  8:06     ` Simon Wright
  2013-02-23  8:22       ` Nasser M. Abbasi
  0 siblings, 1 reply; 32+ messages in thread
From: Simon Wright @ 2013-02-23  8:06 UTC (permalink / raw)


"Nasser M. Abbasi" <nma@12000.org> writes:

> So that is another possibility to make small GUI app which is one file
> that includes everything. But I think Java is in a downwards slope
> now, with all the viruses that are affecting it, so I am not
> interested in Java much these days. Too bad, Java used to be called a
> safe language, now all what you hear about Java is news and
> information on how to uninstall it and remove it from the PC due to
> risks in using it.

I think that it's the Java browser plugin that has the problem. Don't
know why it can't be fixed.

Annoying for me, because ArgoUML won't run on Mac OS X from the
download; I have to run the webstart version, and that needs the Java
plugin to be enabled. Ugh.



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-23  8:06     ` Simon Wright
@ 2013-02-23  8:22       ` Nasser M. Abbasi
  2013-02-23 17:09         ` Simon Wright
  0 siblings, 1 reply; 32+ messages in thread
From: Nasser M. Abbasi @ 2013-02-23  8:22 UTC (permalink / raw)


On 2/23/2013 2:06 AM, Simon Wright wrote:

>
> I think that it's the Java browser plugin that has the problem. Don't
> know why it can't be fixed.
>
> Annoying for me, because ArgoUML won't run on Mac OS X from the
> download; I have to run the webstart version, and that needs the Java
> plugin to be enabled. Ugh.
>

well, may be so, but from reading things like this:

http://www.theverge.com/2013/2/22/4016582/after-so-many-hacks-why-wont-java-just-go-away
http://www.suntimes.com/technology/ihnatko/18340857-452/apple-hacked-and-java-is-the-weak-spot.html

and many other articles like it (simply go to google news and type Java,
you'll get screens full of nothing but bad news for Java),
I am scared to install it on my PC. I bought a new PC and made sure
it has no Java on it. So I un-istalled windows that came with it,
and did fresh install using my own windows OS disk that I bought
separately. This way I know what I have there ;)

If the problems were easy to fix with Java, they would have
been fixed by now.

--Nasser








^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-17 16:39 can one make a static build Ada+GUI GTK application? Nasser M. Abbasi
  2013-02-17 17:04 ` Dmitry A. Kazakov
  2013-02-22  4:56 ` Patrick
@ 2013-02-23 12:47 ` Dirk Heinrichs
  2013-02-23 13:01   ` Dmitry A. Kazakov
  2013-02-25 23:25   ` Randy Brukardt
  2 siblings, 2 replies; 32+ messages in thread
From: Dirk Heinrichs @ 2013-02-23 12:47 UTC (permalink / raw)


Nasser M. Abbasi wrote:

> If I do such an app, and send it to someone,
> I'd like them to be able to run it on their PC
> without having to install anything on their end.

Hmm, thought static linking was a thing of the past, because of it's 
possible security problems.

If one of your statically linked libs has a security flaw, it can't be 
exchanged easily. You must relink and resend your binary to get the fixed 
version to the receiver of your program.

If, OTOH, you just tell the receiver to install libraries X, Y and Z to be 
able to run your program, nether you nor him need to worry about missed 
security fixes. All you need to to is to replace the vulnerable version of a 
shared lib with the fixed one.

Bye...

	Dirk
-- 
Dirk Heinrichs <dirk.heinrichs@altum.de>
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de




^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-23 12:47 ` Dirk Heinrichs
@ 2013-02-23 13:01   ` Dmitry A. Kazakov
  2013-02-25 23:25   ` Randy Brukardt
  1 sibling, 0 replies; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-02-23 13:01 UTC (permalink / raw)


On Sat, 23 Feb 2013 13:47:12 +0100, Dirk Heinrichs wrote:

> Hmm, thought static linking was a thing of the past, because of it's 
> possible security problems.

GUI support is considered an integral part of the platform to be present
anyway.

> If one of your statically linked libs has a security flaw, it can't be 
> exchanged easily. You must relink and resend your binary to get the fixed 
> version to the receiver of your program.

...and conversely, if you link dynamically you can never assert your
application free of issues, because you are not in control of what it will
be linked to...
 
Security aspect is indeed involved considering general vulnerability of
GUI, when that is allowed to use the hardware, e.g. input devices at low
level.

Not that existing GUI frameworks pay much attention to that, but it could
definitely be an argument against static linking as well as against GUIs
allowed to perform sensitive operations in the user space.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-23  8:22       ` Nasser M. Abbasi
@ 2013-02-23 17:09         ` Simon Wright
  0 siblings, 0 replies; 32+ messages in thread
From: Simon Wright @ 2013-02-23 17:09 UTC (permalink / raw)


"Nasser M. Abbasi" <nma@12000.org> writes:

> On 2/23/2013 2:06 AM, Simon Wright wrote:
>
>>
>> I think that it's the Java browser plugin that has the problem. Don't
>> know why it can't be fixed.
>>
>> Annoying for me, because ArgoUML won't run on Mac OS X from the
>> download; I have to run the webstart version, and that needs the Java
>> plugin to be enabled. Ugh.

Turns out I _can_ run ArgoUML via web start with the Safari Java plugin
disabled (it means it does some downloading from tigris.org every time
the ArgoUML starts, doesn't take long).

> well, may be so, but from reading things like this:
>
> http://www.theverge.com/2013/2/22/4016582/after-so-many-hacks-why-wont-java-just-go-away
> http://www.suntimes.com/technology/ihnatko/18340857-452/apple-hacked-and-java-is-the-weak-spot.html
>
> and many other articles like it (simply go to google news and type
> Java, you'll get screens full of nothing but bad news for Java), I am
> scared to install it on my PC. I bought a new PC and made sure it has
> no Java on it. So I un-istalled windows that came with it, and did
> fresh install using my own windows OS disk that I bought
> separately. This way I know what I have there ;)

I looked at the first of your links, a lot of the comments say it's the
browser plugin that's the problem (executing unchecked downloads in a
buggy sandbox).

> If the problems were easy to fix with Java, they would have
> been fixed by now.

Should have used Ada.



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-23 12:47 ` Dirk Heinrichs
  2013-02-23 13:01   ` Dmitry A. Kazakov
@ 2013-02-25 23:25   ` Randy Brukardt
  2013-02-28  0:00     ` Björn Persson
  1 sibling, 1 reply; 32+ messages in thread
From: Randy Brukardt @ 2013-02-25 23:25 UTC (permalink / raw)


"Dirk Heinrichs" <dirk.heinrichs@altum.de> wrote in message 
news:kgadoj$ihm$1@online.de...
> Nasser M. Abbasi wrote:
>
>> If I do such an app, and send it to someone,
>> I'd like them to be able to run it on their PC
>> without having to install anything on their end.
>
> Hmm, thought static linking was a thing of the past, because of it's
> possible security problems.

"Linking" in general is a bad idea, one that needs to be limited to very 
specific things.

> If one of your statically linked libs has a security flaw, it can't be
> exchanged easily. You must relink and resend your binary to get the fixed
> version to the receiver of your program.

Certainly true, but...

> If, OTOH, you just tell the receiver to install libraries X, Y and Z to be
> able to run your program, nether you nor him need to worry about missed
> security fixes. All you need to to is to replace the vulnerable version of 
> a
> shared lib with the fixed one.

...if you have to tell users to "update" something, you're already dead 
(there's no way that most of them will do that). You have a better chance 
updating them yourself (as part of your own patch).

I don't think it is a good idea to link to anything other than things that 
are always distributed with the OS. (That opinion probably doesn't work as 
well on Linux as it does on Windows, where the standard distributions 
contain pretty much everything you'll need). The problem being that as soon 
as you depend on 3rd-party libraries (and *especially* dynamically-linked 
3rd party libraries), you've lost all control over the interface and 
operations. And you've also greatly complicated your installation and 
updating requirements. [And all code not written in Ada is junk. ;-) TM]

With Claw, we only allowed interfacing to OS facilities, for which there is 
a fairly well-defined interface. Those interfaces caused a large percentage 
of the bugs that we had (either because we had gotten wrong or because the 
documentation didn't reflect reality). Those facilities of course get 
updated on their own schedule, and in most cases, problems with them are not 
something that we could do anything about. In the cases where the interface 
itself is the problem, we'd have to rebuild the application either way (a 
broken interface is going to stay broken no matter how the underlying 
linking is done).

Beyond that, we insisted on having all other code in Ada. That prevents most 
security problems simply by having the strong checking that an Ada compiler 
provides, and it also opens up the possibility using more extensive analysis 
on the entire code-base (like CodePeer). Ada 2012 provides ways to 
strengthen the interfaces a bit, but since you have no real idea what the 
other side does, it's not a real help.

It's certainly important that you *don't* statically link things that are 
(or should be) part of the core OS. My brief experience with Linux is that 
it makes this far more complicated than necessary (having a whole bunch of 
different GUI toolkits), and the real problem is there: no Linux programmer 
can assume that anything exists on another's system, even basic support. 
Which leads toward those bad choices between static and dynamic linking.

(If Janus/Ada ever became available for Linux, it would be self-contained, 
only requiring the kernel to run. It of course would optionally support 
linking with other stuff, but there would be no requirement to do so. This 
is how it worked on MS-DOS, Unix, Sun OS, and other systems in the past --  
we didn't do that for Windows mainly because we couldn't find enough 
information back in the Windows NT days to implement that. And there never 
was much demand for a better way there.)

                                                       Randy.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-25 23:25   ` Randy Brukardt
@ 2013-02-28  0:00     ` Björn Persson
  2013-02-28  0:46       ` Nasser M. Abbasi
  2013-03-01  2:37       ` Randy Brukardt
  0 siblings, 2 replies; 32+ messages in thread
From: Björn Persson @ 2013-02-28  0:00 UTC (permalink / raw)


Randy Brukardt wrote:
> I don't think it is a good idea to link to anything other than things that 
> are always distributed with the OS. (That opinion probably doesn't work as 
> well on Linux as it does on Windows, where the standard distributions 
> contain pretty much everything you'll need).

That's not how it looks from my point of view. It's the big free
software distributions that contain pretty much everything you'll need,
lots more than Windows contains. There are all sorts of network servers
and clients, peer-to-peer programs, office suites, graphics editors,
audio editors, games, lots of development tools – and of course all of
the libraries that all of those programs use.

There's no need to reinvent wheels just to avoid libraries that might
not be installed. The package manager will install the required
libraries if they aren't already installed, so although nobody has the
entire distribution installed you don't need to worry about that. (Each
of the big distributions is built around a package manager, for example
Yum or APT. Each package has a list of other packages that it depends
on, and the package manager resolves the dependencies automatically.)

If the program you're packaging requires some library that isn't
packaged yet (like for example some Ada library, as there aren't many
of those packaged), then you simply package that library too – in a
package of its own.

> The problem being that as soon 
> as you depend on 3rd-party libraries (and *especially* dynamically-linked 
> 3rd party libraries), you've lost all control over the interface and 
> operations.

We have sonames and versioned symbols to help us control interfaces,
and package managers use them to ensure that installed packages are
compatible. It is possible to make mistakes though, and sometimes
developers forget to bump the soname when they make ABI changes.

As for operations, there is of course no way to guarantee that the
library actually works as documented – not even if you write it
yourself. :-)

> And you've also greatly complicated your installation and 
> updating requirements.

I suppose that's true in Windows. In Fedora, "yum install niftyprogram"
downloads and installs Nifty Program and all the libraries it needs.
"yum update" updates all installed packages to the latest version. Not
complicated at all. Other distributions have similar commands, and
there are also GUI tools for those who want that.

> It's certainly important that you *don't* statically link things that are 
> (or should be) part of the core OS. My brief experience with Linux is that 
> it makes this far more complicated than necessary

You will certainly run into problems if you try to draw a line between
which libraries are part of the "core OS" and which aren't. If you are
in the camp that equates "operating system" with "kernel", then it's
easy: The kernel is the operating system; programs and libraries
are not (although maybe a microkernel could make it more complicated).
If you are in the camp that wants to define "operating system" to
include more than a kernel, then there is no obvious place to draw the
line. Some components are more essential than others, but they don't
naturally fall into two categories. In Windows you could perhaps say
that what you get when you buy Windows is the operating system and
programs that you buy separately are add-ons. Applying that reasoning to
free software distributions would lead to defining the operating system
as the entire distribution. Fedora, Debian and others include lots of
games, toys and rather specialized utilities, and counting all of those
as parts of the operating system would be silly.

I have found it best not to think about anything as "the operating
system". Fedora is a software distribution, Linux is its kernel, and
what packages I install on a particular box depends on what I want that
box to do.

> (having a whole bunch of different GUI toolkits)

It definitely wouldn't make sense to declare that GTK+ is part of the
operating system and QT is an add-on, or the other way round. Choose
one that you like, link dynamically to it, and let your package depend
on the appropriate sonames.

> no Linux programmer 
> can assume that anything exists on another's system, even basic support.

If you distribute your program as an RPM (or .deb) package, then you can
assume that Yum (or APT) will install any libraries and other packages
it depends on.

Björn Persson




^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28  0:00     ` Björn Persson
@ 2013-02-28  0:46       ` Nasser M. Abbasi
  2013-02-28  8:58         ` Dmitry A. Kazakov
  2013-03-01  2:37       ` Randy Brukardt
  1 sibling, 1 reply; 32+ messages in thread
From: Nasser M. Abbasi @ 2013-02-28  0:46 UTC (permalink / raw)


On 2/27/2013 6:00 PM, Björn Persson wrote:

>
> There's no need to reinvent wheels just to avoid libraries that might
> not be installed. The package manager will install the required
> libraries if they aren't already installed, so although nobody has the
> entire distribution installed you don't need to worry about that. (Each
> of the big distributions is built around a package manager, for example
> Yum or APT. Each package has a list of other packages that it depends
> on, and the package manager resolves the dependencies automatically.)
>

That is the problem when programmers think about delivering software.

They think everyone else in the world is also a programmer like them.
They live in a bubble.

Ok, so I made a program and I want to email it
to my grandmother's aunt to play a game on the computer.
My Aunt has no clue what is a package manager is. She just
knows how to click using a mouse.

So, you expect my grandmother's aunt to use a package manager to
go search for missing packages from the net. May be also patch
the kernel while she is at it and make sure the latest glibc
is there ofcourse. Ofcourse, when using APT she needs to know
which package to pick, since there are thousands there.

Yes. Sound like a winner idea. That is why Linux never made it
to the desktop and will never make it. I bet you 20 years from
now its market share on the desktop will remain where it is
today, at 1%.  (ps. I use Linux all day myself, along with
windows also, but I am a geek also).

All what normal users want is one icon to click on to run
a program.

Anything more is too complicated for the normal users.

--Nasser




^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28  0:46       ` Nasser M. Abbasi
@ 2013-02-28  8:58         ` Dmitry A. Kazakov
  2013-02-28 12:59           ` Nasser M. Abbasi
  2013-03-01  2:46           ` Randy Brukardt
  0 siblings, 2 replies; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-02-28  8:58 UTC (permalink / raw)


On Wed, 27 Feb 2013 18:46:09 -0600, Nasser M. Abbasi wrote:

> Ok, so I made a program and I want to email it
> to my grandmother's aunt to play a game on the computer.
> My Aunt has no clue what is a package manager is. She just
> knows how to click using a mouse.

Hmm, actually people who don't know computers have much bigger difficulties
with very concept of a file being kept somewhere, moved around, executed.
Your logic might apply only to someone who had some experience with MS-DOS
and then spent 20 years in coma. (:-))

> So, you expect my grandmother's aunt to use a package manager to
> go search for missing packages from the net.

No, Yum (and APT) does all that as well as the corresponding GUI
front-end(s).

> Yes. Sound like a winner idea. That is why Linux never made it
> to the desktop and will never make it.

Not for this reason, surely.

> All what normal users want is one icon to click on to run
> a program.

Only if you took a time machine back to early 90's. Today we have many
thousands of programs installed on the computer. You cannot have their
icons visible.

Layman users do not even think it in terms of programs. It is not only
files which they do not understand. Neither they do programs. Try to
explain your aunt the difference between "firefox" and "nautilus," why
things she sees in one do not appear in another. Why downloaded "book" does
not appear in her Kindle etc. "Normal users" see computer as an unsorted
mess of clickable GUI elements.

> Anything more is too complicated for the normal users.

True, that is why you should not only package your software, that would be
only first step. Then you have to create a repository or else submit your
package to an existing one. You also have to add scripts to the package
which would make your program appear in the GNOME's list of applications
(and for KDE and dozen's other window managers) ... if you wanted to
address users as your aunt.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28  8:58         ` Dmitry A. Kazakov
@ 2013-02-28 12:59           ` Nasser M. Abbasi
  2013-02-28 13:44             ` Dmitry A. Kazakov
  2013-03-01  2:46           ` Randy Brukardt
  1 sibling, 1 reply; 32+ messages in thread
From: Nasser M. Abbasi @ 2013-02-28 12:59 UTC (permalink / raw)


On 2/28/2013 2:58 AM, Dmitry A. Kazakov wrote:

> No, Yum (and APT) does all that as well as the corresponding GUI
> front-end(s).
>

My Aunt has an Ipad. My other Aunt has windows. She does not know
about apt or yum or jum or any of these things.

Again, a typical programmer thinking everyone else in the world is
also a programmer and/or using Linux.

--Nasser




^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28 12:59           ` Nasser M. Abbasi
@ 2013-02-28 13:44             ` Dmitry A. Kazakov
  2013-02-28 23:16               ` Nasser M. Abbasi
  2013-03-01  2:53               ` Randy Brukardt
  0 siblings, 2 replies; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-02-28 13:44 UTC (permalink / raw)


On Thu, 28 Feb 2013 06:59:04 -0600, Nasser M. Abbasi wrote:

> On 2/28/2013 2:58 AM, Dmitry A. Kazakov wrote:
> 
>> No, Yum (and APT) does all that as well as the corresponding GUI
>> front-end(s).
> 
> My Aunt has an Ipad. My other Aunt has windows. She does not know
> about apt or yum or jum or any of these things.

The standard MS packaging format under Windows is msi file. MS provides a
front end GUI for that:

   Control Panel\All Control Panel Items\Programs and Features

Due to limitations of Windows design, its applications tend to install all
shared libraries with the application itself. This is why both GPS and GIMP
install their own copies of GTK stuff. Nevertheless both use GTK DLLs
rather than linking statically. Most Windows applications do so.

As someone who has to deal with the issue of redistribution of the MSVC
run-time, I can tell you, it is far more difficult to explain your aunt
what she must do in order to make a C/C++ application working. Linux
packages are nothing comparing to the mess we have to deal with under
Windows (e.g. google for "manifest file").

> Again, a typical programmer thinking everyone else in the world is
> also a programmer and/or using Linux.

You were not specific about the OS. The way software is packaged and
deployed clearly depends on the OS. If you want to distribute an
application for an OS, you MUST do it in a way usual for that OS. Sorry.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28 13:44             ` Dmitry A. Kazakov
@ 2013-02-28 23:16               ` Nasser M. Abbasi
  2013-03-01  8:56                 ` Dmitry A. Kazakov
  2013-03-01  2:53               ` Randy Brukardt
  1 sibling, 1 reply; 32+ messages in thread
From: Nasser M. Abbasi @ 2013-02-28 23:16 UTC (permalink / raw)


On 2/28/2013 7:44 AM, Dmitry A. Kazakov wrote:

>
> You were not specific about the OS. The way software is packaged and
> deployed clearly depends on the OS. If you want to distribute an
> application for an OS, you MUST do it in a way usual for that OS. Sorry.
>

My main goal was to see if I can make small GUI app in Ada
that a user on the other end can just simply download
and run it. User does not need to install any additional
packages, libraries nor anything other than to simply
double click on the file downloaded to run.

For example, when I looked at FLTK which allows
static binding, I found this nice GUI app

http://posterazor.sourceforge.net/
http://posterazor.sourceforge.net/index.php?page=download&lang=english

so I downloaded it, and it was all ONE SINGLE .EXE
which I just clicked on and the GUI came up and run.
You can try it yourself.

That is what I was looking for but using Ada to see
if I can make a simple GUI in Ada.

Linux packaging and deployment which some here seem to
think is so cool, is not only confusing, but I think it is
fundamentally broken.

Even using a GUI based package manager and searching for a package,
one is presented with a list of many different names
and variations of the same package and the user is asked
to select which to use.  So much effort and time is put on
Linux packaging becuase it is so complex and convoluted way
of doing things.

Installing an app, ends up breaking the app into
100 different places on the system when header files go on place,
man pages to another, .so libraries to another place, .a
libraries to another and config files yet to another and so on.

A much better and simpler model will be for each app
to include in it all the necessary user level libraries it
needs to run. (I read somewhere that how things work on
the Mac also, but I do not know, I do not use a mac).

An example is with Java and JavaFX, where one can include the
JRE (run-time library) and any other 3rd party Jar files and
package everything in one self contained one bundle file. When
this is installed, the bundle also remain in one place and
is not broken and scattered all over the place with many
different assumed dependencies on other libraries in the user system.

https://blogs.oracle.com/talkingjavadeployment/entry/native_packaging_for_javafx

--Nasser





^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28  0:00     ` Björn Persson
  2013-02-28  0:46       ` Nasser M. Abbasi
@ 2013-03-01  2:37       ` Randy Brukardt
  2013-03-02 19:00         ` Shark8
  1 sibling, 1 reply; 32+ messages in thread
From: Randy Brukardt @ 2013-03-01  2:37 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2211 bytes --]

"Bj�rn Persson" <bjorn@xn--rombobjrn-67a.se> wrote in message 
news:20130228010057.13659976@hactar.xn--rombobjrn-67a.se...
Randy Brukardt wrote:
...
>As for operations, there is of course no way to guarantee that the
>library actually works as documented - not even if you write it
>yourself. :-)

That's not quite true: that's what SPARK is for, and to a lesser extent 
tools like Codepeer. Not being able to use them is one of the disadvantages 
of "linking" rather than using Ada source code: interfacing to non-Ada code 
is inherently unsafe.

I know I'm "bad" in this aspect: I don't trust much code (even some that I 
wrote myself), especially if it is not in Ada and do so only out of 
necessity (I don't have time to write display drivers or a network stack --  
but I much preferred programming on MS-DOS, which did virtually nothing for 
you, to the current systems with tons of cruft that often doesn't work as 
advertised.)

>> And you've also greatly complicated your installation and
>> updating requirements.
>
>I suppose that's true in Windows. In Fedora, "yum install niftyprogram"
>downloads and installs Nifty Program and all the libraries it needs.
>"yum update" updates all installed packages to the latest version. Not
>complicated at all. Other distributions have similar commands, and
>there are also GUI tools for those who want that.

The outrageous amount of time wasted creating and maintaining installers of 
any sort (including "package managers") is precisely what I hate about 
virtually all systems. (And don't claim it's somehow easier on Linux -- I 
read the messages here all the time about packaging screw-ups. And when I 
tried to install a supposed update to Perl on my new Debian system the other 
day (something I don't even use and am not quite sure why it's on my 
system), the package manager announced that it needed to remove 451 other 
packages, including GNOME and packages that claimed to be the Linux kernel. 
I quickly canceled *that* update and haven't tried since.

Moral: the best dependence is *no* dependence. It's not always practical to 
do that, but the less dependence you have the better.

                                               Randy.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28  8:58         ` Dmitry A. Kazakov
  2013-02-28 12:59           ` Nasser M. Abbasi
@ 2013-03-01  2:46           ` Randy Brukardt
  1 sibling, 0 replies; 32+ messages in thread
From: Randy Brukardt @ 2013-03-01  2:46 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:vg64iet15qab$.1ooflv615alkw$.dlg@40tude.net...
> On Wed, 27 Feb 2013 18:46:09 -0600, Nasser M. Abbasi wrote:
>
>> Ok, so I made a program and I want to email it
>> to my grandmother's aunt to play a game on the computer.
>> My Aunt has no clue what is a package manager is. She just
>> knows how to click using a mouse.
>
> Hmm, actually people who don't know computers have much bigger 
> difficulties
> with very concept of a file being kept somewhere, moved around, executed.

True enough; my Dad, who was using PCs since the very beginning with CP/M, 
still can't quite grasp the idea of copying files. With him, they stay where 
they are created, even if that was the wrong place. Drag-and-drop apparently 
isn't as intuitive as it seems.

                              Randy.






^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28 13:44             ` Dmitry A. Kazakov
  2013-02-28 23:16               ` Nasser M. Abbasi
@ 2013-03-01  2:53               ` Randy Brukardt
  2013-03-01  8:41                 ` Dmitry A. Kazakov
  1 sibling, 1 reply; 32+ messages in thread
From: Randy Brukardt @ 2013-03-01  2:53 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:1jakth6zgpm7u.1jynuosu6x48.dlg@40tude.net...
...
> The standard MS packaging format under Windows is msi file. MS provides a
> front end GUI for that:

Blech. You don't need to put up with that crap to install Windows software. 
It's just a couple of special registry keys and you're done (routines to set 
those keys have been part of Claw since it was created).

.MSI installers spend 10 minutes even on an unloaded fast quad-core machine 
navel gazing (sorry, "preparing to install") before they do anything (even 
when downloaded directly to the machine). WTF?

When we install Claw, it does take a couple of minutes to install - but 
that's because we're using your Ada compiler to compile the entire thing. An 
.MSI would still be "preparing".

...
> You were not specific about the OS. The way software is packaged and
> deployed clearly depends on the OS. If you want to distribute an
> application for an OS, you MUST do it in a way usual for that OS. Sorry.

I can proudly say that I've *never* done it in the "usual" way for Windows, 
and I rather doubt I would do that on Linux, either. The only commonality 
with "normal" windows installers is the use of a program called "setup". 
Otherwise, it's all Ada code doing the work; it's a lot faster and more 
flexible for Ada (since I can compile in any extra code I need).

                                     Randy.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-01  2:53               ` Randy Brukardt
@ 2013-03-01  8:41                 ` Dmitry A. Kazakov
  2013-03-01 11:57                   ` Yannick Duchêne (Hibou57)
  2013-03-02  0:18                   ` Dennis Lee Bieber
  0 siblings, 2 replies; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-03-01  8:41 UTC (permalink / raw)


On Thu, 28 Feb 2013 20:53:49 -0600, Randy Brukardt wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
> news:1jakth6zgpm7u.1jynuosu6x48.dlg@40tude.net...
> ...
>> The standard MS packaging format under Windows is msi file. MS provides a
>> front end GUI for that:
> 
> Blech. You don't need to put up with that crap to install Windows software. 
> It's just a couple of special registry keys and you're done (routines to set 
> those keys have been part of Claw since it was created).
> 
> .MSI installers spend 10 minutes even on an unloaded fast quad-core machine 
> navel gazing (sorry, "preparing to install") before they do anything (even 
> when downloaded directly to the machine). WTF?
> 
> When we install Claw, it does take a couple of minutes to install - but 
> that's because we're using your Ada compiler to compile the entire thing. An 
> .MSI would still be "preparing".

I didn't say msi is good. In fact there exist many Windows installers from
third parity vendors, which indicates that msi is not good. Yet, it is the
standard way under Windows.

>> You were not specific about the OS. The way software is packaged and
>> deployed clearly depends on the OS. If you want to distribute an
>> application for an OS, you MUST do it in a way usual for that OS. Sorry.
> 
> I can proudly say that I've *never* done it in the "usual" way for Windows, 
> and I rather doubt I would do that on Linux, either.

Linux package builders is a huge mess, both Fedora's and Debian's. But you
have to go through this in order to make your software usable under Linux. 

GNAT GPL for Linux is a shining example how not to do it. Assuming that
your compiler would not depend on GCC releases, you would have less
problems than AdaCore has, but still, you will have dependencies on many
system libraries. Today nobody accepts a product that installs itself under
/usr/local/... or /usr/opt/...

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-02-28 23:16               ` Nasser M. Abbasi
@ 2013-03-01  8:56                 ` Dmitry A. Kazakov
  2013-03-01 10:39                   ` Georg Bauhaus
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-03-01  8:56 UTC (permalink / raw)


On Thu, 28 Feb 2013 17:16:29 -0600, Nasser M. Abbasi wrote:

> On 2/28/2013 7:44 AM, Dmitry A. Kazakov wrote:
> 
>> You were not specific about the OS. The way software is packaged and
>> deployed clearly depends on the OS. If you want to distribute an
>> application for an OS, you MUST do it in a way usual for that OS. Sorry.
> 
> My main goal was to see if I can make small GUI app in Ada
> that a user on the other end can just simply download
> and run it.

This is exactly how msi file works.

> Linux packaging and deployment which some here seem to
> think is so cool, is not only confusing, but I think it is
> fundamentally broken.

It is not cool, but it is light years ahead of the Windows' way.
 
> Even using a GUI based package manager and searching for a package,
> one is presented with a list of many different names
> and variations of the same package and the user is asked
> to select which to use.

You are switching the subject. The user already knows that he wanted to
install your package named "foo." The only thing for him to do is

   yum install foo

That would resolve all dependencies and install any missing packages.

> Installing an app, ends up breaking the app into
> 100 different places on the system when header files go on place,
> man pages to another, .so libraries to another place, .a
> libraries to another and config files yet to another and so on.

That is the fate of any file-based OS. If there were no Windows and Unix we
would have another world of OO OS without files. But the world is what it
is.
 
> An example is with Java and JavaFX, where one can include the
> JRE (run-time library) and any other 3rd party Jar files and
> package everything in one self contained one bundle file.

How is it different to having a package? Except that Java introduces one
more dependency on itself?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-01  8:56                 ` Dmitry A. Kazakov
@ 2013-03-01 10:39                   ` Georg Bauhaus
  2013-03-01 13:06                     ` Dmitry A. Kazakov
  2013-03-01 22:05                     ` Randy Brukardt
  0 siblings, 2 replies; 32+ messages in thread
From: Georg Bauhaus @ 2013-03-01 10:39 UTC (permalink / raw)


On 01.03.13 09:56, Dmitry A. Kazakov wrote:
> You are switching the subject. The user already knows that he wanted to
> install your package named "foo." The only thing for him to do is
> 
>    yum install foo
> 
> That would resolve all dependencies and install any missing packages.

Command line?

Watch how an application installs *itself* when you
buy it from some online app store, such as Apple's.
They have raised the bar. (And there's your oligopoly.)

Imagine a statically bound executable program that takes care
of its own installation. There's an icon. Fist click means
"install". After that, all other clicks on the same icon mean
"run".

But there still is dynamically linked code. I wish there was a
timeout built into the DLLs.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-01  8:41                 ` Dmitry A. Kazakov
@ 2013-03-01 11:57                   ` Yannick Duchêne (Hibou57)
  2013-03-02  0:18                   ` Dennis Lee Bieber
  1 sibling, 0 replies; 32+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-03-01 11:57 UTC (permalink / raw)


Le Fri, 01 Mar 2013 09:41:37 +0100, Dmitry A. Kazakov  
<mailbox@dmitry-kazakov.de> a écrit:
> Today nobody accepts a product that installs itself under /usr/local/...  
> or /usr/opt/...

On the opposite, that's a requirement for the most famous Linux based  
platform, which is Ubuntu.

To publish an application via the Software Centre, the application have to  
be installable in `/usr/opt` and to be able to be self‑contained in a  
single sub‑directory of `/usr/opt` [1] and the only exception to this I  
know, is the desktop file which will be written to  
`/usr/share/applications` and even schema files needed by GSettings, have  
to be located inside of the application's self‑contained directory [2].

[1] http://developer.ubuntu.com/publish/my-apps-packages/
Canonical says:
> Technical requirements
>
> In order for your application to be distributed in the Software Centre  
> it must:
>   * Be in one, self-contained directory when installed
>   * Be able to be installed into the /opt/<package-name> directory (*)
>   * Be executable by all users from the /opt/<package-name> directory  
> (**)
>   * Write all configuration settings to ~/.config/<package-name> (This 
>     can be one file or a directory containing multiple > configuration  
> files)

[2]  
http://askubuntu.com/questions/257297/can-commercial-applications-use-gsettings
A Canonical developer says:
> You don't need to install schema files into  
> `/usr/share/glib-2.0/schemas/`,they can be installed into any  
> `${XDG_DATA_DIRS}/glib-2.0/schemas/`.  
> So you can install your schema to  
> `/opt/<yourapp>/share/glib-2.0/schemas`,
> then have your binary add `/opt/<yourapp>/share` to the XDG_DATA_DIR
> environment variable before you try to use GSettings.  
> This is what we do for Quickly apps being installed into 
> `/opt/extra.ubuntu.com/<appname>/`

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-01 10:39                   ` Georg Bauhaus
@ 2013-03-01 13:06                     ` Dmitry A. Kazakov
  2013-03-01 22:05                     ` Randy Brukardt
  1 sibling, 0 replies; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-03-01 13:06 UTC (permalink / raw)


On Fri, 01 Mar 2013 11:39:38 +0100, Georg Bauhaus wrote:

> Imagine a statically bound executable program that takes care
> of its own installation.

No need to imagine that. Each 10th e-mail I get contains such programs in
the attachment. (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-01 10:39                   ` Georg Bauhaus
  2013-03-01 13:06                     ` Dmitry A. Kazakov
@ 2013-03-01 22:05                     ` Randy Brukardt
  1 sibling, 0 replies; 32+ messages in thread
From: Randy Brukardt @ 2013-03-01 22:05 UTC (permalink / raw)


"Georg Bauhaus" <rm.dash-bauhaus@futureapps.de> wrote in message 
news:5130856a$0$6577$9b4e6d93@newsspool3.arcor-online.net...
...
> Imagine a statically bound executable program that takes care
> of its own installation. There's an icon. Fist click means
> "install". After that, all other clicks on the same icon mean
> "run".

Why imagine it? That's how the Claw builder works, for example. (There is an 
optional command line switch to allow specifying which compiler you want to 
set it up for and whether you want desktop and menu icons, but that's it.) 
There's no difficulty to creating such programs (at least for Windows).

The "problem" is that Windows security won't let you install such a program 
under a limited user account, and only idiots and grandmothers run Windows 
as an adminstrator all the time. So we use the installer program to ensure 
that it gets run once before the user touches it. (On older Windows like 
Windows 98 and Windows 2000, no installation was necessary at all; that was 
mainly so that distribution of the free version consisted of nothing but a 
small ZIP file.)

                     Randy.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-01  8:41                 ` Dmitry A. Kazakov
  2013-03-01 11:57                   ` Yannick Duchêne (Hibou57)
@ 2013-03-02  0:18                   ` Dennis Lee Bieber
  2013-03-02  7:52                     ` Dmitry A. Kazakov
  1 sibling, 1 reply; 32+ messages in thread
From: Dennis Lee Bieber @ 2013-03-02  0:18 UTC (permalink / raw)


On Fri, 1 Mar 2013 09:41:37 +0100, "Dmitry A. Kazakov"
<mailbox@dmitry-kazakov.de> declaimed the following in comp.lang.ada:

> 
> I didn't say msi is good. In fact there exist many Windows installers from
> third parity vendors, which indicates that msi is not good. Yet, it is the
> standard way under Windows.
>
	I suspect many of those 3rd party installers predate the creation of
MSI.

	M$ would rather everything be done as MSI since they've tied them
into the security system (there is no <right-click> option for "run
as..." on WinXP, meaning one /must/ log-in as an administrator to run
them... Whereas installers that package as EXE can be started from any
account using the "run as..." to gain admin).
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-02  0:18                   ` Dennis Lee Bieber
@ 2013-03-02  7:52                     ` Dmitry A. Kazakov
  2013-03-02 17:17                       ` Dennis Lee Bieber
  0 siblings, 1 reply; 32+ messages in thread
From: Dmitry A. Kazakov @ 2013-03-02  7:52 UTC (permalink / raw)


On Fri, 01 Mar 2013 19:18:24 -0500, Dennis Lee Bieber wrote:

> 	M$ would rather everything be done as MSI since they've tied them
> into the security system (there is no <right-click> option for "run
> as..." on WinXP, meaning one /must/ log-in as an administrator to run
> them... Whereas installers that package as EXE can be started from any
> account using the "run as..." to gain admin).

Hmm, you have to be an administrator to run an application with elevated
rights (= run as).

Anyway, yes, anything MS introduces always turns to be mess.

P.S. Our Ada software needs to run with elevated rights because it uses
NDIS drivers to implement industrial Ethernet protocols. We do a check if
the rights are elevated and if not the program re-spawns itself with "run
as."

In the MS perverted view it is unsafe to elevate the program itself, but
perfectly safe to start another instance elevated! (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-02  7:52                     ` Dmitry A. Kazakov
@ 2013-03-02 17:17                       ` Dennis Lee Bieber
  0 siblings, 0 replies; 32+ messages in thread
From: Dennis Lee Bieber @ 2013-03-02 17:17 UTC (permalink / raw)


On Sat, 2 Mar 2013 08:52:25 +0100, "Dmitry A. Kazakov"
<mailbox@dmitry-kazakov.de> declaimed the following in comp.lang.ada:

> On Fri, 01 Mar 2013 19:18:24 -0500, Dennis Lee Bieber wrote:
> 
> > 	M$ would rather everything be done as MSI since they've tied them
> > into the security system (there is no <right-click> option for "run
> > as..." on WinXP, meaning one /must/ log-in as an administrator to run
> > them... Whereas installers that package as EXE can be started from any
> > account using the "run as..." to gain admin).
> 
> Hmm, you have to be an administrator to run an application with elevated
> rights (= run as).

	Granted -- but on XP, you don't have the choice of "run as..." for
MSI files; you have to log out of the "user-level" account and log back
in using the admin account. Rather inconvenient (at least Win7 handles
that better).

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: can one make a static build Ada+GUI GTK application?
  2013-03-01  2:37       ` Randy Brukardt
@ 2013-03-02 19:00         ` Shark8
  0 siblings, 0 replies; 32+ messages in thread
From: Shark8 @ 2013-03-02 19:00 UTC (permalink / raw)


On Thursday, February 28, 2013 8:37:48 PM UTC-6, Randy Brukardt wrote:
> 
> 
> I know I'm "bad" in this aspect: I don't trust much code (even some that I 
> wrote myself), especially if it is not in Ada and do so only out of 
> necessity (I don't have time to write display drivers or a network stack --  
> but I much preferred programming on MS-DOS, which did virtually nothing for 
> you, to the current systems with tons of cruft that often doesn't work as 
> advertised.)
[snip]
> 
> Moral: the best dependence is *no* dependence. It's not always practical to 
> do that, but the less dependence you have the better.

This is true; as you point out it is one of the nicer things about being on a [MS-]DOS system: there are/were [in general] no higher-level dependencies. This meant that an "install" could be as simple as the COPY command, or if you were really adventurous a decompressor + setting "system variables."

The above is also why, IMO, MS-DOS would be a superior platform for the development of some new OS -- there aren't any considerations that need to be taken (i.e. memory managers) that are external to the program itself (rather than having to work around the idiosyncrasies of your host-OS) -- In fact this is how I had the beginnings of an OS that I was writing in TP7 (it could recognize commands, including EXIT, and change the video-mode)... and it was completely runnable as an MS-DOS program in addition to being runnable via bootloader.

All that said, I think a good install-system/dependency-manager could be a good thing for an OS, and we already have some good handling of the latter portion [dependencies] in our compiler-technologies for Ada -- so I don't see why we couldn't leverage that a bit in some hypothetical Ada-OS. (The Rational 1000 http://www.somethinkodd.com/oddthinking/category/geek/software-development/rat1000/ seems interesting from what's mentioned.) The 'registry' idea in MS isn't necessarily a bad one, but throwing everything into it certainly isn't a good idea -- a DB (and this is a DB) should have a purpose and not be a scratchpad for every program on your system.



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-03-02 19:00 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-17 16:39 can one make a static build Ada+GUI GTK application? Nasser M. Abbasi
2013-02-17 17:04 ` Dmitry A. Kazakov
2013-02-18 23:30   ` Randy Brukardt
2013-02-19  4:33     ` Nasser M. Abbasi
2013-02-19 20:47       ` slos
2013-02-22  4:56 ` Patrick
2013-02-22 23:29   ` Nasser M. Abbasi
2013-02-23  8:06     ` Simon Wright
2013-02-23  8:22       ` Nasser M. Abbasi
2013-02-23 17:09         ` Simon Wright
2013-02-23 12:47 ` Dirk Heinrichs
2013-02-23 13:01   ` Dmitry A. Kazakov
2013-02-25 23:25   ` Randy Brukardt
2013-02-28  0:00     ` Björn Persson
2013-02-28  0:46       ` Nasser M. Abbasi
2013-02-28  8:58         ` Dmitry A. Kazakov
2013-02-28 12:59           ` Nasser M. Abbasi
2013-02-28 13:44             ` Dmitry A. Kazakov
2013-02-28 23:16               ` Nasser M. Abbasi
2013-03-01  8:56                 ` Dmitry A. Kazakov
2013-03-01 10:39                   ` Georg Bauhaus
2013-03-01 13:06                     ` Dmitry A. Kazakov
2013-03-01 22:05                     ` Randy Brukardt
2013-03-01  2:53               ` Randy Brukardt
2013-03-01  8:41                 ` Dmitry A. Kazakov
2013-03-01 11:57                   ` Yannick Duchêne (Hibou57)
2013-03-02  0:18                   ` Dennis Lee Bieber
2013-03-02  7:52                     ` Dmitry A. Kazakov
2013-03-02 17:17                       ` Dennis Lee Bieber
2013-03-01  2:46           ` Randy Brukardt
2013-03-01  2:37       ` Randy Brukardt
2013-03-02 19:00         ` Shark8

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox