Recent

Author Topic: Terminal Component Available  (Read 15910 times)

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #15 on: April 12, 2018, 02:05:54 pm »
I'm working on a new version that adds more features like adjustable zoom (scales the terminal interface in size), background color, custom fonts, custom color palette, and slightly better dynamic loading capability. I'm also adding the ability to input/output to the terminal. That is a pascal method to send text as commands, and read text as command results.

I'll be posting it on github, along with a copy left license, but in the mean time if anyone has any requests please post them here.
« Last Edit: April 12, 2018, 02:08:05 pm by sysrpl »

guest58172

  • Guest
Re: Terminal Component Available
« Reply #16 on: April 12, 2018, 02:19:23 pm »
damn i started to extend the class now (back/fore/sel color)... i think i'll wait for the repo to be here.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #17 on: April 12, 2018, 03:09:44 pm »
damn i started to extend the class now (back/fore/sel color)... i think i'll wait for the repo to be here.
BBasile, if you want to send me those changes and make and more improvements or suggestions, please send them to me. I've sent you a PM with details to a git account you can use.

guest58172

  • Guest
Re: Terminal Component Available
« Reply #18 on: April 12, 2018, 03:18:33 pm »
Let's use Github pull request, it's more simple. BTW I've just finished font + colors. working okay

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #19 on: April 12, 2018, 03:37:45 pm »
Let's use Github pull request, it's more simple. BTW I've just finished font + colors. working okay
Okay, please send it to the github repository. I'll integrate it with my changes:

https://github.com/sysrpl/Lazarus.Terminal

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #20 on: April 13, 2018, 05:40:38 pm »
Updated at github:

Now includes support for custom colors and fonts.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #21 on: April 14, 2018, 01:49:03 am »

guest58172

  • Guest
Re: Terminal Component Available
« Reply #22 on: April 15, 2018, 08:45:55 am »
Demo of the component in my D IDE:

https://www.youtube.com/watch?v=EtFUQ3rXamU&index=1&list=PLzk8A0LUvEOV-OMdz09jfOahwnKoA2na_

The cool feature is the automatic 'cd' i think.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Terminal Component Available
« Reply #23 on: April 15, 2018, 03:33:04 pm »
Demo of the component in my D IDE:

https://www.youtube.com/watch?v=EtFUQ3rXamU&index=1&list=PLzk8A0LUvEOV-OMdz09jfOahwnKoA2na_

The cool feature is the automatic 'cd' i think.
that looks great. IF you want to do something similar on windows there are a couple of TConsole components you can use or simple dig in to the console emulator (written in delphi) http://www.corion.net/econsole/index.html
at the time being my plate is over the top full otherwise I would try to make it a component my self.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

guest58172

  • Guest
Re: Terminal Component Available
« Reply #24 on: April 15, 2018, 10:18:18 pm »
For now on Windows i've tried to host a cmd instance (EnumProcess then find the Hwnd for the PID of the cmd launched in an asyncprocess), which doesn't work fine due to docking.
The console dispears when it's docked and this not interesting to have it only as a floating form.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Terminal Component Available
« Reply #25 on: April 15, 2018, 11:43:55 pm »
For now on Windows i've tried to host a cmd instance (EnumProcess then find the Hwnd for the PID of the cmd launched in an asyncprocess), which doesn't work fine due to docking.
The console dispears when it's docked and this not interesting to have it only as a floating form.
the econsole application I linked above does the opposite. It opens a console which then hides and has a timer/thread to capture its output in a memo/synedit control. Everything is done on the memo and onkeypressed(#13) are executing on the hiden console. You can go one step farther and do not use a timer just loop through until the console finishes execution and show the prompt.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

guest58172

  • Guest
Re: Terminal Component Available
« Reply #26 on: April 21, 2018, 05:45:14 pm »
Damn I should have thought earlier to do like this. Piping the shell is indeed very simple and works fine...

https://github.com/BBasile/terminov

However there are limitations (colors, inferior process eg vim wont work fine...) still better than nothing

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Terminal Component Available
« Reply #27 on: April 21, 2018, 07:08:19 pm »
;) I see an challenge somewhere in there but not a good time for me to take it up.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

guest58172

  • Guest
Re: Terminal Component Available
« Reply #28 on: April 21, 2018, 08:59:22 pm »
;) I see an challenge somewhere in there

You should not. There's no challenge, it's super simple. The only thing to do could be more qualified as "boring as hell" IMO. This is a graphic control. For now i use a memo, which is not 100% adapted (the last empty lines suck a bit, the caret is a bit thin, protecting the previous line is a bit shitty).

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Terminal Component Available
« Reply #29 on: April 21, 2018, 11:18:41 pm »
;) I see an challenge somewhere in there

You should not. There's no challenge, it's super simple. The only thing to do could be more qualified as "boring as hell" IMO. This is a graphic control. For now i use a memo, which is not 100% adapted (the last empty lines suck a bit, the caret is a bit thin, protecting the previous line is a bit shitty).
the challenge I'm referring to, is transferring the colors from the console to the memo, unless you are referring to the memos inability to show different colors in which case yeah its boring to do. richedit perhaps could be a better choice in this case? KMemo comes to mind.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018