From 376ddb7cf5c51a5e3e57ff0eb6b7f8981d498c33 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Wed, 27 Dec 2017 19:39:24 +0900 Subject: [PATCH 1/6] Prepare Python scripts for building for Mac OSX. This refs #4. --- macbuild/build4mac.py | 334 ++++++++++++++++++++++++++++++++----- macbuild/build4mac_env.py | 21 ++- macbuild/build4mac_util.py | 127 ++++++++++++++ 3 files changed, 436 insertions(+), 46 deletions(-) create mode 100755 macbuild/build4mac_util.py diff --git a/macbuild/build4mac.py b/macbuild/build4mac.py index ca48f0452..a32734802 100755 --- a/macbuild/build4mac.py +++ b/macbuild/build4mac.py @@ -10,6 +10,8 @@ from __future__ import print_function # to use print() of Python 3 in Python >= 2.7 import sys import os +import shutil +import glob import platform import optparse import subprocess @@ -19,13 +21,14 @@ import subprocess #------------------------------------------------------------------------------- mydir = os.path.dirname(os.path.abspath(__file__)) sys.path.append( mydir + "/macbuild" ) -from build4mac_env import * +from build4mac_env import * +from build4mac_util import * #------------------------------------------------------------------------------- ## To set global variables including present directory and platform info. #------------------------------------------------------------------------------- def SetGlobals(): - global PresentDir # present directory + global ProjectDir # project directory where "build.sh" exists global Usage # string on usage global BuildBash # the main build Bash script global Platform # platform @@ -35,7 +38,8 @@ def SetGlobals(): global NoQtBindings # True if not creating Qt bindings for Ruby scripts global MakeOptions # options passed to `make` global DebugMode # True if debug mode build - global CheckComOnly # True if check the command line only + global CheckComOnly # True if only for checking the command line parameters to "build.sh" + global Deployment # True if deploying the binaries for a package # auxiliary variables on platform global System # 6-tuple from platform.uname() global Node # - do - @@ -63,10 +67,15 @@ def SetGlobals(): Usage += " [-m|--make