|
|
@@ -13,7 +13,7 @@
|
|
|
|
|
|
base_dir=$(pwd)
|
|
|
extra_genPyCode_libs=""
|
|
|
-fSqueeze="squeezeMe"
|
|
|
+squeezeFlag=""
|
|
|
optimizeFlag=""
|
|
|
ppython=ppython
|
|
|
ppythonOptimizeFlag=""
|
|
|
@@ -26,7 +26,7 @@ while getopts ogtpven flag; do
|
|
|
p) extra_genPyCode_libs="$extra_genPyCode_libs libpirates" ;;
|
|
|
v) extra_genPyCode_libs="$extra_genPyCode_libs libvrpn" ;;
|
|
|
e) extra_genPyCode_libs="$extra_genPyCode_libs libpandaegg" ;;
|
|
|
- n) fSqueeze="" ;;
|
|
|
+ n) doSqueeze="-n" ;;
|
|
|
esac
|
|
|
done
|
|
|
|
|
|
@@ -63,7 +63,7 @@ pSqueezer=$DIRECT/src/showbase/pandaSqueezer.py
|
|
|
|
|
|
if [ "$buildType" = "linux" ]; then
|
|
|
cd $DIRECT/bin
|
|
|
- ppython -d generatePythonCode -v -d $pyDir -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
+ ppython -d generatePythonCode -v -d $pyDir $doSqueeze -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
pSqueezer=$DIRECT/src/showbase/pandaSqueezer.py
|
|
|
|
|
|
elif [ "$buildType" = "win-debug" ]; then
|
|
|
@@ -71,20 +71,20 @@ elif [ "$buildType" = "win-debug" ]; then
|
|
|
pyDir="$(cygpath -w $pyDir)"
|
|
|
extDir="$(cygpath -w $extDir)"
|
|
|
pSqueezer="$(cygpath -w $pSqueezer)"
|
|
|
- ppython -d generatePythonCode -v -d $pyDir -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
+ ppython -d generatePythonCode -v -d $pyDir $doSqueeze -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
elif [ "$buildType" = "win-release" ]; then
|
|
|
cd $DIRECT/bin
|
|
|
pyDir="$(cygpath -w $pyDir)"
|
|
|
extDir="$(cygpath -w $extDir)"
|
|
|
pSqueezer="$(cygpath -w $pSqueezer)"
|
|
|
- ppython generatePythonCode -v -d $pyDir -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
+ ppython generatePythonCode -v -d $pyDir $doSqueeze -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
elif [ "$buildType" = "win-publish" ]; then
|
|
|
# no assertions, no comments, no docstrings
|
|
|
cd $DIRECT/bin
|
|
|
pyDir="$(cygpath -w $pyDir)"
|
|
|
extDir="$(cygpath -w $extDir)"
|
|
|
pSqueezer="$(cygpath -w $pSqueezer)"
|
|
|
- ppython -OO generatePythonCode -O -v -d $pyDir -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
+ ppython -OO generatePythonCode -O -v -d $pyDir $doSqueeze -e $extDir -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
optimizeFlag="-O"
|
|
|
ppythonOptimizeFlag="-OO"
|
|
|
|
|
|
@@ -93,30 +93,32 @@ elif [ "$buildType" = "install" ]; then
|
|
|
pyDir=$install_dir/lib/pandac
|
|
|
ppython=$install_dir/bin/ppython
|
|
|
pSqueezer=$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
|
|
|
+ $ppython -d $install_dir/bin/generatePythonCode -O -v -d $pyDir $doSqueeze -e $DIRECT/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
elif [ "$buildType" = "release" ]; then
|
|
|
# Use relative paths; as installed on a machine without ctattach etc.
|
|
|
pyDir=$install_dir/lib/pandac
|
|
|
ppython=$install_dir/bin/ppython
|
|
|
pSqueezer=$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
|
|
|
+ $ppython $install_dir/bin/generatePythonCode -v -d $pyDir $doSqueeze -e $DIRECT/src/extensions -i libdtoolconfig libpandaexpress libpanda libpandaphysics libdirect $extra_genPyCode_libs || exit
|
|
|
else
|
|
|
echo "Invalid parameter: $buildType"
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
-if [ "$fSqueeze" = "squeezeMe" ]; then
|
|
|
- echo SQUEEZING PandaModules
|
|
|
- rm -f $pyDir/PandaModules.py* $pyDir/__init__.py || exit
|
|
|
- $ppython $ppythonOptimizeFlag $pSqueezer $optimizeFlag -d $pyDir || exit
|
|
|
- touch $pyDir/__init__.py || exit
|
|
|
-else
|
|
|
- # renaming PandaModulesUnsqueezed.py to PandaModules.py
|
|
|
- cd $pyDir || exit
|
|
|
- rm -f PandaModules.py* || exit
|
|
|
- echo # junk line needed to keep mv from failing
|
|
|
- mv PandaModulesUnsqueezed.py PandaModules.py || exit
|
|
|
-fi
|
|
|
+# The squeeze step is now performed as part of generatePythonCode.
|
|
|
+
|
|
|
+#if [ "$fSqueeze" = "squeezeMe" ]; then
|
|
|
+# echo SQUEEZING PandaModules
|
|
|
+# rm -f $pyDir/PandaModules.py* $pyDir/__init__.py || exit
|
|
|
+# $ppython $ppythonOptimizeFlag $pSqueezer $optimizeFlag -d $pyDir || exit
|
|
|
+# touch $pyDir/__init__.py || exit
|
|
|
+#else
|
|
|
+# # renaming PandaModulesUnsqueezed.py to PandaModules.py
|
|
|
+# cd $pyDir || exit
|
|
|
+# rm -f PandaModules.py* || exit
|
|
|
+# echo # junk line needed to keep mv from failing
|
|
|
+# mv PandaModulesUnsqueezed.py PandaModules.py || exit
|
|
|
+#fi
|
|
|
|
|
|
echo DONE
|
|
|
|