Difference between revisions of "Indy with Lazarus/ko"

From Lazarus wiki
Jump to navigationJump to search
Line 90: Line 90:
 
   IdTCPServer1.Active := True;   
 
   IdTCPServer1.Active := True;   
 
end;</syntaxhighlight>
 
end;</syntaxhighlight>
(3)use TIdSync to Control your GUI in IdTCPServer's OnExecute() even.
+
 
 +
(3)TIdSync를 사용하여, IdTCPServer의 OnExecute() 함수로 GUI를 제어할 수 있습니다.
  
 
=== 설치방법 ===
 
=== 설치방법 ===

Revision as of 09:50, 19 February 2018

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) 한국어 (ko)

라자루스용 인디

인디를 포팅하려는 새로운 시도가 인디 핵심 팀에 의해 착수되고 있다. FPC개발자 마르코 반 데 보르트는 FPC4Lazarus와 완벽하게 작동시키기 위해 인디 코어 포팅 작업하고 있다. 특히 인디의 JP무가스가 FPC와 함께 작업하게 하는 데 크게 기여했다. 대부분의 백엔드는 대부분 그의 작업이기도 하다.


현재 Indy10은 거의 완벽하게 작동하고 있으며, 최종 사용자의 사용 편의성이 크게 개선되었습니다. OpenSSL 및 압축과 같은 특수 주제에만 추가적인 지식이 필요할 수 있습니다. 64비트 지원은 완전하게 검증되지 않았습니다.

힌트: 카일릭스 인디를 지원할 생각이 없다. (libc unit을 사용한 모든것). 네이티브 유닉스 RTL을 이용한 것만 포팅할 것이다.

요구사항

현재, FPC 2.0.4버전 이상에서 일부버그를 제외한 사용 가능합니다. (FreeBSD/Mac OS X:서버버그 2.1.1버전이상)

이제 Indy10은 모든 주요 대상에서 작동하기 때문에 우리는 이버전에 초점을 맞춥니다.

Indy9로 변환이 사람들을 위해 간단 할 수도 있지만,그것은 단지는 Win32에서 작동하는 것을 명심하십시오. (그리고 이론적으로 리눅스/x86에 이식 할 수있다).

그러므로 가급적 인디10을 사용할 것을 추천합니다.

(indy9의 예를 들자면,텔넷 구성 요소가 작동하게하는 tmemorystream.setsize 의 오버라이딩을 제거 할 필요가있을 수 있습니다,하지만 Indy9은 한 동안 테스트되지 않았습니다)


이 포트는 매우 안정적이며, JP Mugaas은 릴리스의 품질, 포함 메이크 세트를 개선하기 위해 많은 일을했다

다운로드/링크

현재 스냅샷들(for die hards only)

동작 기능과 미구현 기능

Indy9:

  • 윈도우에선 대부분 동작한다. 거의 모든 데모가 포팅되었습니다.
  • 리눅스에선 거의 동작 하지 않는다. Linux/x86계열(카이릭스 제외)을 제외한 대상은 희망이 없습니다. <-- 거의 모든 리눅스에서 동작하지 않는다(주)

Indy10:

  • 윈도우, 유닉스: 클라이언트 동작, 원칙적으로 서버 역시 동작한다.
  • 유닉스 RTL의 주요기능은 동작한다. OS X, FreeBSD의 서버,클라이언트도 동일하게 동작한다.

모든버전: 보안관련 기능은 아직 테스트 되지 않음.

단기 개발 계획

  • 데모 소스를 동작하도록 변환 예정.
  • 버그 수정 및 FPC와 Indy RCS를 재수정 할 계획.

문제점들

  • Indy9 및 Indy10 사용에 따른 공통적인 문제, 배포에 발생하는 문제들, 심지어 기본적인 문제점들:
    • Indy9 더 사용되고, 업계에서 입증 된 것입니다.
    • Indy10 은 보다 나은 이식성을 가지고 있습니다. 그러나 이식률은 낮습니다. 더이상 인디 어디에서도 움직임은 보이지 않습니다 (개선되지 않고 있습니다)
  • 배포는 어떻게? 라자루스에 속할지,FPC에 속할지.
  • Lot of pkgs and demos have paths in them. How to centrally fix them so that inexperienced users can build them?
  • 라자루스 문제점들
    • 아이콘 사라지는문제
    • 해결 인디컴포넌트 구성 탭에 요소가 많아 질 경우, 스크롤 되지 않아 선택할 수 없습니다.: JP Mugaas는 인디 클라이언트를 A-M 그리고 N-Z 등으로 분리했습니다. 또한 탭당 2개의 행으로 변경하였습니다.
  • 인디 데모 (특히Indy10)는 멀티 플랫폼 사용에 매우 적합하지 않습니다. 설정은 윈도우에 특화되어있으며, 공백이 있는 경로, 깊은 디렉토리, 쓸모없는 코드(C# 코드)가 있습니다. 빠른 시간 안에 데모는 재작성되어야 합니다.

버그

  • Indy10 서버는 시작 시 예외가 발생하여 종료되기 때문에 동작하지 않는다. FPC 2.2(.0) 또는 그 이상 버전에서 수정되었다.(pthread_kill 문제). 이 문제는 Max OS X에서도 동일하게 나타난다.
  • 데모를 변환시에, 빈번하게 바인딩 프로버티(속성)가 잘못 변환 되었다. 이러한 원인은 인디가 IP4와 IP6를 동시에 사용해서 동일한 포트로 바인딩 하는것 때문에 비정상적으로 동작 할 수 있다.
  • Ubuntu 10.04 + Lazarus 0.9.28 + Indy 10(Server Component) -> launch & do nothing (just crash)

해결방법 (bruce0829@yahoo.com.tw collect and organize data):

(1).Lazarus Main menu -> Project -> Compiler Options -> Other Page , add the "-dUseCThreads" parameter.

(2).force the IdTCPServer to work in Id_IPV4 mode.

procedure TForm1.FormActivate(Sender: TObject);
var
  Binding: TIdSocketHandle;
begin 
  //uses idGlobal
  //explicitly adding a Binding object prevents TIdTCPServer
  //from creating its own default IPv4 and IPv6 Binding objects
  //on the same listening IP/Port pair...
  Binding := IdTCPServer1.Bindings.Add;
  Binding.IPVersion := Id_IPv4; //optional: forces the Binding to work in Id_IPV4 mode.
  Binding.IP := '127.0.0.1';
  Binding.Port := 6501; //customization 
  IdTCPServer1.Active := True;  
end;

(3)TIdSync를 사용하여, IdTCPServer의 OnExecute() 함수로 GUI를 제어할 수 있습니다.

설치방법

이방법은 완벽하지 않지만,원한다면 다음과 같이 설치를 할 수 있다. :Matthijs

  • indysystemlaz.lpk 열고 컴파일
  • indycorelaz.lpk 열고 컴파일
  • indyprotocolslaz.lpk 열고 컴파일
  • dclindycorelaz.lpk 열고 컴파일 후 설치
  • dclindyprotocolslaz.lpk 열고 컴파일 후 설치

라자루스 리빌드 후 15개의 인디 컴포넌츠 탭을 볼 수 있을 것이다.

데비안/우분투 설치방법

# cd indy-10.2.0.1/fpc
# chmod +x debian/rules
# touch README
# sudo apt-get install fakeroot
# dpkg-buildpackage -rfakeroot -uc
# cd ..
# sudo dpkg -i *.deb
  • install package indylaz.lpk in lazarus

리눅스 설치방법[2]

위의 팁으로 라자루스 Indy를 설치하지 못할 경우,이방법을 시도 할 수 있습니다. - Yahoo! Brazil, Lazarus Group (User Everaldo)

라자루스 0.9.24 버전에서 indy-10.2.0.1 버전 기준

  • Unzip the component from file tar.gz (must be this file, the "zip file" does not work) in directory $(LazarusDir)\components;
  • Go to directory $(LazarusDir)\components\indy-10.2.0.1\ and to create inside them a directory named "saved";
  • Copy the content of the directory $(LazarusDir)\components\indy-10.2.0.1\lazarus\ to directory "saved" created above;
  • Copy the content of directory $(LazarusDir)\components\indy-10.2.0.1\fpc\ to directory $(LazarusDir)\components\indy-10.2.0.1\lazarus, and rewrite all files, ok;
  • Get the content of directory "saved" and copy inside of $(LazarusDir)\components\indy-10.2.0.1\lazarus and you can delete "saved" directory now;
  • Install the package laz.lpk (available in $(LazarusDir)\components\indy-10.2.0.1\lazarus\indy) of conventional way.

리눅스 상 경로 : /usr/lib/lazarus/components/indy-10.2.0.1/

윈도우 설치 방법[3], Indy 10.5.8.0 과 그 이상 버전

  • 동작하기 위해서 라자루스 (그리고 FPC)가 필요하다.
  • 인디 다운로드 : http://www.indyproject.org/Sockets/Download/DevSnapshot.EN.aspx.
    또는 현재 최신버전: http://indy.fulgan.com/
  • 디렉토리에 압축 풀기
  • *.pas, *.lrs and *.inc 파일을 \Lib\System, \Lib\Core, 그리고 \Lib\Protocols 하위 폴더에 복사하여 넣거나 새로운 폴더에 생성 후 선택
  • indylaz.lpk 파일을 \Lib 디렉토리에 복사 하거나 생성된 폴더에 복사 또는 선택
  • 라자루스 Package -> Open package file로 indylaz.lpk 열기
  • Package Options dialog 의 "Unit"필드에 인디 폴더 추가
  • 컴파일 후 설치(라자루스 리빌드). 수정: 현재,알려진 FPC 버그로, 설치 전 인디 TWICE 패키지를 컴파일 해야 한다.

인디10을 사용하려면 프로젝트 옵션 ->컴파일러 옵션->경로의 "Other Unit files (-Fu)"에 인디 디렉토리 추가 후 사용 하면 된다.

윈도우(기본) 설치방법 - Indy 10.2.03

For a lot of users, I'm sure that the information given above won't work, or will be somewhat confusing given the differences between versions and inconsistent explanations.

The website points you to download the latest version from the snapshots page.
This wiki tells you to copy a lot of files over into directories.
For me, neither worked, and ended up making a mess of my Lazarus installations.
  1. 첫번째, 다음 사이트에서 인디 10.2.03 윈도우 버전을 받는다 URL.
    다른곳의 파일은 문제가 있으므로 가급적 이곳에서 받기를 추천한다.
  2. When you open up the archive above, you will see there are folders: "fpc" and "lazarus".
    1. You can copy the contents of "fpc" into: LAZARUS_DIR\fpc\2.6.(0)\source\packages\indylaz if you want to have things neat and tidy.
    2. The "lazarus" folder, you copy into LAZARUS_DIR\components\indylaz
    3. With both of these, make sure that there isn't a sub-directory inside the folders given.
      i.e. LAZARUS_DIR\components\indylaz\lazarus\
  1. Go into Lazarus and go to "Package" -> "Open package file" and point it to the "indylaz.lpk" inside the LAZARUS_DIR\components\indylaz directory.
  2. Once the package loads inside your project, click on the "options" button, which resembles an image of a parcel with a cog next to it.
  3. Click the "Compiler Options" on the left-hand side and Click on the ".." button next to "Other unit files (-Fu) (delimiter is semicolon)".
    Select the "fpc" folder you created above and click OK.
    Lazarus will sort out the relative path for you. Don't change it.
  4. Click OK and compile and then direct angry bile towards the individual who has steered you wrong with the previous, unhelpful, instructions.

윈도우64비트 이슈사항

64비트에서는 아래의 코드가 정상적으로 동작 하지 않습니다. IdAntiFreeze.pas의 내용을 아래와 같이 수정하면 해결할 수 있습니다.

수정전:

type
  TIdAntiFreeze = class(TIdAntiFreezeBase)
  public
    procedure Process; override;
  end; 

수정후:

type
  TIdAntiFreeze = class(TIdAntiFreezeBase)
  public
    {$IFDEF WIN32}
    procedure Process; override;
    {$ENDIF}
  end;

외부 링크