Skycoder42 / QtService

A platform independent library to easily create system services and use some of their features

Home Page:https://skycoder42.github.io/QtService/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qmake error build QtService

andreasfranke opened this issue · comments

Following steps to build QtService on a Windows 10 system with Visual Studio 2022/2019 and Qt 5.15.11:

  • qdep installed using pip install qdep

  • qdep prfgen --qmake "C:\Qt\5.15.11\msvc2019_64\bin\qmake.exe"
    Generating PRF-File as: C:/Qt/5.15.11/msvc2019_64\mkspecs\features\qdep.prf

  • set PATH=C:\Qt\5.15.11\msvc2019_64\bin;%PATH%

  • git clone https://github.com/Skycoder42/QtService.git

  • mkdir buildQtService && cd buildQtService

  • qmake ..\buildQtService -r
    results in the following error:
    Info: creating stash file C:\Users\<USER>\source\repos\buildQtService\.qmake.stash Info: creating cache file C:\Users\<USER>\source\repos\buildQtService\.qmake.cache Reading C:/Users/<USER>/source/repos/QtService/src/src.pro [C:/Users/<USER>/source/repos/buildQtService/src] Reading C:/Users/<USER>/source/repos/QtService/src/service/service.pro [C:/Users/<USER>/source/repos/buildQtService/src/service] Project MESSAGE: perl -w C:\Qt\5.15.11\msvc2019_64\bin\syncqt.pl -module QtService -version 2.0.2 -outdir C:/Users/<USER>/source/repos/buildQtService -builddir C:/Users/<USER>/source/repos/buildQtService C:/Users/<USER>/source/repos/QtService <srcbase> = C:/Users/<USER>/source/repos/QtService <bldbase> = C:/Users/<USER>/source/repos/buildQtService <outbase> = C:/Users/<USER>/source/repos/buildQtService QtService: created fwd-include header(s) for <srcbase>/src/service/ { qtservice_global.h (1), qtservice_helpertypes.h (1), service.h (2), service_p.h (1), servicebackend.h (2), servicebackend_p.h (1), servicecontrol.h (2), servicecontrol_p.h (1), serviceplugin.h (2), terminal.h (2), terminal_p.h (1), terminalclient_p.h (1), terminalserver_p.h (1) } QtService: created version header QtService: created master header QtService: created headers.pri file 'C:\Program' is not recognized as an internal or external command, operable program or batch file. Project ERROR: qdep.py script version () is different to qdep.prf version (1.1.1)! Run 'C:\Program Files\Anaconda3\Scripts\qdep.exe prfgen --qmake C:/Qt/5.15.11/msvc2019_64/bin/qmake.exe' to update the prf file!

I need information on what could be causing the error. I have followed the instructions, but without success.

@Skycoder42 Thank you for the project. So far I used a very old (from Qt4 times) version of QtService and wanted to switch to something more recent for a new project ;0)

Update. I found out that the error comes from the generated qdep.prf.
isEmpty(QDEP_PATH) { QDEP_PATH = C:\Program Files\Anaconda3\Scripts\qdep win32: QDEP_PATH = $${QDEP_PATH}.exe }

The qdep.exe is located in the C:\Program Files\Anaconda3\Scripts\ directory and is not processed correctly because of the space character. Question is, how can I generate a correct qdep.prf here?

Hi. Yes, this is correct. qdep cannot work with spaces. You can fix the file manually by quoting the variable. Alternatively, move your python installation somewhere without a space in the path.

Also, please note that this repository is not active developed anymore.

Sorry for the late reply. Can you show me how to "quoting the vairable"? So far I have not managed to process the variable so that it is quoted (in the prf file).

isEmpty(QDEP_PATH) { 
  QDEP_PATH = "C:\Program Files\Anaconda3\Scripts\qdep"
  win32: QDEP_PATH = "$${QDEP_PATH}.exe"
}

Ok, you mean I need to hardcode the path. I thought I could somehow process the variable in the form QDEP_PATH = "$(QDEP_PATH)" . Thank you