mirror of https://github.com/KLayout/klayout.git
Overhaul the Mac build system for Apple Silicon + Tahoe (Part-2)
This commit is contained in:
parent
68ebbe4abc
commit
30332d298a
|
|
@ -2262,11 +2262,12 @@ def Deploy_Binaries_For_Bundle(config, parameters):
|
|||
else:
|
||||
print( " [8] Skipped deploying Qt's Frameworks and optional Python/Ruby Frameworks..." )
|
||||
print( "##### Finished deploying the libraries and executables for <klayout.app> #####" )
|
||||
print("")
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# [11] Sign the application bundle
|
||||
#-------------------------------------------------------------
|
||||
print("")
|
||||
if Platform in ['Tahoe']:
|
||||
print( " [11] Signing the macOS application bundle (ad-hoc) after all post-build edits (install_name_tool/strip)..." )
|
||||
appbundle = "%s/klayout.app" % AbsMacPkgDir
|
||||
res = Sign_App_Bundle(appbundle)
|
||||
|
|
@ -2276,6 +2277,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
|
|||
for tag, ok, out in res["log"][-6:]:
|
||||
print(f"[{tag}] ok={ok}\n{out}")
|
||||
os.chdir(ProjectDir)
|
||||
print("")
|
||||
return 0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@ def Parse_CommandLine_Arguments():
|
|||
global Target # target list
|
||||
global QtTarget # list of (Qt, target, bdType)-tuple
|
||||
global Build # operation flag
|
||||
global Deploy # operation flag
|
||||
global WithPymod # operation flag
|
||||
global QATest # operation flag
|
||||
global QACheck # operation flag
|
||||
|
|
@ -323,6 +324,7 @@ def Parse_CommandLine_Arguments():
|
|||
Usage += " + Or you can pass those list by the 'nightlyBuild.csv' file. |\n"
|
||||
Usage += " A sample file 'macbuild/nightlyBuild.sample.csv' is available. |\n"
|
||||
Usage += " [--build] : build and deploy | disabled\n"
|
||||
Usage += " [--deploy] : deploy only | disabled\n"
|
||||
Usage += " [--pymod] : build and deploy Pymod, too (release build only) | disabled\n"
|
||||
Usage += " [--test] : run the QA Test | disabled\n"
|
||||
Usage += " [--check] : check the QA Test results | disabled\n"
|
||||
|
|
@ -365,6 +367,12 @@ def Parse_CommandLine_Arguments():
|
|||
default=False,
|
||||
help='build and deploy' )
|
||||
|
||||
p.add_option( '--deploy',
|
||||
action='store_true',
|
||||
dest='deploy',
|
||||
default=False,
|
||||
help='deploy only' )
|
||||
|
||||
p.add_option( '--pymod',
|
||||
action='store_true',
|
||||
dest='with_pymod',
|
||||
|
|
@ -411,6 +419,7 @@ def Parse_CommandLine_Arguments():
|
|||
targets = "%s" % targetopt,
|
||||
qt_target = list(),
|
||||
build = False,
|
||||
deploy = False,
|
||||
with_pymod = False,
|
||||
qa_test = False,
|
||||
qa_check = False,
|
||||
|
|
@ -501,6 +510,7 @@ def Parse_CommandLine_Arguments():
|
|||
sys.exit(0)
|
||||
|
||||
Build = opt.build
|
||||
Deploy = opt.deploy
|
||||
WithPymod = opt.with_pymod
|
||||
QATest = opt.qa_test
|
||||
QACheck = opt.qa_check
|
||||
|
|
@ -526,7 +536,7 @@ def Parse_CommandLine_Arguments():
|
|||
Upload = True
|
||||
Dropbox = opt.upload
|
||||
|
||||
if not (Build or QATest or QACheck or MakeDMG or CleanDMG or Upload):
|
||||
if not (Build or Deploy or QATest or QACheck or MakeDMG or CleanDMG or Upload):
|
||||
print( "! No action selected" )
|
||||
print(Usage)
|
||||
sys.exit(0)
|
||||
|
|
@ -534,7 +544,7 @@ def Parse_CommandLine_Arguments():
|
|||
#------------------------------------------------------------------------------
|
||||
## To build and deploy
|
||||
#------------------------------------------------------------------------------
|
||||
def Build_Deploy():
|
||||
def Build_Deploy( deployonly=False ):
|
||||
pyBuilder = "./build4mac.py"
|
||||
myPlatform = Test_My_Platform()
|
||||
buildOp, logfile = Get_Build_Options( Get_Build_Target_Dict(), myPlatform )
|
||||
|
|
@ -571,6 +581,7 @@ def Build_Deploy():
|
|||
print( "" )
|
||||
continue
|
||||
|
||||
if not deployonly:
|
||||
if subprocess.call( command1, shell=False ) != 0:
|
||||
print( "", file=sys.stderr )
|
||||
print( "-----------------------------------------------------------------", file=sys.stderr )
|
||||
|
|
@ -784,7 +795,10 @@ def Main():
|
|||
Parse_CommandLine_Arguments()
|
||||
|
||||
if Build:
|
||||
Build_Deploy()
|
||||
Build_Deploy(deployonly=False)
|
||||
if Deploy:
|
||||
Build_Deploy(deployonly=True)
|
||||
sys.exit(0)
|
||||
if QATest:
|
||||
Run_QATest( [] ) # ex. ['pymod', 'pya']
|
||||
if QACheck:
|
||||
|
|
|
|||
Loading…
Reference in New Issue