more osx stuff

This commit is contained in:
David Rose 2009-06-13 03:52:32 +00:00
parent adf9da20bc
commit f34034d7d4
4 changed files with 19 additions and 7 deletions

View File

@ -327,8 +327,10 @@ write_chars(const char *start, size_t length) {
while (remaining > 0) {
ssize_t result = ::write(_handle, start, remaining);
if (result < 0) {
cerr
<< "Error writing " << remaining << " bytes\n";
if (errno != EPIPE) {
cerr
<< "Error writing " << remaining << " bytes\n";
}
return length - remaining;
}

View File

@ -1,4 +1,4 @@
#! /bin/env python
#! /usr/bin/env python
"""
This command is used to build a downloadable package for the p3d
@ -145,7 +145,9 @@ class PackageMaker:
sub-directories. """
startDir = self.startDir
if startDir.endswith(os.altsep) or startDir.endswith(os.sep):
if startDir.endswith(os.sep):
startDir = startDir[:-1]
elif os.altsep and startDir.endswith(os.altsep):
startDir = startDir[:-1]
prefix = startDir + os.sep
for dirpath, dirnames, filenames in os.walk(startDir):

View File

@ -23,7 +23,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/utime.h>
#include <utime.h>
#ifdef _WIN32
#include <direct.h>

View File

@ -132,8 +132,8 @@ start_instance(P3DInstance *inst) {
send_command(doc);
P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr();
P3DPackage *panda = inst_mgr->get_package("panda3d", "dev");
// start_p3dpython();
// P3DPackage *panda = inst_mgr->get_package("panda3d", "dev");
start_p3dpython();
}
////////////////////////////////////////////////////////////////////
@ -257,6 +257,14 @@ start_p3dpython() {
env += _python_root_dir;
env += '\0';
env += "PRC_DIR=";
env += _python_root_dir;
env += '\0';
env += "PANDA_PRC_DIR=";
env += _python_root_dir;
env += '\0';
#ifdef _WIN32
_p3dpython_handle = win_create_process
(p3dpython, _python_root_dir, env, _output_filename,