mirror of https://github.com/KLayout/klayout.git
Merge pull request #1677 from Kazzz-S/0.29.0-mac1
Updated the build system for MacOS to build KLayout 0.29.0 or later
This commit is contained in:
commit
cc702ab196
|
|
@ -1,9 +1,9 @@
|
||||||
Relevant KLayout version: 0.28.17<br>
|
Relevant KLayout version: 0.29.0<br>
|
||||||
Author: Kazzz-S<br>
|
Author: Kazzz-S<br>
|
||||||
Last modified: 2024-02-16<br>
|
Last modified: 2024-03-27<br>
|
||||||
|
|
||||||
# 1. Introduction
|
# 1. Introduction
|
||||||
This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.28.17 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:
|
||||||
* Monterey (12.x) : the primary development environment
|
* Monterey (12.x) : the primary development environment
|
||||||
* Ventura (13.x) : experimental
|
* Ventura (13.x) : experimental
|
||||||
* Sonoma (14.x) : -- ditto --
|
* Sonoma (14.x) : -- ditto --
|
||||||
|
|
@ -22,16 +22,16 @@ All Apple (M1|M2|M3) chips are still untested, as the author does not own an (M1
|
||||||
|
|
||||||
# 2. Qt Frameworks
|
# 2. Qt Frameworks
|
||||||
|
|
||||||
The default Qt framework is "Qt5" from Homebrew (https://brew.sh/), which is usually located under:
|
The default Qt framework is "Qt5" from **MacPorts** (https://www.macports.org/), which is usually located under:
|
||||||
```
|
|
||||||
/usr/local/opt/qt@5/
|
|
||||||
```
|
|
||||||
|
|
||||||
If you prefer **MacPorts** (https://www.macports.org/), "Qt5" is usually located under:
|
|
||||||
```
|
```
|
||||||
/opt/local/libexec/qt5/
|
/opt/local/libexec/qt5/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you prefer "Qt6" from **Homebrew** (https://brew.sh/), which is usually located under:
|
||||||
|
```
|
||||||
|
/usr/local/opt/qt@6/
|
||||||
|
```
|
||||||
|
|
||||||
You can also choose "Qt5" from Anaconda3 (https://www.anaconda.com/), which is usually located under:
|
You can also choose "Qt5" from Anaconda3 (https://www.anaconda.com/), which is usually located under:
|
||||||
```
|
```
|
||||||
$HOME/opt/anaconda3/pkgs/qt-{version}
|
$HOME/opt/anaconda3/pkgs/qt-{version}
|
||||||
|
|
@ -41,11 +41,12 @@ If you have installed Anaconda3 under $HOME/opt/anaconda3/, make a symbolic link
|
||||||
/Applications/anaconda3/ ---> $HOME/opt/anaconda3/
|
/Applications/anaconda3/ ---> $HOME/opt/anaconda3/
|
||||||
```
|
```
|
||||||
|
|
||||||
The migration work to "Qt6" is ongoing. You can try to use it; however, you will encounter some build and runtime errors.
|
The migration work to "Qt6" is ongoing. You can try to use it; however, you will encounter some build and runtime errors.<br>
|
||||||
|
If you use **Homebrew** to build KLayout >= 0.29.0, you need "Qt6" to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).
|
||||||
|
|
||||||
# 3. Script language support: Ruby and Python
|
# 3. Script language support: Ruby and Python
|
||||||
|
|
||||||
The build script **`build4mac.py`** provides several possible combinations of Qt5, Ruby, and Python modules to suit the user's needs and preferences.<br>
|
The build script **`build4mac.py`** provides several possible combinations of Qt, Ruby, and Python modules to suit the user's needs and preferences.<br>
|
||||||
Some typical use cases are described in Section 6.
|
Some typical use cases are described in Section 6.
|
||||||
|
|
||||||
# 4. Prerequisites
|
# 4. Prerequisites
|
||||||
|
|
@ -53,8 +54,8 @@ You need to have the followings:
|
||||||
* The latest Xcode and command-line tool kit compliant with each OS
|
* The latest Xcode and command-line tool kit compliant with each OS
|
||||||
* https://developer.apple.com/xcode/resources/
|
* https://developer.apple.com/xcode/resources/
|
||||||
* https://mac.install.guide/commandlinetools/4
|
* https://mac.install.guide/commandlinetools/4
|
||||||
* Qt5 package from Homebrew, MacPorts, or Anaconda3
|
* Qt5 package from MacPorts or Anaconda3. Qt6, from Homebrew.
|
||||||
* Optionally, Ruby and Python packages from Homebrew, MacPorts, or Anaconda3
|
* Optionally, Ruby and Python packages from MacPorts, Homebrew, or Anaconda3
|
||||||
#### For matching versions of Ruby and Python, please also refer to `build4mac_env.py`.
|
#### For matching versions of Ruby and Python, please also refer to `build4mac_env.py`.
|
||||||
|
|
||||||
# 5. Command-line options of **`build4mac.py`**
|
# 5. Command-line options of **`build4mac.py`**
|
||||||
|
|
@ -65,7 +66,7 @@ The operating system type is detected automatically.
|
||||||
```
|
```
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
<< Usage of 'build4mac.py' >>
|
<< Usage of 'build4mac.py' >>
|
||||||
for building KLayout 0.28.17 or later on different Apple macOS platforms.
|
for building KLayout 0.29.0 or later on different Apple macOS platforms.
|
||||||
|
|
||||||
$ [python] ./build4mac.py
|
$ [python] ./build4mac.py
|
||||||
option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value
|
option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value
|
||||||
|
|
@ -121,7 +122,7 @@ $ [python] ./build4mac.py
|
||||||
In this section, the actual file and directory names are those obtained on macOS Monterey.<br>
|
In this section, the actual file and directory names are those obtained on macOS Monterey.<br>
|
||||||
On different OS, those names differ accordingly.
|
On different OS, those names differ accordingly.
|
||||||
|
|
||||||
### 6A. Standard build using the OS-bundled Ruby and Python with MacPorts Qt
|
### 6A. Standard build using the OS-bundled Ruby and Python with MacPorts Qt5
|
||||||
0. Install MacPorts, then install Qt5 and libgit2 by
|
0. Install MacPorts, then install Qt5 and libgit2 by
|
||||||
```
|
```
|
||||||
$ sudo port install coreutils
|
$ sudo port install coreutils
|
||||||
|
|
@ -155,70 +156,7 @@ $ ./build4mac.py -q qt5macports -r sys -p sys -y
|
||||||
* "RsysPsys" means that Ruby is 2.6 provided by OS; Python is 3.9 provided by OS.
|
* "RsysPsys" means that Ruby is 2.6 provided by OS; Python is 3.9 provided by OS.
|
||||||
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.
|
||||||
|
|
||||||
### 6B. Fully Homebrew-flavored build with Homebrew Ruby 3.3 and Homebrew Python 3.11
|
### 6B. Fully MacPorts-flavored build with MacPorts Ruby 3.3 and MacPorts Python 3.11
|
||||||
0. Install Homebrew, then install Qt5, Ruby 3.3, Python 3.11, and libgit2 by
|
|
||||||
```
|
|
||||||
$ brew install qt@5
|
|
||||||
$ brew install ruby@3.3
|
|
||||||
$ brew install python@3.11
|
|
||||||
$ brew install libgit2
|
|
||||||
$ cd /where/'build.sh'/exists
|
|
||||||
$ cd macbuild
|
|
||||||
$ ./python3HB.py -v 3.11
|
|
||||||
```
|
|
||||||
1. Invoke **`build4mac.py`** with the following options:
|
|
||||||
```
|
|
||||||
$ cd /where/'build.sh'/exists
|
|
||||||
$ ./build4mac.py -q qt5brew -r hb33 -p hb311
|
|
||||||
```
|
|
||||||
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>
|
|
||||||
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.<br>
|
|
||||||
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Python Module (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ./build4mac.py -q qt5brew -r hb33 -p hb311 -Y
|
|
||||||
```
|
|
||||||
The application bundle **`klayout.app`** is located under:<br>
|
|
||||||
**`LW-qt5Brew.pkg.macos-Monterey-release-Rhb33Phb311`** directory, where
|
|
||||||
* "LW-" means this is a lightweight package.
|
|
||||||
* "qt5Brew" means that Qt5 from Homebrew is used.
|
|
||||||
* "Rhb33Phb311" means that Ruby is 3.3 from Homebrew; Python is 3.11 from Homebrew.
|
|
||||||
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
|
|
||||||
|
|
||||||
### 6C. Partially Homebrew-flavored build with System Ruby and Homebrew Python 3.11
|
|
||||||
0. Install Homebrew, then install Qt5, Python 3.11, and libgit2 by
|
|
||||||
```
|
|
||||||
$ brew install qt@5
|
|
||||||
$ brew install python@3.11
|
|
||||||
$ brew install libgit2
|
|
||||||
$ cd /where/'build.sh'/exists
|
|
||||||
$ cd macbuild
|
|
||||||
$ ./python3HB.py -v 3.11
|
|
||||||
```
|
|
||||||
1. Invoke **`build4mac.py`** with the following options:
|
|
||||||
```
|
|
||||||
$ cd /where/'build.sh'/exists
|
|
||||||
$ ./build4mac.py -q qt5brew -r sys -p hb311
|
|
||||||
```
|
|
||||||
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 (including Qt and Python frameworks) under the **`klayout.app`** bundle.<br>
|
|
||||||
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ./build4mac.py -q qt5brew -r sys -p hb311 -y
|
|
||||||
```
|
|
||||||
The application bundle **`klayout.app`** is located under:<br>
|
|
||||||
**`HW-qt5Brew.pkg.macos-Monterey-release-RsysPhb311`** directory, where
|
|
||||||
* "HW-" means this is a heavyweight package because both Qt5 and Python Frameworks are deployed.
|
|
||||||
* "qt5Brew" means that Qt5 from Homebrew is used.
|
|
||||||
* "RsysPhb311" means that Ruby is OS-bundled; Python is 3.11 from Homebrew.
|
|
||||||
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
|
|
||||||
### Important
|
|
||||||
So far, the deployment of Homebrew Ruby is not supported.<br>
|
|
||||||
Therefore, if you intend to use the "-y" option for deployment, you need to use the "-r sys" option for building.
|
|
||||||
|
|
||||||
### 6D. Fully MacPorts-flavored build with MacPorts Ruby 3.3 and MacPorts Python 3.11
|
|
||||||
0. Install MacPorts, then install Qt5, Ruby 3.3, Python 3.11, and libgit2 by
|
0. Install MacPorts, then install Qt5, Ruby 3.3, Python 3.11, and libgit2 by
|
||||||
```
|
```
|
||||||
$ sudo port install coreutils
|
$ sudo port install coreutils
|
||||||
|
|
@ -237,7 +175,7 @@ $ ./build4mac.py -q qt5macports -r mp33 -p mp311
|
||||||
2. Confirm successful build (it will take about one hour, depending on your machine spec).
|
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>
|
3. Rerun **`build4mac.py`** with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br>
|
||||||
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.<br>
|
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.<br>
|
||||||
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Python Module (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Standalone Python Package (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./build4mac.py -q qt5macports -r mp33 -p mp311 -Y
|
$ ./build4mac.py -q qt5macports -r mp33 -p mp311 -Y
|
||||||
|
|
@ -249,6 +187,80 @@ $ ./build4mac.py -q qt5macports -r mp33 -p mp311 -Y
|
||||||
* "Rmp33Pmp311" means that Ruby is 3.3 from MacPorts; Python is 3.11 from MacPorts.
|
* "Rmp33Pmp311" means that Ruby is 3.3 from MacPorts; Python is 3.11 from MacPorts.
|
||||||
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
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> To build KLayout >= 0.29.0, you need "Qt6" to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).
|
||||||
|
|
||||||
|
0. Install Homebrew, then install Qt6, Ruby 3.3, Python 3.11, and libgit2 by
|
||||||
|
```
|
||||||
|
$ brew install qt@6
|
||||||
|
$ brew install ruby@3.3
|
||||||
|
$ brew install python@3.11
|
||||||
|
$ brew install libgit2
|
||||||
|
$ cd /where/'build.sh'/exists
|
||||||
|
$ cd macbuild
|
||||||
|
$ ./python3HB.py -v 3.11
|
||||||
|
```
|
||||||
|
1. Invoke **`build4mac.py`** with the following options:
|
||||||
|
```
|
||||||
|
$ cd /where/'build.sh'/exists
|
||||||
|
$ ./build4mac.py -q qt6brew -r hb33 -p hb311
|
||||||
|
```
|
||||||
|
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>
|
||||||
|
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.<br>
|
||||||
|
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Standalone Python Package (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./build4mac.py -q qt6brew -r hb33 -p hb311 -Y
|
||||||
|
```
|
||||||
|
The application bundle **`klayout.app`** is located under:<br>
|
||||||
|
**`LW-qt6Brew.pkg.macos-Monterey-release-Rhb33Phb311`** directory, where
|
||||||
|
* "LW-" means this is a lightweight package.
|
||||||
|
* "qt6Brew" means that Qt6 from Homebrew is used.
|
||||||
|
* "Rhb33Phb311" means that Ruby is 3.3 from Homebrew; Python is 3.11 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.11
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> To build KLayout >= 0.29.0, you need "Qt6" to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
> Homebrew Qt6.6.2 seems buggy. More precisely, it does not perfectly deploy the required Qt frameworks.
|
||||||
|
> If you plan to distribute an HW*.dmg package, consider using Qt6.4.x from MacPorts.
|
||||||
|
> That is, substitute `qt6brew` with `qt6macports` in the following command lines.
|
||||||
|
|
||||||
|
0. Install Homebrew, then install Qt6, Python 3.11, and libgit2 by
|
||||||
|
```
|
||||||
|
$ brew install qt@6
|
||||||
|
$ brew install python@3.11
|
||||||
|
$ brew install libgit2
|
||||||
|
$ cd /where/'build.sh'/exists
|
||||||
|
$ cd macbuild
|
||||||
|
$ ./python3HB.py -v 3.11
|
||||||
|
```
|
||||||
|
1. Invoke **`build4mac.py`** with the following options:
|
||||||
|
```
|
||||||
|
$ cd /where/'build.sh'/exists
|
||||||
|
$ ./build4mac.py -q qt6brew -r sys -p hb311
|
||||||
|
```
|
||||||
|
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 (including Qt and Python frameworks) under the **`klayout.app`** bundle.<br>
|
||||||
|
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./build4mac.py -q qt6brew -r sys -p hb311 -y
|
||||||
|
```
|
||||||
|
The application bundle **`klayout.app`** is located under:<br>
|
||||||
|
**`HW-qt6Brew.pkg.macos-Monterey-release-RsysPhb311`** directory, where
|
||||||
|
* "HW-" means this is a heavyweight package because both Qt6 and Python Frameworks are deployed.
|
||||||
|
* "qt6Brew" means that Qt6 from Homebrew is used.
|
||||||
|
* "RsysPhb311" means that Ruby is OS-bundled; Python is 3.11 from Homebrew.
|
||||||
|
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> So far, the deployment of Homebrew Ruby is not supported.<br>
|
||||||
|
> Therefore, if you intend to use the "-y" option for deployment, you need to use the "-r sys" option for building.
|
||||||
|
|
||||||
### 6E. Fully Anaconda3-flavored build with Anaconda3 Ruby 3.2 and Anaconda3 Python 3.11
|
### 6E. Fully Anaconda3-flavored build with Anaconda3 Ruby 3.2 and Anaconda3 Python 3.11
|
||||||
0. Install Anaconda3 (Anaconda3-2023.09-0-MacOSX-x86_64.pkg), then install Ruby 3.2 and libgit2 by
|
0. Install Anaconda3 (Anaconda3-2023.09-0-MacOSX-x86_64.pkg), then install Ruby 3.2 and libgit2 by
|
||||||
```
|
```
|
||||||
|
|
@ -264,7 +276,7 @@ $ ./build4mac.py -q qt5ana3 -r ana3 -p ana3
|
||||||
2. Confirm successful build (it will take about one hour, depending on your machine spec).
|
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>
|
3. Rerun **`build4mac.py`** with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br>
|
||||||
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.<br>
|
The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.<br>
|
||||||
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Python Module (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Standalone Python Package (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./build4mac.py -q qt5ana3 -r ana3 -p ana3 -Y
|
$ ./build4mac.py -q qt5ana3 -r ana3 -p ana3 -Y
|
||||||
|
|
@ -292,7 +304,7 @@ $ export KLAYOUT_GIT_HTTP_PROXY="http://111.222.333.444:5678"
|
||||||
Ask your system administrator for the actual IP address and port number of your proxy server.
|
Ask your system administrator for the actual IP address and port number of your proxy server.
|
||||||
|
|
||||||
It is highly recommended that this setting is included in a launching service script bundle.<br>
|
It is highly recommended that this setting is included in a launching service script bundle.<br>
|
||||||
A sample content (`*.app.Bash`) of the script bundle can be found in `Resources/script-bundle-[A|B|H|P].zip`.
|
A sample content (`*.app.Bash`) of the script bundle can be found in `Resources/script-bundle-[A|B|H|P|S].zip`.
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
@ -310,8 +322,8 @@ $ cd /where/'build.sh'/exists
|
||||||
$ ./makeDMG4mac.py -p LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311 -m
|
$ ./makeDMG4mac.py -p LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311 -m
|
||||||
```
|
```
|
||||||
This command will generate the two files below:<br>
|
This command will generate the two files below:<br>
|
||||||
* **`LW-klayout-0.28.17-macOS-Monterey-1-qt5MP-Rmp33Pmp311.dmg`** ---(1) the main DMG file
|
* **`LW-klayout-0.29.0-macOS-Monterey-1-qt5MP-Rmp33Pmp311.dmg`** ---(1) the main DMG file
|
||||||
* **`LW-klayout-0.28.17-macOS-Monterey-1-qt5MP-Rmp33Pmp311.dmg.md5`** ---(2) MD5-value text file
|
* **`LW-klayout-0.29.0-macOS-Monterey-1-qt5MP-Rmp33Pmp311.dmg.md5`** ---(2) MD5-value text file
|
||||||
|
|
||||||
# Known issues
|
# Known issues
|
||||||
Because we assume some specific versions of non-OS-standard Ruby and Python, updating Homebrew, MacPorts, or Anaconda3 may cause build- and link errors.<br>
|
Because we assume some specific versions of non-OS-standard Ruby and Python, updating Homebrew, MacPorts, or Anaconda3 may cause build- and link errors.<br>
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
# Here are dictionaries of ...
|
# Here are dictionaries of ...
|
||||||
# different modules for building KLayout (http://www.klayout.de/index.php)
|
# different modules for building KLayout (http://www.klayout.de/index.php)
|
||||||
# version 0.28.17 or later on different Apple Mac OSX platforms.
|
# version 0.29.0 or later on different Apple Mac OSX platforms.
|
||||||
#
|
#
|
||||||
# This file is imported by 'build4mac.py' script.
|
# This file is imported by 'build4mac.py' script.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
@ -72,14 +72,16 @@ Qts += [ 'Qt6MacPorts', 'Qt6Brew' ]
|
||||||
# install with 'sudo port install [qt5|qt5-qttools]'
|
# install with 'sudo port install [qt5|qt5-qttools]'
|
||||||
# [Key Type Name] = 'Qt5MacPorts'
|
# [Key Type Name] = 'Qt5MacPorts'
|
||||||
Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
|
Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
|
||||||
'deploy': '/opt/local/libexec/qt5/bin/macdeployqt'
|
'deploy': '/opt/local/libexec/qt5/bin/macdeployqt',
|
||||||
|
'libdir': '/opt/local/libexec/qt5/lib'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Qt5 from Homebrew (https://brew.sh/)
|
# Qt5 from Homebrew (https://brew.sh/)
|
||||||
# install with 'brew install qt5'
|
# install with 'brew install qt5'
|
||||||
# [Key Type Name] = 'Qt5Brew'
|
# [Key Type Name] = 'Qt5Brew'
|
||||||
Qt5Brew = { 'qmake' : '%s/opt/qt@5/bin/qmake' % DefaultHomebrewRoot,
|
Qt5Brew = { 'qmake' : '%s/opt/qt@5/bin/qmake' % DefaultHomebrewRoot,
|
||||||
'deploy': '%s/opt/qt@5/bin/macdeployqt' % DefaultHomebrewRoot
|
'deploy': '%s/opt/qt@5/bin/macdeployqt' % DefaultHomebrewRoot,
|
||||||
|
'libdir': '%s/opt/qt@5/lib' % DefaultHomebrewRoot
|
||||||
}
|
}
|
||||||
|
|
||||||
# Qt5 bundled with anaconda3 installed under /Applications/anaconda3/
|
# Qt5 bundled with anaconda3 installed under /Applications/anaconda3/
|
||||||
|
|
@ -87,7 +89,8 @@ Qt5Brew = { 'qmake' : '%s/opt/qt@5/bin/qmake' % DefaultHomebrewRoot,
|
||||||
# If so, you need to make a symbolic link: /Applications/anaconda3 ---> $HOME/opt/anaconda3/
|
# If so, you need to make a symbolic link: /Applications/anaconda3 ---> $HOME/opt/anaconda3/
|
||||||
# [Key Type Name] = 'Qt5Ana3'
|
# [Key Type Name] = 'Qt5Ana3'
|
||||||
Qt5Ana3 = { 'qmake' : '/Applications/anaconda3/bin/qmake',
|
Qt5Ana3 = { 'qmake' : '/Applications/anaconda3/bin/qmake',
|
||||||
'deploy': '/Applications/anaconda3/bin/macdeployqt'
|
'deploy': '/Applications/anaconda3/bin/macdeployqt',
|
||||||
|
'libdir': '/Applications/anaconda3/lib'
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
@ -97,16 +100,26 @@ Qt5Ana3 = { 'qmake' : '/Applications/anaconda3/bin/qmake',
|
||||||
# install with 'sudo port install [qt6|qt6-qttools]'
|
# install with 'sudo port install [qt6|qt6-qttools]'
|
||||||
# [Key Type Name] = 'Qt6MacPorts'
|
# [Key Type Name] = 'Qt6MacPorts'
|
||||||
Qt6MacPorts = { 'qmake' : '/opt/local/libexec/qt6/bin/qmake',
|
Qt6MacPorts = { 'qmake' : '/opt/local/libexec/qt6/bin/qmake',
|
||||||
'deploy': '/opt/local/libexec/qt6/bin/macdeployqt'
|
'deploy': '/opt/local/libexec/qt6/bin/macdeployqt',
|
||||||
|
'libdir': '/opt/local/libexec/qt6/lib'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Qt6 from Homebrew (https://brew.sh/)
|
# Qt6 from Homebrew (https://brew.sh/)
|
||||||
# install with 'brew install qt6'
|
# install with 'brew install qt6'
|
||||||
# [Key Type Name] = 'Qt6Brew'
|
# [Key Type Name] = 'Qt6Brew'
|
||||||
Qt6Brew = { 'qmake' : '%s/opt/qt@6/bin/qmake' % DefaultHomebrewRoot,
|
Qt6Brew = { 'qmake' : '%s/opt/qt@6/bin/qmake' % DefaultHomebrewRoot,
|
||||||
'deploy': '%s/opt/qt@6/bin/macdeployqt' % DefaultHomebrewRoot
|
'deploy': '%s/opt/qt@6/bin/macdeployqt' % DefaultHomebrewRoot,
|
||||||
|
'libdir': '%s/opt/qt@6/lib' % DefaultHomebrewRoot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Consolidated dictionary kit for Qt[5|6]
|
||||||
|
Qt56Dictionary = { 'Qt5MacPorts': Qt5MacPorts,
|
||||||
|
'Qt5Brew' : Qt5Brew,
|
||||||
|
'Qt5Ana3' : Qt5Ana3,
|
||||||
|
'Qt6MacPorts': Qt6MacPorts,
|
||||||
|
'Qt6Brew' : Qt6Brew
|
||||||
|
}
|
||||||
|
|
||||||
#-----------------------------------------------------
|
#-----------------------------------------------------
|
||||||
# [2] Ruby
|
# [2] Ruby
|
||||||
# * Dropped the followings (2023-10-24).
|
# * Dropped the followings (2023-10-24).
|
||||||
|
|
@ -123,31 +136,46 @@ Rubies = RubyNil + RubySys + RubyExt
|
||||||
#-----------------------------------------------------
|
#-----------------------------------------------------
|
||||||
# Whereabouts of different components of Ruby
|
# Whereabouts of different components of Ruby
|
||||||
#-----------------------------------------------------
|
#-----------------------------------------------------
|
||||||
|
# % which ruby
|
||||||
|
# /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
|
||||||
|
#
|
||||||
|
# % ruby -v
|
||||||
|
# ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin21]
|
||||||
|
#
|
||||||
|
# Where is the 'ruby.h' used to build the 'ruby' executable?
|
||||||
|
#
|
||||||
|
# % ruby -e "puts File.expand_path('ruby.h', RbConfig::CONFIG['rubyhdrdir'])"
|
||||||
|
# ===> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk \
|
||||||
|
# /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h
|
||||||
|
#
|
||||||
# Bundled with Monterey (12.x)
|
# Bundled with Monterey (12.x)
|
||||||
# [Key Type Name] = 'Sys'
|
# [Key Type Name] = 'Sys'
|
||||||
MontereySDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
MontereyXcSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
||||||
|
MontereyCLTSDK = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
|
||||||
RubyMonterey = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
RubyMonterey = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
||||||
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % MontereySDK,
|
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % MontereyXcSDK,
|
||||||
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % MontereySDK,
|
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % MontereyXcSDK,
|
||||||
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % MontereySDK
|
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % MontereyXcSDK
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bundled with Ventura (13.x)
|
# Bundled with Ventura (13.x)
|
||||||
# [Key Type Name] = 'Sys'
|
# [Key Type Name] = 'Sys'
|
||||||
VenturaSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
VenturaXcSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
||||||
|
VenturaCLTSDK = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
|
||||||
RubyVentura = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
RubyVentura = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
||||||
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % VenturaSDK,
|
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % VenturaXcSDK,
|
||||||
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % VenturaSDK,
|
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % VenturaXcSDK,
|
||||||
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % VenturaSDK
|
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % VenturaXcSDK
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bundled with Sonoma (14.x)
|
# Bundled with Sonoma (14.x)
|
||||||
# [Key Type Name] = 'Sys'
|
# [Key Type Name] = 'Sys'
|
||||||
SonomaSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
SonomaXcSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
||||||
|
SonomaCLTSDK = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
|
||||||
RubySonoma = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
RubySonoma = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
||||||
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % SonomaSDK,
|
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % SonomaXcSDK,
|
||||||
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % SonomaSDK,
|
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % SonomaXcSDK,
|
||||||
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % SonomaSDK
|
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % SonomaXcSDK
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ruby 3.3 from MacPorts (https://www.macports.org/)
|
# Ruby 3.3 from MacPorts (https://www.macports.org/)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
# Here are utility functions and classes ...
|
# Here are utility functions and classes ...
|
||||||
# for building KLayout (http://www.klayout.de/index.php)
|
# for building KLayout (http://www.klayout.de/index.php)
|
||||||
# version 0.28.17 or later on different Apple Mac OSX platforms.
|
# version 0.29.0 or later on different Apple Mac OSX platforms.
|
||||||
#
|
#
|
||||||
# This file is imported by 'build4mac.py' script.
|
# This file is imported by 'build4mac.py' script.
|
||||||
#========================================================================================
|
#========================================================================================
|
||||||
|
|
@ -16,6 +16,7 @@ import re
|
||||||
import string
|
import string
|
||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
|
import fnmatch
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------
|
#----------------------------------------------------------------------------------------
|
||||||
## To import global dictionaries of different modules
|
## To import global dictionaries of different modules
|
||||||
|
|
@ -80,6 +81,9 @@ def PrintLibraryDependencyDictionary( depdic, pathdic, namedic ):
|
||||||
# @return 0 on success; non-zero on failure
|
# @return 0 on success; non-zero on failure
|
||||||
#----------------------------------------------------------------------------------------
|
#----------------------------------------------------------------------------------------
|
||||||
def SetChangeIdentificationNameOfDyLib( libdic, pathDic ):
|
def SetChangeIdentificationNameOfDyLib( libdic, pathDic ):
|
||||||
|
if len(libdic) == 0 or len(pathDic) == 0:
|
||||||
|
return 0
|
||||||
|
|
||||||
cmdNameId = XcodeToolChain['nameID']
|
cmdNameId = XcodeToolChain['nameID']
|
||||||
cmdNameChg = XcodeToolChain['nameCH']
|
cmdNameChg = XcodeToolChain['nameCH']
|
||||||
dependentLibs = libdic.keys()
|
dependentLibs = libdic.keys()
|
||||||
|
|
@ -101,10 +105,9 @@ def SetChangeIdentificationNameOfDyLib( libdic, pathDic ):
|
||||||
# [2] Make the library aware of the new identifications of all supporters
|
# [2] Make the library aware of the new identifications of all supporters
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
supporters = libdic[lib]
|
supporters = libdic[lib]
|
||||||
for sup in supporters:
|
for supName in supporters:
|
||||||
supName = os.path.basename(sup)
|
if (libName != supName) and (supName in pathDic):
|
||||||
if libName != supName and (supName in pathDic):
|
nameOld = "%s" % supName
|
||||||
nameOld = "%s" % sup
|
|
||||||
nameNew = pathDic[supName]
|
nameNew = pathDic[supName]
|
||||||
command = "%s %s %s %s" % ( cmdNameChg, nameOld, nameNew, lib )
|
command = "%s %s %s %s" % ( cmdNameChg, nameOld, nameNew, lib )
|
||||||
if subprocess.call( command, shell=True ) != 0:
|
if subprocess.call( command, shell=True ) != 0:
|
||||||
|
|
@ -133,11 +136,15 @@ def SetChangeIdentificationNameOfDyLib( libdic, pathDic ):
|
||||||
# +-- Frameworks/+
|
# +-- Frameworks/+
|
||||||
# | +-- '*.framework'
|
# | +-- '*.framework'
|
||||||
# | +-- '*.dylib'
|
# | +-- '*.dylib'
|
||||||
# | +-- 'db_plugins' --slink--> ../MacOS/db_plugins/
|
# | +-- 'db_plugins' --sym.link--> ../MacOS/db_plugins/
|
||||||
|
# | +-- 'lay_plugins' --sym.link--> ../MacOS/lay_plugins/
|
||||||
|
# | +-- 'pymod' --sym.link--> ../MacOS/pymod/
|
||||||
# +-- MacOS/+
|
# +-- MacOS/+
|
||||||
# | +-- 'klayout'
|
# | +-- 'klayout'
|
||||||
# | +-- db_plugins/
|
# | +-- db_plugins/
|
||||||
# | +-- lay_plugins/
|
# | +-- lay_plugins/
|
||||||
|
# | +-- pymod/
|
||||||
|
# |
|
||||||
# +-- Buddy/+
|
# +-- Buddy/+
|
||||||
# +-- 'strm2cif'
|
# +-- 'strm2cif'
|
||||||
# +-- 'strm2dxf'
|
# +-- 'strm2dxf'
|
||||||
|
|
@ -790,6 +797,79 @@ def Generate_Start_Console_Py( template, pythonver, target ):
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------------------
|
||||||
|
## To deeply copy directory contents
|
||||||
|
#
|
||||||
|
# @param[in] src_dir : source directory
|
||||||
|
# @param[in] dest_dir : destination directory
|
||||||
|
# @param[in] excl_pat_list: exclude pattern list (default=[]])
|
||||||
|
#
|
||||||
|
# @return True on success, False on failure
|
||||||
|
#----------------------------------------------------------------------------------------
|
||||||
|
def Deeply_Copy_Dir( src_dir, dest_dir, excl_pat_list=[] ):
|
||||||
|
|
||||||
|
def FnameMatch(item):
|
||||||
|
for excl_pat in excl_pat_list:
|
||||||
|
if fnmatch.fnmatch( item, excl_pat ):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
if os.path.isfile(dest_dir):
|
||||||
|
print( "! Destination <%s> is an existing file" % dest_dir, file=sys.stderr )
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not os.path.exists(dest_dir):
|
||||||
|
os.makedirs(dest_dir)
|
||||||
|
|
||||||
|
for item in os.listdir(src_dir):
|
||||||
|
src_item = os.path.join(src_dir, item)
|
||||||
|
dest_item = os.path.join(dest_dir, item)
|
||||||
|
|
||||||
|
if os.path.isdir(src_item):
|
||||||
|
if FnameMatch(item):
|
||||||
|
continue # skip copying if directory name matches the exclusion pattern
|
||||||
|
Deeply_Copy_Dir( src_item, dest_item, excl_pat_list )
|
||||||
|
else:
|
||||||
|
if FnameMatch(item):
|
||||||
|
continue # skip copying if the file matches the exclusion pattern
|
||||||
|
shutil.copy2( src_item, dest_item )
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------------------
|
||||||
|
## To dump the contents of a dependency dictionary
|
||||||
|
#
|
||||||
|
# @param[in] title: title
|
||||||
|
# @param[in] depDic: dependency dictionary to dump
|
||||||
|
# @param[in] pathDic: path dictionary to dump
|
||||||
|
#
|
||||||
|
# @return void
|
||||||
|
#----------------------------------------------------------------------------------------
|
||||||
|
def DumpDependencyDicPair( title, depDic, pathDic ):
|
||||||
|
|
||||||
|
print( "### Dependency Dictionary Pair <%s> ###" % title )
|
||||||
|
|
||||||
|
# depDic
|
||||||
|
count1 = 0
|
||||||
|
for key1 in sorted(depDic.keys()):
|
||||||
|
count1 += 1
|
||||||
|
diclist = depDic[key1]
|
||||||
|
print( " %3d:%s" % (count1, key1) )
|
||||||
|
|
||||||
|
count2 = 0
|
||||||
|
for dict_file in diclist:
|
||||||
|
count2 += 1
|
||||||
|
print( " %3d:%s" % (count2, dict_file) )
|
||||||
|
|
||||||
|
# pathDic
|
||||||
|
print( " ==========" )
|
||||||
|
count3 = 0
|
||||||
|
for key3 in sorted(pathDic.keys()):
|
||||||
|
count3 += 1
|
||||||
|
print( " %3d:%s: %s" % (count3, key3, pathDic[key3]) )
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
#----------------
|
#----------------
|
||||||
# End of File
|
# End of File
|
||||||
#----------------
|
#----------------
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
# File: "macbuild/macQAT.py"
|
# File: "macbuild/macQAT.py"
|
||||||
#
|
#
|
||||||
# The top Python script to run "ut_runner" after building KLayout
|
# The top Python script to run "ut_runner" after building KLayout
|
||||||
# (http://www.klayout.de/index.php) version 0.28.17 or later on different Apple
|
# (http://www.klayout.de/index.php) version 0.29.0 or later on different Apple
|
||||||
# ßMac OSX platforms.
|
# ßMac OSX platforms.
|
||||||
#
|
#
|
||||||
# This script must be copied to a "*.macQAT/" directory to run.
|
# This script must be copied to a "*.macQAT/" directory to run.
|
||||||
|
|
@ -25,6 +25,7 @@ import subprocess
|
||||||
def SetGlobals():
|
def SetGlobals():
|
||||||
global ProjectDir # project directory where "ut_runner" exists
|
global ProjectDir # project directory where "ut_runner" exists
|
||||||
global RunnerUsage # True to print the usage of 'ut_runner'
|
global RunnerUsage # True to print the usage of 'ut_runner'
|
||||||
|
global StartKLayout # True to start the KLayout main GUI window
|
||||||
global Run # True to run this script
|
global Run # True to run this script
|
||||||
global ContinueOnError # True to continue after an error
|
global ContinueOnError # True to continue after an error
|
||||||
global TestsExcluded # list of tests to exclude
|
global TestsExcluded # list of tests to exclude
|
||||||
|
|
@ -54,6 +55,7 @@ def SetGlobals():
|
||||||
Usage += " -----------------------------------------------------------------+---------------\n"
|
Usage += " -----------------------------------------------------------------+---------------\n"
|
||||||
Usage += " [-u|--usage] : print usage of 'ut_runner'and exit | disabled\n"
|
Usage += " [-u|--usage] : print usage of 'ut_runner'and exit | disabled\n"
|
||||||
Usage += " |\n"
|
Usage += " |\n"
|
||||||
|
Usage += " [-k|--klayout] : just start the KLayout main GUI window | disabled\n"
|
||||||
Usage += " <-r|--run> : run this script | disabled\n"
|
Usage += " <-r|--run> : run this script | disabled\n"
|
||||||
Usage += " [-s|--stop] : stop on error | disabled\n"
|
Usage += " [-s|--stop] : stop on error | disabled\n"
|
||||||
Usage += " [-x|--exclude <tests>] : exclude test(s) such as 'pymod,pya' | ''\n"
|
Usage += " [-x|--exclude <tests>] : exclude test(s) such as 'pymod,pya' | ''\n"
|
||||||
|
|
@ -66,6 +68,7 @@ def SetGlobals():
|
||||||
|
|
||||||
ProjectDir = os.getcwd()
|
ProjectDir = os.getcwd()
|
||||||
RunnerUsage = False
|
RunnerUsage = False
|
||||||
|
StartKLayout = False
|
||||||
Run = False
|
Run = False
|
||||||
ContinueOnError = True
|
ContinueOnError = True
|
||||||
TestsExcluded = list()
|
TestsExcluded = list()
|
||||||
|
|
@ -104,6 +107,7 @@ def GetTimeStamp():
|
||||||
def ParseCommandLineArguments():
|
def ParseCommandLineArguments():
|
||||||
global Usage
|
global Usage
|
||||||
global RunnerUsage
|
global RunnerUsage
|
||||||
|
global StartKLayout
|
||||||
global Run
|
global Run
|
||||||
global ContinueOnError
|
global ContinueOnError
|
||||||
global TestsExcluded
|
global TestsExcluded
|
||||||
|
|
@ -117,6 +121,12 @@ def ParseCommandLineArguments():
|
||||||
default=False,
|
default=False,
|
||||||
help="print usage of 'ut_runner' and exit (false)" )
|
help="print usage of 'ut_runner' and exit (false)" )
|
||||||
|
|
||||||
|
p.add_option( '-k', '--klayout',
|
||||||
|
action='store_true',
|
||||||
|
dest='start_KLayout',
|
||||||
|
default=False,
|
||||||
|
help='just start the KLayout main GUI window (false)' )
|
||||||
|
|
||||||
p.add_option( '-r', '--run',
|
p.add_option( '-r', '--run',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
dest='runme',
|
dest='runme',
|
||||||
|
|
@ -152,6 +162,7 @@ def ParseCommandLineArguments():
|
||||||
help='check usage (false)' )
|
help='check usage (false)' )
|
||||||
|
|
||||||
p.set_defaults( runner_usage = False,
|
p.set_defaults( runner_usage = False,
|
||||||
|
start_KLayout = False,
|
||||||
runme = False,
|
runme = False,
|
||||||
stop_on_error = False,
|
stop_on_error = False,
|
||||||
exclude_tests = list(),
|
exclude_tests = list(),
|
||||||
|
|
@ -165,6 +176,7 @@ def ParseCommandLineArguments():
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
RunnerUsage = opt.runner_usage
|
RunnerUsage = opt.runner_usage
|
||||||
|
StartKLayout = opt.start_KLayout
|
||||||
Run = opt.runme
|
Run = opt.runme
|
||||||
ContinueOnError = not opt.stop_on_error
|
ContinueOnError = not opt.stop_on_error
|
||||||
if not len(opt.exclude_tests) == 0:
|
if not len(opt.exclude_tests) == 0:
|
||||||
|
|
@ -211,6 +223,18 @@ def ExportEnvVariables():
|
||||||
for env in [ 'TESTSRC', 'TESTTMP', 'LD_LIBRARY_PATH' ]:
|
for env in [ 'TESTSRC', 'TESTTMP', 'LD_LIBRARY_PATH' ]:
|
||||||
os.environ[env] = MyEnviron[env]
|
os.environ[env] = MyEnviron[env]
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
## Start the KLayout main GUI window
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
def StartKLatyouGUIWindow():
|
||||||
|
if System == "Darwin":
|
||||||
|
command = "./klayout.app/Contents/MacOS/klayout"
|
||||||
|
else:
|
||||||
|
command = "./klayout"
|
||||||
|
|
||||||
|
subprocess.call( command, shell=False )
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
## Run the tester
|
## Run the tester
|
||||||
#
|
#
|
||||||
|
|
@ -255,35 +279,43 @@ def Main():
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
# [3] Run the unit tester
|
# [3] Start the KLayout main GUI window
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
if not Run:
|
if StartKLayout:
|
||||||
print( "! pass <-r|--run> option to run" )
|
StartKLatyouGUIWindow()
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
# [4] Run the unit tester
|
||||||
|
#-------------------------------------------------------
|
||||||
|
if not Run and not StartKLayout:
|
||||||
|
print( "! pass <-r|--run> option to run the QA tests" )
|
||||||
|
print( "! pass <-k|--klayout> option to start the KLayout main GUI window" )
|
||||||
print(Usage)
|
print(Usage)
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
command = './ut_runner'
|
if Run:
|
||||||
if ContinueOnError:
|
command = './ut_runner'
|
||||||
command += " -c"
|
if ContinueOnError:
|
||||||
for item in TestsExcluded:
|
command += " -c"
|
||||||
command += ' -x %s' % item
|
for item in TestsExcluded:
|
||||||
if not len(Arguments) == 0:
|
command += ' -x %s' % item
|
||||||
for arg in Arguments:
|
if not len(Arguments) == 0:
|
||||||
command += " %s" % arg
|
for arg in Arguments:
|
||||||
|
command += " %s" % arg
|
||||||
|
|
||||||
print( "" )
|
print( "" )
|
||||||
print( "### Dumping the log to <%s>" % LogFile )
|
print( "### Dumping the log to <%s>" % LogFile )
|
||||||
print( "------------------------------------------------------------------------" )
|
print( "------------------------------------------------------------------------" )
|
||||||
print( " Git SHA1 = %s" % GitSHA1 )
|
print( " Git SHA1 = %s" % GitSHA1 )
|
||||||
print( " Time stamp = %s" % TimeStamp )
|
print( " Time stamp = %s" % TimeStamp )
|
||||||
print( " Command line = %s" % command )
|
print( " Command line = %s" % command )
|
||||||
print( "------------------------------------------------------------------------" )
|
print( "------------------------------------------------------------------------" )
|
||||||
if DryRun:
|
if DryRun:
|
||||||
quit()
|
quit()
|
||||||
sleep(1.0)
|
sleep(1.0)
|
||||||
HidePrivateDir()
|
HidePrivateDir()
|
||||||
RunTester( command, logfile=LogFile )
|
RunTester( command, logfile=LogFile )
|
||||||
ShowPrivateDir()
|
ShowPrivateDir()
|
||||||
|
|
||||||
#===================================================================================
|
#===================================================================================
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ def SetGlobals():
|
||||||
Usage = "\n"
|
Usage = "\n"
|
||||||
Usage += "---------------------------------------------------------------------------------------------------------\n"
|
Usage += "---------------------------------------------------------------------------------------------------------\n"
|
||||||
Usage += "<< Usage of 'makeDMG4mac.py' >>\n"
|
Usage += "<< Usage of 'makeDMG4mac.py' >>\n"
|
||||||
Usage += " for making a DMG file of KLayout 0.28.17 or later on different Apple macOS platforms.\n"
|
Usage += " for making a DMG file of KLayout 0.29.0 or later on different Apple macOS platforms.\n"
|
||||||
Usage += "\n"
|
Usage += "\n"
|
||||||
Usage += "$ [python] ./makeDMG4mac.py\n"
|
Usage += "$ [python] ./makeDMG4mac.py\n"
|
||||||
Usage += " option & argument : descriptions | default value\n"
|
Usage += " option & argument : descriptions | default value\n"
|
||||||
|
|
@ -162,36 +162,50 @@ def SetGlobals():
|
||||||
Item3AppleScript = ""
|
Item3AppleScript = ""
|
||||||
|
|
||||||
# Populate DicStdLightHeavyW
|
# Populate DicStdLightHeavyW
|
||||||
DicStdLightHeavyW[ "std" ] = dict() # ST-*
|
DicStdLightHeavyW[ "std" ] = dict() # ST-*
|
||||||
DicStdLightHeavyW[ "ports" ] = dict() # LW-*
|
DicStdLightHeavyW[ "ports" ] = dict() # LW-*
|
||||||
DicStdLightHeavyW[ "brew" ] = dict() # LW-*
|
DicStdLightHeavyW[ "brew" ] = dict() # LW-*
|
||||||
DicStdLightHeavyW[ "ana3" ] = dict() # LW-*
|
DicStdLightHeavyW[ "ana3" ] = dict() # LW-*
|
||||||
DicStdLightHeavyW[ "brewH" ] = dict() # HW-*
|
DicStdLightHeavyW[ "brewH" ] = dict() # HW-*
|
||||||
|
# "pbrew" is the alternative of "brew" using MacPorts' Qt and Homebrew's (Ruby, Python)
|
||||||
|
# "pbrewHW" is the alternative of "brewH" using MacPorts' Qt and Homebrew's Python
|
||||||
|
DicStdLightHeavyW[ "pbrew" ] = dict() # LW-*
|
||||||
|
DicStdLightHeavyW[ "pbrewHW" ] = dict() # HW-*
|
||||||
|
|
||||||
DicStdLightHeavyW[ "std" ]["zip"] = "macbuild/Resources/script-bundle-S.zip"
|
DicStdLightHeavyW[ "std" ]["zip"] = "macbuild/Resources/script-bundle-S.zip"
|
||||||
DicStdLightHeavyW[ "std" ]["src"] = "script-bundle-S"
|
DicStdLightHeavyW[ "std" ]["src"] = "script-bundle-S"
|
||||||
DicStdLightHeavyW[ "std" ]["des"] = "MacStdUser-ReadMeFirst"
|
DicStdLightHeavyW[ "std" ]["des"] = "MacStdUser-ReadMeFirst"
|
||||||
DicStdLightHeavyW[ "std" ]["item3"] = 'set position of item "MacStdUser-ReadMeFirst" to {700, 400}'
|
DicStdLightHeavyW[ "std" ]["item3"] = 'set position of item "MacStdUser-ReadMeFirst" to {700, 400}'
|
||||||
|
|
||||||
DicStdLightHeavyW[ "ports" ]["zip"] = "macbuild/Resources/script-bundle-P.zip"
|
DicStdLightHeavyW[ "ports" ]["zip"] = "macbuild/Resources/script-bundle-P.zip"
|
||||||
DicStdLightHeavyW[ "ports" ]["src"] = "script-bundle-P"
|
DicStdLightHeavyW[ "ports" ]["src"] = "script-bundle-P"
|
||||||
DicStdLightHeavyW[ "ports" ]["des"] = "MacPortsUser-ReadMeFirst"
|
DicStdLightHeavyW[ "ports" ]["des"] = "MacPortsUser-ReadMeFirst"
|
||||||
DicStdLightHeavyW[ "ports" ]["item3"] = 'set position of item "MacPortsUser-ReadMeFirst" to {700, 400}'
|
DicStdLightHeavyW[ "ports" ]["item3"] = 'set position of item "MacPortsUser-ReadMeFirst" to {700, 400}'
|
||||||
|
|
||||||
DicStdLightHeavyW[ "brew" ]["zip"] = "macbuild/Resources/script-bundle-B.zip"
|
DicStdLightHeavyW[ "brew" ]["zip"] = "macbuild/Resources/script-bundle-B.zip"
|
||||||
DicStdLightHeavyW[ "brew" ]["src"] = "script-bundle-B"
|
DicStdLightHeavyW[ "brew" ]["src"] = "script-bundle-B"
|
||||||
DicStdLightHeavyW[ "brew" ]["des"] = "HomebrewUser-ReadMeFirst"
|
DicStdLightHeavyW[ "brew" ]["des"] = "HomebrewUser-ReadMeFirst"
|
||||||
DicStdLightHeavyW[ "brew" ]["item3"] = 'set position of item "HomebrewUser-ReadMeFirst" to {700, 400}'
|
DicStdLightHeavyW[ "brew" ]["item3"] = 'set position of item "HomebrewUser-ReadMeFirst" to {700, 400}'
|
||||||
|
|
||||||
DicStdLightHeavyW[ "ana3" ]["zip"] = "macbuild/Resources/script-bundle-A.zip"
|
DicStdLightHeavyW[ "ana3" ]["zip"] = "macbuild/Resources/script-bundle-A.zip"
|
||||||
DicStdLightHeavyW[ "ana3" ]["src"] = "script-bundle-A"
|
DicStdLightHeavyW[ "ana3" ]["src"] = "script-bundle-A"
|
||||||
DicStdLightHeavyW[ "ana3" ]["des"] = "Anaconda3User-ReadMeFirst"
|
DicStdLightHeavyW[ "ana3" ]["des"] = "Anaconda3User-ReadMeFirst"
|
||||||
DicStdLightHeavyW[ "ana3" ]["item3"] = 'set position of item "Anaconda3User-ReadMeFirst" to {700, 400}'
|
DicStdLightHeavyW[ "ana3" ]["item3"] = 'set position of item "Anaconda3User-ReadMeFirst" to {700, 400}'
|
||||||
|
|
||||||
DicStdLightHeavyW[ "brewH" ]["zip"] = "macbuild/Resources/script-bundle-H.zip"
|
DicStdLightHeavyW[ "brewH" ]["zip"] = "macbuild/Resources/script-bundle-H.zip"
|
||||||
DicStdLightHeavyW[ "brewH" ]["src"] = "script-bundle-H"
|
DicStdLightHeavyW[ "brewH" ]["src"] = "script-bundle-H"
|
||||||
DicStdLightHeavyW[ "brewH" ]["des"] = "Homebrew-HUser-ReadMeFirst"
|
DicStdLightHeavyW[ "brewH" ]["des"] = "Homebrew-HUser-ReadMeFirst"
|
||||||
DicStdLightHeavyW[ "brewH" ]["item3"] = 'set position of item "Homebrew-HUser-ReadMeFirst" to {700, 400}'
|
DicStdLightHeavyW[ "brewH" ]["item3"] = 'set position of item "Homebrew-HUser-ReadMeFirst" to {700, 400}'
|
||||||
|
|
||||||
|
DicStdLightHeavyW[ "pbrew" ]["zip"] = "macbuild/Resources/script-bundle-B.zip"
|
||||||
|
DicStdLightHeavyW[ "pbrew" ]["src"] = "script-bundle-B"
|
||||||
|
DicStdLightHeavyW[ "pbrew" ]["des"] = "HomebrewUser-ReadMeFirst"
|
||||||
|
DicStdLightHeavyW[ "pbrew" ]["item3"] = 'set position of item "HomebrewUser-ReadMeFirst" to {700, 400}'
|
||||||
|
|
||||||
|
DicStdLightHeavyW[ "pbrewHW" ]["zip"] = "macbuild/Resources/script-bundle-H.zip"
|
||||||
|
DicStdLightHeavyW[ "pbrewHW" ]["src"] = "script-bundle-H"
|
||||||
|
DicStdLightHeavyW[ "pbrewHW" ]["des"] = "Homebrew-HUser-ReadMeFirst"
|
||||||
|
DicStdLightHeavyW[ "pbrewHW" ]["item3"] = 'set position of item "Homebrew-HUser-ReadMeFirst" to {700, 400}'
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
## To check the contents of the package directory
|
## To check the contents of the package directory
|
||||||
|
|
@ -199,18 +213,15 @@ def SetGlobals():
|
||||||
# The package directory name should look like:
|
# The package directory name should look like:
|
||||||
# * ST-qt5MP.pkg.macos-Monterey-release-RsysPsys
|
# * ST-qt5MP.pkg.macos-Monterey-release-RsysPsys
|
||||||
# * LW-qt5Ana3.pkg.macos-Monterey-release-Rana3Pana3
|
# * LW-qt5Ana3.pkg.macos-Monterey-release-Rana3Pana3
|
||||||
# * LW-qt5Brew.pkg.macos-Monterey-release-Rhb33Phb311 --- (1)
|
# * LW-qt6Brew.pkg.macos-Monterey-release-Rhb33Phb311 --- (1)
|
||||||
# * LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
# * LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
||||||
# * HW-qt5Brew.pkg.macos-Monterey-release-RsysPhb311
|
|
||||||
#
|
|
||||||
# * ST-qt6MP.pkg.macos-Monterey-release-RsysPsys
|
|
||||||
# * LW-qt6Ana3.pkg.macos-Monterey-release-Rana3Pana3
|
|
||||||
# * LW-qt6Brew.pkg.macos-Monterey-release-Rhb33Phb311
|
|
||||||
# * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
|
||||||
# * HW-qt6Brew.pkg.macos-Monterey-release-RsysPhb311
|
# * HW-qt6Brew.pkg.macos-Monterey-release-RsysPhb311
|
||||||
#
|
#
|
||||||
|
# * ST-qt6MP.pkg.macos-Monterey-release-RsysPsys
|
||||||
|
# * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
||||||
|
#
|
||||||
# Generated DMG will be, for example,
|
# Generated DMG will be, for example,
|
||||||
# (1) ---> LW-klayout-0.28.17-macOS-Monterey-1-qt5Brew-Rhb33Phb311.dmg
|
# (1) ---> LW-klayout-0.29.0-macOS-Monterey-1-qt6Brew-Rhb33Phb311.dmg
|
||||||
#
|
#
|
||||||
# @return on success, positive integer in [MB] that tells approx. occupied disc space;
|
# @return on success, positive integer in [MB] that tells approx. occupied disc space;
|
||||||
# on failure, -1
|
# on failure, -1
|
||||||
|
|
@ -251,16 +262,13 @@ def CheckPkgDirectory():
|
||||||
# [2] Identify (Qt, Ruby, Python) from PkgDir
|
# [2] Identify (Qt, Ruby, Python) from PkgDir
|
||||||
# * ST-qt5MP.pkg.macos-Monterey-release-RsysPsys
|
# * ST-qt5MP.pkg.macos-Monterey-release-RsysPsys
|
||||||
# * LW-qt5Ana3.pkg.macos-Monterey-release-Rana3Pana3
|
# * LW-qt5Ana3.pkg.macos-Monterey-release-Rana3Pana3
|
||||||
# * LW-qt5Brew.pkg.macos-Monterey-release-Rhb33Phb311
|
# * LW-qt6Brew.pkg.macos-Monterey-release-Rhb33Phb311
|
||||||
# * LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
# * LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
||||||
# * HW-qt5Brew.pkg.macos-Monterey-release-RsysPhb311
|
# * HW-qt6Brew.pkg.macos-Monterey-release-RsysPhb311
|
||||||
# * EX-qt5MP.pkg.macos-Monterey-release-Rhb33Pmp311
|
# * EX-qt5MP.pkg.macos-Monterey-release-Rhb33Pmp311
|
||||||
#
|
#
|
||||||
# * ST-qt6MP.pkg.macos-Monterey-release-RsysPsys
|
# * ST-qt6MP.pkg.macos-Monterey-release-RsysPsys
|
||||||
# * LW-qt6Ana3.pkg.macos-Monterey-release-Rana3Pana3
|
|
||||||
# * LW-qt6Brew.pkg.macos-Monterey-release-Rhb33Phb311
|
|
||||||
# * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
# * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311
|
||||||
# * HW-qt6Brew.pkg.macos-Monterey-release-RsysPhb311
|
|
||||||
#-----------------------------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------------------------
|
||||||
patQRP = u'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-]release[-])([0-9A-Za-z]+)'
|
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)
|
regQRP = re.compile(patQRP)
|
||||||
|
|
@ -299,7 +307,7 @@ def CheckPkgDirectory():
|
||||||
|
|
||||||
LatestOSHomebrew = Platform == LatestOS
|
LatestOSHomebrew = Platform == LatestOS
|
||||||
LatestOSHomebrew &= PackagePrefix == "LW"
|
LatestOSHomebrew &= PackagePrefix == "LW"
|
||||||
LatestOSHomebrew &= QtIdentification in [ "qt5Brew", "qt6Brew" ]
|
LatestOSHomebrew &= QtIdentification in [ "qt5Brew", "qt6Brew", "qt5MP", "qt6MP" ] # "qt[5|6]MP" are the alternatives
|
||||||
LatestOSHomebrew &= RubyPythonID in [ "Rhb33Phb311", "Rhb33Phb39", "Rhb33Phbauto" ]
|
LatestOSHomebrew &= RubyPythonID in [ "Rhb33Phb311", "Rhb33Phb39", "Rhb33Phbauto" ]
|
||||||
|
|
||||||
LatestOSAnaconda3 = Platform == LatestOS
|
LatestOSAnaconda3 = Platform == LatestOS
|
||||||
|
|
@ -309,8 +317,8 @@ def CheckPkgDirectory():
|
||||||
|
|
||||||
LatestOSHomebrewH = Platform == LatestOS
|
LatestOSHomebrewH = Platform == LatestOS
|
||||||
LatestOSHomebrewH &= PackagePrefix == "HW"
|
LatestOSHomebrewH &= PackagePrefix == "HW"
|
||||||
LatestOSHomebrewH &= QtIdentification in [ "qt5Brew", "qt6Brew" ]
|
LatestOSHomebrewH &= QtIdentification in [ "qt5Brew", "qt6Brew", "qt5MP", "qt6MP" ] # "qt[5|6]MP" are the alternatives
|
||||||
LatestOSHomebrewH &= RubyPythonID in [ "RsysPhb311", "RsysPhb39", "RsysPhbauto" ] # Sys-Homebre hybrid
|
LatestOSHomebrewH &= RubyPythonID in [ "RsysPhb311", "RsysPhb39", "RsysPhbauto" ] # Sys-Homebrew hybrid
|
||||||
|
|
||||||
if LatestOSSys:
|
if LatestOSSys:
|
||||||
mydic = DicStdLightHeavyW["std"]
|
mydic = DicStdLightHeavyW["std"]
|
||||||
|
|
|
||||||
|
|
@ -57,15 +57,18 @@ def Test_My_Platform( platforms=[ 'Monterey', 'Ventura', 'Sonoma' ] ):
|
||||||
# @return a dictionary; key=integer, value=mnemonic
|
# @return a dictionary; key=integer, value=mnemonic
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
def Get_Build_Target_Dict():
|
def Get_Build_Target_Dict():
|
||||||
buildTargetDic = dict()
|
buildTargetDic = dict()
|
||||||
buildTargetDic[0] = 'std'
|
buildTargetDic[0] = 'std'
|
||||||
buildTargetDic[1] = 'ports'
|
buildTargetDic[1] = 'ports'
|
||||||
buildTargetDic[2] = 'brew'
|
buildTargetDic[2] = 'brew'
|
||||||
buildTargetDic[3] = 'brewHW'
|
buildTargetDic[3] = 'brewHW'
|
||||||
buildTargetDic[4] = 'ana3'
|
buildTargetDic[4] = 'ana3'
|
||||||
|
|
||||||
buildTargetDic[5] = 'brewA'
|
buildTargetDic[5] = 'brewA'
|
||||||
buildTargetDic[6] = 'brewAHW'
|
buildTargetDic[6] = 'brewAHW'
|
||||||
|
|
||||||
|
buildTargetDic[12] = 'pbrew' # use MacPorts' Qt and Homebrew's (Ruby, Python)
|
||||||
|
buildTargetDic[13] = 'pbrewHW' # use MacPorts' Qt and Homebrew's Python
|
||||||
return buildTargetDic
|
return buildTargetDic
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
@ -97,25 +100,32 @@ def Get_Build_Options( targetDic, platform ):
|
||||||
buildOp[(qtVer, "ports")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP311' ]
|
buildOp[(qtVer, "ports")] = [ '-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")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rmp33Pmp311")
|
||||||
elif target == "brew":
|
elif target == "brew":
|
||||||
buildOp[(qtVer, "brew")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB311' ]
|
buildOp[(qtVer, "brew")] = [ '-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")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311")
|
||||||
elif target == "brewHW":
|
elif target == "brewHW":
|
||||||
buildOp[(qtVer, "brewHW")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HB311' ]
|
buildOp[(qtVer, "brewHW")] = [ '-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")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311")
|
||||||
elif target == "ana3":
|
elif target == "ana3":
|
||||||
buildOp[(qtVer, "ana3")] = [ '-q', '%sAna3' % qtType, '-r', 'Ana3', '-p', 'Ana3' ]
|
buildOp[(qtVer, "ana3")] = [ '-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")] = "%sAna3.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rana3Pana3")
|
||||||
elif target == "brewA":
|
elif target == "brewA":
|
||||||
buildOp[(qtVer, "brewA")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HBAuto' ]
|
buildOp[(qtVer, "brewA")] = [ '-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")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phbauto")
|
||||||
elif target == "brewAHW":
|
elif target == "brewAHW":
|
||||||
buildOp[(qtVer, "brewAHW")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HBAuto' ]
|
buildOp[(qtVer, "brewAHW")] = [ '-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")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhbauto")
|
||||||
|
elif target == "pbrew":
|
||||||
|
buildOp[(qtVer, "pbrew")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB311' ]
|
||||||
|
logfile[(qtVer, "pbrew")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311")
|
||||||
|
elif target == "pbrewHW":
|
||||||
|
buildOp[(qtVer, "pbrewHW")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'HB311' ]
|
||||||
|
logfile[(qtVer, "pbrewHW")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311")
|
||||||
|
|
||||||
if WithPymod:
|
if WithPymod:
|
||||||
buildOp[(qtVer,"ports")] = buildOp[(qtVer,"ports")] + ['--buildPymod']
|
buildOp[(qtVer,"ports")] = buildOp[(qtVer,"ports")] + ['--buildPymod']
|
||||||
buildOp[(qtVer,"brew")] = buildOp[(qtVer,"brew")] + ['--buildPymod']
|
buildOp[(qtVer,"brew")] = buildOp[(qtVer,"brew")] + ['--buildPymod']
|
||||||
buildOp[(qtVer,"ana3")] = buildOp[(qtVer,"ana3")] + ['--buildPymod']
|
buildOp[(qtVer,"ana3")] = buildOp[(qtVer,"ana3")] + ['--buildPymod']
|
||||||
|
buildOp[(qtVer,"pbrew")] = buildOp[(qtVer,"pbrew")] + ['--buildPymod']
|
||||||
|
|
||||||
return (buildOp, logfile)
|
return (buildOp, logfile)
|
||||||
|
|
||||||
|
|
@ -152,6 +162,10 @@ def Get_QAT_Directory( targetDic, platform ):
|
||||||
dirQAT[(qtVer, "brewA")] = '%sBrew.build.macos-%s-release-Rhb33Phbauto.macQAT' % (qtType.lower(), platform)
|
dirQAT[(qtVer, "brewA")] = '%sBrew.build.macos-%s-release-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")] = '%sBrew.build.macos-%s-release-RsysPhbauto.macQAT' % (qtType.lower(), platform)
|
||||||
|
elif target == "pbrew":
|
||||||
|
dirQAT[(qtVer, "pbrew")] = '%sMP.build.macos-%s-release-Rhb33Phb311.macQAT' % (qtType.lower(), platform)
|
||||||
|
elif target == "pbrewHW":
|
||||||
|
dirQAT[(qtVer, "pbrewHW")] = '%sMP.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform)
|
||||||
|
|
||||||
return dirQAT
|
return dirQAT
|
||||||
|
|
||||||
|
|
@ -182,19 +196,19 @@ 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")] = [ '-p', 'ST-%sMP.pkg.macos-%s-release-RsysPsys' % (qtType.lower(), platform),
|
||||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
'-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")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rmp33Pmp311' % (qtType.lower(), platform),
|
||||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
'-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")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform),
|
||||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
'-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")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform),
|
||||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
'-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")] = [ '-p', 'LW-%sAna3.pkg.macos-%s-release-Rana3Pana3' % (qtType.lower(), platform),
|
||||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
'-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")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phbauto' % (qtType.lower(), platform),
|
||||||
|
|
@ -202,6 +216,12 @@ def Get_Package_Options( targetDic, platform, srlDMG, makeflag ):
|
||||||
elif target == "brewAHW":
|
elif target == "brewAHW":
|
||||||
packOp[(qtVer, "brewAHW")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhbauto' % (qtType.lower(), platform),
|
packOp[(qtVer, "brewAHW")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhbauto' % (qtType.lower(), platform),
|
||||||
'-s', '%d' % srlDMG, '%s' % flag ]
|
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||||
|
elif target == "pbrew":
|
||||||
|
packOp[(qtVer, "pbrew")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform),
|
||||||
|
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||||
|
elif target == "pbrewHW":
|
||||||
|
packOp[(qtVer, "pbrewHW")] = [ '-p', 'HW-%sMP.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform),
|
||||||
|
'-s', '%d' % srlDMG, '%s' % flag ]
|
||||||
return packOp
|
return packOp
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
@ -227,7 +247,7 @@ def Parse_CommandLine_Arguments():
|
||||||
if platform in [ "Sonoma", "Ventura", "Monterey" ]:
|
if platform in [ "Sonoma", "Ventura", "Monterey" ]:
|
||||||
targetopt = "0,1,2,3,4"
|
targetopt = "0,1,2,3,4"
|
||||||
else:
|
else:
|
||||||
targetopt = None
|
targetopt = ""
|
||||||
|
|
||||||
Usage = "\n"
|
Usage = "\n"
|
||||||
Usage += "----------------------------------------------------------------------------------------------------------\n"
|
Usage += "----------------------------------------------------------------------------------------------------------\n"
|
||||||
|
|
@ -240,7 +260,7 @@ def Parse_CommandLine_Arguments():
|
||||||
Usage += " --------------------------------------------------------------------------+--------------\n"
|
Usage += " --------------------------------------------------------------------------+--------------\n"
|
||||||
Usage += " [--qt <type>] : 5='qt5', 6='qt6' (migration to Qt6 is ongoing) | 5\n"
|
Usage += " [--qt <type>] : 5='qt5', 6='qt6' (migration to Qt6 is ongoing) | 5\n"
|
||||||
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' |\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' for qt=5, target=1 | disabled\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"
|
||||||
|
|
@ -266,7 +286,7 @@ def Parse_CommandLine_Arguments():
|
||||||
Usage += " (3) $ ./nightlyBuild.py --test |\n"
|
Usage += " (3) $ ./nightlyBuild.py --test |\n"
|
||||||
Usage += " (4) $ ./nightlyBuild.py --check (confirm the QA Test results) |\n"
|
Usage += " (4) $ ./nightlyBuild.py --check (confirm the QA Test results) |\n"
|
||||||
Usage += " (5) $ ./nightlyBuild.py --makedmg 1 |\n"
|
Usage += " (5) $ ./nightlyBuild.py --makedmg 1 |\n"
|
||||||
Usage += " (6) $ ./nightlyBuild.py --upload '0.28.17' |\n"
|
Usage += " (6) $ ./nightlyBuild.py --upload '0.29.0' |\n"
|
||||||
Usage += " (7) $ ./nightlyBuild.py --cleandmg 1 |\n"
|
Usage += " (7) $ ./nightlyBuild.py --cleandmg 1 |\n"
|
||||||
Usage += "-----------------------------------------------------------------------------+----------------------------\n"
|
Usage += "-----------------------------------------------------------------------------+----------------------------\n"
|
||||||
|
|
||||||
|
|
@ -370,7 +390,7 @@ def Parse_CommandLine_Arguments():
|
||||||
targetDic = Get_Build_Target_Dict()
|
targetDic = Get_Build_Target_Dict()
|
||||||
Target = list()
|
Target = list()
|
||||||
for idx in targetIdx:
|
for idx in targetIdx:
|
||||||
if idx in range(0, 7):
|
if idx in [0,1,2,3,4,5,6,12,13]:
|
||||||
Target.append( targetDic[idx] )
|
Target.append( targetDic[idx] )
|
||||||
|
|
||||||
# Populate QtTarget
|
# Populate QtTarget
|
||||||
|
|
@ -393,7 +413,7 @@ def Parse_CommandLine_Arguments():
|
||||||
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 range(0, 7)) or (qt == 6 and idx in [0,1,2,3, 5,6]):
|
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]):
|
||||||
QtTarget.append( (qt, targetDic[idx]) )
|
QtTarget.append( (qt, targetDic[idx]) )
|
||||||
elif len(opt.qt_target) > 0:
|
elif len(opt.qt_target) > 0:
|
||||||
QtTarget = list()
|
QtTarget = list()
|
||||||
|
|
@ -401,7 +421,7 @@ def Parse_CommandLine_Arguments():
|
||||||
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 range(0, 7)) or (qt == 6 and idx in [0,1,2,3, 5,6]):
|
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]):
|
||||||
QtTarget.append( (qt, targetDic[idx]) )
|
QtTarget.append( (qt, targetDic[idx]) )
|
||||||
else:
|
else:
|
||||||
withqttarget = False
|
withqttarget = False
|
||||||
|
|
@ -462,7 +482,7 @@ def Build_Deploy():
|
||||||
|
|
||||||
command1 = [ pyBuilder ] + buildOp[(qttype, key)]
|
command1 = [ pyBuilder ] + buildOp[(qttype, key)]
|
||||||
|
|
||||||
if key in [ "std", "brewHW", "brewAHW" ] :
|
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)]:
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,21 @@
|
||||||
# qtVer,target
|
# qtVer,target
|
||||||
# where
|
# where
|
||||||
# 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']
|
||||||
# note that
|
# note that
|
||||||
# (qtVer,target)=(6,4) will be omitted
|
# (qtVer,target)=(6,4) will be omitted
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
qtVer,target
|
qtVer,target
|
||||||
5,0
|
5,0
|
||||||
5,1
|
5,1
|
||||||
5,2
|
6,2
|
||||||
5,3
|
6,13
|
||||||
5,4
|
5,4
|
||||||
#6,0
|
#6,0
|
||||||
#6,1
|
#6,1
|
||||||
#6,2
|
#6,2
|
||||||
#6,3
|
#6,3
|
||||||
#6,4
|
#6,4
|
||||||
|
#6,12
|
||||||
|
#6,13
|
||||||
|
|
|
||||||
|
Can't render this file because it contains an unexpected character in line 5 and column 30.
|
|
|
@ -27,17 +27,17 @@ def SetGlobals():
|
||||||
del System, Node, Release, MacVersion, Machine, Processor
|
del System, Node, Release, MacVersion, Machine, Processor
|
||||||
|
|
||||||
Usage = "\n"
|
Usage = "\n"
|
||||||
Usage += "-------------------------------------------------------------------------------------\n"
|
Usage += "----------------------------------------------------------------------------------------\n"
|
||||||
Usage += "<< Usage of 'python3HB.py' >>\n"
|
Usage += "<< Usage of 'python3HB.py' >>\n"
|
||||||
Usage += " to setup the standardized directory structures for Homebrew's Python 3.x on Mac\n"
|
Usage += " to setup the standardized directory structures for Homebrew's Python 3.x on Mac\n"
|
||||||
Usage += "\n"
|
Usage += "\n"
|
||||||
Usage += " option & argument : descriptions | default value\n"
|
Usage += " option & argument : descriptions | default value\n"
|
||||||
Usage += " -------------------------------------------------------------------+----------\n"
|
Usage += " -------------------------------------------------------------------+---------------\n"
|
||||||
Usage += " <-v|--version <number>>: in ['3.8', '3.9', '3.10', '3.11', '3.12', | ''\n"
|
Usage += " <-v|--version <number>>: in ['3.8', '3.9', '3.10', '3.11', '3.12', | ''\n"
|
||||||
Usage += " '3.13'] | ''\n"
|
Usage += " '3.13'] |\n"
|
||||||
Usage += " [-u|-unlink] : unlink only | disabled\n"
|
Usage += " [-u|-unlink] : unlink only | disabled\n"
|
||||||
Usage += " [-?|--?] : print this usage and exit | disabled\n"
|
Usage += " [-?|--?] : print this usage and exit | disabled\n"
|
||||||
Usage += "----------------------------------------------------------------------+--------------\n"
|
Usage += "----------------------------------------------------------------------+-----------------\n"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Parse the command line arguments
|
# Parse the command line arguments
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue