Recent

Author Topic: convert Sebran delphi(4) code to lazarus  (Read 102228 times)

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #30 on: February 06, 2009, 02:33:43 pm »


Hi

I have deleted *.ppu files in the componets directory and subdirctories of it.
it did not help but when I delete it in the Temp direktory
so I could come another step forwards.
Now the compiler deliever this messeage.

Hint: Start of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Hint: End of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.2.2 [2008/10/05] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling package01.pas
Compiling .\sebran\Delphi4\FILEREAD.PAS
D:\Temp\sebran\Delphi4\FILEREAD.PAS(161,3) Note: Local variable "b" not used
D:\Temp\sebran\Delphi4\FILEREAD.PAS(161,6) Note: Local variable "b2" not used
D:\Temp\sebran\Delphi4\FILEREAD.PAS(163,3) Note: Local variable "code" not used
D:\Temp\sebran\Delphi4\FILEREAD.PAS(226,52) Hint: Local variable "TempBufSize" does not seem to be initialized
D:\Temp\sebran\Delphi4\FILEREAD.PAS(237,5) Note: Local variable "i" not used
D:\Temp\sebran\Delphi4\FILEREAD.PAS(238,5) Note: Local variable "NyStr" not used
Compiling .\sebran\Delphi4\GENERELL.PAS
D:\Temp\sebran\Delphi4\GENERELL.PAS(1,1) Fatal: Can't find unit MPlayer used by Generell

can I do something with Mplayer ?
is the order of .pas files the problem ?

kind regards
Kawous


Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #31 on: February 06, 2009, 03:49:25 pm »
I guess, Delphi has a mplayer unit. Lazarus has not. That is why I said a couple of days ago, that if you don't have the source code of the mplayer unit, you can stop the porting. You must remove it from the uses clause and find or write replacements procedure and functions for the functions and procedures that are in the mplayer unit.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: convert Sebran delphi(4) code to lazarus
« Reply #32 on: February 06, 2009, 06:49:43 pm »
It depends on what he needs to do with Media Player. If he just needs to play something (.mid, .avi file, etc.) he could just do a ShellExecute to the mplayer2.exe installed on the computer and pass the path to the file. This will launch the MS Media Player external to his app and open the file.

If he's using the Delphi MPlayer unit's TMediaPlayer component to provide a "VCR-type" set of controls on a form, then that's not available with Lazarus.

Thanks.

-Phil

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #33 on: February 06, 2009, 07:52:00 pm »
Phil, good point, well explained. Thanks for the help.

That is what I more or less wanted to say with a re-implementation of mplayer, which can be easy, as you explained or hard if you want to show some VCR controls.

But even for showing controls, there are component on Lazarus CCR, IIRC.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: convert Sebran delphi(4) code to lazarus
« Reply #34 on: February 06, 2009, 09:46:34 pm »
Do you mean ACS? Recent posts seem to indicate that ACS doesn't work very well and never worked for OS X.

Sebran: Maybe you could post a small bounty for fixing ACS if indeed it doesn't work very well on Windows.

Thanks.

-Phil

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #35 on: February 06, 2009, 09:56:18 pm »

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #36 on: February 07, 2009, 12:08:33 am »

Hi

sebran just use some sounds for giving some good or bad singnals for the kids. and some small music sounds after a play.
there is nothing with video.
can I use RackCtls instead of MPlayer ?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #37 on: February 07, 2009, 03:45:03 pm »
I don't think so. RackCtls are just the visible controls.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #38 on: February 09, 2009, 09:51:27 am »
Hi

I have found a source code . But I have some questions ?
and I am not sure if it is the right one.

does lazarus support all this units ?

uses Windows, Classes, Controls, Forms, Graphics, Messages,
  MMSystem, Dialogs, SysUtils;


Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #39 on: February 09, 2009, 12:45:52 pm »
On windows, yes.

The MMSystem unit is windows only and there is not simple replacement for it.

The Windows unit is for windows only too, but some windows functions can be found in the LCLIntf unit.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #40 on: February 09, 2009, 02:36:18 pm »
Hi

There is one more unit does not work. consts

can I replace that ?

Hint: Start of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Hint: End of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.2.2 [2008/10/05] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling package01.pas
Compiling MPlayer.pas
D:\Temp\MPlayer.pas(101,15) Warning: An inherited method is hidden by "TMediaPlayer.SetVisible(TButtonSet)"
D:\Temp\MPlayer.pas(237,6) Fatal: Can't find unit Consts used by MPlayer


kind regards
Kawous

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #41 on: February 09, 2009, 02:38:27 pm »
I don't know the unit consts.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #42 on: February 09, 2009, 03:27:11 pm »


Hi

So I have found also consts.pas and now I get this compiler message.
I am very disapointed but I would like to do that.
what do you think about this message ?

Hint: Start of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Hint: End of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.2.2 [2008/10/05] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling package01.pas
Compiling D:\delphi\Consts.pas
Compiling MPlayer.pas
D:\Temp\MPlayer.pas(101,15) Warning: An inherited method is hidden by "TMediaPlayer.SetVisible(TButtonSet)"
D:\Temp\MPlayer.pas(283,52) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(503,14) Error: Identifier not found "BrushCopy"
D:\Temp\MPlayer.pas(790,65) Error: Identifier not found "sNotOpenErr"
D:\Temp\MPlayer.pas(830,32) Error: Illegal type conversion: "ShortString" to "^Char"
D:\Temp\MPlayer.pas(848,49) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(898,60) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(943,57) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(978,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1000,57) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1005,65) Error: Identifier not found "sNotOpenErr"
D:\Temp\MPlayer.pas(1030,58) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1050,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1110,57) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1168,57) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1196,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1202,3) Error: Duplicate identifier "Error"
D:\Temp\MPlayer.pas(1202,3) Hint: Identifier already defined in MPlayer.pas at line 182
D:\Temp\MPlayer.pas(1240,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1267,60) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1288,60) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1314,57) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1324,47) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1335,49) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1346,49) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1357,28) Error: Illegal type conversion: "ShortString" to "^Char"
D:\Temp\MPlayer.pas(1373,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1417,58) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1431,61) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1465,61) Hint: Conversion between ordinals and pointers is not portable

D:\Temp\MPlayer.pas(1487,58) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1501,60) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1518,53) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1523,53) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1528,53) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1533,53) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1538,53) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1547,58) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1560,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1571,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1582,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1592,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1602,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1613,59) Hint: Conversion between ordinals and pointers is not portable
D:\Temp\MPlayer.pas(1623,3) Error: Identifier not found "SMCIUnknownError"
D:\Temp\MPlayer.pas(1694,36) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
D:\Temp\MPlayer.pas(1694,36) Hint: Converting the operands to "Int64" before doing the multiply could prevent overflow errors.
D:\Temp\MPlayer.pas(1695,18) Hint: Converting the operands to "Int64" before doing the multiply could prevent overflow errors.
D:\Temp\MPlayer.pas(1754) Fatal: There were 7 errors compiling module, stopping



arnoldb

  • Jr. Member
  • **
  • Posts: 97
Re: convert Sebran delphi(4) code to lazarus
« Reply #43 on: February 09, 2009, 03:31:10 pm »
Consts contains a lot of resource strings in Delphi.

Some of the errors you are getting looks like they are related to the consts unit, or expect to have entries in the consts unit...

Looks like you will have to try to figure out the others.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #44 on: February 09, 2009, 03:37:35 pm »

Hi

That was just a statement from me.

What do you recommend me to do now ?

 

TinyPortal © 2005-2018