mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
changes to allow different install dir without ctattach
This commit is contained in:
parent
4e83b2ae04
commit
974c0d1ff6
@ -8,9 +8,11 @@
|
|||||||
# -v adds libvrpn
|
# -v adds libvrpn
|
||||||
# -n doesn't perform a squeeze
|
# -n doesn't perform a squeeze
|
||||||
|
|
||||||
|
base_dir=$(pwd)
|
||||||
extra_genPyCode_libs=""
|
extra_genPyCode_libs=""
|
||||||
fSqueeze="squeezeMe"
|
fSqueeze="squeezeMe"
|
||||||
optimizeFlag=""
|
optimizeFlag=""
|
||||||
|
ppython=ppython
|
||||||
ppythonOptimizeFlag=""
|
ppythonOptimizeFlag=""
|
||||||
|
|
||||||
while getopts tvn flag; do
|
while getopts tvn flag; do
|
||||||
@ -27,23 +29,28 @@ firstarg="$1"
|
|||||||
shift
|
shift
|
||||||
extra_genPyCode_libs="$extra_genPyCode_libs $*"
|
extra_genPyCode_libs="$extra_genPyCode_libs $*"
|
||||||
|
|
||||||
|
if [ "$INSTALL_DIR" != "" ]; then
|
||||||
|
install_dir="$INSTALL_DIR"
|
||||||
|
elif [ "$DIRECT" != "" ]; then
|
||||||
|
install_dir="$DIRECT"
|
||||||
|
else
|
||||||
|
install_dir="./install"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$firstarg" = "linux" ]; then
|
if [ "$firstarg" = "linux" ]; then
|
||||||
pyDir=$DIRECT/lib/py
|
pyDir=$DIRECT/lib/py
|
||||||
cd $DIRECT/bin
|
cd $DIRECT/bin
|
||||||
ppython -d generatePythonCode -v -d $pyDir -e $DIRECT/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
ppython -d generatePythonCode -v -d $pyDir -e $DIRECT/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
||||||
pSqueezer=$DIRECT/src/showbase/pandaSqueezer.py
|
pSqueezer=$DIRECT/src/showbase/pandaSqueezer.py
|
||||||
|
|
||||||
elif [ "$firstarg" = "win-debug" ]; then
|
elif [ "$firstarg" = "win-debug" ]; then
|
||||||
pyDir=`cygpath -w $DIRECT/lib/py`
|
pyDir=`cygpath -w $DIRECT/lib/py`
|
||||||
cd $DIRECT/bin
|
cd $DIRECT/bin
|
||||||
ppython -d generatePythonCode -v -d $pyDir -e `cygpath -w $DIRECT/src/extensions` -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
ppython -d generatePythonCode -v -d $pyDir -e `cygpath -w $DIRECT/src/extensions` -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
||||||
|
|
||||||
elif [ "$firstarg" = "win-release" ]; then
|
elif [ "$firstarg" = "win-release" ]; then
|
||||||
pyDir=`cygpath -w $DIRECT/lib/py`
|
pyDir=`cygpath -w $DIRECT/lib/py`
|
||||||
cd $DIRECT/bin
|
cd $DIRECT/bin
|
||||||
ppython generatePythonCode -v -d $pyDir -e `cygpath -w $DIRECT/src/extensions` -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
ppython generatePythonCode -v -d $pyDir -e `cygpath -w $DIRECT/src/extensions` -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
||||||
pSqueezer=`cygpath -w $DIRECT/src/showbase/pandaSqueezer.py`
|
pSqueezer=`cygpath -w $DIRECT/src/showbase/pandaSqueezer.py`
|
||||||
|
|
||||||
elif [ "$firstarg" = "win-publish" ]; then
|
elif [ "$firstarg" = "win-publish" ]; then
|
||||||
# no assertions, no comments, no docstrings
|
# no assertions, no comments, no docstrings
|
||||||
pyDir=`cygpath -w $DIRECT/lib/py`
|
pyDir=`cygpath -w $DIRECT/lib/py`
|
||||||
@ -52,19 +59,18 @@ elif [ "$firstarg" = "win-publish" ]; then
|
|||||||
optimizeFlag="-O"
|
optimizeFlag="-O"
|
||||||
ppythonOptimizeFlag="-OO"
|
ppythonOptimizeFlag="-OO"
|
||||||
pSqueezer=`cygpath -w $DIRECT/src/showbase/pandaSqueezer.py`
|
pSqueezer=`cygpath -w $DIRECT/src/showbase/pandaSqueezer.py`
|
||||||
|
|
||||||
elif [ "$firstarg" = "install" ]; then
|
elif [ "$firstarg" = "install" ]; then
|
||||||
# as installed on a machine without ctattach etc.
|
# as installed on a machine without ctattach etc.
|
||||||
pyDir=install/lib/py
|
pyDir=$install_dir/lib/py
|
||||||
install/bin/ppython -d install/bin/generatePythonCode -O -v -d $pyDir -e direct/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
ppython=$install_dir/bin/ppython
|
||||||
pSqueezer=`pwd`/direct/src/showbase/pandaSqueezer.py
|
$ppython -d $install_dir/bin/generatePythonCode -O -v -d $pyDir -e direct/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
||||||
|
pSqueezer=$(cygpath -w $base_dir/direct/src/showbase/pandaSqueezer.py) || exit
|
||||||
elif [ "$firstarg" = "release" ]; then
|
elif [ "$firstarg" = "release" ]; then
|
||||||
# as installed on a machine without ctattach etc.
|
# as installed on a machine without ctattach etc.
|
||||||
pyDir=install/lib/py
|
pyDir=$install_dir/lib/py
|
||||||
install/bin/ppython install/bin/generatePythonCode -v -d $pyDir -e direct/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
ppython=$install_dir/bin/ppython
|
||||||
pSqueezer=`pwd`/direct/src/showbase/pandaSqueezer.py
|
$ppython $install_dir/bin/generatePythonCode -v -d $pyDir -e direct/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
||||||
|
pSqueezer=$(cygpath -w $base_dir/direct/src/showbase/pandaSqueezer.py) || exit
|
||||||
else
|
else
|
||||||
echo "Invalid parameter: $firstarg"
|
echo "Invalid parameter: $firstarg"
|
||||||
exit 1
|
exit 1
|
||||||
@ -72,16 +78,14 @@ fi
|
|||||||
|
|
||||||
if [ "$fSqueeze" = "squeezeMe" ]; then
|
if [ "$fSqueeze" = "squeezeMe" ]; then
|
||||||
echo SQUEEZING PandaModules
|
echo SQUEEZING PandaModules
|
||||||
|
cd $pyDir || exit
|
||||||
cd $pyDir
|
rm -f PandaModules.py* || exit
|
||||||
rm -f PandaModules.py*
|
$base_dir/$ppython $ppythonOptimizeFlag $pSqueezer $optimizeFlag || exit
|
||||||
ppython $ppythonOptimizeFlag $pSqueezer $optimizeFlag || exit
|
|
||||||
|
|
||||||
else
|
else
|
||||||
cd $pyDir
|
|
||||||
echo RENAMING PandaModulesUnsqueezed.py to PandaModules.py
|
echo RENAMING PandaModulesUnsqueezed.py to PandaModules.py
|
||||||
rm -f PandaModules.py*
|
cd $pyDir || exit
|
||||||
mv PandaModulesUnsqueezed.py PandaModules.py
|
rm -f PandaModules.py* || exit
|
||||||
|
mv PandaModulesUnsqueezed.py PandaModules.py || exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo DONE
|
echo DONE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user