mirror of https://github.com/KLayout/klayout.git
The build system for macOS uses Ruby 3.2 in MacPorts and Homebrew by default (earlier, 3.1) (#1286)
* The build system for macOS uses Ruby 3.2 in MacPorts and Homebrew by default (earlier, 3.1) * The build system for macOS uses Ruby 3.2 in MacPorts and Homebrew by default (earlier, 3.1) * The build system for macOS uses Ruby 3.2 in MacPorts and Homebrew by default (earlier, 3.1) --------- Co-authored-by: Kazunari Sekigawa <kazunari_sekigawa@shinko.co.jp>
This commit is contained in:
parent
3a7e726914
commit
334e9985f3
|
|
@ -1,9 +1,9 @@
|
|||
Relevant KLayout version: 0.28.3<br>
|
||||
Relevant KLayout version: 0.28.4<br>
|
||||
Author: Kazzz-S<br>
|
||||
Last modified: 2023-01-13<br>
|
||||
Last modified: 2023-02-01<br>
|
||||
|
||||
# 1. Introduction
|
||||
This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.28.3 or later for different 64-bit macOS, including:
|
||||
This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.28.4 or later for different 64-bit macOS, including:
|
||||
* Catalina (10.15.7) : the primary development environment
|
||||
* Big Sur (11.x) : experimental; Apple (M1|M2) chip is not tested since the author does not own an (M1|M2) Mac
|
||||
* Monterey (12.x) : -- ditto --
|
||||
|
|
@ -55,8 +55,8 @@ $ /usr/bin/python --version
|
|||
Python 2.7.16
|
||||
```
|
||||
Note that this configuration for backward compatibility is possible only for macOS Catalina (10.15.7).<br>
|
||||
In contrast, Homebrew's Ruby 3.1 and Python 3.9 are the default environment for Big Sur, Monterey, and Ventura.<br>
|
||||
Since Python 2.7 is already deprecated, using MacPorts' or Homebrew's Ruby 3.1 and Python 3.9 are also recommended for Catalina.
|
||||
In contrast, Homebrew's Ruby 3.2 and Python 3.9 are the default environment for Big Sur, Monterey, and Ventura.<br>
|
||||
Since Python 2.7 is already deprecated, using MacPorts' or Homebrew's Ruby 3.2 and Python 3.9 are also recommended for Catalina.
|
||||
|
||||
The build script **`build4mac.py`** provides several possible combinations of Qt5, Ruy, and Python modules to accommodate such a slightly complex environment.<br>
|
||||
Some typical use cases are described in Section 6.
|
||||
|
|
@ -73,7 +73,7 @@ You need to have the followings:
|
|||
```
|
||||
---------------------------------------------------------------------------------------------------------
|
||||
<< Usage of 'build4mac.py' >>
|
||||
for building KLayout 0.28.3 or later on different Apple macOS / Mac OSX platforms.
|
||||
for building KLayout 0.28.4 or later on different Apple macOS / Mac OSX platforms.
|
||||
|
||||
$ [python] ./build4mac.py
|
||||
option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value
|
||||
|
|
@ -86,12 +86,15 @@ $ [python] ./build4mac.py
|
|||
: Qt6MacPorts: use Qt6 from MacPorts (*) |
|
||||
: Qt6Brew: use Qt6 from Homebrew (*) |
|
||||
: (*) migration to Qt6 is ongoing |
|
||||
[-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3'] | sys
|
||||
[-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3', | sys
|
||||
: 'MP32', HB32'] |
|
||||
: nil: don't bind Ruby |
|
||||
: Sys: use OS-bundled Ruby [2.0 - 2.6] depending on OS |
|
||||
: MP31: use Ruby 3.1 from MacPorts |
|
||||
: HB31: use Ruby 3.1 from Homebrew |
|
||||
: Ana3: use Ruby 3.1 from Anaconda3 |
|
||||
: MP32: use Ruby 3.2 from MacPorts |
|
||||
: HB32: use Ruby 3.2 from Homebrew |
|
||||
[-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP38', 'HB38', 'Ana3', | sys
|
||||
: 'MP39', HB39', 'HBAuto'] |
|
||||
: nil: don't bind Python |
|
||||
|
|
@ -119,7 +122,7 @@ $ [python] ./build4mac.py
|
|||
[-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1
|
||||
: 0 = no output, 1 = error/warning (default), |
|
||||
: 2 = normal, 3 = debug |
|
||||
[-?|--?] : print this usage and exit | disabled
|
||||
[-?|--?] : print this usage and exit; in zsh, quote like '-?' or '--?' | disabled
|
||||
-----------------------------------------------------------------------------------------+---------------
|
||||
```
|
||||
|
||||
|
|
@ -127,7 +130,7 @@ $ [python] ./build4mac.py
|
|||
```
|
||||
---------------------------------------------------------------------------------------------------------
|
||||
<< Usage of 'build4mac.py' >>
|
||||
for building KLayout 0.28.3 or later on different Apple macOS / Mac OSX platforms.
|
||||
for building KLayout 0.28.4 or later on different Apple macOS / Mac OSX platforms.
|
||||
|
||||
$ [python] ./build4mac.py
|
||||
option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value
|
||||
|
|
@ -140,12 +143,15 @@ $ [python] ./build4mac.py
|
|||
: Qt6MacPorts: use Qt6 from MacPorts (*) |
|
||||
: Qt6Brew: use Qt6 from Homebrew (*) |
|
||||
: (*) migration to Qt6 is ongoing |
|
||||
[-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3'] | hb31
|
||||
[-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3', | hb32
|
||||
: 'MP32', HB32'] |
|
||||
: nil: don't bind Ruby |
|
||||
: Sys: use OS-bundled Ruby [2.0 - 2.6] depending on OS |
|
||||
: MP31: use Ruby 3.1 from MacPorts |
|
||||
: HB31: use Ruby 3.1 from Homebrew |
|
||||
: Ana3: use Ruby 3.1 from Anaconda3 |
|
||||
: MP32: use Ruby 3.2 from MacPorts |
|
||||
: HB32: use Ruby 3.2 from Homebrew |
|
||||
[-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP38', 'HB38', 'Ana3', | hb39
|
||||
: 'MP39', HB39', 'HBAuto'] |
|
||||
: nil: don't bind Python |
|
||||
|
|
@ -173,7 +179,7 @@ $ [python] ./build4mac.py
|
|||
[-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1
|
||||
: 0 = no output, 1 = error/warning (default), |
|
||||
: 2 = normal, 3 = debug |
|
||||
[-?|--?] : print this usage and exit | disabled
|
||||
[-?|--?] : print this usage and exit; in zsh, quote like '-?' or '--?' | disabled
|
||||
-----------------------------------------------------------------------------------------+---------------
|
||||
```
|
||||
|
||||
|
|
@ -212,20 +218,20 @@ Then the directory name will be **`LW-qt5MP.pkg.macos-Catalina-release-RsysPsys`
|
|||
|
||||
#### If you build KLayout from the source code AND run it on the same machine, the "-Y" option is highly recommended.
|
||||
|
||||
### 6B. Fully MacPorts-flavored build with MacPorts Ruby 3.1 and MacPorts Python 3.9
|
||||
0. Install MacPorts, then install Qt5, Ruby 3.1, and Python 3.9 by
|
||||
### 6B. Fully MacPorts-flavored build with MacPorts Ruby 3.2 and MacPorts Python 3.9
|
||||
0. Install MacPorts, then install Qt5, Ruby 3.2, and Python 3.9 by
|
||||
```
|
||||
$ sudo port install coreutils
|
||||
$ sudo port install findutils
|
||||
$ sudo port install qt5
|
||||
$ sudo port install ruby31
|
||||
$ sudo port install ruby32
|
||||
$ sudo port install python39
|
||||
$ sudo port install py39-pip
|
||||
```
|
||||
1. Invoke **`build4mac.py`** with the following options:
|
||||
```
|
||||
$ cd /where/'build.sh'/exists
|
||||
$ ./build4mac.py -q qt5macports -r mp31 -p mp39
|
||||
$ ./build4mac.py -q qt5macports -r mp32 -p mp39
|
||||
```
|
||||
2. Confirm successful build (it will take about one hour, depending on your machine spec).
|
||||
3. Rerun **`build4mac.py`** with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br>
|
||||
|
|
@ -233,26 +239,26 @@ $ ./build4mac.py -q qt5macports -r mp31 -p mp39
|
|||
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Python Module (\*.whl, \*.egg) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
||||
|
||||
```
|
||||
$ ./build4mac.py -q qt5macports -r mp31 -p mp39 -Y
|
||||
$ ./build4mac.py -q qt5macports -r mp32 -p mp39 -Y
|
||||
```
|
||||
The application bundle **`klayout.app`** is located under:<br>
|
||||
**`LW-qt5MP.pkg.macos-Catalina-release-Rmp31Pmp39`** directory, where
|
||||
**`LW-qt5MP.pkg.macos-Catalina-release-Rmp32Pmp39`** directory, where
|
||||
* "LW-" means this is a lightweight package.
|
||||
* "qt5MP" means that Qt5 from MacPorts is used.
|
||||
* "Rmp31Pmp39" means that Ruby is 3.1 from MacPorts; Python is 3.9 from MacPorts.
|
||||
* "Rmp32Pmp39" means that Ruby is 3.2 from MacPorts; Python is 3.9 from MacPorts.
|
||||
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
|
||||
|
||||
### 6C. Fully Homebrew-flavored build with Homebrew Ruby 3.1 and Homebrew Python 3.9
|
||||
0. Install Homebrew, then install Qt5, Ruby 3.1, and Python 3.9 by
|
||||
### 6C. Fully Homebrew-flavored build with Homebrew Ruby 3.2 and Homebrew Python 3.9
|
||||
0. Install Homebrew, then install Qt5, Ruby 3.2, and Python 3.9 by
|
||||
```
|
||||
$ brew install qt@5
|
||||
$ brew install ruby@3.1
|
||||
$ brew install ruby@3.2
|
||||
$ brew install python@3.9
|
||||
```
|
||||
1. Invoke **`build4mac.py`** with the following options: **((Notes))** These options are the default for Big Sur, Monterey, and Ventura.
|
||||
```
|
||||
$ cd /where/'build.sh'/exists
|
||||
$ ./build4mac.py -q qt5brew -r hb31 -p hb39
|
||||
$ ./build4mac.py -q qt5brew -r hb32 -p hb39
|
||||
```
|
||||
2. Confirm successful build (it will take about one hour, depending on your machine spec).
|
||||
3. Rerun **`build4mac.py`** with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br>
|
||||
|
|
@ -260,13 +266,13 @@ $ ./build4mac.py -q qt5brew -r hb31 -p hb39
|
|||
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Python Module (\*.whl, \*.egg) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
||||
|
||||
```
|
||||
$ ./build4mac.py -q qt5brew -r hb31 -p hb39 -Y
|
||||
$ ./build4mac.py -q qt5brew -r hb32 -p hb39 -Y
|
||||
```
|
||||
The application bundle **`klayout.app`** is located under:<br>
|
||||
**`LW-qt5Brew.pkg.macos-Catalina-release-Rhb31Phb39`** directory, where
|
||||
**`LW-qt5Brew.pkg.macos-Catalina-release-Rhb32Phb39`** directory, where
|
||||
* "LW-" means this is a lightweight package.
|
||||
* "qt5Brew" means that Qt5 from Homebrew is used.
|
||||
* "Rhb31Phb39" means that Ruby is 3.1 from Homebrew; Python is 3.9 from Homebrew.
|
||||
* "Rhb32Phb39" means that Ruby is 3.2 from Homebrew; Python is 3.9 from Homebrew.
|
||||
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.9
|
||||
|
|
@ -343,11 +349,11 @@ makeDMG4mac.py -> macbuild/makeDMG4mac.py
|
|||
2. Invoke **`makeDMG4mac.py`** with -p and -m options, for example,
|
||||
```
|
||||
$ cd /where/'build.sh'/exists
|
||||
$ ./makeDMG4mac.py -p LW-qt5MP.pkg.macos-Catalina-release-Rmp31Pmp39 -m
|
||||
$ ./makeDMG4mac.py -p LW-qt5MP.pkg.macos-Catalina-release-Rmp32Pmp39 -m
|
||||
```
|
||||
This command will generate the two files below:<br>
|
||||
* **`LW-klayout-0.28.3-macOS-Catalina-1-qt5MP-Rmp31Pmp39.dmg`** ---(1) the main DMG file
|
||||
* **`LW-klayout-0.28.3-macOS-Catalina-1-qt5MP-Rmp31Pmp39.dmg.md5`** ---(2) MD5-value text file
|
||||
* **`LW-klayout-0.28.4-macOS-Catalina-1-qt5MP-Rmp32Pmp39.dmg`** ---(1) the main DMG file
|
||||
* **`LW-klayout-0.28.4-macOS-Catalina-1-qt5MP-Rmp32Pmp39.dmg.md5`** ---(2) MD5-value text file
|
||||
|
||||
# Known issues
|
||||
Because we assume some specific versions of non-OS-standard Ruby and Python, updating MacPorts, Homebrew, or Anaconda3 may cause build- and link errors.<br>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -35,9 +35,9 @@ from build4mac_util import *
|
|||
def GenerateUsage(platform):
|
||||
if platform.upper() in [ "VENTURA", "MONTEREY", "BIGSUR" ]: # with Xcode [13.1 .. ]
|
||||
myQt56 = "qt5brew"
|
||||
myRuby = "hb31"
|
||||
myRuby = "hb32"
|
||||
myPython = "hb39"
|
||||
moduleset = ('qt5Brew', 'HB31', 'HB39')
|
||||
moduleset = ('qt5Brew', 'HB32', 'HB39')
|
||||
else: # with Xcode [ .. 12.4]; 'sys' for Python has been restored in 0.28.3
|
||||
myQt56 = "qt5macports"
|
||||
myRuby = "sys"
|
||||
|
|
@ -47,7 +47,7 @@ def GenerateUsage(platform):
|
|||
usage = "\n"
|
||||
usage += "---------------------------------------------------------------------------------------------------------\n"
|
||||
usage += "<< Usage of 'build4mac.py' >>\n"
|
||||
usage += " for building KLayout 0.28.3 or later on different Apple macOS / Mac OSX platforms.\n"
|
||||
usage += " for building KLayout 0.28.4 or later on different Apple macOS / Mac OSX platforms.\n"
|
||||
usage += "\n"
|
||||
usage += "$ [python] ./build4mac.py\n"
|
||||
usage += " option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value\n"
|
||||
|
|
@ -60,12 +60,15 @@ def GenerateUsage(platform):
|
|||
usage += " : Qt6MacPorts: use Qt6 from MacPorts (*) | \n"
|
||||
usage += " : Qt6Brew: use Qt6 from Homebrew (*) | \n"
|
||||
usage += " : (*) migration to Qt6 is ongoing | \n"
|
||||
usage += " [-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3'] | %s \n" % myRuby
|
||||
usage += " [-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3', | %s \n" % myRuby
|
||||
usage += " : 'MP32', HB32'] | \n"
|
||||
usage += " : nil: don't bind Ruby | \n"
|
||||
usage += " : Sys: use OS-bundled Ruby [2.0 - 2.6] depending on OS | \n"
|
||||
usage += " : MP31: use Ruby 3.1 from MacPorts | \n"
|
||||
usage += " : HB31: use Ruby 3.1 from Homebrew | \n"
|
||||
usage += " : Ana3: use Ruby 3.1 from Anaconda3 | \n"
|
||||
usage += " : MP32: use Ruby 3.2 from MacPorts | \n"
|
||||
usage += " : HB32: use Ruby 3.2 from Homebrew | \n"
|
||||
usage += " [-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP38', 'HB38', 'Ana3', | %s \n" % myPython
|
||||
usage += " : 'MP39', HB39', 'HBAuto'] | \n"
|
||||
usage += " : nil: don't bind Python | \n"
|
||||
|
|
@ -93,7 +96,7 @@ def GenerateUsage(platform):
|
|||
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; in zsh, quote like '-?' or '--?' | disabled\n"
|
||||
usage += "-----------------------------------------------------------------------------------------+---------------\n"
|
||||
return (usage, moduleset)
|
||||
|
||||
|
|
@ -154,16 +157,16 @@ def Get_Default_Config():
|
|||
# Set the default modules
|
||||
if Platform == "Ventura":
|
||||
ModuleQt = "Qt5Brew"
|
||||
ModuleRuby = "Ruby31Brew"
|
||||
ModulePython = "Python38Brew"
|
||||
ModuleRuby = "Ruby32Brew"
|
||||
ModulePython = "Python39Brew"
|
||||
elif Platform == "Monterey":
|
||||
ModuleQt = "Qt5Brew"
|
||||
ModuleRuby = "Ruby31Brew"
|
||||
ModulePython = "Python38Brew"
|
||||
ModuleRuby = "Ruby32Brew"
|
||||
ModulePython = "Python39Brew"
|
||||
elif Platform == "BigSur":
|
||||
ModuleQt = "Qt5Brew"
|
||||
ModuleRuby = "RubyBigSur"
|
||||
ModulePython = "PythonBigSur"
|
||||
ModuleRuby = "Ruby32Brew"
|
||||
ModulePython = "Python39Brew"
|
||||
elif Platform == "Catalina":
|
||||
ModuleQt = "Qt5MacPorts"
|
||||
ModuleRuby = "RubyCatalina"
|
||||
|
|
@ -390,7 +393,7 @@ def Parse_CLI_Args(config):
|
|||
|
||||
p.add_option( '-r', '--ruby',
|
||||
dest='type_ruby',
|
||||
help="Ruby type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3']" )
|
||||
help="Ruby type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3', 'MP32', 'HB32']" )
|
||||
|
||||
p.add_option( '-p', '--python',
|
||||
dest='type_python',
|
||||
|
|
@ -454,7 +457,7 @@ def Parse_CLI_Args(config):
|
|||
|
||||
if Platform.upper() in [ "VENTURA", "MONTEREY", "BIGSUR" ]: # with Xcode [13.1 .. ]
|
||||
p.set_defaults( type_qt = "qt5brew",
|
||||
type_ruby = "hb31",
|
||||
type_ruby = "hb32",
|
||||
type_python = "hb39",
|
||||
build_pymod = False,
|
||||
no_qt_binding = False,
|
||||
|
|
@ -525,6 +528,8 @@ def Parse_CLI_Args(config):
|
|||
candidates['MP31'] = 'MP31'
|
||||
candidates['HB31'] = 'HB31'
|
||||
candidates['ANA3'] = 'Ana3'
|
||||
candidates['MP32'] = 'MP32'
|
||||
candidates['HB32'] = 'HB32'
|
||||
try:
|
||||
choiceRuby = candidates[ opt.type_ruby.upper() ]
|
||||
except KeyError:
|
||||
|
|
@ -561,6 +566,12 @@ def Parse_CLI_Args(config):
|
|||
elif choiceRuby == "Ana3":
|
||||
ModuleRuby = 'RubyAnaconda3'
|
||||
NonOSStdLang = True
|
||||
elif choiceRuby == "MP32":
|
||||
ModuleRuby = 'Ruby32MacPorts'
|
||||
NonOSStdLang = True
|
||||
elif choiceRuby == "HB32":
|
||||
ModuleRuby = 'Ruby32Brew'
|
||||
NonOSStdLang = True
|
||||
if ModuleRuby == '':
|
||||
print("")
|
||||
print( "!!! Unknown Ruby type <%s>. Case-insensitive candidates: %s" % \
|
||||
|
|
@ -844,7 +855,7 @@ def Get_Build_Parameters(config):
|
|||
|
||||
PymodDistDir = dict()
|
||||
if Platform in [ 'Ventura', 'Monterey', 'BigSur', 'Catalina' ]:
|
||||
if ModuleRuby in [ 'Ruby31MacPorts', 'Ruby31Brew', 'RubyAnaconda3' ]:
|
||||
if ModuleRuby in [ 'Ruby31MacPorts', 'Ruby31Brew', 'RubyAnaconda3', 'Ruby32MacPorts', 'Ruby32Brew' ]:
|
||||
if ModulePython in [ 'Python38MacPorts', 'Python39MacPorts' ]:
|
||||
PymodDistDir[ModulePython] = 'dist-MP3'
|
||||
elif ModulePython in [ 'Python38Brew', 'Python39Brew', 'PythonAutoBrew' ]:
|
||||
|
|
@ -867,7 +878,8 @@ def Build_pymod(parameters):
|
|||
# [1] <pymod> will be built if:
|
||||
# BuildPymod = True
|
||||
# Platform = [ 'Ventura', 'Monterey', 'BigSur', 'Catalina' ]
|
||||
# ModuleRuby = [ 'Ruby31MacPorts', 'Ruby31Brew', 'RubyAnaconda3' ]
|
||||
# ModuleRuby = [ 'Ruby31MacPorts', 'Ruby31Brew', 'RubyAnaconda3',
|
||||
# 'Ruby32MacPorts', 'Ruby32Brew' ]
|
||||
# ModulePython = [ 'Python38MacPorts', 'Python38Brew', 'PythonAnaconda3',
|
||||
# 'Python39MacPorts', 'Python39Brew', 'PythonAutoBrew' ]
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
@ -879,7 +891,7 @@ def Build_pymod(parameters):
|
|||
return 0
|
||||
if not Platform in [ 'Ventura', 'Monterey', 'BigSur', 'Catalina' ]:
|
||||
return 0
|
||||
elif not ModuleRuby in [ 'Ruby31MacPorts', 'Ruby31Brew', 'RubyAnaconda3' ]:
|
||||
elif not ModuleRuby in [ 'Ruby31MacPorts', 'Ruby31Brew', 'RubyAnaconda3', 'Ruby32MacPorts', 'Ruby32Brew' ]:
|
||||
return 0
|
||||
elif not ModulePython in [ 'Python38MacPorts', 'Python38Brew', 'PythonAnaconda3', \
|
||||
'Python39MacPorts', 'Python39Brew', 'PythonAutoBrew' ]:
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ Qt6Brew = { 'qmake' : '%s/opt/qt@6/bin/qmake' % DefaultHomebrewRoot,
|
|||
RubyNil = [ 'nil' ]
|
||||
RubySys = [ 'RubyElCapitan', 'RubySierra', 'RubyHighSierra', 'RubyMojave' ]
|
||||
RubySys += [ 'RubyCatalina', 'RubyBigSur', 'RubyMonterey', 'RubyVentura' ]
|
||||
RubyExt = [ 'Ruby31MacPorts', 'Ruby31Brew', 'RubyAnaconda3' ]
|
||||
RubyExt = [ 'Ruby31MacPorts', 'Ruby32MacPorts', 'Ruby31Brew', 'Ruby32Brew', 'RubyAnaconda3' ]
|
||||
Rubies = RubyNil + RubySys + RubyExt
|
||||
|
||||
#-----------------------------------------------------
|
||||
|
|
@ -192,6 +192,14 @@ Ruby31MacPorts = { 'exe': '/opt/local/bin/ruby3.1',
|
|||
'lib': '/opt/local/lib/libruby.3.1.dylib'
|
||||
}
|
||||
|
||||
# Ruby 3.2 from MacPorts (https://www.macports.org/) *+*+*+ EXPERIMENTAL *+*+*+
|
||||
# install with 'sudo port install ruby32'
|
||||
# [Key Type Name] = 'MP32'
|
||||
Ruby32MacPorts = { 'exe': '/opt/local/bin/ruby3.2',
|
||||
'inc': '/opt/local/include/ruby-3.2.0',
|
||||
'lib': '/opt/local/lib/libruby.3.2.dylib'
|
||||
}
|
||||
|
||||
# Ruby 3.1 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
|
||||
# install with 'brew install ruby@3.1'
|
||||
# [Key Type Name] = 'HB31'
|
||||
|
|
@ -201,6 +209,15 @@ Ruby31Brew = { 'exe': '%s/bin/ruby' % HBRuby31Path,
|
|||
'lib': '%s/lib/libruby.3.1.dylib' % HBRuby31Path
|
||||
}
|
||||
|
||||
# Ruby 3.2 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
|
||||
# install with 'brew install ruby@3.2'
|
||||
# [Key Type Name] = 'HB32'
|
||||
HBRuby32Path = '%s/opt/ruby@3.2' % DefaultHomebrewRoot
|
||||
Ruby32Brew = { 'exe': '%s/bin/ruby' % HBRuby32Path,
|
||||
'inc': '%s/include/ruby-3.2.0' % HBRuby32Path,
|
||||
'lib': '%s/lib/libruby.3.2.dylib' % HBRuby32Path
|
||||
}
|
||||
|
||||
# Ruby 3.1 bundled with anaconda3 installed under /Applications/anaconda3/ *+*+*+ EXPERIMENTAL *+*+*+
|
||||
# The standard installation deploys the tool under $HOME/opt/anaconda3/.
|
||||
# If so, you need to make a symbolic link: /Applications/anaconda3 ---> $HOME/opt/anaconda3/
|
||||
|
|
@ -222,7 +239,9 @@ RubyDictionary = { 'nil' : None,
|
|||
'RubyMonterey' : RubyMonterey,
|
||||
'RubyVentura' : RubyVentura,
|
||||
'Ruby31MacPorts': Ruby31MacPorts,
|
||||
'Ruby32MacPorts': Ruby32MacPorts,
|
||||
'Ruby31Brew' : Ruby31Brew,
|
||||
'Ruby32Brew' : Ruby32Brew,
|
||||
'RubyAnaconda3' : RubyAnaconda3
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@ def SetGlobals():
|
|||
Usage = "\n"
|
||||
Usage += "---------------------------------------------------------------------------------------------------------\n"
|
||||
Usage += "<< Usage of 'makeDMG4mac.py' >>\n"
|
||||
Usage += " for making a DMG file of KLayout 0.28.3 or later on different Apple macOS / Mac OSX platforms.\n"
|
||||
Usage += " for making a DMG file of KLayout 0.28.4 or later on different Apple macOS / Mac OSX platforms.\n"
|
||||
Usage += "\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 += " : like 'LW-qt5MP.pkg.macos-Catalina-release-Rmp31Pmp38' | \n"
|
||||
Usage += " : like 'LW-qt5MP.pkg.macos-Catalina-release-Rmp32Pmp39' | \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"
|
||||
|
|
@ -208,17 +208,17 @@ def SetGlobals():
|
|||
#
|
||||
# The package directory name should look like:
|
||||
# * LW-qt5Ana3.pkg.macos-Catalina-release-Rana3Pana3
|
||||
# * LW-qt5Brew.pkg.macos-Catalina-release-Rhb31Phb38 --- (1)
|
||||
# * LW-qt5MP.pkg.macos-Catalina-release-Rmp31Pmp38
|
||||
# * HW-qt5Brew.pkg.macos-Catalina-release-RsysPhb38
|
||||
# * LW-qt5Brew.pkg.macos-Catalina-release-Rhb32Phb39 --- (1)
|
||||
# * LW-qt5MP.pkg.macos-Catalina-release-Rmp32Pmp39
|
||||
# * HW-qt5Brew.pkg.macos-Catalina-release-RsysPhb39
|
||||
#
|
||||
# * LW-qt6Ana3.pkg.macos-Catalina-release-Rana3Pana3
|
||||
# * LW-qt6Brew.pkg.macos-Catalina-release-Rhb31Phb38
|
||||
# * LW-qt6MP.pkg.macos-Catalina-release-Rmp31Pmp38
|
||||
# * HW-qt6Brew.pkg.macos-Catalina-release-RsysPhb38
|
||||
# * LW-qt6Brew.pkg.macos-Catalina-release-Rhb32Phb39
|
||||
# * LW-qt6MP.pkg.macos-Catalina-release-Rmp32Pmp39
|
||||
# * HW-qt6Brew.pkg.macos-Catalina-release-RsysPhb39
|
||||
#
|
||||
# Generated DMG will be, for example,
|
||||
# (1) ---> LW-klayout-0.28.2-macOS-Catalina-1-qt5Brew-Rhb31Phb38.dmg
|
||||
# (1) ---> LW-klayout-0.28.4-macOS-Catalina-1-qt5Brew-Rhb32Phb39.dmg
|
||||
#
|
||||
# @return on success, positive integer in [MB] that tells approx. occupied disc space;
|
||||
# on failure, -1
|
||||
|
|
@ -259,15 +259,15 @@ def CheckPkgDirectory():
|
|||
# [2] Identify (Qt, Ruby, Python) from PkgDir
|
||||
# * ST-qt5MP.pkg.macos-Catalina-release-RsysPsys # 'ST' has been restored in 0.28.3
|
||||
# * LW-qt5Ana3.pkg.macos-Catalina-release-Rana3Pana3
|
||||
# * LW-qt5Brew.pkg.macos-Catalina-release-Rhb31Phb38
|
||||
# * LW-qt5MP.pkg.macos-Catalina-release-Rmp31Pmp38
|
||||
# * HW-qt5Brew.pkg.macos-Catalina-release-RsysPhb38
|
||||
# * EX-qt5MP.pkg.macos-Catalina-release-Rhb31Pmp38
|
||||
# * LW-qt5Brew.pkg.macos-Catalina-release-Rhb32Phb39
|
||||
# * LW-qt5MP.pkg.macos-Catalina-release-Rmp32Pmp39
|
||||
# * HW-qt5Brew.pkg.macos-Catalina-release-RsysPhb39
|
||||
# * EX-qt5MP.pkg.macos-Catalina-release-Rhb32Pmp39
|
||||
#
|
||||
# * LW-qt6Ana3.pkg.macos-Catalina-release-Rana3Pana3
|
||||
# * LW-qt6Brew.pkg.macos-Catalina-release-Rhb31Phb38
|
||||
# * LW-qt6MP.pkg.macos-Catalina-release-Rmp31Pmp38
|
||||
# * HW-qt6Brew.pkg.macos-Catalina-release-RsysPhb38
|
||||
# * LW-qt6Brew.pkg.macos-Catalina-release-Rhb32Phb39
|
||||
# * LW-qt6MP.pkg.macos-Catalina-release-Rmp32Pmp39
|
||||
# * HW-qt6Brew.pkg.macos-Catalina-release-RsysPhb39
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
patQRP = u'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-]release[-])([0-9A-Za-z]+)'
|
||||
regQRP = re.compile(patQRP)
|
||||
|
|
@ -296,23 +296,25 @@ def CheckPkgDirectory():
|
|||
#-----------------------------------------------------------------------------
|
||||
LatestOSMacPorts = Platform == LatestOS
|
||||
LatestOSMacPorts &= PackagePrefix == "LW"
|
||||
LatestOSMacPorts &= QtIdentification in ["qt5MP", "qt6MP"]
|
||||
LatestOSMacPorts &= RubyPythonID in ["Rmp31Pmp38", "Rmp31Pmp39"]
|
||||
LatestOSMacPorts &= QtIdentification in [ "qt5MP", "qt6MP" ]
|
||||
LatestOSMacPorts &= RubyPythonID in [ "Rmp31Pmp38", "Rmp31Pmp39", \
|
||||
"Rmp32Pmp38", "Rmp32Pmp39" ]
|
||||
|
||||
LatestOSHomebrew = Platform == LatestOS
|
||||
LatestOSHomebrew &= PackagePrefix == "LW"
|
||||
LatestOSHomebrew &= QtIdentification in ["qt5Brew", "qt6Brew"]
|
||||
LatestOSHomebrew &= RubyPythonID in ["Rhb31Phb38", "Rhb31Phb39", "Rhb31Phbauto"]
|
||||
LatestOSHomebrew &= QtIdentification in [ "qt5Brew", "qt6Brew" ]
|
||||
LatestOSHomebrew &= RubyPythonID in [ "Rhb31Phb38", "Rhb31Phb39", "Rhb31Phbauto", \
|
||||
"Rhb32Phb38", "Rhb32Phb39", "Rhb32Phbauto" ]
|
||||
|
||||
LatestOSAnaconda3 = Platform == LatestOS
|
||||
LatestOSAnaconda3 &= PackagePrefix == "LW"
|
||||
LatestOSAnaconda3 &= QtIdentification in ["qt5Ana3"]
|
||||
LatestOSAnaconda3 &= RubyPythonID in ["Rana3Pana3"]
|
||||
LatestOSAnaconda3 &= QtIdentification in [ "qt5Ana3" ]
|
||||
LatestOSAnaconda3 &= RubyPythonID in [ "Rana3Pana3" ]
|
||||
|
||||
LatestOSHomebrewH = Platform == LatestOS
|
||||
LatestOSHomebrewH &= PackagePrefix == "HW"
|
||||
LatestOSHomebrewH &= QtIdentification in ["qt5Brew", "qt6Brew"]
|
||||
LatestOSHomebrewH &= RubyPythonID in ["RsysPhb38", "RsysPhb39", "RsysPhbauto"] # Sys-Homebre hybrid
|
||||
LatestOSHomebrewH &= QtIdentification in [ "qt5Brew", "qt6Brew" ]
|
||||
LatestOSHomebrewH &= RubyPythonID in [ "RsysPhb39", "RsysPhb39", "RsysPhbauto" ] # Sys-Homebre hybrid
|
||||
|
||||
if LatestOSMacPorts:
|
||||
mydic = DicLightHeavyW["ports"]
|
||||
|
|
@ -648,10 +650,12 @@ def MakeTargetDMGFile(msg=""):
|
|||
command = "/usr/bin/osascript %s %s" % (AppleScriptDMG, VolumeDMG)
|
||||
process = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True )
|
||||
output, error = process.communicate()
|
||||
if not output == "":
|
||||
print( " STDOUT: %s" % output )
|
||||
if not error == "":
|
||||
print( " STDERR: %s" % error )
|
||||
outputStr = output.decode("utf-8")
|
||||
errorStr = error.decode("utf-8")
|
||||
if not outputStr == "":
|
||||
print( " STDOUT: %s" % outputStr )
|
||||
if not errorStr == "":
|
||||
print( " STDERR: %s" % errorStr )
|
||||
|
||||
#--------------------------------------------------------
|
||||
# (8) Copy the custom volume icon
|
||||
|
|
|
|||
|
|
@ -83,15 +83,15 @@ def Get_Build_Options( targetDic ):
|
|||
if target == "std": # use 'Qt5MacPorts' that provides Qt 5.15.2~ to run on "Big Sur", too
|
||||
buildOp["std"] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'sys' ]
|
||||
elif target == "ports":
|
||||
buildOp["ports"] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP31', '-p', 'MP39' ]
|
||||
buildOp["ports"] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP32', '-p', 'MP39' ]
|
||||
elif target == "brew":
|
||||
buildOp["brew"] = [ '-q', '%sBrew' % qtType, '-r', 'HB31', '-p', 'HB39' ]
|
||||
buildOp["brew"] = [ '-q', '%sBrew' % qtType, '-r', 'HB32', '-p', 'HB39' ]
|
||||
elif target == "brewHW":
|
||||
buildOp["brewHW"] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HB39' ]
|
||||
elif target == "ana3":
|
||||
buildOp["ana3"] = [ '-q', '%sAna3' % qtType, '-r', 'Ana3', '-p', 'Ana3' ]
|
||||
elif target == "brewA":
|
||||
buildOp["brewA"] = [ '-q', '%sBrew' % qtType, '-r', 'HB31', '-p', 'HBAuto' ]
|
||||
buildOp["brewA"] = [ '-q', '%sBrew' % qtType, '-r', 'HB32', '-p', 'HBAuto' ]
|
||||
elif target == "brewAHW":
|
||||
buildOp["brewAHW"] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HBAuto' ]
|
||||
|
||||
|
|
@ -121,15 +121,15 @@ def Get_QAT_Directory( targetDic, platform ):
|
|||
if target == "std":
|
||||
dirQAT["std"] = '%sMP.build.macos-%s-release-RsysPsys.macQAT' % (qtType, platform)
|
||||
elif target == "ports":
|
||||
dirQAT["ports"] = '%sMP.build.macos-%s-release-Rmp31Pmp39.macQAT' % (qtType, platform)
|
||||
dirQAT["ports"] = '%sMP.build.macos-%s-release-Rmp32Pmp39.macQAT' % (qtType, platform)
|
||||
elif target == "brew":
|
||||
dirQAT["brew"] = '%sBrew.build.macos-%s-release-Rhb31Phb39.macQAT' % (qtType, platform)
|
||||
dirQAT["brew"] = '%sBrew.build.macos-%s-release-Rhb32Phb39.macQAT' % (qtType, platform)
|
||||
elif target == "brewHW":
|
||||
dirQAT["brewHW"] = '%sBrew.build.macos-%s-release-RsysPhb39.macQAT' % (qtType, platform)
|
||||
elif target == "ana3":
|
||||
dirQAT["ana3"] = '%sAna3.build.macos-%s-release-Rana3Pana3.macQAT' % (qtType, platform)
|
||||
elif target == "brewA":
|
||||
dirQAT["brewA"] = '%sBrew.build.macos-%s-release-Rhb31Phbauto.macQAT' % (qtType, platform)
|
||||
dirQAT["brewA"] = '%sBrew.build.macos-%s-release-Rhb32Phbauto.macQAT' % (qtType, platform)
|
||||
elif target == "brewAHW":
|
||||
dirQAT["brewAHW"] = '%sBrew.build.macos-%s-release-RsysPhbauto.macQAT' % (qtType, platform)
|
||||
return dirQAT
|
||||
|
|
@ -162,10 +162,10 @@ def Get_Package_Options( targetDic, platform, srlDMG, makeflag ):
|
|||
packOp["std"] = [ '-p', 'ST-%sMP.pkg.macos-%s-release-RsysPsys' % (qtType, platform),
|
||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||
elif target == "ports":
|
||||
packOp["ports"] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rmp31Pmp39' % (qtType, platform),
|
||||
packOp["ports"] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rmp32Pmp39' % (qtType, platform),
|
||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||
elif target == "brew":
|
||||
packOp["brew"] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb31Phb39' % (qtType, platform),
|
||||
packOp["brew"] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb32Phb39' % (qtType, platform),
|
||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||
elif target == "brewHW":
|
||||
packOp["brewHW"] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhb39' % (qtType, platform),
|
||||
|
|
@ -174,7 +174,7 @@ def Get_Package_Options( targetDic, platform, srlDMG, makeflag ):
|
|||
packOp["ana3"] = [ '-p', 'LW-%sAna3.pkg.macos-%s-release-Rana3Pana3' % (qtType, platform),
|
||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||
elif target == "brewA":
|
||||
packOp["brewA"] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb31Phbauto' % (qtType, platform),
|
||||
packOp["brewA"] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb32Phbauto' % (qtType, platform),
|
||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||
elif target == "brewAHW":
|
||||
packOp["brewAHW"] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhbauto' % (qtType, platform),
|
||||
|
|
@ -235,7 +235,7 @@ def Parse_CommandLine_Arguments():
|
|||
Usage += " (3) $ ./nightlyBuild.py --test | \n"
|
||||
Usage += " (4) $ ./nightlyBuild.py --check (confirm the QA Test results) | \n"
|
||||
Usage += " (5) $ ./nightlyBuild.py --makedmg 1 | \n"
|
||||
Usage += " (6) $ ./nightlyBuild.py --upload '0.28.2' | \n"
|
||||
Usage += " (6) $ ./nightlyBuild.py --upload '0.28.4' | \n"
|
||||
Usage += " (7) $ ./nightlyBuild.py --cleandmg 1 | \n"
|
||||
Usage += "---------------------------------------------------------------------------+------------------------------\n"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue