Updated the build system for Mac to support Monterey

This commit is contained in:
Kazunari Sekigawa 2021-11-16 23:06:24 +09:00
parent bca2164c16
commit 13d2e9018a
3 changed files with 26 additions and 26 deletions

View File

@ -49,7 +49,7 @@ def GenerateUsage(platform):
usage += "<< Usage of 'build4mac.py' >>\n"
usage += " for building KLayout 0.27.4 or later on different Apple macOS / Mac OSX platforms.\n"
usage += "\n"
usage += "$ [python] ./build4mac.py \n"
usage += "$ [python] ./build4mac.py\n"
usage += " option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value\n"
usage += " --------------------------------------------------------------------------------------+---------------\n"
usage += " [-q|--qt <type>] : case-insensitive type=['Qt5MacPorts', 'Qt5Brew', 'Qt5Ana3'] | %s \n" % myQt5
@ -70,23 +70,23 @@ def GenerateUsage(platform):
usage += " : HB38: use Python 3.8 from Homebrew | \n"
usage += " : Ana3: use Python 3.8 from Anaconda3 | \n"
usage += " : HBAuto: use the latest Python 3.x auto-detected from Homebrew | \n"
usage += " [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled \n"
usage += " [-u|--noqtuitools] : don't include uitools in Qt binding | disabled \n"
usage += " [-m|--make <option>] : option passed to 'make' | '--jobs=4' \n"
usage += " [-d|--debug] : enable debug mode build | disabled \n"
usage += " [-c|--checkcom] : check command-line and exit without building | disabled \n"
usage += " [-y|--deploy] : deploy executables and dylibs including Qt's Frameworks | disabled \n"
usage += " [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled \n"
usage += " [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled\n"
usage += " [-u|--noqtuitools] : don't include uitools in Qt binding | disabled\n"
usage += " [-m|--make <option>] : option passed to 'make' | '--jobs=4'\n"
usage += " [-d|--debug] : enable debug mode build | disabled\n"
usage += " [-c|--checkcom] : check command-line and exit without building | disabled\n"
usage += " [-y|--deploy] : deploy executables and dylibs including Qt's Frameworks | disabled\n"
usage += " [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled\n"
usage += " : from the source code and use the tools in the same machine | \n"
usage += " : ! After confirmation of successful build of 'klayout.app', | \n"
usage += " : rerun this script with BOTH: | \n"
usage += " : 1) the same options used for building AND | \n"
usage += " : 2) <-y|--deploy> OR <-Y|--DEPLOY> | \n"
usage += " : optionally with [-v|--verbose <0-3>] | \n"
usage += " [-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1 \n"
usage += " [-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1\n"
usage += " : 0 = no output, 1 = error/warning (default), | \n"
usage += " : 2 = normal, 3 = debug | \n"
usage += " [-?|--?] : print this usage and exit | disabled \n"
usage += " [-?|--?] : print this usage and exit | disabled\n"
usage += "-----------------------------------------------------------------------------------------+---------------\n"
return (usage, moduleset)

View File

@ -75,24 +75,24 @@ def SetGlobals():
global Bit # machine bit-size
Usage = "\n"
Usage += "--------------------------------------------------------------------------------------------------------\n"
Usage += "---------------------------------------------------------------------------------------------------------\n"
Usage += "<< Usage of 'makeDMG4mac.py' >>\n"
Usage += " for making a DMG file of KLayout 0.26.12 or later on different Apple macOS / Mac OSX platforms.\n"
Usage += " for making a DMG file of KLayout 0.27.4 or later on different Apple macOS / Mac OSX platforms.\n"
Usage += "\n"
Usage += "$ [python] ./makeDMG4mac.py \n"
Usage += "$ [python] ./makeDMG4mac.py\n"
Usage += " option & argument : descriptions | default value\n"
Usage += " ----------------------------------------------------------------------------------+---------------\n"
Usage += " <-p|--pkg <dir>> : package directory created by `build4mac.py` with [-y|-Y] | `` \n"
Usage += " ----------------------------------------------------------------------------------+-----------------\n"
Usage += " <-p|--pkg <dir>> : package directory created by `build4mac.py` with [-y|-Y] | ``\n"
Usage += " : like 'ST-qt5MP.pkg.macos-Catalina-release-RsysPsys' | \n"
Usage += " <-c|--clean> : clean the work directory | disabled \n"
Usage += " <-m|--make> : make a compressed DMG file | disabled \n"
Usage += " <-c|--clean> : clean the work directory | disabled\n"
Usage += " <-m|--make> : make a compressed DMG file | disabled\n"
Usage += " : <-c|--clean> and <-m|--make> are mutually exclusive | \n"
Usage += " [-b|--bundle <name>] : forcibly use this bundle name in the DMG | '' \n"
Usage += " [-s|--serial <num>] : DMG serial number | 1 \n"
Usage += " [-u|--unsafe] : Ignores a few checks (use with caution) | disabled \n"
Usage += " [-t|--targetdmg] : Specify output .dmg filename | chosen by script \n"
Usage += " [-?|--?] : print this usage and exit | disabled \n"
Usage += "-------------------------------------------------------------------------------------+------------------\n"
Usage += " [-b|--bundle <name>] : forcibly use this bundle name in the DMG | ''\n"
Usage += " [-s|--serial <num>] : DMG serial number | 1\n"
Usage += " [-u|--unsafe] : Ignores a few checks (use with caution) | disabled\n"
Usage += " [-t|--targetdmg] : Specify output .dmg filename | chosen by script\n"
Usage += " [-?|--?] : print this usage and exit | disabled\n"
Usage += "-------------------------------------------------------------------------------------+-------------------\n"
ProjectDir = os.getcwd()
(System, Node, Release, Version, Machine, Processor) = platform.uname()
@ -137,7 +137,7 @@ def SetGlobals():
sys.exit(1)
if not Machine == "x86_64":
if Machine == "arm64" and Platform == "BigSur": # with an Apple Silicon Chip
if Machine == "arm64" and (Platform == "Monterey" or Platform == "BigSur"): # with an Apple Silicon Chip
print("")
print( "### Your Mac equips an Apple Silicon Chip ###" )
print("")

View File

@ -188,7 +188,7 @@ def Parse_CommandLine_Arguments():
Usage += " nightlyBuild.py [EXPERIMENTAL] \n"
Usage += " << To execute the jobs for making KLayout's DMGs for macOS Catalina, Big Sur, or Monterey >>\n"
Usage += "\n"
Usage += "$ [python] nightlyBuild.py \n"
Usage += "$ [python] nightlyBuild.py\n"
Usage += " option & argument : comment on option if any | default value\n"
Usage += " ------------------------------------------------------------------------+--------------\n"
Usage += " [--target <list>] : 0='std', 1='ports', 2='brew', 3='brewHW', 4='ana3', | '%s'\n" % targetopt
@ -305,7 +305,7 @@ def Parse_CommandLine_Arguments():
Dropbox = opt.upload
if not (Build or QATest or QACheck or MakeDMG or CleanDMG or Upload):
print( "! No option selected" )
print( "! No action selected" )
print(Usage)
quit()