|
47 | 47 | <arg>--no-color</arg>
|
48 | 48 | <arg>--no-tty</arg>
|
49 | 49 | <arg>-q</arg>
|
| 50 | + <arg>--</arg> |
| 51 | + <arg>%X</arg> |
50 | 52 | </command-line>
|
51 | 53 | <iconname>gps-build-all-symbolic</iconname>
|
52 |
| - <switches command="%(tool_name)s" columns="1" lines="1"> |
| 54 | + <switches command="%(tool_name)s" columns="1" lines="1" sections="--"> |
53 | 55 | <title column="1" line="1" >Profiles</title>
|
54 | 56 | <radio
|
55 | 57 | line="1"
|
|
83 | 85 | <arg>--no-color</arg>
|
84 | 86 | <arg>--no-tty</arg>
|
85 | 87 | <arg>-q</arg>
|
| 88 | + <arg>--</arg> |
| 89 | + <arg>%X</arg> |
86 | 90 | </command-line>
|
87 | 91 | <iconname>gps-clean-symbolic</iconname>
|
88 |
| - <switches command="%(tool_name)s" columns="2" lines="1"> |
| 92 | + <switches command="%(tool_name)s" columns="2" lines="1" sections="--"> |
89 | 93 | <title column="1" line="1" >Options</title>
|
90 | 94 | <check label="Delete cache of releases" switch="--cache"
|
91 | 95 | tip="All downloaded dependencies will be deleted." />
|
|
103 | 107 | </output-parsers>
|
104 | 108 | </target-model>
|
105 | 109 |
|
106 |
| - <target-model name="Alire Run" category=""> |
107 |
| - <description>Launch an executable built by the crate</description> |
108 |
| - <command-line> |
109 |
| - <arg>alr</arg> |
110 |
| - <arg>--non-interactive</arg> |
111 |
| - <arg>--no-color</arg> |
112 |
| - <arg>--no-tty</arg> |
113 |
| - <arg>-q</arg> |
114 |
| - </command-line> |
115 |
| - <iconname>gps-run-symbolic</iconname> |
116 |
| - <switches command="%(tool_name)s" columns="1" lines="1"> |
117 |
| - <title column="1" line="1" >Options</title> |
118 |
| - <check label="Skip building step" switch="--skip-build" |
119 |
| - tip="Skip the building step before running the executable(s)." /> |
120 |
| - </switches> |
121 |
| - <output-parsers> |
122 |
| - output_chopper |
123 |
| - utf8_converter |
124 |
| - progress_parser |
125 |
| - alire_parser |
126 |
| - console_writer |
127 |
| - end_of_build |
128 |
| - </output-parsers> |
129 |
| - </target-model> |
130 |
| -
|
131 | 110 | <target model="Alire" category="Alire" name="Alire"
|
132 | 111 | messages_category="Alire">
|
133 | 112 | <in-toolbar>FALSE</in-toolbar>
|
|
169 | 148 | <arg>--no-tty</arg>
|
170 | 149 | <arg>-q</arg>
|
171 | 150 | <arg>build</arg>
|
| 151 | + <arg>--</arg> |
| 152 | + <arg>%X</arg> |
172 | 153 | </command-line>
|
173 | 154 | </target>
|
174 | 155 |
|
|
187 | 168 | <arg>--no-tty</arg>
|
188 | 169 | <arg>-q</arg>
|
189 | 170 | <arg>build</arg>
|
| 171 | + <arg>--</arg> |
| 172 | + <arg>%X</arg> |
190 | 173 | </command-line>
|
191 | 174 | </target>
|
192 | 175 |
|
|
204 | 187 | <arg>--no-tty</arg>
|
205 | 188 | <arg>-q</arg>
|
206 | 189 | <arg>clean</arg>
|
| 190 | + <arg>--</arg> |
| 191 | + <arg>%X</arg> |
207 | 192 | </command-line>
|
208 | 193 | </target>
|
209 | 194 | """
|
@@ -284,7 +269,8 @@ def display_message(timeout):
|
284 | 269 | # Alire is being ran
|
285 | 270 | timeout = GPS.Timeout(100, display_message)
|
286 | 271 | timeout.counter = 0
|
287 |
| - else: |
| 272 | + |
| 273 | + elif not GPS.getenv("ALIRE"): |
288 | 274 | # We are not loading an Alire project: unset the aliases
|
289 | 275 | # on Alire build targets.
|
290 | 276 | update_aliases_for_alire_targets(is_alire_project=False)
|
@@ -319,8 +305,15 @@ def on_compilation_finished(hook, category, target_name, mode_name, status, cmd)
|
319 | 305 | "Alire environment is now setup: project has been reloaded",
|
320 | 306 | importance=GPS.Message.Importance.INFORMATIONAL,
|
321 | 307 | )
|
| 308 | + |
322 | 309 | update_aliases_for_alire_targets(is_alire_project=True)
|
323 | 310 | GPS.MDI.information_popup("Alire project is now setup", "vcs-up-to-date")
|
| 311 | + |
| 312 | + # Change GS's current directory to Alire project's root directory. |
| 313 | + GPS.Logger("ALIRE").log("Changing current directory to: %s" % root) |
| 314 | + GPS.cd(root) |
| 315 | + GPS.Logger("ALIRE").log("Current directory is now: %s" % GPS.pwd()) |
| 316 | + |
324 | 317 | project_to_reload = None
|
325 | 318 |
|
326 | 319 |
|
@@ -352,7 +345,7 @@ def on_project_changing(hook, file):
|
352 | 345 | root = find_alire_root(file.path)
|
353 | 346 |
|
354 | 347 | if root:
|
355 |
| - GPS.Logger("ALIRE").log("Alire manifest detected!") |
| 348 | + GPS.Logger("ALIRE").log("Alire manifest detected at: %s" % file.path) |
356 | 349 | project_to_reload = (file.path, root)
|
357 | 350 |
|
358 | 351 |
|
|
0 commit comments