Recent

Author Topic: [SOLVED] Configuring External Tools on Windows  (Read 846 times)

lucamar

  • Hero Member
  • *****
  • Posts: 1810
[SOLVED] Configuring External Tools on Windows
« on: June 19, 2019, 09:03:30 pm »
On Windows (XP) I added an "External Tool" to the IDE with these settings:

  Title: Open &Terminal
  Program filename: cmd
  Parameters:
       /k
      cd "$ProjPath()"


When it didn't work I tried changing "Program filename" to
* cmd.exe
* c:\windows|\system32\cmd.exe

It kept not working, so I changed "Parameters" to a single line:
  /k cd "$ProjPath()",
tested with all three of the previous "Program filename" and still doesn't work. All it does (in any incarnation) is take the focus away of Lazarus.

Thinking it was something about cmd, I tried next adding "Open project folder" which calls
  explorer.exe "$ProjPath()"
but it didn't work either.

Please, kind folks: what am I doing wrong?

BTW, environment is Lazarus 2.0.2 under Windows XP-SP3.
« Last Edit: June 20, 2019, 11:42:43 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4 & 2.0.2 w/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: Configuring External Tools on Windows
« Reply #1 on: June 19, 2019, 11:59:21 pm »
Check "Show Console"
« Last Edit: June 20, 2019, 12:02:55 am by engkin »

lucamar

  • Hero Member
  • *****
  • Posts: 1810
Re: Configuring External Tools on Windows
« Reply #2 on: June 20, 2019, 10:44:03 am »
Thanks, engkin, that was it! Had it been a tiger I'd be eaten by now :D

About the second problem, with "explore"? Ahhhh ... I had the "Hide window" box ticked. Dunno if it's a "default" or just a "fault" (a "touchpad fault", I mean...) :-[

Anyway, lotsa thanks!
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4 & 2.0.2 w/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: [SOLVED] Configuring External Tools on Windows
« Reply #3 on: June 20, 2019, 06:09:48 pm »
I am glad that was not a tiger. I had fallen for that "mistake" before, twice!!

dbannon

  • Hero Member
  • *****
  • Posts: 587
    • tomboy-ng, a rewrite of the classic Tomboy
Re: [SOLVED] Configuring External Tools on Windows
« Reply #4 on: June 21, 2019, 07:08:16 am »
Hi engkin and lucamar, assuming you don't mind, I'll add that 'trick' to -

 https://wiki.freepascal.org/IDE_tricks#Opening_a_Terminal_Windows_from_the_IDE

Being able to pop open a terminal is so useful but I left the Windows section blank last time it came up as I don't do windows ....

Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: [SOLVED] Configuring External Tools on Windows
« Reply #5 on: June 21, 2019, 12:24:05 pm »
Please do, and thank you!

lucamar

  • Hero Member
  • *****
  • Posts: 1810
Re: [SOLVED] Configuring External Tools on Windows
« Reply #6 on: June 21, 2019, 02:01:13 pm »
Hi engkin and lucamar, assuming you don't mind, I'll add that 'trick' to - [...]

Sure, the more the merrier :)

But make sure to add a note about the potential "Show console" pitfall :D
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4 & 2.0.2 w/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

dbannon

  • Hero Member
  • *****
  • Posts: 587
    • tomboy-ng, a rewrite of the classic Tomboy
Re: [SOLVED] Configuring External Tools on Windows
« Reply #7 on: June 21, 2019, 11:43:23 pm »
Yep, have done. I used engkin's image.

I should also make sure its valid advice even on Win10 too......

Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

lucamar

  • Hero Member
  • *****
  • Posts: 1810
Re: [SOLVED] Configuring External Tools on Windows
« Reply #8 on: June 22, 2019, 02:02:00 am »
I should also make sure its valid advice even on Win10 too......

Someone with Windows 10 could try to see what is needed to launch PowerShell ... and bash! if the Linux thing is installed.

Just saying :-[  :D
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4 & 2.0.2 w/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.