mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
add new binary option
This commit is contained in:
parent
ba5ff66beb
commit
76a6b01a56
@ -21,6 +21,9 @@
|
|||||||
/* Define if we're compiling with Cygwin. */
|
/* Define if we're compiling with Cygwin. */
|
||||||
/* #undef HAVE_CYGWIN */
|
/* #undef HAVE_CYGWIN */
|
||||||
|
|
||||||
|
/* Define if we're compiling for OSX. */
|
||||||
|
/* #undef HAVE_OSX */
|
||||||
|
|
||||||
/* Define if we're compiling using Windows Microsoft Visual C++. */
|
/* Define if we're compiling using Windows Microsoft Visual C++. */
|
||||||
#define WIN32_VC 1
|
#define WIN32_VC 1
|
||||||
|
|
||||||
@ -86,5 +89,5 @@
|
|||||||
** Also be sure to change the version number **
|
** Also be sure to change the version number **
|
||||||
** at the beginning of configure.in. **
|
** at the beginning of configure.in. **
|
||||||
**************** ****************/
|
**************** ****************/
|
||||||
#define VERSION "1.20"
|
#define VERSION "1.21"
|
||||||
/**************** UPDATE VERSION NUMBER HERE ****************/
|
/**************** UPDATE VERSION NUMBER HERE ****************/
|
||||||
|
@ -5,7 +5,7 @@ dnl **************** UPDATE VERSION NUMBER HERE ****************
|
|||||||
dnl ** Also be sure to change the version number **
|
dnl ** Also be sure to change the version number **
|
||||||
dnl ** at the end of config_msvc.h. **
|
dnl ** at the end of config_msvc.h. **
|
||||||
dnl **************** ****************
|
dnl **************** ****************
|
||||||
AM_INIT_AUTOMAKE(ppremake, 1.20)
|
AM_INIT_AUTOMAKE(ppremake, 1.21)
|
||||||
dnl **************** UPDATE VERSION NUMBER HERE ****************
|
dnl **************** UPDATE VERSION NUMBER HERE ****************
|
||||||
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
@ -82,6 +82,10 @@ if test "$PLATFORM" = "Cygwin"; then
|
|||||||
AC_DEFINE(HAVE_CYGWIN, 1, [Define if we're compiling with Cygwin.])
|
AC_DEFINE(HAVE_CYGWIN, 1, [Define if we're compiling with Cygwin.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$PLATFORM" = "OSX"; then
|
||||||
|
AC_DEFINE(HAVE_OSX, 1, [Define if we're compiling for OSX.])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(PLATFORM, "$PLATFORM",
|
AC_DEFINE_UNQUOTED(PLATFORM, "$PLATFORM",
|
||||||
[The platform ppremake is compiled for. This primarily controls the
|
[The platform ppremake is compiled for. This primarily controls the
|
||||||
initial setting of the PLATFORM ppremake variable.])
|
initial setting of the PLATFORM ppremake variable.])
|
||||||
|
@ -1138,6 +1138,8 @@ handle_output_command() {
|
|||||||
for (int i = 0; i < (int)words.size(); i++) {
|
for (int i = 0; i < (int)words.size(); i++) {
|
||||||
if (words[i] == "notouch") {
|
if (words[i] == "notouch") {
|
||||||
nest->_flags |= OF_notouch;
|
nest->_flags |= OF_notouch;
|
||||||
|
} else if (words[i] == "binary") {
|
||||||
|
nest->_flags |= OF_binary;
|
||||||
} else {
|
} else {
|
||||||
cerr << "Invalid output flag: " << words[i] << "\n";
|
cerr << "Invalid output flag: " << words[i] << "\n";
|
||||||
errors_occurred = true;
|
errors_occurred = true;
|
||||||
@ -1281,7 +1283,8 @@ handle_end_command() {
|
|||||||
#endif // HAVE_SSTREAM
|
#endif // HAVE_SSTREAM
|
||||||
|
|
||||||
if (!compare_output(generated_file, nest->_params,
|
if (!compare_output(generated_file, nest->_params,
|
||||||
(nest->_flags & OF_notouch) != 0)) {
|
(nest->_flags & OF_notouch) != 0,
|
||||||
|
(nest->_flags & OF_binary) != 0)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2103,8 +2106,12 @@ replay_formap(const string &varname, const string &mapvar) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool PPCommandFile::
|
bool PPCommandFile::
|
||||||
compare_output(const string &new_contents, Filename filename,
|
compare_output(const string &new_contents, Filename filename,
|
||||||
bool notouch) {
|
bool notouch, bool binary) {
|
||||||
filename.set_text();
|
if (binary) {
|
||||||
|
filename.set_binary();
|
||||||
|
} else {
|
||||||
|
filename.set_text();
|
||||||
|
}
|
||||||
bool exists = filename.exists();
|
bool exists = filename.exists();
|
||||||
bool differ = false;
|
bool differ = false;
|
||||||
|
|
||||||
@ -2139,7 +2146,11 @@ compare_output(const string &new_contents, Filename filename,
|
|||||||
// Write our new contents to a file so we can run diff on both
|
// Write our new contents to a file so we can run diff on both
|
||||||
// of them.
|
// of them.
|
||||||
Filename temp_filename = filename.get_fullpath() + string(".ppd");
|
Filename temp_filename = filename.get_fullpath() + string(".ppd");
|
||||||
temp_filename.set_text();
|
if (binary) {
|
||||||
|
temp_filename.set_binary();
|
||||||
|
} else {
|
||||||
|
temp_filename.set_text();
|
||||||
|
}
|
||||||
ofstream out_b;
|
ofstream out_b;
|
||||||
if (!temp_filename.open_write(out_b)) {
|
if (!temp_filename.open_write(out_b)) {
|
||||||
cerr << "Unable to open temporary file " << filename << " for writing.\n";
|
cerr << "Unable to open temporary file " << filename << " for writing.\n";
|
||||||
|
@ -78,7 +78,7 @@ protected:
|
|||||||
bool replay_foreach(const string &varname, const vector<string> &words);
|
bool replay_foreach(const string &varname, const vector<string> &words);
|
||||||
bool replay_formap(const string &varname, const string &mapvar);
|
bool replay_formap(const string &varname, const string &mapvar);
|
||||||
bool compare_output(const string &new_contents, Filename filename,
|
bool compare_output(const string &new_contents, Filename filename,
|
||||||
bool notouch);
|
bool notouch, bool binary);
|
||||||
bool failed_if() const;
|
bool failed_if() const;
|
||||||
|
|
||||||
bool is_valid_formal(const string &formal_parameter_name) const;
|
bool is_valid_formal(const string &formal_parameter_name) const;
|
||||||
@ -154,6 +154,7 @@ private:
|
|||||||
|
|
||||||
enum OutputFlags {
|
enum OutputFlags {
|
||||||
OF_notouch = 0x001,
|
OF_notouch = 0x001,
|
||||||
|
OF_binary = 0x002,
|
||||||
};
|
};
|
||||||
|
|
||||||
class BlockNesting {
|
class BlockNesting {
|
||||||
|
@ -1492,14 +1492,20 @@ expand_libtest(const string ¶ms) {
|
|||||||
found = libname.resolve_filename(directories);
|
found = libname.resolve_filename(directories);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else // WIN32
|
||||||
libname = "lib" + libname.get_basename() + ".a";
|
libname = "lib" + libname.get_basename() + ".a";
|
||||||
found = libname.resolve_filename(directories);
|
found = libname.resolve_filename(directories);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
libname.set_extension("so");
|
libname.set_extension("so");
|
||||||
found = libname.resolve_filename(directories);
|
found = libname.resolve_filename(directories);
|
||||||
}
|
}
|
||||||
#endif
|
#ifdef HAVE_OSX
|
||||||
|
if (!found) {
|
||||||
|
libname.set_extension("dylib");
|
||||||
|
found = libname.resolve_filename(directories);
|
||||||
|
}
|
||||||
|
#endif // HAVE_OSX
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
if (found) {
|
if (found) {
|
||||||
return libname.get_fullpath();
|
return libname.get_fullpath();
|
||||||
|
@ -139,7 +139,8 @@ static void
|
|||||||
report_version() {
|
report_version() {
|
||||||
cerr << "This is " << PACKAGE << " version " << VERSION
|
cerr << "This is " << PACKAGE << " version " << VERSION
|
||||||
<< " built on " << __DATE__ << " at " << __TIME__
|
<< " built on " << __DATE__ << " at " << __TIME__
|
||||||
<< ".\n";
|
<< ".\n"
|
||||||
|
<< "Default platform is \"" << PLATFORM << "\".\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user