Merge branch '0.29.3-mac1' into 0.29.4-mac1

This commit is contained in:
Kazunari Sekigawa 2024-07-09 18:42:03 +09:00
commit 646a356d96
7 changed files with 266 additions and 142 deletions

View File

@ -1,6 +1,6 @@
Relevant KLayout version: 0.29.2<br> Relevant KLayout version: 0.29.3<br>
Author: Kazzz-S<br> Author: Kazzz-S<br>
Last modified: 2024-06-09<br> Last modified: 2024-07-05<br>
# 1. Introduction # 1. Introduction
This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.29.0 or later for different 64-bit macOS, including: This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.29.0 or later for different 64-bit macOS, including:
@ -61,7 +61,7 @@ You need to have the followings:
# 5. Command-line options of **`build4mac.py`** # 5. Command-line options of **`build4mac.py`**
**`build4mac.py`** is the top level Python script for for building KLayout for a macOS. **`build4mac.py`** is the top level Python script for building KLayout for a macOS.
The operating system type is detected automatically. The operating system type is detected automatically.
``` ```
@ -102,7 +102,7 @@ $ [python] ./build4mac.py
[-u|--noqtuitools] : don't include uitools in Qt binding | disabled [-u|--noqtuitools] : don't include uitools in Qt binding | disabled
[-g|--nolibgit2] : don't include libgit2 for Git package support | disabled [-g|--nolibgit2] : don't include libgit2 for Git package support | disabled
[-m|--make <option>] : option passed to 'make' | '--jobs=4' [-m|--make <option>] : option passed to 'make' | '--jobs=4'
[-d|--debug] : enable debug mode build | disabled [-d|--debug] : enable debug mode build; AddressSanitizer (ASAN) is linked | disabled
[-c|--checkcom] : check command-line and exit without building | disabled [-c|--checkcom] : check command-line and exit without building | disabled
[-y|--deploy] : deploy executables and dylibs, including Qt's Frameworks | disabled [-y|--deploy] : deploy executables and dylibs, including Qt's Frameworks | disabled
[-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled
@ -189,10 +189,8 @@ $ ./build4mac.py -q qt5macports -r mp33 -p mp311 -Y
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation. 4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
### 6C. Fully Homebrew-flavored build with Homebrew Ruby 3.3 and Homebrew Python 3.11 ### 6C. Fully Homebrew-flavored build with Homebrew Ruby 3.3 and Homebrew Python 3.11
> [!CAUTION] > [!IMPORTANT]
> To build KLayout >= 0.29.0, you need "Qt6" to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br> > To build KLayout >= 0.29.0, you need "Qt6" >= 6.7.1 to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br>
> However, the current KLayout is not compliant with the latest Qt6.7.0, so you will get another compilation error.<br>
> Therefore, this section will be disabled for the time being.
0. Install Homebrew, then install Qt6, Ruby 3.3, Python 3.11, and libgit2 by 0. Install Homebrew, then install Qt6, Ruby 3.3, Python 3.11, and libgit2 by
``` ```
@ -225,10 +223,8 @@ $ ./build4mac.py -q qt6brew -r hb33 -p hb311 -Y
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation. 4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
### 6D. Partially Homebrew-flavored build with System Ruby and Homebrew Python 3.11 ### 6D. Partially Homebrew-flavored build with System Ruby and Homebrew Python 3.11
> [!CAUTION] > [!IMPORTANT]
> To build KLayout >= 0.29.0, you need "Qt6" to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br> > To build KLayout >= 0.29.0, you need "Qt6" >= 6.7.1 to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br>
> However, the current KLayout is not compliant with the latest Qt6.7.0, so you will get another compilation error.<br>
> Therefore, this section will be disabled for the time being.
0. Install Homebrew, then install Qt6, Python 3.11, and libgit2 by 0. Install Homebrew, then install Qt6, Python 3.11, and libgit2 by
``` ```
@ -263,7 +259,7 @@ $ ./build4mac.py -q qt6brew -r sys -p hb311 -y
### 6E. Heterogeneous combination of MacPorts Qt5, System Ruby, and Homebrew Python 3.11 ### 6E. Heterogeneous combination of MacPorts Qt5, System Ruby, and Homebrew Python 3.11
> [!IMPORTANT] > [!IMPORTANT]
> This is a practical solution for building an HW*.dmg package. > This is another practical solution for building a popular HW*.dmg package.
0. Install MacPorts, then install Qt5 and libgit2 by 0. Install MacPorts, then install Qt5 and libgit2 by
``` ```
@ -347,7 +343,37 @@ A sample content (`*.app.Bash`) of the script bundle can be found in `Resources/
---- ----
# 7. Making a DMG installer # 7. QA Tests
You can optionally conduct QA tests using the `ut_runner` executable.<br>
[This forum post](https://www.klayout.de/forum/discussion/comment/11012/#Comment_11012) provides information on the unit tests, mainly for Linux.
In the macOS environment, the QA test working directory is `[ST|LW|HB]-build_directory.macQAT`, where you will find `macQAT.py`, a wrapper script for the `ut_runner` executable.<br>
Some required environment variables including `TESTSRC`, `TESTTMP`, and `DYLD_LIBRARY_PATH` are set by `macQAT.py`.<br>
1. Change directory to `[ST|LW|HB]-build_directory.macQAT`
```
cd [ST|LW|HB]-build_directory.macQAT
```
2. To print usage of `ut_runner`, run `macQAT.py` with '-u'
```
./macQAT.py -u
```
3. To start the KLayout main GUI window, run `macQAT.py` with '-k'
```
./macQAT.py -k
```
4. To normally run `ut_runner`, invoke `macQAT.py` with '-r'
```
./macQAT.py -r
```
If required, you can use the `-x <test>` option to skip some erroneous tests.
----
# 8. Making a DMG installer
You can make a DMG installer using another Python script **`makeDMG4mac.py`**.<br> You can make a DMG installer using another Python script **`makeDMG4mac.py`**.<br>
This script requires a directory generated by **`build4mac.py`** with the [-y|-Y] option (refer to 6B through 6E). This script requires a directory generated by **`build4mac.py`** with the [-y|-Y] option (refer to 6B through 6E).

View File

@ -80,7 +80,7 @@ def GenerateUsage(platform):
usage += " [-u|--noqtuitools] : don't include uitools in Qt binding | disabled\n" usage += " [-u|--noqtuitools] : don't include uitools in Qt binding | disabled\n"
usage += " [-g|--nolibgit2] : don't include libgit2 for Git package support | disabled\n" usage += " [-g|--nolibgit2] : don't include libgit2 for Git package support | disabled\n"
usage += " [-m|--make <option>] : option passed to 'make' | '--jobs=4'\n" usage += " [-m|--make <option>] : option passed to 'make' | '--jobs=4'\n"
usage += " [-d|--debug] : enable debug mode build | disabled\n" usage += " [-d|--debug] : enable debug mode build; AddressSanitizer (ASAN) is linked | disabled\n"
usage += " [-c|--checkcom] : check command-line and exit without building | 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, including Qt's Frameworks | disabled\n"
usage += " [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled\n" usage += " [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled\n"
@ -1007,6 +1007,7 @@ def Build_pymod_wheel(parameters):
# @return 0 on success; non-zero (1), otherwise # @return 0 on success; non-zero (1), otherwise
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def Run_Build_Command(config, parameters): def Run_Build_Command(config, parameters):
DebugMode = config['DebugMode']
ModuleQt = config['ModuleQt'] ModuleQt = config['ModuleQt']
NoLibGit2 = config['NoLibGit2'] NoLibGit2 = config['NoLibGit2']
ToolDebug = config['ToolDebug'] ToolDebug = config['ToolDebug']
@ -1015,8 +1016,22 @@ def Run_Build_Command(config, parameters):
else: else:
jump2pymod_wheel = True jump2pymod_wheel = True
#-----------------------------------------------------------------
# [1] Use the AddressSanitizer (ASan) in the debug build.
# This environment variable is tested in ../src/klayout.pri.
#-----------------------------------------------------------------
try:
useAsan = os.environ['MAC_USE_ASAN']
except KeyError:
pass
else:
del os.environ['MAC_USE_ASAN']
if DebugMode:
os.environ['MAC_USE_ASAN'] = "1"
#----------------------------------------------------- #-----------------------------------------------------
# [1] Set two environment variables to use libgit2 # [2] Set two environment variables to use libgit2
#----------------------------------------------------- #-----------------------------------------------------
if not NoLibGit2: if not NoLibGit2:
# Using MacPorts # Using MacPorts
@ -1048,7 +1063,7 @@ def Run_Build_Command(config, parameters):
if not jump2pymod_wheel: if not jump2pymod_wheel:
#----------------------------------------------------- #-----------------------------------------------------
# [2] Set parameters passed to the main Bash script # [3] Set parameters passed to the main Bash script
#----------------------------------------------------- #-----------------------------------------------------
cmd_args = "" cmd_args = ""
@ -1106,7 +1121,7 @@ def Run_Build_Command(config, parameters):
cmd_args += " \\\n -nopython" cmd_args += " \\\n -nopython"
#----------------------------------------------------- #-----------------------------------------------------
# [3] Make the consolidated command line # [4] Make the consolidated command line
#----------------------------------------------------- #-----------------------------------------------------
command = "time" command = "time"
command += " \\\n %s" % parameters['build_cmd'] command += " \\\n %s" % parameters['build_cmd']
@ -1119,7 +1134,7 @@ def Run_Build_Command(config, parameters):
sys.exit(0) sys.exit(0)
#----------------------------------------------------- #-----------------------------------------------------
# [4] Invoke the main Bash script; takes time:-) # [5] Invoke the main Bash script; takes time:-)
#----------------------------------------------------- #-----------------------------------------------------
myscript = os.path.basename(__file__) myscript = os.path.basename(__file__)
ret = subprocess.call( command, shell=True ) ret = subprocess.call( command, shell=True )
@ -1138,7 +1153,7 @@ def Run_Build_Command(config, parameters):
print( "", file=sys.stderr ) print( "", file=sys.stderr )
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# [5] Prepare "*.macQAT/" directory for the QATest. # [6] Prepare "*.macQAT/" directory for the QATest.
# Binaries under "*.macQAT/" such as *.dylib will be touched later. # Binaries under "*.macQAT/" such as *.dylib will be touched later.
#------------------------------------------------------------------------ #------------------------------------------------------------------------
print( "### Preparing <%s>" % MacBuildDirQAT ) print( "### Preparing <%s>" % MacBuildDirQAT )
@ -1177,7 +1192,7 @@ def Run_Build_Command(config, parameters):
print( "", file=sys.stderr ) print( "", file=sys.stderr )
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# [6] Build <pymod> for some predetermined environments on demand # [7] Build <pymod> for some predetermined environments on demand
#------------------------------------------------------------------------ #------------------------------------------------------------------------
BuildPymodWhl = parameters['BuildPymodWhl'] BuildPymodWhl = parameters['BuildPymodWhl']
if BuildPymodWhl: if BuildPymodWhl:

View File

@ -216,7 +216,9 @@ def ExportEnvVariables():
MyEnviron[ 'TESTTMP' ] = WorkDir MyEnviron[ 'TESTTMP' ] = WorkDir
if System == "Darwin": if System == "Darwin":
MyEnviron[ 'DYLD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir) MyEnviron[ 'DYLD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir)
for env in [ 'TESTSRC', 'TESTTMP', 'DYLD_LIBRARY_PATH' ]: MyEnviron[ 'MallocNanoZone' ] = "0"
MyEnviron[ 'ASAN_OPTIONS' ] = "ast_unwind_on_malloc=0:verbosity=1:detect_leaks=0:abort_on_error=0:halt_on_error=0:symbolize=1"
for env in [ 'TESTSRC', 'TESTTMP', 'DYLD_LIBRARY_PATH', 'MallocNanoZone', 'ASAN_OPTIONS' ]:
os.environ[env] = MyEnviron[env] os.environ[env] = MyEnviron[env]
else: else:
MyEnviron[ 'LD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir) MyEnviron[ 'LD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir)

View File

@ -49,6 +49,7 @@ def SetGlobals():
global DMGSerialNum # the DMG serial number global DMGSerialNum # the DMG serial number
global PackagePrefix # the package prefix: LW-', 'HW-', or 'EX-' global PackagePrefix # the package prefix: LW-', 'HW-', or 'EX-'
global QtIdentification # Qt identification global QtIdentification # Qt identification
global BuildType # build type ['release', 'debug']
global RubyPythonID # Ruby- and Python-identification global RubyPythonID # Ruby- and Python-identification
global KLVersion # KLayout's version global KLVersion # KLayout's version
global OccupiedDS # approx. occupied disc space global OccupiedDS # approx. occupied disc space
@ -144,6 +145,7 @@ def SetGlobals():
DMGSerialNum = 1 DMGSerialNum = 1
PackagePrefix = "" PackagePrefix = ""
QtIdentification = "" QtIdentification = ""
BuildType = ""
RubyPythonID = "" RubyPythonID = ""
KLVersion = GetKLayoutVersionFrom( "./version.sh" ) KLVersion = GetKLayoutVersionFrom( "./version.sh" )
OccupiedDS = -1 OccupiedDS = -1
@ -236,6 +238,7 @@ def CheckPkgDirectory():
global BundleName global BundleName
global PackagePrefix global PackagePrefix
global QtIdentification global QtIdentification
global BuildType
global RubyPythonID global RubyPythonID
global BackgroundPNG global BackgroundPNG
global LatestOSMacPorts global LatestOSMacPorts
@ -270,7 +273,8 @@ def CheckPkgDirectory():
# * ST-qt6MP.pkg.macos-Monterey-release-RsysPsys # * ST-qt6MP.pkg.macos-Monterey-release-RsysPsys
# * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311 # * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311
#----------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------
patQRP = u'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-]release[-])([0-9A-Za-z]+)' # 0 1 2 3 4 5 6 7
patQRP = u'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-])(release|debug)([-])([0-9A-Za-z]+)'
regQRP = re.compile(patQRP) regQRP = re.compile(patQRP)
if not regQRP.match(PkgDir): if not regQRP.match(PkgDir):
print( "! Cannot identify (Qt, Ruby, Python) from the package directory name" ) print( "! Cannot identify (Qt, Ruby, Python) from the package directory name" )
@ -283,7 +287,6 @@ def CheckPkgDirectory():
pkgdirComponents = regQRP.match(PkgDir).groups() pkgdirComponents = regQRP.match(PkgDir).groups()
PackagePrefix = pkgdirComponents[0] PackagePrefix = pkgdirComponents[0]
QtIdentification = pkgdirComponents[2] QtIdentification = pkgdirComponents[2]
RubyPythonID = pkgdirComponents[5]
if QtIdentification.find('qt5') == 0: if QtIdentification.find('qt5') == 0:
BackgroundPNG = "KLayoutDMG-BackQt5.png" BackgroundPNG = "KLayoutDMG-BackQt5.png"
elif QtIdentification.find('qt6') == 0: elif QtIdentification.find('qt6') == 0:
@ -291,6 +294,14 @@ def CheckPkgDirectory():
else: else:
BackgroundPNG = None BackgroundPNG = None
raise Exception( "! neither qt5 nor qt6" ) raise Exception( "! neither qt5 nor qt6" )
if pkgdirComponents[5] == 'release':
BuildType = 'release'
elif pkgdirComponents[5] == 'debug':
BuildType = 'debug'
else:
BuildType = None
raise Exception( "! neither release nor debug" )
RubyPythonID = pkgdirComponents[7]
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# [3] Check if the "LatestOS" with MacPorts / Homebrew / Anaconda3 # [3] Check if the "LatestOS" with MacPorts / Homebrew / Anaconda3
@ -435,6 +446,7 @@ def ParseCommandLineArguments():
global UnsafePkg global UnsafePkg
global PackagePrefix global PackagePrefix
global QtIdentification global QtIdentification
global BuildType
global RubyPythonID global RubyPythonID
global KLVersion global KLVersion
global OccupiedDS global OccupiedDS
@ -532,6 +544,8 @@ def ParseCommandLineArguments():
% (PackagePrefix, KLVersion, GenOSName, Platform, DMGSerialNum, QtIdentification, RubyPythonID) % (PackagePrefix, KLVersion, GenOSName, Platform, DMGSerialNum, QtIdentification, RubyPythonID)
if Machine == "arm64": # with an Apple Silicon Chip if Machine == "arm64": # with an Apple Silicon Chip
TargetDMG = Machine + TargetDMG TargetDMG = Machine + TargetDMG
if BuildType == "debug": # in the case of 'debug' build
TargetDMG = "debug-" + TargetDMG
return return
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -607,7 +621,7 @@ def MakeTargetDMGFile(msg=""):
#---------------------------------------------------- #----------------------------------------------------
if os.path.exists(WorkDMG): if os.path.exists(WorkDMG):
os.remove(WorkDMG) os.remove(WorkDMG)
dmgsize = OccupiedDS + 20 # approx. occupied size plus 20[MB] dmgsize = OccupiedDS + int(0.2*OccupiedDS) # approx. occupied size plus 20[%]
cmdline = 'hdiutil create -srcfolder %s -volname %s -fs HFS+ -fsargs "-c c=64,a=16,e=16" ' cmdline = 'hdiutil create -srcfolder %s -volname %s -fs HFS+ -fsargs "-c c=64,a=16,e=16" '
cmdline += '-format UDRW -size %dm %s' cmdline += '-format UDRW -size %dm %s'
command = cmdline % (PkgDir, VolumeDMG, dmgsize, WorkDMG) command = cmdline % (PkgDir, VolumeDMG, dmgsize, WorkDMG)

View File

@ -78,8 +78,8 @@ def Get_Build_Target_Dict():
# @param[in] platform platform name # @param[in] platform platform name
# #
# @return (dictionary1, dictionary2)-tupple # @return (dictionary1, dictionary2)-tupple
# dictionary1: key=(qtVer, mnemonic), value=build option list # dictionary1: key=(qtVer, mnemonic, bdType), value=build option list
# dictionary2: key=(qtVer, mnemonic), value=log file name # dictionary2: key=(qtVer, mnemonic, bdType), value=log file name
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def Get_Build_Options( targetDic, platform ): def Get_Build_Options( targetDic, platform ):
buildOp = dict() buildOp = dict()
@ -94,38 +94,61 @@ def Get_Build_Options( targetDic, platform ):
for key in targetDic.keys(): for key in targetDic.keys():
target = targetDic[key] target = targetDic[key]
if target == "std": if target == "std":
buildOp[(qtVer, "std")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'sys' ] buildOp[(qtVer, "std", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'sys' ]
logfile[(qtVer, "std")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPsys") logfile[(qtVer, "std", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPsys")
buildOp[(qtVer, "std", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'sys', '--debug' ]
logfile[(qtVer, "std", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPsys")
elif target == "ports": elif target == "ports":
buildOp[(qtVer, "ports")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP311' ] buildOp[(qtVer, "ports", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP311' ]
logfile[(qtVer, "ports")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rmp33Pmp311") logfile[(qtVer, "ports", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rmp33Pmp311")
buildOp[(qtVer, "ports", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP311', '--debug' ]
logfile[(qtVer, "ports", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rmp33Pmp311")
elif target == "brew": elif target == "brew":
buildOp[(qtVer, "brew")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB311' ] buildOp[(qtVer, "brew", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB311' ]
logfile[(qtVer, "brew")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311") logfile[(qtVer, "brew", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311")
buildOp[(qtVer, "brew", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB311', '--debug' ]
logfile[(qtVer, "brew", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rhb33Phb311")
elif target == "brewHW": elif target == "brewHW":
buildOp[(qtVer, "brewHW")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HB311' ] buildOp[(qtVer, "brewHW", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HB311' ]
logfile[(qtVer, "brewHW")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311") logfile[(qtVer, "brewHW", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311")
buildOp[(qtVer, "brewHW", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HB311', '--debug' ]
logfile[(qtVer, "brewHW", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPhb311")
elif target == "ana3": elif target == "ana3":
buildOp[(qtVer, "ana3")] = [ '-q', '%sAna3' % qtType, '-r', 'Ana3', '-p', 'Ana3' ] buildOp[(qtVer, "ana3", "r")] = [ '-q', '%sAna3' % qtType, '-r', 'Ana3', '-p', 'Ana3' ]
logfile[(qtVer, "ana3")] = "%sAna3.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rana3Pana3") logfile[(qtVer, "ana3", "r")] = "%sAna3.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rana3Pana3")
buildOp[(qtVer, "ana3", "d")] = [ '-q', '%sAna3' % qtType, '-r', 'Ana3', '-p', 'Ana3', '--debug' ]
logfile[(qtVer, "ana3", "d")] = "%sAna3.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rana3Pana3")
elif target == "brewA": elif target == "brewA":
buildOp[(qtVer, "brewA")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HBAuto' ] buildOp[(qtVer, "brewA", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HBAuto' ]
logfile[(qtVer, "brewA")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phbauto") logfile[(qtVer, "brewA", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phbauto")
buildOp[(qtVer, "brewA", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HBAuto', '--debug' ]
logfile[(qtVer, "brewA", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rhb33Phbauto")
elif target == "brewAHW": elif target == "brewAHW":
buildOp[(qtVer, "brewAHW")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HBAuto' ] buildOp[(qtVer, "brewAHW", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HBAuto' ]
logfile[(qtVer, "brewAHW")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhbauto") logfile[(qtVer, "brewAHW", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhbauto")
buildOp[(qtVer, "brewAHW", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HBAuto', '--debug' ]
logfile[(qtVer, "brewAHW", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPhbauto")
elif target == "pbrew": elif target == "pbrew":
buildOp[(qtVer, "pbrew")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB311' ] buildOp[(qtVer, "pbrew", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB311' ]
logfile[(qtVer, "pbrew")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311") logfile[(qtVer, "pbrew", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311")
buildOp[(qtVer, "pbrew", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB311', '--debug' ]
logfile[(qtVer, "pbrew", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rhb33Phb311")
elif target == "pbrewHW": elif target == "pbrewHW":
buildOp[(qtVer, "pbrewHW")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'HB311' ] buildOp[(qtVer, "pbrewHW", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'HB311' ]
logfile[(qtVer, "pbrewHW")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311") logfile[(qtVer, "pbrewHW", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311")
buildOp[(qtVer, "pbrewHW", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'HB311', '--debug' ]
logfile[(qtVer, "pbrewHW", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPhb311")
if WithPymod: if WithPymod:
buildOp[(qtVer,"ports")] = buildOp[(qtVer,"ports")] + ['--buildPymod'] buildOp[(qtVer, "ports", "r")] = buildOp[(qtVer, "ports", "r")] + ['--buildPymod']
buildOp[(qtVer,"brew")] = buildOp[(qtVer,"brew")] + ['--buildPymod'] buildOp[(qtVer, "brew", "r")] = buildOp[(qtVer, "brew", "r")] + ['--buildPymod']
buildOp[(qtVer,"ana3")] = buildOp[(qtVer,"ana3")] + ['--buildPymod'] buildOp[(qtVer, "ana3", "r")] = buildOp[(qtVer, "ana3", "r")] + ['--buildPymod']
buildOp[(qtVer,"pbrew")] = buildOp[(qtVer,"pbrew")] + ['--buildPymod'] buildOp[(qtVer, "pbrew", "r")] = buildOp[(qtVer, "pbrew", "r")] + ['--buildPymod']
buildOp[(qtVer, "ports", "d")] = buildOp[(qtVer, "ports", "d")]
buildOp[(qtVer, "brew", "d")] = buildOp[(qtVer, "brew", "d")]
buildOp[(qtVer, "ana3", "d")] = buildOp[(qtVer, "ana3", "d")]
buildOp[(qtVer, "pbrew", "d")] = buildOp[(qtVer, "pbrew", "d")]
return (buildOp, logfile) return (buildOp, logfile)
@ -135,7 +158,7 @@ def Get_Build_Options( targetDic, platform ):
# @param[in] targetDic build target dictionary # @param[in] targetDic build target dictionary
# @param[in] platform platform name # @param[in] platform platform name
# #
# @return a dictionary; key=(qtVer, mnemonic), value=".macQAT" directory # @return a dictionary; key=(qtVer, mnemonic, bdType), value=".macQAT" directory
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def Get_QAT_Directory( targetDic, platform ): def Get_QAT_Directory( targetDic, platform ):
dirQAT = dict() dirQAT = dict()
@ -149,23 +172,32 @@ def Get_QAT_Directory( targetDic, platform ):
for key in targetDic.keys(): for key in targetDic.keys():
target = targetDic[key] target = targetDic[key]
if target == "std": if target == "std":
dirQAT[(qtVer, "std")] = '%sMP.build.macos-%s-release-RsysPsys.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "std", "r")] = '%sMP.build.macos-%s-release-RsysPsys.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "std", "d")] = '%sMP.build.macos-%s-debug-RsysPsys.macQAT' % (qtType.lower(), platform)
elif target == "ports": elif target == "ports":
dirQAT[(qtVer, "ports")] = '%sMP.build.macos-%s-release-Rmp33Pmp311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "ports", "r")] = '%sMP.build.macos-%s-release-Rmp33Pmp311.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "ports", "d")] = '%sMP.build.macos-%s-debug-Rmp33Pmp311.macQAT' % (qtType.lower(), platform)
elif target == "brew": elif target == "brew":
dirQAT[(qtVer, "brew")] = '%sBrew.build.macos-%s-release-Rhb33Phb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brew", "r")] = '%sBrew.build.macos-%s-release-Rhb33Phb311.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "brew", "d")] = '%sBrew.build.macos-%s-debug-Rhb33Phb311.macQAT' % (qtType.lower(), platform)
elif target == "brewHW": elif target == "brewHW":
dirQAT[(qtVer, "brewHW")] = '%sBrew.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brewHW", "r")] = '%sBrew.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "brewHW", "d")] = '%sBrew.build.macos-%s-debug-RsysPhb311.macQAT' % (qtType.lower(), platform)
elif target == "ana3": elif target == "ana3":
dirQAT[(qtVer, "ana3")] = '%sAna3.build.macos-%s-release-Rana3Pana3.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "ana3", "r")] = '%sAna3.build.macos-%s-release-Rana3Pana3.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "ana3", "d")] = '%sAna3.build.macos-%s-debug-Rana3Pana3.macQAT' % (qtType.lower(), platform)
elif target == "brewA": elif target == "brewA":
dirQAT[(qtVer, "brewA")] = '%sBrew.build.macos-%s-release-Rhb33Phbauto.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brewA", "r")] = '%sBrew.build.macos-%s-release-Rhb33Phbauto.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "brewA", "d")] = '%sBrew.build.macos-%s-debug-Rhb33Phbauto.macQAT' % (qtType.lower(), platform)
elif target == "brewAHW": elif target == "brewAHW":
dirQAT[(qtVer, "brewAHW")] = '%sBrew.build.macos-%s-release-RsysPhbauto.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brewAHW", "r")] = '%sBrew.build.macos-%s-release-RsysPhbauto.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "brewAHW", "d")] = '%sBrew.build.macos-%s-debug-RsysPhbauto.macQAT' % (qtType.lower(), platform)
elif target == "pbrew": elif target == "pbrew":
dirQAT[(qtVer, "pbrew")] = '%sMP.build.macos-%s-release-Rhb33Phb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "pbrew", "r")] = '%sMP.build.macos-%s-release-Rhb33Phb311.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "pbrew", "d")] = '%sMP.build.macos-%s-debug-Rhb33Phb311.macQAT' % (qtType.lower(), platform)
elif target == "pbrewHW": elif target == "pbrewHW":
dirQAT[(qtVer, "pbrewHW")] = '%sMP.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "pbrewHW", "r")] = '%sMP.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "pbrewHW", "d")] = '%sMP.build.macos-%s-debug-RsysPhb311.macQAT' % (qtType.lower(), platform)
return dirQAT return dirQAT
@ -177,7 +209,7 @@ def Get_QAT_Directory( targetDic, platform ):
# @param[in] srlDMG serial number of DMG # @param[in] srlDMG serial number of DMG
# @param[in] makeflag True to make; False to clean # @param[in] makeflag True to make; False to clean
# #
# @return a dictionary; key=(qtVer, mnemonic), value=build option list # @return a dictionary; key=(qtVer, mnemonic, bdType), value=build option list
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def Get_Package_Options( targetDic, platform, srlDMG, makeflag ): def Get_Package_Options( targetDic, platform, srlDMG, makeflag ):
packOp = dict() packOp = dict()
@ -196,52 +228,70 @@ def Get_Package_Options( targetDic, platform, srlDMG, makeflag ):
for key in targetDic.keys(): for key in targetDic.keys():
target = targetDic[key] target = targetDic[key]
if target == "std": if target == "std":
packOp[(qtVer, "std")] = [ '-p', 'ST-%sMP.pkg.macos-%s-release-RsysPsys' % (qtType.lower(), platform), packOp[(qtVer, "std", "r")] = [ '-p', 'ST-%sMP.pkg.macos-%s-release-RsysPsys' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "std", "d")] = [ '-p', 'ST-%sMP.pkg.macos-%s-debug-RsysPsys' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "ports": elif target == "ports":
packOp[(qtVer, "ports")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rmp33Pmp311' % (qtType.lower(), platform), packOp[(qtVer, "ports", "r")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rmp33Pmp311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "ports", "d")] = [ '-p', 'LW-%sMP.pkg.macos-%s-debug-Rmp33Pmp311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "brew": elif target == "brew":
packOp[(qtVer, "brew")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform), packOp[(qtVer, "brew", "r")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "brew", "d")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-debug-Rhb33Phb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "brewHW": elif target == "brewHW":
packOp[(qtVer, "brewHW")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform), packOp[(qtVer, "brewHW", "r")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "brewHW", "d")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-debug-RsysPhb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "ana3": elif target == "ana3":
packOp[(qtVer, "ana3")] = [ '-p', 'LW-%sAna3.pkg.macos-%s-release-Rana3Pana3' % (qtType.lower(), platform), packOp[(qtVer, "ana3", "r")] = [ '-p', 'LW-%sAna3.pkg.macos-%s-release-Rana3Pana3' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "ana3", "d")] = [ '-p', 'LW-%sAna3.pkg.macos-%s-debug-Rana3Pana3' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "brewA": elif target == "brewA":
packOp[(qtVer, "brewA")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phbauto' % (qtType.lower(), platform), packOp[(qtVer, "brewA", "r")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phbauto' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "brewA", "d")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-debug-Rhb33Phbauto' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "brewAHW": elif target == "brewAHW":
packOp[(qtVer, "brewAHW")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhbauto' % (qtType.lower(), platform), packOp[(qtVer, "brewAHW", "r")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhbauto' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "brewAHW", "d")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-debug-RsysPhbauto' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "pbrew": elif target == "pbrew":
packOp[(qtVer, "pbrew")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform), packOp[(qtVer, "pbrew", "r")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "pbrew", "d")] = [ '-p', 'LW-%sMP.pkg.macos-%s-debug-Rhb33Phb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
elif target == "pbrewHW": elif target == "pbrewHW":
packOp[(qtVer, "pbrewHW")] = [ '-p', 'HW-%sMP.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform), packOp[(qtVer, "pbrewHW", "r")] = [ '-p', 'HW-%sMP.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "pbrewHW", "d")] = [ '-p', 'HW-%sMP.pkg.macos-%s-debug-RsysPhb311' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ]
return packOp return packOp
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
## To parse the command line arguments ## To parse the command line arguments
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def Parse_CommandLine_Arguments(): def Parse_CommandLine_Arguments():
global Usage # usage global Usage # usage
global QtType # Qt type global QtType # Qt type
global Target # target list global Target # target list
global QtTarget # list of (Qt, target)-tuple global QtTarget # list of (Qt, target, bdType)-tuple
global Build # operation flag global Build # operation flag
global WithPymod # operation flag global WithPymod # operation flag
global QATest # operation flag global QATest # operation flag
global QACheck # operation flag global QACheck # operation flag
global MakeDMG # operation flag global MakeDMG # operation flag
global CleanDMG # operation flag global CleanDMG # operation flag
global Upload # operation flag global Upload # operation flag
global SrlDMG # DMG serial number global SrlDMG # DMG serial number
global Dropbox # Dropbox directory global Dropbox # Dropbox directory
global DryRun # True for dry-run global DryRun # True for dry-run
platform = Test_My_Platform() platform = Test_My_Platform()
if platform in [ "Sonoma", "Ventura", "Monterey" ]: if platform in [ "Sonoma", "Ventura", "Monterey" ]:
@ -262,13 +312,14 @@ def Parse_CommandLine_Arguments():
Usage += " [--target <list>] : 0='std', 1='ports', 2='brew', 3='brewHW', 4='ana3', | '%s'\n" % targetopt Usage += " [--target <list>] : 0='std', 1='ports', 2='brew', 3='brewHW', 4='ana3', | '%s'\n" % targetopt
Usage += " 5='brewA', 6='brewAHW', 12='pbrew', 13='pbrewHW' |\n" Usage += " 5='brewA', 6='brewAHW', 12='pbrew', 13='pbrewHW' |\n"
Usage += " * with --qt=6, use --target='0,1,2,3' (4 is ignored) |\n" Usage += " * with --qt=6, use --target='0,1,2,3' (4 is ignored) |\n"
Usage += " [--qttarget <tuple list>] : ex. '5,1' for qt=5, target=1 | disabled\n" Usage += " [--qttarget <tuple list>] : ex. '5,1,r'| qt=5, target=1, bdType='r' | disabled\n"
Usage += " '5,4,d', '6,4,r', and '6,4,d' are omitted |\n"
Usage += " + This option supersedes, if used, the --qt and --target combination. |\n" Usage += " + This option supersedes, if used, the --qt and --target combination. |\n"
Usage += " + You can use this option multiple times. |\n" Usage += " + You can use this option multiple times. |\n"
Usage += " + Or you can pass those list by the 'nightlyBuild.csv' file. |\n" 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 += " A sample file 'macbuild/nightlyBuild.sample.csv' is available. |\n"
Usage += " [--build] : build and deploy | disabled\n" Usage += " [--build] : build and deploy | disabled\n"
Usage += " [--pymod] : build and deploy Pymod, too | disabled\n" Usage += " [--pymod] : build and deploy Pymod, too (release build only) | disabled\n"
Usage += " [--test] : run the QA Test | disabled\n" Usage += " [--test] : run the QA Test | disabled\n"
Usage += " [--check] : check the QA Test results | disabled\n" Usage += " [--check] : check the QA Test results | disabled\n"
Usage += " [--makedmg|--cleandmg <srlno>] : make or clean DMGs | disabled\n" Usage += " [--makedmg|--cleandmg <srlno>] : make or clean DMGs | disabled\n"
@ -302,7 +353,7 @@ def Parse_CommandLine_Arguments():
p.add_option( '--qttarget', p.add_option( '--qttarget',
action='append', action='append',
dest='qt_target', dest='qt_target',
help='(Qt, target)-tuple' ) help='(Qt, target, bdType)-tuple' )
p.add_option( '--build', p.add_option( '--build',
action='store_true', action='store_true',
@ -396,10 +447,10 @@ def Parse_CommandLine_Arguments():
# Populate QtTarget # Populate QtTarget
QtTarget = list() QtTarget = list()
for target in Target: for target in Target:
QtTarget.append( (QtType, target) ) QtTarget.append( (QtType, target, 'r') )
QtType = None QtType = None
Target = None Target = None
print( "# The --qt and --target combination specifies..." ) print( "# The --qt and --target combination specifies for 'r'elease build..." )
print(QtTarget) print(QtTarget)
if len(opt.qt_target) == 1 and opt.qt_target[0] == "nightlyBuild.csv": # reserved file name if len(opt.qt_target) == 1 and opt.qt_target[0] == "nightlyBuild.csv": # reserved file name
@ -411,18 +462,24 @@ def Parse_CommandLine_Arguments():
print(Usage) print(Usage)
quit() quit()
for i in range(0, len(df)): for i in range(0, len(df)):
qt = df.iloc[i,0] qt = df.iloc[i,0]
idx = df.iloc[i,1] idx = df.iloc[i,1]
if (qt == 5 and idx in [0,1,2,3,4,5,6,12,13]) or (qt == 6 and idx in [0,1,2,3, 5,6,12,13]): bdType = df.iloc[i,2].lower()[0]
QtTarget.append( (qt, targetDic[idx]) ) if (qt == 5 and idx in [0,1,2,3,4,5,6,12,13] and bdType in ['r']) or \
(qt == 5 and idx in [0,1,2,3, 5,6,12,13] and bdType in ['d']) or \
(qt == 6 and idx in [0,1,2,3, 5,6,12,13] and bdType in ['r', 'd']):
QtTarget.append( (qt, targetDic[idx], bdType) )
elif len(opt.qt_target) > 0: elif len(opt.qt_target) > 0:
QtTarget = list() QtTarget = list()
withqttarget = True withqttarget = True
for item in opt.qt_target: for item in opt.qt_target:
qt = int(item.split(",")[0]) qt = int(item.split(",")[0])
idx = int(item.split(",")[1]) idx = int(item.split(",")[1])
if (qt == 5 and idx in [0,1,2,3,4,5,6,12,13]) or (qt == 6 and idx in [0,1,2,3, 5,6,12,13]): bdType = (item.split(",")[2]).lower()[0]
QtTarget.append( (qt, targetDic[idx]) ) if (qt == 5 and idx in [0,1,2,3,4,5,6,12,13] and bdType in ['r']) or \
(qt == 5 and idx in [0,1,2,3, 5,6,12,13] and bdType in ['d']) or \
(qt == 6 and idx in [0,1,2,3, 5,6,12,13] and bdType in ['r', 'd']):
QtTarget.append( (qt, targetDic[idx], bdType) )
else: else:
withqttarget = False withqttarget = False
@ -431,7 +488,7 @@ def Parse_CommandLine_Arguments():
print( "# The --qttarget option superseded the --qt and --target combination" ) print( "# The --qttarget option superseded the --qt and --target combination" )
print(QtTarget) print(QtTarget)
else: else:
print( "! --qttarget is used but there is no valid (Qt, target)-tuple" ) print( "! --qttarget is used but there is no valid (Qt, target, bdTye)-tuple" )
print(Usage) print(Usage)
quit() quit()
@ -474,18 +531,18 @@ def Build_Deploy():
myPlatform = Test_My_Platform() myPlatform = Test_My_Platform()
buildOp, logfile = Get_Build_Options( Get_Build_Target_Dict(), myPlatform ) buildOp, logfile = Get_Build_Options( Get_Build_Target_Dict(), myPlatform )
for qttype, key in QtTarget: for qttype, key, bdType in QtTarget:
if key == "ana3" and qttype == 6: # anaconda3 does not provide Qt6 so far if key == "ana3" and (qttype == 6 or bdType == 'd'): # anaconda3 does not provide Qt6 | debug_lib
continue continue
deplog = logfile[(qttype, key)].replace( ".log", ".dep.log" ) deplog = logfile[(qttype, key, bdType)].replace( ".log", ".dep.log" )
command1 = [ pyBuilder ] + buildOp[(qttype, key)] command1 = [ pyBuilder ] + buildOp[(qttype, key, bdType)]
if key in [ "std", "brewHW", "brewAHW", "pbrewHW" ] : if key in [ "std", "brewHW", "brewAHW", "pbrewHW" ] :
command2 = "time" command2 = "time"
command2 += " \\\n %s" % pyBuilder command2 += " \\\n %s" % pyBuilder
for option in buildOp[(qttype, key)]: for option in buildOp[(qttype, key, bdType)]:
command2 += " \\\n %s" % option command2 += " \\\n %s" % option
command2 += " \\\n %s" % '-y' command2 += " \\\n %s" % '-y'
command2 += " 2>&1 | tee %s; \\\n" % deplog command2 += " 2>&1 | tee %s; \\\n" % deplog
@ -493,7 +550,7 @@ def Build_Deploy():
else: else:
command2 = "time" command2 = "time"
command2 += " \\\n %s" % pyBuilder command2 += " \\\n %s" % pyBuilder
for option in buildOp[(qttype, key)]: for option in buildOp[(qttype, key, bdType)]:
command2 += " \\\n %s" % option command2 += " \\\n %s" % option
command2 += " \\\n %s" % '-Y' command2 += " \\\n %s" % '-Y'
command2 += " 2>&1 | tee %s; \\\n" % deplog command2 += " 2>&1 | tee %s; \\\n" % deplog
@ -544,8 +601,8 @@ def Run_QATest( excludeList ):
myPlatform = Test_My_Platform() myPlatform = Test_My_Platform()
dirQAT = Get_QAT_Directory( Get_Build_Target_Dict(), myPlatform ) dirQAT = Get_QAT_Directory( Get_Build_Target_Dict(), myPlatform )
for qttype, key in QtTarget: for qttype, key, bdType in QtTarget:
if key == "ana3" and qttype == 6: # anaconda3 does not provide Qt6 so far if key == "ana3" and (qttype == 6 or bdType == 'd'): # anaconda3 does not provide Qt6 | debug_lib
continue continue
if key == "ana3": if key == "ana3":
@ -555,9 +612,9 @@ def Run_QATest( excludeList ):
command1 = [ pyRunnerQAT ] + [ '--run' ] command1 = [ pyRunnerQAT ] + [ '--run' ]
if not exclude == "": if not exclude == "":
command1 += [ '--exclude', '%s' % exclude ] command1 += [ '--exclude', '%s' % exclude ]
print( dirQAT[(qttype, key)], command1 ) print( dirQAT[(qttype, key, bdType)], command1 )
#continue #continue
os.chdir( dirQAT[(qttype, key)] ) os.chdir( dirQAT[(qttype, key, bdType)] )
if subprocess.call( command1, shell=False ) != 0: if subprocess.call( command1, shell=False ) != 0:
print( "", file=sys.stderr ) print( "", file=sys.stderr )
@ -585,14 +642,14 @@ def Check_QATest_Results( lines ):
myPlatform = Test_My_Platform() myPlatform = Test_My_Platform()
dirQAT = Get_QAT_Directory( Get_Build_Target_Dict(), myPlatform ) dirQAT = Get_QAT_Directory( Get_Build_Target_Dict(), myPlatform )
for qttype, key in QtTarget: for qttype, key, bdType in QtTarget:
if key == "ana3" and qttype == 6: # anaconda3 does not provide Qt6 so far if key == "ana3" and (qttype == 6 or bdType == 'd'): # anaconda3 does not provide Qt6 | debug_lib
continue continue
os.chdir( dirQAT[(qttype, key)] ) os.chdir( dirQAT[(qttype, key, bdType)] )
logfile = glob.glob( "*.log" ) logfile = glob.glob( "*.log" )
command1 = [ tailCommand ] + [ '-n', '%d' % lines ] + logfile command1 = [ tailCommand ] + [ '-n', '%d' % lines ] + logfile
print( dirQAT[(qttype, key)], command1 ) print( dirQAT[(qttype, key, bdType)], command1 )
#continue #continue
if subprocess.call( command1, shell=False ) != 0: if subprocess.call( command1, shell=False ) != 0:
@ -626,11 +683,11 @@ def DMG_Make( srlDMG ):
shutil.rmtree( stashDMG ) shutil.rmtree( stashDMG )
os.mkdir( stashDMG ) os.mkdir( stashDMG )
for qttype, key in QtTarget: for qttype, key, bdType in QtTarget:
if key == "ana3" and qttype == 6: # anaconda3 does not provide Qt6 so far if key == "ana3" and (qttype == 6 or bdType == 'd'): # anaconda3 does not provide Qt6 | debug_lib
continue continue
command1 = [ pyDMGmaker ] + packOp[(qttype, key)] command1 = [ pyDMGmaker ] + packOp[(qttype, key, bdType)]
print(command1) print(command1)
#continue #continue
@ -666,11 +723,11 @@ def DMG_Clean( srlDMG ):
if os.path.isdir( stashDMG ): if os.path.isdir( stashDMG ):
shutil.rmtree( stashDMG ) shutil.rmtree( stashDMG )
for qttype, key in QtTarget: for qttype, key, bdType in QtTarget:
if key == "ana3" and qttype == 6: # anaconda3 does not provide Qt6 so far if key == "ana3" and (qttype == 6 or bdType == 'd'): # anaconda3 does not provide Qt6 | debug_lib
continue continue
command1 = [ pyDMGmaker ] + packOp[(qttype, key)] command1 = [ pyDMGmaker ] + packOp[(qttype, key, bdType)]
print(command1) print(command1)
#continue #continue

View File

@ -10,19 +10,20 @@
# qtVer = 5 or 6 # qtVer = 5 or 6
# target = [0='std', 1='ports', 2='brew', 3='brewHW', 4='ana3', # target = [0='std', 1='ports', 2='brew', 3='brewHW', 4='ana3',
# 12='pbrew', 13='pbrewHW'] # 12='pbrew', 13='pbrewHW']
# bdType = ['r(elease)', 'd(ebug)']
# note that # note that
# (qtVer,target)=(6,4) will be omitted # (qtVer,target,bdType)=(6,4,r|d) and (5,4,d) will be omitted
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
qtVer,target qtVer,target,bdType
5,0 5,0,r
5,1 5,1,r
6,2 6,2,r
6,13 6,13,r
5,4 5,4,r
#6,0 #6,0,r
#6,1 #6,1,r
#6,2 #6,2,r
#6,3 #6,3,r
#6,4 #6,4,r
#6,12 #6,12,r
#6,13 #6,13,r

Can't render this file because it contains an unexpected character in line 5 and column 30.

View File

@ -118,6 +118,15 @@ equals(HAVE_GIT2, "1") {
DEFINES += HAVE_GIT2 DEFINES += HAVE_GIT2
} }
# Use the Address Sanitizer for the debug build on Mac
mac {
USE_ASAN_MAC = $$system(echo $$(MAC_USE_ASAN))
equals(USE_ASAN_MAC, "1") {
QMAKE_CXXFLAGS += -fsanitize=address
QMAKE_LFLAGS += -fsanitize=address
}
}
equals(HAVE_RUBY, "1") { equals(HAVE_RUBY, "1") {
!isEmpty(BITS_PATH) { !isEmpty(BITS_PATH) {
include($$BITS_PATH/ruby/ruby.pri) include($$BITS_PATH/ruby/ruby.pri)