jurplel / install-qt-action

Install Qt on your Github Actions workflows with just one simple action
MIT License
473 stars 81 forks source link

Add tools tool PATH #75

Closed hasselmm closed 3 years ago

hasselmm commented 3 years ago

After installing tools like Ninja or MINGW64 via aqtinstall they should be added to the PATH variable, so that they can be used easily without complex hacks.

hasselmm commented 3 years ago

I can't "npm run build" the action because of this error:

src/main.ts:6:30 - error TS2307: Cannot find module 'setup-python/lib/find-python'.

6 import * as setupPython from 'setup-python/lib/find-python'

Do you have an idea what could be wrong? Actually I am almost clueless about Node and Typescript.

pzhlkj6612 commented 3 years ago

Hi. I noticed that mingw32-make.exe can be called directly without specifying the path before install Qt on windows-latest 20201210.0.

In PowerShell,

Get-Command -Name 'mingw32-make.exe' | Format-List
Name            : mingw32-make.exe
CommandType     : Application
Definition      : C:\ProgramData\Chocolatey\bin\mingw32-make.exe
Extension       : .exe
Path            : C:\ProgramData\Chocolatey\bin\mingw32-make.exe
FileVersionInfo : File:             C:\ProgramData\Chocolatey\bin\mingw32-make.exe
                  InternalName:     mingw32-make.exe
                  OriginalFilename: mingw32-make.exe
                  FileVersion:      0.8.1.0
                  FileDescription:  ShimGen generated shim - shim
                  Product:          ShimGen generated shim
                  ProductVersion:   0.8.1
                  Debug:            False
                  Patched:          False
                  PreRelease:       False
                  PrivateBuild:     False
                  SpecialBuild:     False
                  Language:         Language Neutral

Or, in CMD,

where "mingw32-make.exe"
C:\ProgramData\Chocolatey\bin\mingw32-make.exe

So I guess there may be some conflicts with Chocolatey if install-qt-action puts tools' bin path into PATH.


Currently, I have to use the path ${Env:\Qt5_Dir}\..\..\Tools\mingw810_64\bin\mingw32-make.exe to call the Qt's one.

jurplel commented 3 years ago

I will add an environment variable $iqta_tools for this. @hasselmm You have to run:

npm install
npm run-script build-setup-python
npm run-script build
pzhlkj6612 commented 3 years ago

Hi, @jurplel . If multiple tools are installed, which path does $iqta_tools point to?

jurplel commented 3 years ago

It will point to the parent tools directory

pzhlkj6612 commented 3 years ago

Got it, thank you.

jurplel commented 3 years ago

You're welcome.

jurplel commented 3 years ago

Updated now