4

I want to use FTP in my current project, but since Qt5 ftp isn't available (only as add-on).

I downloaded the sources from here: https://github.com/qt/qtftp In Qt's forum, I found a instruction how to use it:

  1. Open Console in the qtftp-folder
  2. Generate the headers: cd qtftp, <QTDIR>/bin/syncqt.pl -version 5.2.0
  3. Run qmake
  4. Run make (mingw32-make)
  5. Run make install (mingw32-make install)
  6. Add QT += ftp in my .pro-file
  7. Run qmake on my project
  8. compile my project.

(https://forum.qt.io/topic/23904/qtftp-and-qthttp-compatibility-add-ons-for-qhttp-and-qftp-classes-in-qt-5)

So, I wanted to try these steps, but it fails on the first step, because the syncqt.pl cant be found, but I looked in the Qt-directory, and the file is there.

Anybody has an idea, how to fix/solve this? I am using Qt5.9.1

erniberni
  • 313
  • 5
  • 17
  • 1
    I guess you mean it fails on the 2. step? Anyway if the syncqt.pl file is there how does it fail? Are you calling the perl script the right way? If you're on windows and have perl installed but not added to the path you need to call it with a absolute path where the perl.exe is located. – xander Jan 02 '18 at 09:56
  • Sorry, my fault, i mean 2. step. Ehm, I only typed the code from step 2 in the console, I didnt do anything with "perl" and it doesnt seem that I have it installed. – erniberni Jan 02 '18 at 10:36
  • Well `syncqt.pl` is a perl script, you can't just run it like that. Just search for "How to run a perl script on windows", there should be enough answers. :) – xander Jan 02 '18 at 10:39
  • Thank you very much, I will have a look at it later or tomorrow and tell if I can do it or not :) – erniberni Jan 02 '18 at 11:05
  • So, I've downloaded a portable version of strawberry-perl, but I cant figure out how to run the script. I open the portableshell.bat (cmd), change directory to the qtftp-folder, and then try to run the syncqt.pl, but I still get the message, that it cant be found. – erniberni Jan 04 '18 at 06:32
  • I got it now, see my answer, thanks for your help xander! :) – erniberni Jan 04 '18 at 06:37

1 Answers1

1

If you have downloaded the portable version of strawberry-perl like me, just extract .zip somewhere on your disk. After that, open the portableshell.bat (it should open a command prompt window) After that, you can type in the code of step 2, and don't forget to add the -version argument.

Then you can continue with step 3, and everything should work without any problems.

erniberni
  • 313
  • 5
  • 17