mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Assorted bugfixes
This commit is contained in:
parent
a260e5610f
commit
8d799850fb
28
doc/makepanda/makepanda.bat
Executable file
28
doc/makepanda/makepanda.bat
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
REM
|
||||||
|
REM Verify that we can find the 'makepanda' python script
|
||||||
|
REM and the python interpreter. If we can find both, then
|
||||||
|
REM run 'makepanda'.
|
||||||
|
REM
|
||||||
|
|
||||||
|
if not exist makepanda\makepanda.py goto :missing1
|
||||||
|
if not exist thirdparty\win-python\python.exe goto :missing2
|
||||||
|
thirdparty\win-python\python.exe makepanda\makepanda.py %*
|
||||||
|
goto done
|
||||||
|
|
||||||
|
|
||||||
|
:missing1
|
||||||
|
echo You need to change directory to the root of the panda source tree
|
||||||
|
echo before invoking makepanda. For further install instructions, read
|
||||||
|
echo the installation instructions in the file doc/INSTALL-MK.
|
||||||
|
goto done
|
||||||
|
|
||||||
|
:missing2
|
||||||
|
echo You seem to be missing the 'thirdparty' directory. You probably checked
|
||||||
|
echo the source code out from sourceforge. The sourceforge repository is
|
||||||
|
echo missing the 'thirdparty' directory. You will need to supplement the
|
||||||
|
echo code by downloading the 'thirdparty' directory from panda3d.etc.cmu.edu
|
||||||
|
goto done
|
||||||
|
|
||||||
|
:done
|
File diff suppressed because it is too large
Load Diff
192
doc/makepanda/maketarball.py
Executable file
192
doc/makepanda/maketarball.py
Executable file
@ -0,0 +1,192 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
##
|
||||||
|
##
|
||||||
|
## This script builds the panda source tarball and zip-file
|
||||||
|
##
|
||||||
|
## usage: maketarball [version]
|
||||||
|
##
|
||||||
|
## The source tarball contains most of what is in CVS, but some of the
|
||||||
|
## control files (like the CVS directories themselves) are stripped out.
|
||||||
|
##
|
||||||
|
## The source tarball contains an rpmbuild 'spec' file so that you can
|
||||||
|
## easily build a binary RPM: rpmbuild -tb panda3d-version.tar.GZ
|
||||||
|
##
|
||||||
|
## The 'spec' file included in the tarball uses the 'makepanda' build
|
||||||
|
## system to compile panda.
|
||||||
|
##
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
import sys,os,time,stat,string,re,getopt,cPickle;
|
||||||
|
|
||||||
|
def oscmd(cmd):
|
||||||
|
print cmd
|
||||||
|
sys.stdout.flush()
|
||||||
|
if (os.system(cmd)): sys.exit("Failed")
|
||||||
|
|
||||||
|
def writefile(dest,desiredcontents):
|
||||||
|
print "Generating file: "+dest
|
||||||
|
sys.stdout.flush()
|
||||||
|
try:
|
||||||
|
wfile = open(dest, 'wb');
|
||||||
|
wfile.write(desiredcontents);
|
||||||
|
wfile.close();
|
||||||
|
except: sys.exit("Cannot write to "+dest);
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
#
|
||||||
|
# Locate the root of the panda tree
|
||||||
|
#
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
PANDASOURCE=os.path.dirname(os.path.abspath(sys.path[0]))
|
||||||
|
|
||||||
|
if ((os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.py"))==0) or
|
||||||
|
(os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.sln"))==0) or
|
||||||
|
(os.path.exists(os.path.join(PANDASOURCE,"dtool","src","dtoolbase","dtoolbase.h"))==0) or
|
||||||
|
(os.path.exists(os.path.join(PANDASOURCE,"panda","src","pandabase","pandabase.h"))==0)):
|
||||||
|
sys.exit("I am unable to locate the root of the panda source tree.")
|
||||||
|
|
||||||
|
os.chdir(PANDASOURCE)
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
##
|
||||||
|
## Read the default version number from dtool/PandaVersion.pp
|
||||||
|
##
|
||||||
|
## Parse the command-line arguments.
|
||||||
|
##
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
def printUsage():
|
||||||
|
sys.exit("usage: maketarball [version]")
|
||||||
|
|
||||||
|
if (len(sys.argv)==2):
|
||||||
|
VERSION = sys.argv[1]
|
||||||
|
if (len(VERSION.split(".")) != 3): printUsage()
|
||||||
|
elif (len(sys.argv)==1):
|
||||||
|
VERSION="0.0.0"
|
||||||
|
try:
|
||||||
|
f = file("dtool/PandaVersion.pp","r")
|
||||||
|
pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
|
||||||
|
for line in f:
|
||||||
|
match = pattern.match(line,0);
|
||||||
|
if (match):
|
||||||
|
VERSION = match.group(1)+"."+match.group(2)+"."+match.group(3)
|
||||||
|
break
|
||||||
|
f.close()
|
||||||
|
except: sys.exit("Cannot read version number from dtool/PandaVersion.pp")
|
||||||
|
else: printUsage()
|
||||||
|
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
##
|
||||||
|
## The SPEC File
|
||||||
|
##
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
SPEC="""Summary: Panda 3D Engine
|
||||||
|
Name: panda3d
|
||||||
|
Version: VERSION
|
||||||
|
Release: 1
|
||||||
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
License: Panda3D License
|
||||||
|
Group: Development/Libraries
|
||||||
|
BuildRoot: %{_builddir}/%{name}-%{version}/BUILDROOT
|
||||||
|
%description
|
||||||
|
The Panda3D engine.
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%build
|
||||||
|
makepanda/makepanda.py --version VERSION --everything
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
PANDA=$RPM_BUILD_ROOT/usr/share/panda3d
|
||||||
|
mkdir -p $PANDA
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||||
|
cp --recursive built/bin $PANDA/bin
|
||||||
|
cp --recursive built/lib $PANDA/lib
|
||||||
|
cp --recursive built/etc $PANDA/etc
|
||||||
|
cp --recursive built/include $PANDA/include
|
||||||
|
cp --recursive direct $PANDA/direct
|
||||||
|
cp built/direct/__init__.py $PANDA/direct/__init__.py
|
||||||
|
cp --recursive models $PANDA/models
|
||||||
|
cp --recursive samples $PANDA/samples
|
||||||
|
cp --recursive SceneEditor $PANDA/SceneEditor
|
||||||
|
cp --recursive Config.prc $PANDA/Config.prc
|
||||||
|
cp --recursive LICENSE $PANDA/LICENSE
|
||||||
|
echo "/usr/share/panda3d/lib" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/panda3d.conf
|
||||||
|
for x in $PANDA/bin/* ; do
|
||||||
|
base=`basename $x`
|
||||||
|
ln -sf /usr/share/panda3d/bin/$base $RPM_BUILD_ROOT/usr/bin
|
||||||
|
done
|
||||||
|
for x in $PANDA/direct/src/* ; do
|
||||||
|
if [ `basename $x` != extensions ] ; then
|
||||||
|
python -c "import compileall; compileall.compile_dir('$x')"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
/usr/share/panda3d
|
||||||
|
/etc/ld.so.conf.d/panda3d.conf
|
||||||
|
/usr/bin
|
||||||
|
"""
|
||||||
|
|
||||||
|
SPEC=SPEC.replace("VERSION",str(VERSION))
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
##
|
||||||
|
## Build the Zip-file and Tar-File
|
||||||
|
##
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
TARDIR="panda3d-"+VERSION
|
||||||
|
oscmd("rm -rf "+TARDIR)
|
||||||
|
oscmd("mkdir -p "+TARDIR)
|
||||||
|
oscmd("mkdir -p "+TARDIR+"/thirdparty")
|
||||||
|
oscmd("ln -sf ../dtool "+TARDIR+"/dtool")
|
||||||
|
oscmd("ln -sf ../panda "+TARDIR+"/panda")
|
||||||
|
oscmd("ln -sf ../direct "+TARDIR+"/direct")
|
||||||
|
oscmd("ln -sf ../pandaapp "+TARDIR+"/pandaapp")
|
||||||
|
oscmd("ln -sf ../pandatool "+TARDIR+"/pandatool")
|
||||||
|
oscmd("ln -sf ../ppremake "+TARDIR+"/ppremake")
|
||||||
|
oscmd("ln -sf ../SceneEditor "+TARDIR+"/SceneEditor")
|
||||||
|
oscmd("ln -sf ../models "+TARDIR+"/models")
|
||||||
|
oscmd("ln -sf ../samples "+TARDIR+"/samples")
|
||||||
|
oscmd("ln -sf ../doc "+TARDIR+"/doc")
|
||||||
|
oscmd("ln -sf ../makepanda "+TARDIR+"/makepanda")
|
||||||
|
oscmd("ln -sf ../../thirdparty/linux-libs-a "+TARDIR+"/thirdparty/linux-libs-a")
|
||||||
|
writefile(TARDIR+'/panda3d.spec',SPEC)
|
||||||
|
oscmd("tar --exclude CVS -chzf "+TARDIR+".tar.gz "+TARDIR)
|
||||||
|
oscmd("rm -rf "+TARDIR)
|
||||||
|
|
||||||
|
TARDIR="panda3d-"+VERSION.replace(".","-")
|
||||||
|
oscmd("rm -rf "+TARDIR)
|
||||||
|
oscmd("mkdir -p "+TARDIR)
|
||||||
|
oscmd("mkdir -p "+TARDIR+"/thirdparty")
|
||||||
|
oscmd("ln -sf ../dtool "+TARDIR+"/dtool")
|
||||||
|
oscmd("ln -sf ../panda "+TARDIR+"/panda")
|
||||||
|
oscmd("ln -sf ../direct "+TARDIR+"/direct")
|
||||||
|
oscmd("ln -sf ../pandaapp "+TARDIR+"/pandaapp")
|
||||||
|
oscmd("ln -sf ../pandatool "+TARDIR+"/pandatool")
|
||||||
|
oscmd("ln -sf ../ppremake "+TARDIR+"/ppremake")
|
||||||
|
oscmd("ln -sf ../SceneEditor "+TARDIR+"/SceneEditor")
|
||||||
|
oscmd("ln -sf ../models "+TARDIR+"/models")
|
||||||
|
oscmd("ln -sf ../samples "+TARDIR+"/samples")
|
||||||
|
oscmd("ln -sf ../doc "+TARDIR+"/doc")
|
||||||
|
oscmd("ln -sf ../makepanda "+TARDIR+"/makepanda")
|
||||||
|
oscmd("ln -sf ../../thirdparty/win-libs-vc7 "+TARDIR+"/thirdparty/win-libs-vc7")
|
||||||
|
oscmd("ln -sf ../../thirdparty/win-python "+TARDIR+"/thirdparty/win-python")
|
||||||
|
oscmd("ln -sf ../../thirdparty/win-util "+TARDIR+"/thirdparty/win-util")
|
||||||
|
oscmd("ln -sf ../../thirdparty/win-nsis "+TARDIR+"/thirdparty/win-nsis")
|
||||||
|
oscmd("zip -rq "+TARDIR+".zip "+TARDIR+" -x '*/CVS/*'")
|
||||||
|
oscmd("rm -rf "+TARDIR)
|
||||||
|
|
||||||
|
|
@ -1,148 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## This script builds the panda source tarball.
|
|
||||||
##
|
|
||||||
##
|
|
||||||
## The source tarball contains a hardwired version-number. You specify
|
|
||||||
## the version number using the options --v1, --v2, --v3.
|
|
||||||
##
|
|
||||||
## The source tarball contains most of what is in CVS, but some of the
|
|
||||||
## control files (like the CVS directories themselves) are stripped out.
|
|
||||||
##
|
|
||||||
## The source tarball contains an rpmbuild 'spec' file so that you can
|
|
||||||
## easily build a binary RPM: rpmbuild -tb panda3d-version.tar.GZ
|
|
||||||
##
|
|
||||||
## The 'spec' file included in the tarball uses the 'makepanda' build
|
|
||||||
## system to compile panda.
|
|
||||||
##
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
import sys,os,time,stat,string,re,getopt,cPickle;
|
|
||||||
|
|
||||||
def oscmd(cmd):
|
|
||||||
print cmd
|
|
||||||
sys.stdout.flush()
|
|
||||||
if (os.system(cmd)): sys.exit("Failed")
|
|
||||||
|
|
||||||
def writefile(dest,desiredcontents):
|
|
||||||
print "Generating file: "+dest
|
|
||||||
sys.stdout.flush()
|
|
||||||
try:
|
|
||||||
wfile = open(dest, 'wb');
|
|
||||||
wfile.write(desiredcontents);
|
|
||||||
wfile.close();
|
|
||||||
except: sys.exit("Cannot write to "+dest);
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## Parse the command-line arguments.
|
|
||||||
##
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
VERSION1=1
|
|
||||||
VERSION2=0
|
|
||||||
VERSION3=0
|
|
||||||
|
|
||||||
def parseopts(args):
|
|
||||||
global VERSION1,VERSION2,VERSION3
|
|
||||||
longopts = ["v1=","v2=","v3="]
|
|
||||||
try:
|
|
||||||
opts, extras = getopt.getopt(args, "", longopts)
|
|
||||||
for option,value in opts:
|
|
||||||
if (option=="--v1"): VERSION1=int(value)
|
|
||||||
if (option=="--v2"): VERSION2=int(value)
|
|
||||||
if (option=="--v3"): VERSION3=int(value)
|
|
||||||
except: usage(0)
|
|
||||||
|
|
||||||
parseopts(sys.argv[1:])
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## Which files go into the source-archive?
|
|
||||||
##
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
ARCHIVE=["dtool","panda","direct","pandatool","pandaapp",
|
|
||||||
"ppremake","SceneEditor","models","samples",
|
|
||||||
"Config.pp.sample","Config.prc","LICENSE","README",
|
|
||||||
"INSTALL-PP","INSTALL-MK","makepanda.bat","makepanda.py","maketarball.py",
|
|
||||||
"InstallerNotes","ReleaseNotes","makepanda.sln","makepanda.vcproj"]
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## The SPEC File
|
|
||||||
##
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
SPEC="""Summary: Panda 3D Engine
|
|
||||||
Name: panda3d
|
|
||||||
Version: VERSION1.VERSION2.VERSION3
|
|
||||||
Release: 1
|
|
||||||
Source0: %{name}-%{version}.tar.gz
|
|
||||||
License: Panda3D License
|
|
||||||
Group: Development/Libraries
|
|
||||||
BuildRoot: %{_builddir}/%{name}-%{version}/BUILDROOT
|
|
||||||
%description
|
|
||||||
The Panda3D engine.
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
%build
|
|
||||||
makepanda.py --v1 VERSION1 --v2 VERSION2 --v3 VERSION3 --no-installer
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
PANDA=$RPM_BUILD_ROOT/usr/share/panda3d
|
|
||||||
mkdir -p $PANDA
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
|
||||||
cp --recursive built/bin $PANDA/bin
|
|
||||||
cp --recursive built/lib $PANDA/lib
|
|
||||||
cp --recursive built/etc $PANDA/etc
|
|
||||||
cp --recursive built/include $PANDA/include
|
|
||||||
cp --recursive direct $PANDA/direct
|
|
||||||
cp built/direct/__init__.py $PANDA/direct/__init__.py
|
|
||||||
cp --recursive models $PANDA/models
|
|
||||||
cp --recursive samples $PANDA/samples
|
|
||||||
cp --recursive SceneEditor $PANDA/SceneEditor
|
|
||||||
cp --recursive Config.prc $PANDA/Config.prc
|
|
||||||
cp --recursive LICENSE $PANDA/LICENSE
|
|
||||||
echo "/usr/share/panda3d/lib" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/panda3d
|
|
||||||
for x in $PANDA/bin/* ; do
|
|
||||||
base=`basename $x`
|
|
||||||
ln -sf /usr/share/panda3d/bin/$base $RPM_BUILD_ROOT/usr/bin
|
|
||||||
done
|
|
||||||
%post
|
|
||||||
/sbin/ldconfig
|
|
||||||
%postun
|
|
||||||
/sbin/ldconfig
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
/usr/share/panda3d
|
|
||||||
/etc/ld.so.conf.d/panda3d
|
|
||||||
/usr/bin
|
|
||||||
"""
|
|
||||||
|
|
||||||
SPEC=SPEC.replace("VERSION1",str(VERSION1))
|
|
||||||
SPEC=SPEC.replace("VERSION2",str(VERSION2))
|
|
||||||
SPEC=SPEC.replace("VERSION3",str(VERSION3))
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## Build the tar-ball
|
|
||||||
##
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
TARDIR="panda3d-"+str(VERSION1)+"."+str(VERSION2)+"."+str(VERSION3)
|
|
||||||
oscmd("rm -rf "+TARDIR)
|
|
||||||
oscmd("mkdir -p "+TARDIR)
|
|
||||||
oscmd("mkdir -p "+TARDIR+"/thirdparty")
|
|
||||||
for x in ARCHIVE: oscmd("ln -sf ../"+x+" "+TARDIR+"/"+x)
|
|
||||||
oscmd("ln -sf ../../thirdparty/linux-libs-a "+TARDIR+"/thirdparty/linux-libs-a")
|
|
||||||
writefile(TARDIR+'/panda3d.spec',SPEC)
|
|
||||||
oscmd("tar --exclude CVS -chzf "+TARDIR+".tar.gz "+TARDIR)
|
|
||||||
oscmd("rm -rf "+TARDIR)
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user