Skip to content
  • Chun-wei Fan's avatar
    utils.py: Improve .gir search on Windows · be9df05d
    Chun-wei Fan authored
    On Windows, we tend to look for .gir files in the $(prefix) directory
    indicated by $(prefix)/bin/g-ir-scanner when running g-ir-scanner, so:
    
    *  We add a special case for find_program() to look for g-ir-scanner on
       Windows without any executable extensions, since that is how
       g-ir-scanner is being deployed as a Python script.
    
    *  Update default_search_paths() to first look for the presence of
       g-ir-scanner, and use its "installation prefix" to construct the
       default path where g-ir-scanner looks for the .gir files.
    
    This way, we can make gi-docgen work better on Visual Studio builds
    where Python (i.e. the official binary installers from www.python.org)
    is generally installed seperately from the $(prefix) of our GNOME stack,
    meaning that we can reduce the need to copy the dependent .gir files
    from under our $(prefix).
    be9df05d