adding QtCustom flag for macos building

This commit is contained in:
Thomas Ferreira de Lima 2018-02-07 10:51:38 -05:00
parent ee0c348e14
commit 4e4beefe3b
2 changed files with 19 additions and 6 deletions

View File

@ -239,7 +239,7 @@ def ParseCommandLineArguments():
quit()
# Determine Qt type
candidates = [ i.upper() for i in ['Qt4MacPorts', 'Qt5MacPorts'] ]
candidates = [ i.upper() for i in ['Qt4MacPorts', 'Qt5MacPorts', 'Qt5Custom'] ]
ModuleQt = ""
index = 0
for item in candidates:
@ -250,6 +250,9 @@ def ParseCommandLineArguments():
elif index == 1:
ModuleQt = 'Qt5MacPorts'
break
elif index == 2:
ModuleQt = 'Qt5Custom'
break
else:
index += 1
if ModuleQt == "":
@ -433,9 +436,9 @@ def RunMainBuildBash():
AbsMacBuildLog = "%s/qt5.build.macos-%s-%s.log" % (ProjectDir, Platform, mode)
parameters += " \\\n -bin %s" % MacBinDir
parameters += " \\\n -build %s" % MacBuildDir
elif ModuleQt == 'Qt5Brew':
elif ModuleQt == 'Qt5Custom':
parameters += " \\\n -qt5"
parameters += " \\\n -qmake %s" % Qt5Brew['qmake']
parameters += " \\\n -qmake %s" % Qt5Custom['qmake']
MacPkgDir = "./qt5.pkg.macos-%s-%s" % (Platform, mode)
MacBinDir = "./qt5.bin.macos-%s-%s" % (Platform, mode)
MacBuildDir = "./qt5.build.macos-%s-%s" % (Platform, mode)
@ -543,9 +546,9 @@ def DeployBinariesForBundle():
if not DeploymentF and not DeploymentP:
return 1
if DeploymentF and NonOSStdLang:
print( "!!! You chose <-y|--deploy> while using non-OS-standard script language.", file=sys.stderr )
print( "WARNING!!! You chose <-y|--deploy> while using non-OS-standard script language.", file=sys.stderr )
print( " Use <-Y|--DEPLOY> instead", file=sys.stderr )
return 1
#return 1
if not os.path.isfile(MacBuildLog):
print( "!!! Build log file <%s> does not present !!!" % MacBuildLog, file=sys.stderr )
return 1
@ -748,6 +751,10 @@ def DeployBinariesForBundle():
deploytool = Qt5MacPorts['deploy']
app_bundle = "klayout.app"
options = macdepQtOpt + verbose
elif ModuleQt == 'Qt5Custom':
deploytool = Qt5Custom['deploy']
app_bundle = "klayout.app"
options = macdepQtOpt + verbose
os.chdir(ProjectDir)
os.chdir(MacPkgDir)

View File

@ -21,7 +21,7 @@ XcodeToolChain = { 'nameID': '/usr/bin/install_name_tool -id ',
#-----------------------------------------------------
# [1] Qt
#-----------------------------------------------------
Qts = [ 'Qt4MacPorts', 'Qt5MacPorts' ]
Qts = [ 'Qt4MacPorts', 'Qt5MacPorts', 'Qt5Custom' ]
#-----------------------------------------------------
# Whereabout of different components of Qt4
@ -47,6 +47,12 @@ Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
# 'deploy': '/usr/local/Cellar/qt5/5.10.0_1/bin/macdeployqt'
# }
# Qt5 Custom (https://www1.qt.io/offline-installers/)
# [Key Type Name] = 'Qt5Custom'
Qt5Custom = { 'qmake' : '~/Qt5.9.4/5.9.4/clang_64/bin/qmake',
'deploy': '~/Qt5.9.4/5.9.4/clang_64/bin/macdeployqt'
}
#-----------------------------------------------------
# [2] Ruby
#-----------------------------------------------------