comp.lang.ada
 help / color / mirror / Atom feed
* Integration issues with GNAT GPS in Ubuntu
@ 2012-04-11 16:31 Yannick Duchêne (Hibou57)
  2012-04-11 16:49 ` Yannick Duchêne (Hibou57)
  2012-04-26 11:09 ` Yannick Duchêne (Hibou57)
  0 siblings, 2 replies; 5+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-04-11 16:31 UTC (permalink / raw)


Hi,

Just installed GPS in Ubuntu, late, as I usually use something else.

I encountered an integration issue, and seems the bug
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg774486.html
is still there

I had to manually create the desktop file. And by the way, there seems to  
be no file type for GPR files neither.

How to solve, locally (not system wide):

In “~/.local/mime/packages” create a file named “gnat-project.xml”, edit  
to give it this content:

    <?xml version="1.0" encoding="UTF-8"?>

    <mime-info  
xmlns="http://www.freedesktop.org/standards/shared-mime-info">
       <mime-type type="application/x-gnat-project">
          <sub-class-of type="text/plain"/>
          <comment xml:lang="en">GNAT Project</comment>
          <comment xml:lang="fr">Projet GNAT</comment>
          <icon name="gnat-gps"/>
          <glob pattern="*.gpr"/>
       </mime-type>
    </mime-info>

That's the file type definition for GNAT project files.

Copy “/usr/share/gps/icons/48px/gps_48.png” to  
“~/.local/share/icons/xxx/gnat-gps.png” where “xxx” is your active local  
icon set subdirectory (if you have one).

In “~/.local/share/applications”, create a file “gnat-gps.desktop”, whose  
content is similar to the one suggested in the above ling, with tiny  
variations:

    [Desktop Entry]
    Name=GNAT GPS
    Comment=The GNAT Programming System
    Comment[ca]=Sistema de programació de GNAT
    Comment[fr]=Environnement de Programmation GNAT
    Exec=/usr/bin/gnat-gps
    Icon=gnat-gps
    MimeType=application/x-gnat-project;
    Terminal=false
    Type=Application
    Categories=Development;
    StartupNotify=true

That's the menu entry definition and MIME‑type application association.

 From a console, run the following commands:

    update-mime-database ~/.local/share/mime
    update-menus

That will update your environment.

GNAT GPR files should display with the GNAT GPS icons, should run GPS when  
you click on, and a menu entry for GPS should have appeared in your  
Applications menu.

-- 
“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] 5+ messages in thread

* Re: Integration issues with GNAT GPS in Ubuntu
  2012-04-11 16:31 Integration issues with GNAT GPS in Ubuntu Yannick Duchêne (Hibou57)
@ 2012-04-11 16:49 ` Yannick Duchêne (Hibou57)
  2012-04-25  8:14   ` Yannick Duchêne (Hibou57)
  2012-04-26 11:09 ` Yannick Duchêne (Hibou57)
  1 sibling, 1 reply; 5+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-04-11 16:49 UTC (permalink / raw)


Le Wed, 11 Apr 2012 18:31:14 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

>  From a console, run the following commands:
>
>     update-mime-database ~/.local/share/mime
>     update-menus

Sorry, one was missing:

    update-desktop-database ~/.local

Without this one, GPS won't be invoked when you click on a project file.

-- 
“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] 5+ messages in thread

* Re: Integration issues with GNAT GPS in Ubuntu
  2012-04-11 16:49 ` Yannick Duchêne (Hibou57)
@ 2012-04-25  8:14   ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 5+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-04-25  8:14 UTC (permalink / raw)


Le Wed, 11 Apr 2012 18:49:34 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

> Le Wed, 11 Apr 2012 18:31:14 +0200, Yannick Duchêne (Hibou57)  
> <yannick_duchene@yahoo.fr> a écrit:
>
>>  From a console, run the following commands:
>>
>>     update-mime-database ~/.local/share/mime
>>     update-menus
>
> Sorry, one was missing:
>
>     update-desktop-database ~/.local
>
> Without this one, GPS won't be invoked when you click on a project file.

Still not perfect, as you may have noticed.

Create a file named “open-gnat-project”, and give it this content:

    #!/bin/sh
    gnat-gps "-P$1" &

move it in you “~/bin” directory and give it the executable attribute.

In the previously suggested “gnat-gps.desktop” file, change

    Exec=/usr/bin/gnat-gps

into

    Exec=open-gnat-project

Then run again from a terminal

    update-desktop-database ~/.local
    update-menus

Now GPS will open on you project when you click on a project file, instead  
of opening with a dialog requesting you to browse for a project file. More  
handy.

-- 
“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] 5+ messages in thread

* Re: Integration issues with GNAT GPS in Ubuntu
  2012-04-11 16:31 Integration issues with GNAT GPS in Ubuntu Yannick Duchêne (Hibou57)
  2012-04-11 16:49 ` Yannick Duchêne (Hibou57)
@ 2012-04-26 11:09 ` Yannick Duchêne (Hibou57)
  2012-05-04 14:34   ` Álex R. Mosteo
  1 sibling, 1 reply; 5+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-04-26 11:09 UTC (permalink / raw)


Le Wed, 11 Apr 2012 18:31:14 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

> Hi,
>
> Just installed GPS in Ubuntu, late, as I usually use something else.
>
> I encountered an integration issue, and seems the bug

A more severe bug seems to be with the outline view. Whatever I click on  
the outline view, GPS crashes and I get this on the terminal (need to  
start GPS from a terminal to get the message):

    raised STORAGE_ERROR : s-intman.adb:139 explicit raise

Do you get the same? That's for Ubuntu Maverick. Not tested on Windows.

-- 
“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] 5+ messages in thread

* Re: Integration issues with GNAT GPS in Ubuntu
  2012-04-26 11:09 ` Yannick Duchêne (Hibou57)
@ 2012-05-04 14:34   ` Álex R. Mosteo
  0 siblings, 0 replies; 5+ messages in thread
From: Álex R. Mosteo @ 2012-05-04 14:34 UTC (permalink / raw)


Yannick Duchêne (Hibou57) wrote:

> Le Wed, 11 Apr 2012 18:31:14 +0200, Yannick Duchêne (Hibou57)
> <yannick_duchene@yahoo.fr> a écrit:
> 
>> Hi,
>>
>> Just installed GPS in Ubuntu, late, as I usually use something else.
>>
>> I encountered an integration issue, and seems the bug
> 
> A more severe bug seems to be with the outline view. Whatever I click on
> the outline view, GPS crashes and I get this on the terminal (need to
> start GPS from a terminal to get the message):
> 
>     raised STORAGE_ERROR : s-intman.adb:139 explicit raise
> 
> Do you get the same? That's for Ubuntu Maverick. Not tested on Windows.
> 

I have seen this in the past, In some of my installations it happened and in 
others not. Which meant that somehow it could be fixed, but I didn't narrow 
it down. Sorry to be of so little help.

IIRC that in these cases I settled on using the packaged gnat-gps.



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

end of thread, other threads:[~2012-05-04 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 16:31 Integration issues with GNAT GPS in Ubuntu Yannick Duchêne (Hibou57)
2012-04-11 16:49 ` Yannick Duchêne (Hibou57)
2012-04-25  8:14   ` Yannick Duchêne (Hibou57)
2012-04-26 11:09 ` Yannick Duchêne (Hibou57)
2012-05-04 14:34   ` Álex R. Mosteo

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