TC for Linux suggestion...

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
stas
Junior Member
Junior Member
Posts: 27
Joined: 2003-02-10, 22:27 UTC
Location: Brazil
Contact:

TC for Linux suggestion...

Post by *stas »

I remember that problems appeared when trying to port Total Commander for Linux through Kylix... Some resources are simply unavailable onder Kylix environment. So I was thinking; why not to "import" that resources through... WINE? For those who doesn't knows, WINE means "WINdows Emulator" and also "WINE Is Not Emulator". I saw MPlayer (http://www.mplayerhq.hu/homepage/design5/news.html) running Windows ASF video codecs being emulated through WINE, and it runs very fast and doesn't crashes!!! Another project, XMMS, has a plugin that is able to run WinAmp plugins through WINE too... I guess many people will become happy if Total Commander is finally out for Linux :D
| hamlet DB 2Bh or not 2Bh, ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

WineLIB is a library for C(++), and therefore it cannot be used with Kylix. It would also be much slower than using native functions.
Author of Total Commander
https://www.ghisler.com
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

I guess many people will become happy if Total Commander is finally out for Linux

Happy it's not enough i would say VERY HAPPY, :wink:
User avatar
jpcv
Junior Member
Junior Member
Posts: 28
Joined: 2003-02-11, 15:35 UTC
Location: Uruguay

Post by *jpcv »

I would really preciate this
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Yeah, TC for Linux would be great (main reason why I don't use Linux is the lack of a good filemanager). For the time being you can try Krusader, http://krusader.sourceforge.net .

HTH
Roman
jsmith
Junior Member
Junior Member
Posts: 2
Joined: 2003-02-15, 15:25 UTC

Post by *jsmith »

ghisler(Author) wrote:WineLIB is a library for C(++), and therefore it cannot be used with Kylix. It would also be much slower than using native functions.
Can you tell us exactly what 3rd-party Delphi components are missing under Kylix (with all methods), what are the Win32 API's you're having trouble under Linux, etc ? Maybe some of us would like to help you with the Linux port.

/jsmith
Stop abusing my name!!!
Sincerely yours,
John Smith.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The main problem is that there is no virtual listbox under Linux. A virtual listbox works like this: I just tell the listbox that it is filled with 100'000 lines, and I don't put any data in it. The listbox then calls a callback function for each line, and I draw the lines myself. The Linux-listbox creates an object for each single line(!), which is unfeasible and slow for long files. I need this for the 'compare by contents' function. On Windows, I wrote such a Listbox myself.

It's quite a complex component, directly derived from TWinControl, and uses (reacts to) many Windows messages:

Code: Select all

      procedure wmSetRedraw(var Message:TWMSetredraw); message wm_setredraw;
      procedure wmSetFocus(var Message: TWMSetFocus); message wm_setfocus;
      procedure wmKillFocus(var Message: TWMKillFocus); message wm_killfocus;
      procedure wmKeyDown(var Message: TWMKeydown); message wm_keydown;
      procedure wmChar(var Message: TWMChar); message wm_char;
      procedure wmSize(var Message: TWMSize); message wm_Size;
      procedure WMEraseBkGnd(var Message: TWMEraseBkGnd); Message WM_EraseBkGnd;
      procedure wmPaint(var Message: TWMPaint); message wm_paint;
      procedure wmShowWindow(var Message: TWMShowwindow); message wm_ShowWindow;
      procedure wmRbuttondown(var Message: TWMRButtondown); message wm_Rbuttondown;
      procedure wmRbuttonup(var Message: TWMRButtonUp); message wm_Rbuttonup;
      procedure wmLbuttondown(var Message: TWMLButtonDown); message wm_Lbuttondown;
      procedure wmLbuttonup(var Message: TWMLButtonUp); message wm_Lbuttonup;
      procedure wmGetDlgCode(var Message: TMessage); message wm_GetDlgCode;
      procedure wmVScroll(var Message: TWMScroll); message wm_vscroll;
      procedure wmHScroll(var Message: TWMScroll); message wm_hscroll;
      procedure lbSetSel(var Message: TMessage); message lb_setsel;
      procedure lbGetSel(var Message: TMessage); message lb_getsel;
      procedure lbGetSelItems(var Message: TMessage); message lb_getselitems;
      procedure lbSetCurSel(var Message: TMessage); message lb_setcursel;
      procedure lbGetCurSel(var Message: TMessage); message lb_getcursel;
      procedure lbSetCaretIndex(var Message: TMessage); message lb_SetCaretIndex;
      procedure lbGetCaretIndex(var Message: TMessage); message lb_GetCaretIndex;
      procedure lbSetTopIndex(var Message: TMessage); message lb_SetTopIndex;
      procedure lbGetTopIndex(var Message: TMessage); message lb_GetTopIndex;
      procedure lbGetCount(var Message: TMessage); message lb_getcount;
      procedure lbSetCount(var Message: TMessage); message lb_setcount;
      procedure lbGetSelCount(var Message: TMessage); message lb_GetSelCount;
      procedure lbGetItemHeight(var Message: TMessage); message lb_GetItemHeight;
      procedure lbGetItemRect(var Message: TMessage); message lb_getitemrect;
      procedure lbResetContent(var Message: TMessage); message lb_ResetContent;
      procedure lbSelItemRange(var Message: TMessage); message lb_SelItemRange;
      procedure lbSetColumnWidth(var Message: TMessage); message lb_SetColumnWidth;
      procedure lbAddString(var Message: TMessage); message lb_AddString;
      procedure lbInsertString(var Message: TMessage); message lb_InsertString;
      procedure lbDeleteString(var Message: TMessage); message lb_DeleteString;
Unfortunately messages don't exist on Linux, all is done via callback functions. I have no idea how to port such a component to Linux. Is there any component porting guide available?
Author of Total Commander
https://www.ghisler.com
User avatar
flognat
Junior Member
Junior Member
Posts: 5
Joined: 2003-02-11, 20:05 UTC

Post by *flognat »

Just a quick question, have you tried MidnightCommander (linux/solaris/cygwin/...)? One of these NortonCom.. ehm.. Total Commander clones :-)
User avatar
ben hub
Member
Member
Posts: 132
Joined: 2003-02-06, 21:47 UTC
Location: Madagascar

Post by *ben hub »

flognat wrote:Just a quick question, have you tried MidnightCommander (linux/solaris/cygwin/...)? One of these NortonCom.. ehm.. Total Commander clones :-)
yes... looks like a come back to Cromagnon's age :D
Benoît
# 4081
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

:) Agreed, can't see why everyone is suggesting MC...

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Zenox
Junior Member
Junior Member
Posts: 7
Joined: 2003-02-19, 22:01 UTC

Post by *Zenox »

ghisler(Author) wrote:The main problem is that there is no virtual listbox under Linux.
Probably out of the blue here (I'm mainly doing java coding), but since I'm only running Linux and miss Total Commander sooo much I got to check anyways. Is it possible to port using wxWindows somehow? Dunno how much work it would require though, maybe too much? Anyways, IBM has written an article about porting MFC apps etc. Here's the links (the IBM one containing links to other resources too, like kparts etc):

http://www-106.ibm.com/developerworks/opensource/library/l-mfc/
http://www.wxwindows.org/
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately not - TC is a Delphi app, not C++ / MFC. But the problem with the missing virtual listbox lies elsewhere: Delphi for Linux (Kylix) uses the Qt toolkit, and Qt doesn't seem to have a virtual listbox either...
Author of Total Commander
https://www.ghisler.com
Zenox
Junior Member
Junior Member
Posts: 7
Joined: 2003-02-19, 22:01 UTC

Post by *Zenox »

ghisler(Author) wrote:Unfortunately not - TC is a Delphi app, not C++ / MFC. But the problem with the missing virtual listbox lies elsewhere: Delphi for Linux (Kylix) uses the Qt toolkit, and Qt doesn't seem to have a virtual listbox either...
Ah okay. Hmm, asked about your (every linux users) problem at the #qt (irc.freenode.net) irc channel. Got this reply:

<blackie> Zenox: You can always do that if you create your own listbox - I dont know if it is possible in QListBox tho. Perhaps you should look at QScrollView - it has some examples of such large data sets

Dont know if that's gonna help though. Guess it would be better if you go there and ask them (if you got the time someday), as you know lots more on what it's about. Anyhow, maybe QScrollView could be a starting point to build something on like he mentioned (or if it works directly, dunno)?
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

ghisler(Author) wrote:Unfortunately not - TC is a Delphi app, not C++ / MFC.
As far as I know Delphi includes a proprietary language of Borland, kind of "objectized" Pascal. Why don't you use a the standardized C++ with probably much more supporting tools, libraries etc.? Is it the legendary support of Delphi for GUI development (I don't know it personally)? Is it because you started the development of WC/TC with Pascal long time ago?

It is NOT my intention to start another never ending language discussion or to convert anybody to C++. I'm just curious to get to know some of your reasons.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Is it because you started the development of WC/TC with Pascal long time ago?
Yes, exactly! Also development with Delphi is much faster and the code much more readable and easier to support than C++. TC is far over 100'000 lines of code, but I don't have any problems to keep the overview...
Author of Total Commander
https://www.ghisler.com
Post Reply