comp.lang.ada
 help / color / mirror / Atom feed
* Native version of GNAT Programming Studio for OSX
@ 2013-06-23 17:11 Felix Krause
  2013-06-26  0:27 ` Jerry
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Felix Krause @ 2013-06-23 17:11 UTC (permalink / raw)


In case any other Mac users are coding Ada:

I succeeded in compiling the GNAT Programming Studio on OSX with 
GTK-Quartz backend. Compared to the version AdaCore bundles with GNAT, 
this version does not need X11. Build scripts, patches used and more 
information is available at:

https://github.com/flyx86/gps-osx

If anyone else is interested in this, feel free to contribute.


-- 
Felix Krause
http://flyx.org/



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

* Re: Native version of GNAT Programming Studio for OSX
  2013-06-23 17:11 Native version of GNAT Programming Studio for OSX Felix Krause
@ 2013-06-26  0:27 ` Jerry
  2013-06-30 11:03   ` Felix Krause
  2013-06-26 16:42 ` optikos
  2013-06-30 19:26 ` Felix Krause
  2 siblings, 1 reply; 10+ messages in thread
From: Jerry @ 2013-06-26  0:27 UTC (permalink / raw)


On Sunday, June 23, 2013 10:11:08 AM UTC-7, Felix Krause wrote:
> In case any other Mac users are coding Ada:
> 
> I succeeded in compiling the GNAT Programming Studio on OSX with 
> GTK-Quartz backend. Compared to the version AdaCore bundles with GNAT, 
> this version does not need X11. Build scripts, patches used and more 
> information is available at:
> 
> https://github.com/flyx86/gps-osx
> 
> If anyone else is interested in this, feel free to contribute.
> -- 
> Felix Krause
> http://flyx.org/

This is really interesting. Maybe I'll take a run at this. I would love to have something resembling a native GPS for Mac, and it looks like Felix has got it well under way.

I wonder if any of the prerequisites are available on MacPorts, and if so, how would one modify the build process. I note that gtk-osx-application is available there.

Thanks, Felix.

Jerry

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

* Re: Native version of GNAT Programming Studio for OSX
  2013-06-23 17:11 Native version of GNAT Programming Studio for OSX Felix Krause
  2013-06-26  0:27 ` Jerry
@ 2013-06-26 16:42 ` optikos
  2013-06-26 17:34   ` Simon Wright
  2013-06-27  8:55   ` Maciej Sobczak
  2013-06-30 19:26 ` Felix Krause
  2 siblings, 2 replies; 10+ messages in thread
From: optikos @ 2013-06-26 16:42 UTC (permalink / raw)


On Sunday, June 23, 2013 12:11:08 PM UTC-5, Felix Krause wrote:
> https://github.com/flyx86/gps-osx

The instructions at that webpage specify downloading AdaCore's GPL Edition of GNAT to which patches are applied.  This means that the resulting compiler has the GPL license instead of the GMGPL.  If this work was based on GNAT-FSF's compiler instead of AdaCore's GNAT GPL Edition, then it would be more useful, because the resulting apps on OSX produced by this GPS-on-Mac would not need to be GPL licensed.


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

* Re: Native version of GNAT Programming Studio for OSX
  2013-06-26 16:42 ` optikos
@ 2013-06-26 17:34   ` Simon Wright
  2013-06-27  8:55   ` Maciej Sobczak
  1 sibling, 0 replies; 10+ messages in thread
From: Simon Wright @ 2013-06-26 17:34 UTC (permalink / raw)


optikos@verizon.net writes:

> On Sunday, June 23, 2013 12:11:08 PM UTC-5, Felix Krause wrote:
>> https://github.com/flyx86/gps-osx
>
> The instructions at that webpage specify downloading AdaCore's GPL
> Edition of GNAT to which patches are applied.  This means that the
> resulting compiler has the GPL license instead of the GMGPL.  If this
> work was based on GNAT-FSF's compiler instead of AdaCore's GNAT GPL
> Edition, then it would be more useful, because the resulting apps on
> OSX produced by this GPS-on-Mac would not need to be GPL licensed.

It's perfectly possible (I've just done it) to use AdaCore's GPS to
build a project using FSF GCC 4.8.0.

I have FSF GCC installed at /opt/gcc-4.8.0 and GNAT GPL at
/opt/gnat-gpl-2013.

My path has /opt/gcc-4.8.0/bin and not /opt/gnat-gpl-2013/bin.

In a terminal window, I execute 

   $ /opt/gnat-gpl-2013/bin/gps &

and GPS starts up with FSF GCC as the compiler (but knows just fine how
to pick up the GPS plugins, for example).

Of course, some of the facilities available in the full GNAT GPL
installation may be missing if they're not in the FSF GCC build (for
example, gnattest, which relies on both ASIS and GNATCOLL; and I didn't
include GNATCOLL in my build.)

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

* Re: Native version of GNAT Programming Studio for OSX
  2013-06-26 16:42 ` optikos
  2013-06-26 17:34   ` Simon Wright
@ 2013-06-27  8:55   ` Maciej Sobczak
  1 sibling, 0 replies; 10+ messages in thread
From: Maciej Sobczak @ 2013-06-27  8:55 UTC (permalink / raw)



> The instructions at that webpage specify downloading AdaCore's GPL Edition of GNAT to which patches are applied.  This means that the resulting compiler has the GPL license instead of the GMGPL.  If this work was based on GNAT-FSF's compiler instead of AdaCore's GNAT GPL Edition, then it would be more useful, because the resulting apps on OSX produced by this GPS-on-Mac would not need to be GPL licensed.

I don't see any problem here. GPS is a text editor, it can have whatever license. Once you have your text files shiny and ready, feel free (yes, it's about freedom) to build your project from command line using the compiler of your choice with whatever other license (or even on whatever other system with appropriate toolchain).

Don't confuse IDEs with compilers. They don't even need each other.

-- 
Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com


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

* Re: Native version of GNAT Programming Studio for OSX
  2013-06-26  0:27 ` Jerry
@ 2013-06-30 11:03   ` Felix Krause
  0 siblings, 0 replies; 10+ messages in thread
From: Felix Krause @ 2013-06-30 11:03 UTC (permalink / raw)


On 2013-06-26 00:27:58 +0000, Jerry said:
> 
> I wonder if any of the prerequisites are available on MacPorts, and if 
> so, how would one modify the build process. I note that 
> gtk-osx-application is available there.

I didn't have a look at MacPorts for a long time (usually using 
Homebrew for stuff, which doesn't support gtk-quartz). As my goal is to 
eventually build an app bundle, I won't look into it, though it would 
definitely be more stable than using the jhbuild toolchain.

Meanwhile, have some screenshots:

https://github.com/flyx86/gps-osx/wiki

As you can see, the default theme doesn't really make any difference. 
However, it's now possible to use the other themes that are available 
for gtk-quartz. Unfortunately, the gtk-quartz-engine - a theme that 
uses the deprecated Carbon framework to give widgets a native OSX style 
- is very old, incomplete and GPS crashes when I try to start it with 
that theme. So there will be no really native-looking GPS.

-- 
Felix Krause
http://flyx.org/

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

* Re: Native version of GNAT Programming Studio for OSX
  2013-06-23 17:11 Native version of GNAT Programming Studio for OSX Felix Krause
  2013-06-26  0:27 ` Jerry
  2013-06-26 16:42 ` optikos
@ 2013-06-30 19:26 ` Felix Krause
  2013-07-02  9:48   ` Jerry
  2 siblings, 1 reply; 10+ messages in thread
From: Felix Krause @ 2013-06-30 19:26 UTC (permalink / raw)


Some hours and packs of unhealthy food later:

I managed to build an app bundle!

Download link is contained in the readme [1], be sure to read the 
important stuff before you try to launch this thing. Do not try it out 
if you use AdaCore's gps binary for anything serious - it might screw 
up your configuration at ~/.gps! You need to have GNAT GPL 2013 
installed in /usr/local/gnat to be able to launch this (bleeding edge 
constraint, will be fixed later. probably).

The most important feature compared to AdaCore's binary is probably the 
ability to use the command key for keyboard shortcuts, because nobody 
uses Ctrl+C on a Mac. I patched this into the source and this is what 
screws up the configuration when it's used together with the original 
gps.

I wrote more about the status of the app bundle in the "Known issues" 
section in the readme. I built this bundle on one of my Macs and tested 
it on the other one, and would be glad if anyone else can confirm it to 
be working. ("tested" as in "started it and saw that it didn't crash")


 [1]: https://github.com/flyx86/gps-osx

-- 
Felix Krause
http://flyx.org/



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

* Re: Native version of GNAT Programming Studio for OSX
  2013-06-30 19:26 ` Felix Krause
@ 2013-07-02  9:48   ` Jerry
  2013-07-02 15:30     ` Felix Krause
  0 siblings, 1 reply; 10+ messages in thread
From: Jerry @ 2013-07-02  9:48 UTC (permalink / raw)


On Sunday, June 30, 2013 12:26:49 PM UTC-7, Felix Krause wrote:
> Some hours and packs of unhealthy food later:
> 
> I managed to build an app bundle!

Awesome!
> 
snip

would be glad if anyone else can confirm it to 
> be working. ("tested" as in "started it and saw that it didn't crash")

Done. I've used it for an hour or two and it hasn't crashed. (FWIW, I have used GPS only a little in the past, mainly due to frustration with it not being a Mac program.) The biggest problem that I'm having is that I can't compile anything--it's not finding gnatmake. I have gnat at /usr/local/gnat like you instruct; however, this was not its installed location, which was /usr/local/adacore-gnat-2013. I merely renamed the path to /usr/local/gnat so maybe that is wrong (setting a symlink didn't work either). Maybe it has to be originally installed there.

Overall, this is a big improvement to the user experience over the X11 version. I think I'm finding that maybe the next biggest problem is that none of the standard window controls work—Command-W, Hide Others Option-Command-H, Command-~ to rotate through windows, and there is not a menu command to Bring All to Front.

Thanks for all your work. I hope your health isn't suffering too much. :-)

Jerry


> 
> 
>  [1]: https://github.com/flyx86/gps-osx
> 
> -- 
> Felix Krause
> http://flyx.org/

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

* Re: Native version of GNAT Programming Studio for OSX
  2013-07-02  9:48   ` Jerry
@ 2013-07-02 15:30     ` Felix Krause
  2013-07-04  4:31       ` Jerry
  0 siblings, 1 reply; 10+ messages in thread
From: Felix Krause @ 2013-07-02 15:30 UTC (permalink / raw)


On 2013-07-02 09:48:19 +0000, Jerry said:

> Done. I've used it for an hour or two and it hasn't crashed. (FWIW, I 
> have used GPS only a little in the past, mainly due to frustration with 
> it not being a Mac program.) The biggest problem that I'm having is 
> that I can't compile anything--it's not finding gnatmake. I have gnat 
> at /usr/local/gnat like you instruct; however, this was not its 
> installed location, which was /usr/local/adacore-gnat-2013. I merely 
> renamed the path to /usr/local/gnat so maybe that is wrong (setting a 
> symlink didn't work either). Maybe it has to be originally installed 
> there.

Thanks for testing! gnatmake just can't be called with the current 
downloadable bundle, but I already fixed it. You may drag the latest 
Info.plist and launcher.sh from the develop branch [1] and replace the 
ones in the app bundle to get it to work. This also seems to enable 
code completion. If you have GNAT installed somewhere other than 
/usr/local/gnat, you can open the Info.plist with Xcode and change the 
GNAT_HOME environment variable accordingly there. (Note to self: I 
should document that somewhere.)

> Overall, this is a big improvement to the user experience over the X11 
> version. I think I'm finding that maybe the next biggest problem is 
> that none of the standard window controls work—Command-W, Hide Others 
> Option-Command-H, Command-~ to rotate through windows, and there is not 
> a menu command to Bring All to Front.

I believe this is one of the things GtkOSXApplication is needed for.

> Thanks for all your work. I hope your health isn't suffering too much. :-)

Oh don't worry, I'm used to it. ;)


 [1]: https://github.com/flyx86/gps-osx/tree/develop/bundle

-- 
Felix Krause
http://flyx.org/

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

* Re: Native version of GNAT Programming Studio for OSX
  2013-07-02 15:30     ` Felix Krause
@ 2013-07-04  4:31       ` Jerry
  0 siblings, 0 replies; 10+ messages in thread
From: Jerry @ 2013-07-04  4:31 UTC (permalink / raw)


On Tuesday, July 2, 2013 8:30:11 AM UTC-7, Felix Krause wrote:
> On 2013-07-02 09:48:19 +0000, Jerry said:
> 
> 
> Thanks for testing! gnatmake just can't be called with the current 
> downloadable bundle, but I already fixed it. You may drag the latest 
> Info.plist and launcher.sh from the develop branch [1] and replace the 
> ones in the app bundle to get it to work. This also seems to enable 
> code completion. If you have GNAT installed somewhere other than 
> /usr/local/gnat, you can open the Info.plist with Xcode and change the 
> GNAT_HOME environment variable accordingly there. (Note to self: I 
> should document that somewhere.) 

Much better—works now! BTW, there is no launcher.sh in the bundle so I used launcher.sh to replace GPS.

Now to get used to foibles beyond your control, such as GPS hiding a dialog box which requires a response completely behind another dialog box (I thought this widget set would be a little more polished than that) and the built-in terminal not working with Get_Immediate.

Jerry

> 
>  [1]: https://github.com/flyx86/gps-osx/tree/develop/bundle
> 
> Felix Krause
> http://flyx.org/



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

end of thread, other threads:[~2013-07-04  4:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-23 17:11 Native version of GNAT Programming Studio for OSX Felix Krause
2013-06-26  0:27 ` Jerry
2013-06-30 11:03   ` Felix Krause
2013-06-26 16:42 ` optikos
2013-06-26 17:34   ` Simon Wright
2013-06-27  8:55   ` Maciej Sobczak
2013-06-30 19:26 ` Felix Krause
2013-07-02  9:48   ` Jerry
2013-07-02 15:30     ` Felix Krause
2013-07-04  4:31       ` Jerry

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