6 Replies - 1057 Views - Last Post: 19 January 2012 - 09:22 AM Rate Topic: -----

Topic Sponsor:

#1 Toadill  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 34
  • View blog
  • Posts: 274
  • Joined: 08-January 12

Delphi 7/ Client game autopatcher using Indy FTP

Posted 08 January 2012 - 06:03 PM

I am not actually a Delphi 7 programmer, but I decided to try to build this project for members of LOMCN a site of programmers and MMORPG gamers. I am however a programmer in C#, C++, VB6, and RPG on the AS/400 mainframe. My other alias is XxEvilDxX.

The idea of this program is to scan all files for the client side of the game and compare them to the files uploaded by the server admin. Any file that is changed would be downloaded ect ect until the game is up to date.

PS. The reason I am trying Delphi instead of VB or C# is because I would like to inter-grade the auto patcher into the game client which is already written in Delphi 7

[Fatal Error] Unit1.pas(9): Unit IdFTPListParseBase was compiled with a different version of IdContainers.TIdObjectList

Posted Image



I am sure whatever the problem is here is common sense to a Delphi programmer. There are quite a few difference from this language to the languages I know.


BTW this is not my school project LMAO. I am currently doing 3D programming in school, and I am a Game Software Development major.
Thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Delphi 7/ Client game autopatcher using Indy FTP

#2 ButchDean  Icon User is offline

  • Pro Games Programmer
  • member icon


Reputation: 689
  • View blog
  • Posts: 2,504
  • Joined: 26-November 10

Re: Delphi 7/ Client game autopatcher using Indy FTP

Posted 08 January 2012 - 06:56 PM

Isn't Delphi pretty much obsolete now, in terms of widespread development?

I think it will be worth your while to research an alternative written in C++ or C#.
Was This Post Helpful? 0
  • +
  • -

#3 Toadill  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 34
  • View blog
  • Posts: 274
  • Joined: 08-January 12

Re: Delphi 7/ Client game autopatcher using Indy FTP

Posted 08 January 2012 - 08:40 PM

View PostButchDean, on 08 January 2012 - 06:56 PM, said:

Isn't Delphi pretty much obsolete now, in terms of widespread development?

I think it will be worth your while to research an alternative written in C++ or C#.



Delphi 7 is still alive and kicking along with Visual Basic 6.0. for now... The O/S is all that really matters in programming. I guess windows 7 is not the best system to be running these files agreed in what you mean, .net is definitely my favorite, but I don't mind learning old languages since a lot old software still needs to be upgraded. To me it has always been a fine art. I enjoy it!

Here is some code

Unit1
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, ComCtrls, StdCtrls, OleCtrls, SHDocVw,
  IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
  IdExplicitTLSClientServerBase, IdFTP;


type
  TfrmMain = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    lblTimeRemaining: TLabel;
    ProgressBar1: TProgressBar;
    lblCurrentFile: TLabel;
    lblPatchNumber: TLabel;
    cmdPlay: TButton;
    WebBrowser1: TWebBrowser;
    lblScrollingMessage: TLabel;
    tmrScrollText: TTimer;
    IdFTP1: TIdFTP;
    procedure tmrScrollTextTimer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmMain: TfrmMain;

implementation

{$R *.dfm}

procedure TfrmMain.tmrScrollTextTimer(Sender: TObject);
begin
lblScrollingMessage.Left:= lblScrollingMessage.Left-1;
If lblScrollingMessage.Left <= 0 Then
  lblScrollingMessage.Left:= 705
end;
procedure TfrmMain.FormCreate(Sender: TObject);
begin
with IdFTP1 do try
  Host := 'FTP.com';
  Username := '';
  Password := '';
  Connect;
  ChangDir('/');
  finally
end;
   try
   IdFTP1.Put('C:\FTPFolder\FTP.txt', 'FTP.txt');
   IdFTP1.Get('FileDownloadFTP.txt', 'C:\FTPFolder\FTP.txt', false);
   finally
   IdFTP1.Disconnect;

  Webbrowser1.Navigate('http://www.google.com');
end;

end.


Was This Post Helpful? 0
  • +
  • -

#4 ButchDean  Icon User is offline

  • Pro Games Programmer
  • member icon


Reputation: 689
  • View blog
  • Posts: 2,504
  • Joined: 26-November 10

Re: Delphi 7/ Client game autopatcher using Indy FTP

Posted 09 January 2012 - 12:26 PM

View PostToadill, on 09 January 2012 - 03:40 AM, said:

The O/S is all that really matters in programming.

Not quite! It's he hardware and the OS. When you delve more into SDKs and maybe cross-platform game development you will see exactly what I mean. :)
Was This Post Helpful? 0
  • +
  • -

#5 Toadill  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 34
  • View blog
  • Posts: 274
  • Joined: 08-January 12

Re: Delphi 7/ Client game autopatcher using Indy FTP

Posted 09 January 2012 - 12:37 PM

View PostButchDean, on 09 January 2012 - 12:26 PM, said:

View PostToadill, on 09 January 2012 - 03:40 AM, said:

The O/S is all that really matters in programming.

Not quite! It's he hardware and the OS. When you delve more into SDKs and maybe cross-platform game development you will see exactly what I mean. :)


Yeah I can see where you are coming from, since even hardware needs software to run( drivers)
So far I have only used Direct X... I just can't learn enough. :wacko:
Was This Post Helpful? 0
  • +
  • -

#6 stayscrisp  Icon User is offline

  • Lets-a play!
  • member icon

Reputation: 800
  • View blog
  • Posts: 3,690
  • Joined: 14-February 08

Re: Delphi 7/ Client game autopatcher using Indy FTP

Posted 10 January 2012 - 02:21 AM

Then keep learning until you do :P
Was This Post Helpful? 0
  • +
  • -

#7 Toadill  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 34
  • View blog
  • Posts: 274
  • Joined: 08-January 12

Re: Delphi 7/ Client game autopatcher using Indy FTP

Posted 19 January 2012 - 09:22 AM

I figured out that I was using the wrong version of Delphi for the component to work.
I am now building the auto patcher, with little problem so far. This code does work. Except I want to be able to download all files in the root directory. I am using FileZilla as the server.

Here is my code so far downloads one file at the moment.

procedure TfrmMain.Button1Click(Sender: TObject);
var
numFiles : Integer;
I : Integer;
FilesFtp : array of String;
begin
  if FTP.Connected then
  begin
    FTP.Disconnect;
  end
  else
  begin
  FTP := TIdFTP.Create( nil );
  //Built using filezilla server.
  with FTP do try

    Passive := True;    //adjust the firewall
    Host := '127.0.0.1';  //set the host
    Username := 'anonymous'; //set the user name
    Password := '';      //set a password
    Port:= 21;         //set the port
    Connect;
    ChangeDir('/')     //move to root directory
    finally
  end;

  if (FTP.Size('/') > 0)
  then
  else
  begin
  //populated the list box with all files FTP server
  FTP.list(ListBox1.Items,'*.ZIP',false);

  //count the files in the directory listing
  //numFiles := FTP.DirectoryListing.Count;
  //SetLength(FilesFtp, numFiles);

  //for I:= 0 to numFiles - 1 do
  //FilesFtp := FTP.DirectoryListing.Items.FileName;

  //IdFTP.Get('SourceFIle: String', 'Destination File: String', 'OverWrite: Boolean', 'Resume : Boolean');
  FTP.Get('FTP.zip', 'C:\Test\Test2\FTP.zip', true);    //Download files.
  FTP.Disconnect;   //disconnect
  end;
  end;
end;



autopatcher.jpg

This post has been edited by Toadill: 19 January 2012 - 09:38 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1