From 5b1fcb27cea4d1393cdd6ce44f19dfbdc6c7e39a Mon Sep 17 00:00:00 2001 From: maximcapra Date: Thu, 19 Sep 2024 16:38:46 +0200 Subject: [PATCH 1/3] package and houdini.env changes added macos example files and adjusted paths for that. --- .gitignore | 1 + houdini.env_linux | 2 +- houdini.env_macos | 18 ++++++++++++++++++ houdini.env_windows | 4 ++-- qLib_package_macos.json | 24 ++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 houdini.env_macos create mode 100644 qLib_package_macos.json diff --git a/.gitignore b/.gitignore index 4118ad55..0bfddb5d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ gallery/backup .lock* build/* +.DS_Store diff --git a/houdini.env_linux b/houdini.env_linux index 2266d4e0..69ae7864 100644 --- a/houdini.env_linux +++ b/houdini.env_linux @@ -9,7 +9,7 @@ # QLIB variable should point to the downloaded and extracted qLib package # ($HIH is the $HOME/houdiniXX.X folder) # -QLIB=$HIH/qLib-dev +QLIB=$HIH/qLib-master QOTL=$QLIB/otls HOUDINI_OTLSCAN_PATH = $QOTL/base:$QOTL/future:$QOTL/experimental:$HOUDINI_OTLSCAN_PATH:& diff --git a/houdini.env_macos b/houdini.env_macos new file mode 100644 index 00000000..24c3a388 --- /dev/null +++ b/houdini.env_macos @@ -0,0 +1,18 @@ +# houdini.env +# =========== +# +# example snippet (macos) +# +# +# + +# QLIB variable should point to the downloaded and extracted qLib package +# +QLIB=$HOME/Library/Preferences/houdini/qLib-master +QOTL=$QLIB/otls + +HOUDINI_OTLSCAN_PATH = $QOTL/base;$QOTL/future;$QOTL/experimental;$HOUDINI_OTLSCAN_PATH;& +HOUDINI_PATH = $QLIB;& + +# alternatively, you can try this -- +# HOUDINI_PATH = $QLIB;$HOUDINI_PATH;& diff --git a/houdini.env_windows b/houdini.env_windows index a8eb7c19..cf3b4f88 100644 --- a/houdini.env_windows +++ b/houdini.env_windows @@ -1,7 +1,7 @@ # houdini.env # =========== # -# example snippet (linux) +# example snippet (windows) # # # @@ -9,7 +9,7 @@ # QLIB variable should point to the downloaded and extracted qLib package # ($HIH is the $HOME/houdiniXX.X folder) # -QLIB=$HIH/qLib-dev +QLIB=$HIH/qLib-master QOTL=$QLIB/otls HOUDINI_OTLSCAN_PATH = $QOTL/base;$QOTL/future;$QOTL/experimental;$HOUDINI_OTLSCAN_PATH;& diff --git a/qLib_package_macos.json b/qLib_package_macos.json new file mode 100644 index 00000000..3e11ade9 --- /dev/null +++ b/qLib_package_macos.json @@ -0,0 +1,24 @@ +{ + "path": "$QLIB", + "load_package_once": true, + "recommends": "houdini_version >= '17.5.321'", + + "env": [ + { + "QLIB": "$HOME/Library/Preferences/houdini/qLib-master" + }, + { + "QOTL": "$QLIB/otls" + }, + { + "var": "HOUDINI_OTLSCAN_PATH", + "value": [ + "$QOTL/base", + "$QOTL/future", + "$QOTL/experimental" + ], + "method": "append" + } + ] +} + From 42e3a55d369c5975c1a10e3eba7c91534b311891 Mon Sep 17 00:00:00 2001 From: maximcapra Date: Fri, 20 Sep 2024 11:20:00 +0200 Subject: [PATCH 2/3] changed $HIH to $HOUDINI_USER_PREF_DIR changes across the repo --- MainMenuCommon.xml | 4 ++-- config/README.txt | 2 +- help/qlib/mainmenu/index.txt | 2 +- houdini.env_linux | 4 ++-- houdini.env_macos | 3 ++- houdini.env_windows | 4 ++-- qLib_package_linux.json | 2 +- qLib_package_macos.json | 2 +- qLib_package_windows.json | 2 +- scripts/OnCreated.py_ | 2 +- 10 files changed, 14 insertions(+), 13 deletions(-) diff --git a/MainMenuCommon.xml b/MainMenuCommon.xml index 4b7fd1ce..04a54f79 100644 --- a/MainMenuCommon.xml +++ b/MainMenuCommon.xml @@ -49,9 +49,9 @@ import qlibutils; qlibutils.open_hda_dirs()]]> - + +import qlibutils; qlibutils.open_dir(env="HOUDINI_USER_PREF_DIR")]]> diff --git a/config/README.txt b/config/README.txt index 04663b9c..613700b2 100644 --- a/config/README.txt +++ b/config/README.txt @@ -5,7 +5,7 @@ Configuration-related files install location: $HOME/houdiniXX.X/config - $HIH/config + $HOUDINI_USER_PREF_DIR/config diff --git a/help/qlib/mainmenu/index.txt b/help/qlib/mainmenu/index.txt index 0589b0d4..e42219d0 100644 --- a/help/qlib/mainmenu/index.txt +++ b/help/qlib/mainmenu/index.txt @@ -62,7 +62,7 @@ Open in File Browser: Opens the folder(s) that contain the definitions of the currently selected HDAs or complied plug-in DSOs (DLLs). - $HIH: User Config Files...: + $HOUDINI_USER_PREF_DIR: User Config Files...: Opens the user's preferences folder (usually called _houdiniXX.X_). diff --git a/houdini.env_linux b/houdini.env_linux index 69ae7864..09253c12 100644 --- a/houdini.env_linux +++ b/houdini.env_linux @@ -7,9 +7,9 @@ # # QLIB variable should point to the downloaded and extracted qLib package -# ($HIH is the $HOME/houdiniXX.X folder) +# ($HOUDINI_USER_PREF_DIR is the $HOME/houdiniXX.X folder) # -QLIB=$HIH/qLib-master +QLIB=$HOUDINI_USER_PREF_DIR/qLib-master QOTL=$QLIB/otls HOUDINI_OTLSCAN_PATH = $QOTL/base:$QOTL/future:$QOTL/experimental:$HOUDINI_OTLSCAN_PATH:& diff --git a/houdini.env_macos b/houdini.env_macos index 24c3a388..9b33cd9a 100644 --- a/houdini.env_macos +++ b/houdini.env_macos @@ -7,8 +7,9 @@ # # QLIB variable should point to the downloaded and extracted qLib package +# ($HOUDINI_USER_PREF_DIR is the $HOME/houdiniXX.X folder) # -QLIB=$HOME/Library/Preferences/houdini/qLib-master +QLIB=$HOUDINI_USER_PREF_DIR/qLib-master QOTL=$QLIB/otls HOUDINI_OTLSCAN_PATH = $QOTL/base;$QOTL/future;$QOTL/experimental;$HOUDINI_OTLSCAN_PATH;& diff --git a/houdini.env_windows b/houdini.env_windows index cf3b4f88..15e10552 100644 --- a/houdini.env_windows +++ b/houdini.env_windows @@ -7,9 +7,9 @@ # # QLIB variable should point to the downloaded and extracted qLib package -# ($HIH is the $HOME/houdiniXX.X folder) +# ($HOUDINI_USER_PREF_DIR is the $HOME/houdiniXX.X folder) # -QLIB=$HIH/qLib-master +QLIB=$HOUDINI_USER_PREF_DIR/qLib-master QOTL=$QLIB/otls HOUDINI_OTLSCAN_PATH = $QOTL/base;$QOTL/future;$QOTL/experimental;$HOUDINI_OTLSCAN_PATH;& diff --git a/qLib_package_linux.json b/qLib_package_linux.json index eec33900..fab1e978 100644 --- a/qLib_package_linux.json +++ b/qLib_package_linux.json @@ -5,7 +5,7 @@ "env": [ { - "QLIB": "$HIH/qLib-master" + "QLIB": "$HOUDINI_USER_PREF_DIR/qLib-master" }, { "QOTL": "$QLIB/otls" diff --git a/qLib_package_macos.json b/qLib_package_macos.json index 3e11ade9..fab1e978 100644 --- a/qLib_package_macos.json +++ b/qLib_package_macos.json @@ -5,7 +5,7 @@ "env": [ { - "QLIB": "$HOME/Library/Preferences/houdini/qLib-master" + "QLIB": "$HOUDINI_USER_PREF_DIR/qLib-master" }, { "QOTL": "$QLIB/otls" diff --git a/qLib_package_windows.json b/qLib_package_windows.json index f0243ecf..644d405b 100644 --- a/qLib_package_windows.json +++ b/qLib_package_windows.json @@ -3,7 +3,7 @@ "env": [ { - "QLIB": "$HIH/qLib-master" + "QLIB": "$HOUDINI_USER_PREF_DIR/qLib-master" }, { "QOTL": "$QLIB/otls" diff --git a/scripts/OnCreated.py_ b/scripts/OnCreated.py_ index 1af2e076..9da661c1 100644 --- a/scripts/OnCreated.py_ +++ b/scripts/OnCreated.py_ @@ -7,7 +7,7 @@ @brief Automatic coloring of newly created nodes. - Location: $HIH/scripts/ + Location: $HOUDINI_USER_PREF_DIR/scripts/ Note: this script is automatically reloaded on each node creation! From 32c7d30f23a85cb9af70732c72dc61eade691600 Mon Sep 17 00:00:00 2001 From: maximcapra Date: Fri, 20 Sep 2024 13:26:22 +0200 Subject: [PATCH 3/3] package consolidation and windows subprocess call bugfix --- houdini.env_linux => houdini.env | 0 houdini.env_macos | 19 ---------------- houdini.env_windows | 19 ---------------- qLib_package_linux.json => qLib_package.json | 0 qLib_package_macos.json | 24 -------------------- qLib_package_windows.json | 18 --------------- scripts/python/qlibutils.py | 2 +- 7 files changed, 1 insertion(+), 81 deletions(-) rename houdini.env_linux => houdini.env (100%) delete mode 100644 houdini.env_macos delete mode 100644 houdini.env_windows rename qLib_package_linux.json => qLib_package.json (100%) delete mode 100644 qLib_package_macos.json delete mode 100644 qLib_package_windows.json diff --git a/houdini.env_linux b/houdini.env similarity index 100% rename from houdini.env_linux rename to houdini.env diff --git a/houdini.env_macos b/houdini.env_macos deleted file mode 100644 index 9b33cd9a..00000000 --- a/houdini.env_macos +++ /dev/null @@ -1,19 +0,0 @@ -# houdini.env -# =========== -# -# example snippet (macos) -# -# -# - -# QLIB variable should point to the downloaded and extracted qLib package -# ($HOUDINI_USER_PREF_DIR is the $HOME/houdiniXX.X folder) -# -QLIB=$HOUDINI_USER_PREF_DIR/qLib-master -QOTL=$QLIB/otls - -HOUDINI_OTLSCAN_PATH = $QOTL/base;$QOTL/future;$QOTL/experimental;$HOUDINI_OTLSCAN_PATH;& -HOUDINI_PATH = $QLIB;& - -# alternatively, you can try this -- -# HOUDINI_PATH = $QLIB;$HOUDINI_PATH;& diff --git a/houdini.env_windows b/houdini.env_windows deleted file mode 100644 index 15e10552..00000000 --- a/houdini.env_windows +++ /dev/null @@ -1,19 +0,0 @@ -# houdini.env -# =========== -# -# example snippet (windows) -# -# -# - -# QLIB variable should point to the downloaded and extracted qLib package -# ($HOUDINI_USER_PREF_DIR is the $HOME/houdiniXX.X folder) -# -QLIB=$HOUDINI_USER_PREF_DIR/qLib-master -QOTL=$QLIB/otls - -HOUDINI_OTLSCAN_PATH = $QOTL/base;$QOTL/future;$QOTL/experimental;$HOUDINI_OTLSCAN_PATH;& -HOUDINI_PATH = $QLIB;& - -# alternatively, you can try this -- -# HOUDINI_PATH = $QLIB;$HOUDINI_PATH;& diff --git a/qLib_package_linux.json b/qLib_package.json similarity index 100% rename from qLib_package_linux.json rename to qLib_package.json diff --git a/qLib_package_macos.json b/qLib_package_macos.json deleted file mode 100644 index fab1e978..00000000 --- a/qLib_package_macos.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "path": "$QLIB", - "load_package_once": true, - "recommends": "houdini_version >= '17.5.321'", - - "env": [ - { - "QLIB": "$HOUDINI_USER_PREF_DIR/qLib-master" - }, - { - "QOTL": "$QLIB/otls" - }, - { - "var": "HOUDINI_OTLSCAN_PATH", - "value": [ - "$QOTL/base", - "$QOTL/future", - "$QOTL/experimental" - ], - "method": "append" - } - ] -} - diff --git a/qLib_package_windows.json b/qLib_package_windows.json deleted file mode 100644 index 644d405b..00000000 --- a/qLib_package_windows.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "recommends": "houdini_version >= '17.5.321'", - - "env": [ - { - "QLIB": "$HOUDINI_USER_PREF_DIR/qLib-master" - }, - { - "QOTL": "$QLIB/otls" - }, - { - "HOUDINI_OTLSCAN_PATH": "$QOTL/base;$QOTL/future;$QOTL/experimental;$HOUDINI_OTLSCAN_PATH" - } - ], - - "path": "$QLIB" -} - diff --git a/scripts/python/qlibutils.py b/scripts/python/qlibutils.py index 647a0233..b9f6e56c 100644 --- a/scripts/python/qlibutils.py +++ b/scripts/python/qlibutils.py @@ -327,7 +327,7 @@ def open_dir(dir="", env=None): if oss and cmd: statmsg("(%s) %s %s" % (oss, cmd, dir, ) ) - r = subprocess.call([cmd, dir]) + r = subprocess.call(' '.join([cmd, dir]), shell=True) if r!=0: statmsg("(%s) FAILED: %s %s" % (oss, cmd, dir, ), warn=True)