comp.lang.ada
 help / color / mirror / Atom feed
* basic questions on using GPS
@ 2015-07-18 20:20 Nasser M. Abbasi
  2015-07-18 21:57 ` Jeffrey R. Carter
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nasser M. Abbasi @ 2015-07-18 20:20 UTC (permalink / raw)


I never used GPS (much) before. I do not like project based IDE's
actually, as they make me feel trapped, but have no choice here.

I am little confused about something.  normally when not using
an IDE, and want to test something, by making small program,
I have a one folder where I keep my Ada test files,
and then use the editor and make a new foo_nnn.adb and
then compile it using gnatmake from command line.

Now with GPS, each time I want to try something, I open
GPS, then have to decide between these choices:

1. create new project from template
2. start with default project in directory ...
3. create new project with wizard
4. open existing project.

I select 1, then select basic project->simple project,
now I have to give a name to the project. name? ok, I have
to come up with yet another name, say default_nnn, and
hopefully this was not used before as I can't remember,
now I have to select folder to where to create the project
in, navigate to the folder, make new folder below it
so that this project do not see the other source files,
just for this one project, make yet another new folder
name, may be same as project name? and click apply.

This is all so much work for making one simple foo.adb
each time I want to try something.

using command line, I simply do
cd my_stuff
vi foo1.adb
gnatmake foo1.adb

and be done with it.

I must be missing some simpler way to deal with GPS.

All what I want is to be able to make a new main program
and compile it and run it, without having to go through
this process each time and having to make new
project and new folders for each small item.

Is there a way to avoid having to go through this
process each time? I could use the last project,
but I want to keep the earlier files and not modify
them.

thanks
--Nasser


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

* Re: basic questions on using GPS
  2015-07-18 20:20 basic questions on using GPS Nasser M. Abbasi
@ 2015-07-18 21:57 ` Jeffrey R. Carter
  2015-07-18 22:26   ` Anh Vo
  2015-07-19  2:42 ` Peter Chapin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Jeffrey R. Carter @ 2015-07-18 21:57 UTC (permalink / raw)


On 07/18/2015 01:20 PM, Nasser M. Abbasi wrote:
> 
> using command line, I simply do
> cd my_stuff
> vi foo1.adb
> gnatmake foo1.adb

There's no reason you can't use GPS simply as an editor, and compile from the
command line.

-- 
Jeff Carter
"We burst our pimples at you."
Monty Python & the Holy Grail
16

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

* Re: basic questions on using GPS
  2015-07-18 21:57 ` Jeffrey R. Carter
@ 2015-07-18 22:26   ` Anh Vo
  0 siblings, 0 replies; 8+ messages in thread
From: Anh Vo @ 2015-07-18 22:26 UTC (permalink / raw)


On Saturday, July 18, 2015 at 2:57:17 PM UTC-7, Jeffrey R. Carter wrote:
> On 07/18/2015 01:20 PM, Nasser M. Abbasi wrote:
> > 
> > using command line, I simply do
> > cd my_stuff
> > vi foo1.adb
> > gnatmake foo1.adb
> 
> There's no reason you can't use GPS simply as an editor, and compile from the
> command line.
> 
Another option is to use AdaGide, simple Ada IDE for Windows. I use it all most of the time if a small number of packages are involved. However, GPS is preferred for moderate or bigger code size. The advantage is that the readers will have a better time to understand the codes quickly through GPS's browsing capability among other features.

Anh Vo


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

* Re: basic questions on using GPS
  2015-07-18 20:20 basic questions on using GPS Nasser M. Abbasi
  2015-07-18 21:57 ` Jeffrey R. Carter
@ 2015-07-19  2:42 ` Peter Chapin
  2015-07-19  9:17 ` Stephen Leake
  2015-07-20 17:13 ` Norman Worth
  3 siblings, 0 replies; 8+ messages in thread
From: Peter Chapin @ 2015-07-19  2:42 UTC (permalink / raw)


On Sat, 18 Jul 2015, Nasser M. Abbasi wrote:

> All what I want is to be able to make a new main program and compile it 
> and run it, without having to go through this process each time and 
> having to make new project and new folders for each small item.

GPS allows a single project to have multiple main files. You can put them 
all in the same source folders. GPS generates a menu of them that you can 
select from when you want to build (you can specify which of your several 
main files you want to use). It is not necessary to create an entirely 
separate project for each main file.

Peter

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

* Re: basic questions on using GPS
  2015-07-18 20:20 basic questions on using GPS Nasser M. Abbasi
  2015-07-18 21:57 ` Jeffrey R. Carter
  2015-07-19  2:42 ` Peter Chapin
@ 2015-07-19  9:17 ` Stephen Leake
  2015-07-20 17:13 ` Norman Worth
  3 siblings, 0 replies; 8+ messages in thread
From: Stephen Leake @ 2015-07-19  9:17 UTC (permalink / raw)


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

> I never used GPS (much) before. I do not like project based IDE's
> actually, as they make me feel trapped, but have no choice here.

You can use Emacs.

> I am little confused about something.  normally when not using
> an IDE, and want to test something, by making small program,
> I have a one folder where I keep my Ada test files,
> and then use the editor and make a new foo_nnn.adb and
> then compile it using gnatmake from command line.
>
> Now with GPS, each time I want to try something, I open
> GPS, then have to decide between these choices:
>
> 1. create new project from template
> 2. start with default project in directory ...
> 3. create new project with wizard
> 4. open existing project.

You should select 4, and maintain a trivial .gpr file in your Ada test
folder.

Here is the .gpr I use for this purpose:

project Gnat is
   for Source_Dirs use
     ("..");

   for Object_Dir use "objects";
   for Exec_Dir use ".";

   package Compiler is
      for Default_Switches ("Ada") use
        ("-g", "-gnat12", "-gnatwa");
   end Compiler;

   package Binder is
      for Default_Switches ("Ada") use ("-E");
   end Binder;
end Gnat;


-- 
-- Stephe

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

* Re: basic questions on using GPS
  2015-07-18 20:20 basic questions on using GPS Nasser M. Abbasi
                   ` (2 preceding siblings ...)
  2015-07-19  9:17 ` Stephen Leake
@ 2015-07-20 17:13 ` Norman Worth
  2015-07-21  2:10   ` Robert Love
  3 siblings, 1 reply; 8+ messages in thread
From: Norman Worth @ 2015-07-20 17:13 UTC (permalink / raw)


On 7/18/2015 2:20 PM, Nasser M. Abbasi wrote:
> I never used GPS (much) before. I do not like project based IDE's
> actually, as they make me feel trapped, but have no choice here.
>
> I am little confused about something.  normally when not using
> an IDE, and want to test something, by making small program,
> I have a one folder where I keep my Ada test files,
> and then use the editor and make a new foo_nnn.adb and
> then compile it using gnatmake from command line.
>
> Now with GPS, each time I want to try something, I open
> GPS, then have to decide between these choices:
>
> 1. create new project from template
> 2. start with default project in directory ...
> 3. create new project with wizard
> 4. open existing project.
>
> I select 1, then select basic project->simple project,
> now I have to give a name to the project. name? ok, I have
> to come up with yet another name, say default_nnn, and
> hopefully this was not used before as I can't remember,
> now I have to select folder to where to create the project
> in, navigate to the folder, make new folder below it
> so that this project do not see the other source files,
> just for this one project, make yet another new folder
> name, may be same as project name? and click apply.
>
> This is all so much work for making one simple foo.adb
> each time I want to try something.
>
> using command line, I simply do
> cd my_stuff
> vi foo1.adb
> gnatmake foo1.adb
>
> and be done with it.
>
> I must be missing some simpler way to deal with GPS.
>
> All what I want is to be able to make a new main program
> and compile it and run it, without having to go through
> this process each time and having to make new
> project and new folders for each small item.
>
> Is there a way to avoid having to go through this
> process each time? I could use the last project,
> but I want to keep the earlier files and not modify
> them.
>
> thanks
> --Nasser
>
GPS has its faults.  It appears to be designed for medium to large sized 
projects, and it is awkward for small experiments.  When you have 
something that uses several packages, it begins to show its merit.  The 
GNU project manager is quite effective and versatile, but it can be 
obscure.  The GPS interface to it does a lot to simplify things, but 
this still doesn't make for a simple and convenient tool.  I think that 
if I had more experience with GPS, it could really be helpful.  But it 
certainly isn't as inviting as some of the other development tools.  For 
small experiments, I usually just create a directory and use an editor 
like kate or jedit (which are more friendly than the standard GPS 
editor) with gnatmake.

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

* Re: basic questions on using GPS
  2015-07-20 17:13 ` Norman Worth
@ 2015-07-21  2:10   ` Robert Love
  2015-07-21  6:55     ` Simon Wright
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Love @ 2015-07-21  2:10 UTC (permalink / raw)


On 2015-07-20 17:13:33 +0000, Norman Worth said:

>  The GNU project manager is quite effective and versatile, but it can 
> be obscure.  The GPS interface to it does a lot to simplify things,

Is that a typo?   I tried googling 'GNU project manager' and was given 
links to tools for Gnatt charts and the like.   There are Emacs add-ons 
for software projects but I don't know of a standalone GNU project 
manager.

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

* Re: basic questions on using GPS
  2015-07-21  2:10   ` Robert Love
@ 2015-07-21  6:55     ` Simon Wright
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Wright @ 2015-07-21  6:55 UTC (permalink / raw)


Robert Love <rblove@airmail.net> writes:

> On 2015-07-20 17:13:33 +0000, Norman Worth said:
>
>>  The GNU project manager is quite effective and versatile, but it
>> can be obscure.  The GPS interface to it does a lot to simplify
>> things,
>
> Is that a typo?   I tried googling 'GNU project manager' and was given
> links to tools for Gnatt charts and the like.   There are Emacs
> add-ons for software projects but I don't know of a standalone GNU
> project manager.

I'm sure there are some. Oh, you mean software: :-)

It's "Gnat PRoject manager"


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

end of thread, other threads:[~2015-07-21  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-18 20:20 basic questions on using GPS Nasser M. Abbasi
2015-07-18 21:57 ` Jeffrey R. Carter
2015-07-18 22:26   ` Anh Vo
2015-07-19  2:42 ` Peter Chapin
2015-07-19  9:17 ` Stephen Leake
2015-07-20 17:13 ` Norman Worth
2015-07-21  2:10   ` Robert Love
2015-07-21  6:55     ` Simon Wright

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