Skip to content

Generator script expects python3 on Windows #40

Description

@Wyverex42

generate-openxr-hpp.ps1 currently expects the Python executable to be named python3. However, that's not always the case. If you install Python via https://www.python.org/downloads/, the executable is called python, even though it's v3 and not v2. Not sure if that has changed with any particular minor version of Python. Maybe the executable downloaded from the Microsoft store is still called python3 (as alluded to in the error message below).

PS C:\dev\OpenXR-1.0.26\OpenXR-Hpp> .\generate-openxr-hpp.ps1
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Generation failed while generating openxr_atoms.hpp :
At C:\dev\OpenXR-1.0.26\OpenXR-Hpp\generate-openxr-hpp.ps1:58 char:9
+         throw "Generation failed while generating ${header} : ${proce ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Generation fail...xr_atoms.hpp : :String) [], RuntimeException
    + FullyQualifiedErrorId : Generation failed while generating openxr_atoms.hpp :

PS C:\dev\OpenXR-1.0.26\OpenXR-Hpp> python
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

Bottom line is that the script should be more lenient towards the name of the executable and potentially try both?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions