Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding > Coding Tutorials
You last visited: Today at 03:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Delphi][Tut][ENG] Update System

Discussion on [Delphi][Tut][ENG] Update System within the Coding Tutorials forum part of the General Coding category.

Reply
 
Old   #1
 
CappieW's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 19
Received Thanks: 1
[Delphi][Tut][ENG] Update System

How many tags u.u
Well, let's start with the tutorial.

Well, it's a simple system, it downloads an program/file/something from your FTP.

in Uses put urlmon,shellapi;

Add the function:
Code:
function DownloadFile(Source, Dest: string): Boolean;
begin
try
Result:= UrlDownloadToFile(nil, PChar(source),PChar(Dest), 0, nil) = 0;
except
Result:= False;
end;
end;
Add the component IdHTTP1 in the Indy Clients pallet.
Add a TMemo in the standard pallet.

Now, do an archive ".txt" called "Verify" inside it, write the name of your form.
Example: CappieWilliams Likes Chocolate v1.0.

Upload it in an FTP folder, now make a button in your program and add the code below:
Code:
//Gets the Verify.txt and write in the memo
Memo1.Lines.text:=IdHTTP1.Get('http://www.elitepvpers.com/Verify.txt');

//If it's written the same name of the form on the memo, it will say that is already updated
if Memo1.Lines.Text = LoaderForm.caption then begin
MessageBeep(MB_ICONERROR);
showmessage('You already have the newest version!');
end else

//If it's not written in the .txt archive it will update
if messagedlg('There's a new version, want to update?',mtconfirmation,[mbyes,mbno],0)=mryes then
begin

//Download the archive and save in the archive folder with the "CappieWilliams" name XD
if DownloadFile ('http://www.elitepvpers.com/CappieWilliams.exe','CappieWilliams.exe') then

//Make an OK! sound
MessageBeep(MB_OK);

//If the archive exists, appear a succes message
if fileexists('CappieWilliams.exe') then begin

//Give a message telling that it's updated and close the program and open again!
showmessage('Update complete, click on OK to restart the application!');
application.terminate;
shellexecute (handle, 'open', 'CappieWilliams.exe', '', nil, sw_shownormal);
end;
end;
Conclusion: It'll see if it's written CappieWilliams Likes Chocolate v1.0 in the archive, and see if the form is also written as CappieWilliams Likes Chocolate v1.0, if they're the same, a message box will appear telling you that is already updated and won't do anything. But if you write "Cappie'sAwesome" in the .txt archive, it'll update (:

But, in the place of writting "Cappie'sAwesome" you write CappieWilliams Likes Chocolate v2.0 and in the v2.0 you edit from 1.0 to 2.0 to read on the archive, got it?

Credits: Cappie Williams (CappieW), made only for elitepvpers.com.
If you have some question, just ask here or send an PM.

Cya.
CappieW is offline  
Old 03/19/2010, 20:52   #2
 
CappieW's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 19
Received Thanks: 1
62 Views, 0 Comments D:
CappieW is offline  
Old 03/19/2010, 21:00   #3
 
HardCore.1337's Avatar
 
elite*gold: 1
Join Date: Feb 2009
Posts: 1,726
Received Thanks: 729
take the Indy Components

Edit: Linking the Website about the Indy Components, because the Indy Components available are only in D7 and higher
HardCore.1337 is offline  
Reply


Similar Threads Similar Threads
DELPHI - Who make Exploits, Hacks and Tools with DELPHI?
05/15/2013 - CO2 Programming - 13 Replies
Hi all. Iwith DELPHI, but a dont now. hello, I use Delphi to program and i like someone put here source code of make Exploits, Hacks and Tools bot here, or part of the code. ty to all
update (clan system?)
03/17/2010 - WarRock - 4 Replies
hi leute, was kommt da wieder für ein update?...könnte es vlt das neue clansystem sein? das letzte kam ja auch vor ca. 1 jahr...
[DELPHI&METIN]Wie sind die Delphi Befehle für einen Bot?
03/07/2010 - General Coding - 3 Replies
Hallo liebe com, ich habe mal eine Frage: Ich möchte einen Metin Bot in Delphi schreiben aber ich weiß nicht die Befehle für eine bestimmte Taste senden etc. könnt ihr mir die pls sagen oder per pn geben MfGGGGGG
Blog system update
11/28/2009 - Main - 29 Replies
We've just updated the blog system, please report all bugs in this topic. Some of the new features in Blog 2 include: Blog Customization - users may customize their blogs in the same manner that they can customize their user profiles. Group Blogs - users may allow other users to post to their blog. Sidebar Blocks - users may create custom blocks to display in their sidebar. These blocks can be rearranged by drag and drop. Custom Pages - users may create custom pages to be displayed in...
DK-Update System for Developers ( Delphi Req. ) beta 1.0 *UPDATED
11/27/2009 - Dekaron Private Server - 14 Replies
Attachmend was deleted thanks to janvier123. Project CLosed! Tipp: Get Delphi Personal 2005 .. 4Free! No warez, 100% working, your own orginal (Non Trial) key! Simple Programing language (like lua Scripting lang), easy to learn! Update: New version of the manager, they works fully! DKUtils and Exampe Project are includes, have fun! Hello i have writen an Update Engine for Dekaron! Only for Developers with Delphi or another language, with this engine u can Make ur Own Luncher...



All times are GMT +1. The time now is 03:43.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.