SRL Archive - Delphi/FPC Help and Tutorials

How to Publish a delphi app?


Awkwardsaw

2009-05-29 02:12:51

im starting delphi(it looks fun, and should be easy since im already used to scar)
and i made a simple application, a calculator :)

what i want to know, is how do you publish it, or let other people see your work?

do you just save it as a .zip/.rar file, and attatch it?

if so, what are the things that you need in the .zip file

thanks in advanced :)

and, the code:

unit SimpleCalc;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
AnswerL: TLabel;
Label2: TLabel;
Label3: TLabel;
addition: TButton;
subtraction: TButton;
Multiplication: TButton;
Division: TButton;
Clear: TButton;
MBA: TLabel;
procedure FormCreate(Sender: TObject);
procedure additionClick(Sender: TObject);
procedure subtractionClick(Sender: TObject);
procedure MultiplicationClick(Sender: TObject);
procedure DivisionClick(Sender: TObject);
procedure ClearClick(Sender: TObject);
procedure MBAMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure MBAMouseLeave(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.text:= inttostr(0);
edit2.Text:= inttostr(0);
end;

procedure TForm1.additionClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 + num2;
AnswerL.Caption:= (floattostr(a));
end;

procedure TForm1.subtractionClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 - num2;
AnswerL.Caption:= (floattostr(a));
end;

procedure TForm1.MultiplicationClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 * num2;
AnswerL.Caption:= (floattostr(a));
end;

procedure TForm1.DivisionClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 / num2;
AnswerL.Caption:= (floattostr(a));
end;

procedure TForm1.ClearClick(Sender: TObject);
begin
edit1.Text := '0';
edit2.Text := '0';
AnswerL.Caption := 'Answer';
end;

procedure TForm1.MBAMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
MBA.Caption := 'Found me!';
end;

procedure TForm1.MBAMouseLeave(Sender: TObject);
begin
MBA.Caption := 'Made By Akwardsaw';
end;

end.

Cazax

2009-05-29 02:16:10

Once you run the project, a .exe file is created in the project's folder. zip or rar the executable file along with the source, that means the .dpr, .pas and .dfm (I think that's enough to successfully compile the project). You can also post the sauce so we can look at it without downloading anything :)

Awkwardsaw

2009-05-29 02:24:52

thanks cazax :) testing out now, as in uploading into main post