From 36635a00b9e64efb2f35419e4724d5ca45ebb599 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 9 Nov 2010 20:06:19 +0000 Subject: [PATCH] MAKE_BAT_SCRIPTS --- direct/src/ffi/Sources.pp | 2 +- direct/src/ffi/genPyCode.pp | 6 +++--- direct/src/p3d/Sources.pp | 8 ++++---- dtool/Config.pp | 4 ++++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/direct/src/ffi/Sources.pp b/direct/src/ffi/Sources.pp index bca96a0b76..e0625858f0 100644 --- a/direct/src/ffi/Sources.pp +++ b/direct/src/ffi/Sources.pp @@ -3,7 +3,7 @@ // If we're on Win32 without Cygwin, install the genPyCode.bat file; // for all other platforms, install the genPyCode sh script. -#if $[eq $[PLATFORM],Win32] +#if $[MAKE_BAT_SCRIPTS] #define INSTALL_SCRIPTS $[INSTALL_SCRIPTS] genPyCode.bat #else #define INSTALL_SCRIPTS $[INSTALL_SCRIPTS] genPyCode diff --git a/direct/src/ffi/genPyCode.pp b/direct/src/ffi/genPyCode.pp index 28e9c35341..e9eeb52340 100644 --- a/direct/src/ffi/genPyCode.pp +++ b/direct/src/ffi/genPyCode.pp @@ -25,7 +25,7 @@ // we generate the script anyway to be consistent with Win32, which // does require it. -#if $[eq $[PLATFORM],Win32] +#if $[MAKE_BAT_SCRIPTS] #output genPyCode.bat @echo off @@ -35,7 +35,7 @@ rem ################################# DO NOT EDIT ########################### $[python] -u $[osfilename $[install_bin_dir]/genPyCode.py] %1 %2 %3 %4 %5 %6 %7 %8 %9 #end genPyCode.bat -#else // Win32 +#else // MAKE_BAT_SCRIPTS #output genPyCode $[if $[>= $[PPREMAKE_VERSION],1.21],binary] #! /bin/sh @@ -55,7 +55,7 @@ $[python] -u '$[osfilename $[install_bin_dir]/genPyCode.py]' "$@" #endif #end genPyCode -#endif // Win32 +#endif // MAKE_BAT_SCRIPTS #output genPyCode.py #! /usr/bin/env $[python] diff --git a/direct/src/p3d/Sources.pp b/direct/src/p3d/Sources.pp index a6a79db212..390348668b 100644 --- a/direct/src/p3d/Sources.pp +++ b/direct/src/p3d/Sources.pp @@ -31,13 +31,13 @@ #endif #foreach scriptname $[BUILD_P3D_SCRIPTS] - #if $[eq $[PLATFORM],Win32] + #if $[MAKE_BAT_SCRIPTS] #set INSTALL_SCRIPTS $[INSTALL_SCRIPTS] $[scriptname].bat #else #set INSTALL_SCRIPTS $[INSTALL_SCRIPTS] $[scriptname] #endif - #if $[eq $[PLATFORM],Win32] + #if $[MAT_BAT_SCRIPTS] #output $[scriptname].bat notouch @echo off rem #### Generated automatically by $[PPREMAKE] $[PPREMAKE_VERSION] from $[notdir $[THISFILENAME]]. @@ -46,7 +46,7 @@ rem ################################# DO NOT EDIT ########################### $[python] -u $[osfilename $[install_bin_dir]/$[scriptname].py] %1 %2 %3 %4 %5 %6 %7 %8 %9 #end $[scriptname].bat - #else // Win32 + #else // MAKE_BAT_SCRIPTS #output $[scriptname] binary notouch #! /bin/sh @@ -66,7 +66,7 @@ $[python] -u '$[osfilename $[install_bin_dir]/$[scriptname].py]' "$@" #endif #end $[scriptname] - #endif // Win32 + #endif // MAKE_BAT_SCRIPTS #end scriptname diff --git a/dtool/Config.pp b/dtool/Config.pp index bf5e2c2d35..f29810383e 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -1085,6 +1085,10 @@ // on Windows. Some Windows compilers may not support this syntax. #defer EXPORT_TEMPLATES yes +// Define this to generate .bat files when a Sources.pp makes a +// script; leave it clear to generate Unix-style sh scripts. +#defer MAKE_BAT_SCRIPTS $[eq $[PLATFORM],Win32] + // Define USE_COMPILER to switch the particular compiler that should // be used. A handful of tokens are recognized, depending on BUILD_TYPE. // This may also be further customized within Global.$[BUILD_TYPE].pp.