|
15 | 15 | -- of the license. --
|
16 | 16 | ------------------------------------------------------------------------------
|
17 | 17 |
|
18 |
| -with Ada.Strings.Fixed; use Ada.Strings.Fixed; |
19 |
| -with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; |
20 |
| -with Ada.Text_IO; use Ada.Text_IO; |
21 |
| -with Config; use Config; |
22 |
| -with Interfaces.C; use Interfaces.C; |
23 |
| -with Glib; use Glib; |
24 |
| -with Glib.Application; use Glib.Application; |
25 |
| -with Glib.Error; use Glib.Error; |
26 |
| -with Glib.Messages; use Glib.Messages; |
| 18 | +with Ada.Strings.Fixed; use Ada.Strings.Fixed; |
| 19 | +with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; |
| 20 | +with Ada.Text_IO; use Ada.Text_IO; |
| 21 | +with GNAT.Command_Line; use GNAT.Command_Line; |
| 22 | +with GNAT.Directory_Operations; use GNAT.Directory_Operations; |
| 23 | +with GNAT.OS_Lib; use GNAT.OS_Lib; |
| 24 | +with Interfaces.C; use Interfaces.C; |
| 25 | + |
| 26 | +with VSS.Characters.Latin; use VSS.Characters.Latin; |
| 27 | +with VSS.Command_Line; |
| 28 | +with VSS.Standard_Paths; |
| 29 | +with VSS.Strings; use VSS.Strings; |
| 30 | +with VSS.Strings.Conversions; |
| 31 | +with VSS.Strings.Formatters.Strings; use VSS.Strings.Formatters.Strings; |
| 32 | +with VSS.Strings.Templates; use VSS.Strings.Templates; |
| 33 | + |
| 34 | +with GNATCOLL.Memory; |
| 35 | +with GNATCOLL.Traces; use GNATCOLL.Traces; |
| 36 | +with GNATCOLL.Utils; use GNATCOLL.Utils; |
| 37 | +with GNATCOLL.VFS; use GNATCOLL.VFS; |
| 38 | +with GNATCOLL.VFS.VSS_Utils; use GNATCOLL.VFS.VSS_Utils; |
| 39 | + |
| 40 | +with Glib; use Glib; |
| 41 | +with Glib.Application; use Glib.Application; |
| 42 | +with Glib.Error; use Glib.Error; |
| 43 | +with Glib.Messages; use Glib.Messages; |
27 | 44 | with Glib.Option;
|
28 | 45 | with Glib.Utils;
|
29 |
| -with GNAT.Command_Line; use GNAT.Command_Line; |
30 |
| -with GNAT.Directory_Operations; use GNAT.Directory_Operations; |
31 |
| -with GNAT.OS_Lib; use GNAT.OS_Lib; |
32 |
| -with GNATCOLL.Memory; |
33 |
| -with GNATCOLL.Traces; use GNATCOLL.Traces; |
34 |
| -with GNATCOLL.Utils; use GNATCOLL.Utils; |
35 |
| -with GNATCOLL.VFS; use GNATCOLL.VFS; |
36 |
| -with GNATCOLL.VFS.VSS_Utils; use GNATCOLL.VFS.VSS_Utils; |
37 |
| -with GPS.Callbacks; use GPS.Callbacks; |
38 |
| -with GPS.Globals; use GPS.Globals; |
39 |
| -with GPS.Intl; use GPS.Intl; |
40 |
| -with GPS.Kernel; use GPS.Kernel; |
41 |
| -with GPS.Traces; |
42 | 46 | with Gtk;
|
43 |
| -with Gtk_Utils; use Gtk_Utils; |
44 |
| -with Gtkada.Dialogs; use Gtkada.Dialogs; |
| 47 | +with Gtk_Utils; use Gtk_Utils; |
| 48 | +with Gtkada.Dialogs; use Gtkada.Dialogs; |
45 | 49 | with Gtkada.Intl;
|
46 |
| -with Gtkada.Types; use Gtkada.Types; |
47 |
| -with GUI_Utils; use GUI_Utils; |
| 50 | +with Gtkada.Types; use Gtkada.Types; |
| 51 | + |
| 52 | +with Config; use Config; |
| 53 | +with GPS.Callbacks; use GPS.Callbacks; |
| 54 | +with GPS.Globals; use GPS.Globals; |
| 55 | +with GPS.Intl; use GPS.Intl; |
| 56 | +with GPS.Kernel; use GPS.Kernel; |
| 57 | +with GPS.Traces; |
| 58 | +with GUI_Utils; use GUI_Utils; |
48 | 59 | with Remote_Module;
|
49 |
| -with Src_Editor_Box; use Src_Editor_Box; |
| 60 | +with Src_Editor_Box; use Src_Editor_Box; |
50 | 61 | with String_Utils;
|
51 |
| -with VSS.Standard_Paths; |
52 |
| -with VSS.Strings; |
53 |
| -with VSS.Strings.Conversions; |
54 | 62 |
|
55 | 63 | package body GPS.Initialization is
|
56 | 64 |
|
@@ -173,7 +181,7 @@ package body GPS.Initialization is
|
173 | 181 | Setenv ("TERM", "dumb");
|
174 | 182 |
|
175 | 183 | declare
|
176 |
| - Home : constant VSS.Strings.Virtual_String := |
| 184 | + Home : constant Virtual_String := |
177 | 185 | Getenv_With_Fallback ("GNATSTUDIO_HOME", "GPS_HOME");
|
178 | 186 |
|
179 | 187 | begin
|
@@ -941,23 +949,27 @@ package body GPS.Initialization is
|
941 | 949 | -- in the main group (such as Gtk+ options)
|
942 | 950 | -- Get_Help (True) will only print options from the main
|
943 | 951 | -- group
|
944 |
| - Help : constant String := |
945 |
| - "GNAT Studio " |
946 |
| - & VSS.Strings.Conversions.To_UTF_8_String (Config.Version) |
947 |
| - & " (" |
948 |
| - & VSS.Strings.Conversions.To_UTF_8_String (Config.Source_Date) |
949 |
| - & ") hosted on " |
950 |
| - & VSS.Strings.Conversions.To_UTF_8_String (Config.Target) |
951 |
| - & ASCII.LF |
952 |
| - & ASCII.LF |
953 |
| - & GPS_Command_Line.Context.Get_Help |
954 |
| - (Switch /= "--help-all", null); |
| 952 | + |
| 953 | + Template : constant Virtual_String_Template := |
| 954 | + -("GNAT Studio {} ({}) hosted on {}" |
| 955 | + & Line_Feed |
| 956 | + & Line_Feed |
| 957 | + & "{}"); |
| 958 | + |
955 | 959 | begin
|
956 |
| - Put_Line (Help); |
| 960 | + GPS_Command_Line.Do_Exit := True; |
| 961 | + |
| 962 | + VSS.Command_Line.Report_Message |
| 963 | + (Template.Format |
| 964 | + (Image (Config.Version), |
| 965 | + Image (Config.Source_Date), |
| 966 | + Image (Config.Target), |
| 967 | + Image |
| 968 | + (VSS.Strings.Conversions.To_Virtual_String |
| 969 | + (GPS_Command_Line.Context.Get_Help |
| 970 | + (Switch /= "--help-all", null))))); |
957 | 971 | end;
|
958 | 972 |
|
959 |
| - GPS_Command_Line.Do_Exit := True; |
960 |
| - |
961 | 973 | elsif Switch = "-X" then
|
962 | 974 | Handle_X_Switch (ICS.Value (Value));
|
963 | 975 |
|
@@ -989,6 +1001,7 @@ package body GPS.Initialization is
|
989 | 1001 | & ASCII.LF
|
990 | 1002 | & "For now, you can still access this feature by enabling "
|
991 | 1003 | & "the GPS.INTERNAL.MODULE_REMOTE trace.";
|
| 1004 | + |
992 | 1005 | begin
|
993 | 1006 | Put_Line (Standard_Error, Obsolete_Msg);
|
994 | 1007 |
|
@@ -1076,8 +1089,7 @@ package body GPS.Initialization is
|
1076 | 1089 | (Filename => Create_From_Base (+ICS.Value (Value)));
|
1077 | 1090 |
|
1078 | 1091 | elsif Switch = "--tracelist" then
|
1079 |
| - GNATCOLL.Traces.Show_Configuration |
1080 |
| - (Ada.Text_IO.Put_Line'Access); |
| 1092 | + GNATCOLL.Traces.Show_Configuration (Put_Line'Access); |
1081 | 1093 | GPS_Command_Line.Do_Exit := True;
|
1082 | 1094 |
|
1083 | 1095 | elsif Switch = "--pwd" then
|
|
0 commit comments