Skip to content

Commit

Permalink
Support installation in 3dsMax 2023 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugow authored Feb 2, 2022
1 parent b86ef45 commit 829f5e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions scripts/inst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ else
startuppath="$installdir/scripts/startup"
fi

if [ "$version" -le "2022" ]
then
pythonpath="Python37"
else
pythonpath="Python"
fi

exiterr() {
echo "$@" 1>&2
exit 1
Expand All @@ -49,7 +56,7 @@ fi

# install pip
installpip() {
cd "$installdir/Python37"
cd "$installdir/$pythonpath"
if ! ./python.exe -m pip -V 2>/dev/null
then
if ! ./python.exe -m ensurepip 2>/dev/null
Expand All @@ -72,7 +79,7 @@ installpythonpackages() {
for f in $(find "$packagedir" -name "setup.py")
do
local package="$(dirname "$f")"
"$installdir/Python37/python.exe" -m pip install --user -e "$package"
"$installdir/$pythonpath/python.exe" -m pip install --user -e "$package"
done
}

Expand All @@ -82,7 +89,7 @@ uninstallpythonpackages() {
do
local package="$(basename "$(dirname "$f")")"
local pname="$package-autodesk"
"$installdir/Python37/python.exe" -m pip uninstall -y "$pname"
"$installdir/$pythonpath/python.exe" -m pip uninstall -y "$pname"
done
}

2 changes: 1 addition & 1 deletion uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ echo "Uninstall python packages"

echo "Uninstall pip"
(
cd Python37
cd "$pythonpath"
./python.exe -m pip uninstall pip
)

Expand Down

0 comments on commit 829f5e0

Please sign in to comment.