Made shell scripts more generic
This commit is contained in:
parent
fe4d0a70ac
commit
e2557e2204
|
|
@ -1,3 +1,3 @@
|
|||
// For now, since we are not installing Python files, this file can
|
||||
// remain empty.
|
||||
|
||||
// Install scripts for building zipfiles (leveleditor and RobotToonManager)
|
||||
#define INSTALL_SCRIPTS printdir printlib copyfiles
|
||||
|
|
|
|||
|
|
@ -3,15 +3,17 @@
|
|||
if [ "$1" = "-d" ]
|
||||
then
|
||||
destdir=$2
|
||||
printfilesCmd=$3
|
||||
debug_state="-d"
|
||||
else
|
||||
destdir=$1
|
||||
printfilesCmd=$2
|
||||
debug_state=""
|
||||
fi
|
||||
|
||||
if [ "${destdir}" = "" ]
|
||||
if [ "${destdir}" = "" -o "${printfilesCmd}" = "" ]
|
||||
then
|
||||
echo "Usage: copyfiles [-d] destdir"
|
||||
echo "Usage: copyfiles [-d] destdir printfilesCmd"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -21,7 +23,7 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
for file in `printfiles $debug_state`
|
||||
for file in `$printfilesCmd $debug_state`
|
||||
do
|
||||
if cp -R ${file} ${destdir}
|
||||
then
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ fi
|
|||
|
||||
if mkdir ${destdir}
|
||||
then
|
||||
if copyfiles ${debug_state} ${destdir}
|
||||
if copyfiles ${debug_state} ${destdir} printfiles
|
||||
then
|
||||
if [ -f ${zipfile} ]
|
||||
then
|
||||
|
|
|
|||
|
|
@ -204,11 +204,12 @@ class ShowBase(DirectObject.DirectObject):
|
|||
self.transitions = Transitions.Transitions(self.loader)
|
||||
|
||||
# Start Tk and DIRECT if specified by Configrc
|
||||
self.startTk(self.config.GetBool('want-tk', 0))
|
||||
fTk = self.config.GetBool('want-tk', 0)
|
||||
# Start DIRECT if specified in Configrc or in cluster mode
|
||||
fDirect = (self.config.GetBool('want-directtools', 0) or
|
||||
(base.config.GetString("cluster-mode", '') != ''))
|
||||
self.startDirect(fDirect)
|
||||
# Set fWantTk to 0 to avoid starting Tk with this call
|
||||
self.startDirect(fWantDirect = fDirect, fWantTk = fTk)
|
||||
# Start IGLOOP
|
||||
self.restart()
|
||||
|
||||
|
|
@ -1198,9 +1199,11 @@ class ShowBase(DirectObject.DirectObject):
|
|||
self.wantTk = fWantTk
|
||||
if self.wantTk:
|
||||
import TkGlobal
|
||||
taskMgr.remove('tkloop')
|
||||
TkGlobal.spawnTkLoop()
|
||||
|
||||
def startDirect(self, fWantDirect = 1):
|
||||
def startDirect(self, fWantDirect = 1, fWantTk = 1):
|
||||
self.startTk(fWantTk)
|
||||
self.wantDirect = fWantDirect
|
||||
if self.wantDirect:
|
||||
import DirectSession
|
||||
|
|
|
|||
Loading…
Reference in New Issue