Recent

Author Topic: [SOLVED] idHTTP component  (Read 12600 times)

yawa16

  • New Member
  • *
  • Posts: 10
[SOLVED] idHTTP component
« on: May 14, 2014, 09:00:17 pm »
At the moment I have an application for which I make new versions regularly, and I want my application to check for a newer version. I almost figured out how to do this (by checking the contents of a textfile on a server), but I need somethink like an idHTTP component. I had hoped my physics teacher could explain me how to get this component, but he uses Delphi and idHTTP is apparently a standard component in Delphi. After some searching on Google I found out I need to install Indy or Synapse or something like that, but I'm a newbie to Lazarus and didn't manage to get Indy or Synapse working correctly. Does anyone know a good and easy tutorial? English isn't my first language (as you might have noticed) so that could be the cause of a wrong installation
« Last Edit: May 20, 2014, 01:48:27 pm by yawa16 »

mica

  • Full Member
  • ***
  • Posts: 196
Re: idHTTP component
« Reply #1 on: May 15, 2014, 06:49:42 am »

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: idHTTP component
« Reply #2 on: May 15, 2014, 07:04:44 am »
Hey, there's so many great things!

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: idHTTP component
« Reply #3 on: May 15, 2014, 07:12:39 am »
have a look at http://wiki.lazarus.freepascal.org/Indy_with_Lazarus#How_to_install_.5B3.5D_Windows.2C_Indy_10.5.8.0_and_above and follow the steps there. Make sure you download the nightly build snapshot and follow those steps to the letter and you should be fine. I installed them the same way. Be careful what you use and the license its attach to it eg GPL requires to open source you entire application as GPL too its ok for a school project but for any commercial endeavor I would keep my distance from gpl and lgpl until I'm sure I will not have problems using them in closed source ee the static linking exception of lcl is a good start.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

JD

  • Hero Member
  • *****
  • Posts: 1907
Re: idHTTP component
« Reply #4 on: May 15, 2014, 01:44:42 pm »
Here is a Lazarus project using Indy's IdHTTP that I converted from a Delphi example I got from the Internet some years ago.

It downloads a file from the SysInternals site & saves it to your hard disk. You just need to replace source file name with the location of your own application & you are good to go. The progress bar shows the progress of the download operation so you have a visual indicator for your users.

To avoid errors, be sure to supply the full path name to where the downloaded file will be saved (see example screenshot). I can assure you that it works as I tested it again today before posting it.

Good luck,

JD

NOTE: It should work for Windows & Linux (not tested on recent versions though)
« Last Edit: May 15, 2014, 02:01:24 pm by JD »
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

yawa16

  • New Member
  • *
  • Posts: 10
Re: idHTTP component
« Reply #5 on: May 17, 2014, 10:15:54 pm »
Thanks taazz, I did something wrong last time I suppose. I did follow those steps more or less, apparently not strict enough. It works now! :D

 

TinyPortal © 2005-2018