From fc3c5b717a88e480617fd6be7800bc71f9661531 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 26 Aug 2008 08:25:10 +0000 Subject: [PATCH] Made installer generation more clear about missing rpmbuild/dpkg-deb --- doc/makepanda/makepanda.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/makepanda/makepanda.py b/doc/makepanda/makepanda.py index 5cc05de20a..47c8586cd8 100755 --- a/doc/makepanda/makepanda.py +++ b/doc/makepanda/makepanda.py @@ -3493,9 +3493,9 @@ def MakeInstallerLinux(): oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) - WriteFile("linuxroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n") - oscmd("chmod 755 linuxroot/DEBIAN/postinst") - oscmd("cp linuxroot/DEBIAN/postinst linuxroot/DEBIAN/postrm") + WriteFile("linuxroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n") + oscmd("chmod 755 linuxroot/DEBIAN/postinst") + oscmd("cp linuxroot/DEBIAN/postinst linuxroot/DEBIAN/postrm") oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_"+ARCH+".deb") oscmd("chmod -R 755 linuxroot") @@ -3505,7 +3505,10 @@ def MakeInstallerLinux(): WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+pandasource+"' -bb panda3d.spec") oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .") - + + if not(os.path.exists("/usr/bin/rpmbuild") or os.path.exists("/usr/bin/dpkg-deb")): + exit("To build an installer, either rpmbuild or dpkg-deb must be present on your system!") + # oscmd("chmod -R 755 linuxroot") # oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH)