qLab / qLib

A procedural asset library for SideFX Houdini. https://www.facebook.com/qLibHoudini
http://qlab.github.io/qLib
Other
743 stars 116 forks source link

Make qlib_package.json platform agnostic #1440

Closed cfxegbert closed 2 months ago

cfxegbert commented 6 months ago
{
  "path": "$QLIB",
  "load_package_once": true,
  "recommends": "houdini_version >= '17.5.321'",
  "env": [
    {
      "var": "QLIB",
      "value": "$HOUDINI_PACKAGE_PATH"
    },
    {
      "var": "QOTL",
      "value": "$QLIB/otls"
    },
    {
      "var": "HOUDINI_OTLSCAN_PATH",
      "value": [
        "$QOTL/base",
        "$QOTL/experimental",
        "$QOTL/future"
      ],
      "method": "append"
    }
  ]
}

At load time $HOUDINI_PACKAGE_PATH resolves to the directory where the json file was found. With this you do not have to edit the json file.

johnnyquest commented 6 months ago

Hey @cfxegbert thanks for the tip -- not sure what you mean by "platform agnostic", is that refer to the "var": / "value" syntax, or the use of $HOUDINI_PACKAGE_PATH ? I'm not sure how the latter would make things platform agnostic?

cfxegbert commented 6 months ago

Right now you have a linux version that uses ":" as a separator and a windows version that uses ";". Houdini will handle both no matter the platform BTW. The main advantages are the use of the HOUDINI_PACKAGE_PATH and the appending of the values to the built-in Houdini values.

johnnyquest commented 3 months ago

The main advantages are the use of the HOUDINI_PACKAGE_PATH and the appending of the values to the built-in Houdini values.

@cfxegbert The assumption with not using it like that is that the qLib package content itself will be in a separate folder somewhere (as opposed to be residing in the "packages" folder). I'm happy to consider this though if it makes installation easier.

So far I did all the changes you suggested, currently in qLib_package_linux.json, if that looks ok (and/or if I can do some testing on windows at some point) I can unify the two files.

johnnyquest commented 3 months ago

@cfxegbert let me know if it looks ok to you, 0.2.255

johnnyquest commented 2 months ago

@cfxegbert ^^^^ please see 0.2.256, there's a single qLib_package.json now