Update README_MacOS.md

This commit is contained in:
StefanSchippers 2020-12-12 02:16:57 +01:00 committed by GitHub
parent 6e8b1f7ba9
commit 5b95847cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 16 deletions

View File

@ -11,42 +11,53 @@ we need to specify the X libraries from XQuartz when compiling Tk. Let's use the
## Tcl compilation ## Tcl compilation
Extract the Tcl sources and then go to the unix folder: Extract the Tcl sources and then go to the unix folder:
`cd <extracted-folder>/unix` ```
`./configure --prefix=/usr/local/opt/tcl-tk` cd <extracted-folder>/unix
`make` ./configure --prefix=/usr/local/opt/tcl-tk
`make install` make
make install
```
## Tk compilation ## Tk compilation
Same procedure as Tcl, but we need to specificy the Tcl and X libraries paths. XQuartz is installed on Same procedure as Tcl, but we need to specificy the Tcl and X libraries paths. XQuartz is installed on
/opt/X11 , so we do: /opt/X11 , so we do:
`cd <extracted-folder>/unix` ```
`./configure --prefix=/usr/local/opt/tcl-tk \ cd <extracted-folder>/unix
./configure --prefix=/usr/local/opt/tcl-tk \
--with-tcl=/usr/local/opt/tcl-tk/lib --with-x \ --with-tcl=/usr/local/opt/tcl-tk/lib --with-x \
--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib` --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
`make` make
`make install` make install
```
## xschem compilation ## xschem compilation
Besides referencing the X libraries, we need to also point to the Tcl/Tk installation path. Let's use a recent Besides referencing the X libraries, we need to also point to the Tcl/Tk installation path. Let's use a recent
xschem repository and install it on ~/xschem-macos (adapt this to your username): xschem repository and install it on ~/xschem-macos (adapt this to your username):
`git clone https://github.com/StefanSchippers/xschem.git` ```
`cd xschem` git clone https://github.com/StefanSchippers/xschem.git
`./configure --prefix=/Users/$(whoami)/xschem-macos` cd xschem
./configure --prefix=/Users/$(whoami)/xschem-macos
```
Before building the application, we need to adjust `Makefile.conf` because the current configure Before building the application, we need to adjust `Makefile.conf` because the current configure
script doesn't support custom flags. So we need to replace the CFLAGS and LDFLAGS variables in that file script doesn't support custom flags. So we need to replace the CFLAGS and LDFLAGS variables in that file
as below: as below:
`CFLAGS=-I/opt/X11/include -I/opt/X11/include/cairo \
```
CFLAGS=-I/opt/X11/include -I/opt/X11/include/cairo \
-I/usr/local/opt/tcl-tk/include -O2 -I/usr/local/opt/tcl-tk/include -O2
LDFLAGS=-L/opt/X11/lib -L/usr/local/opt/tcl-tk/lib -lm -lcairo \ LDFLAGS=-L/opt/X11/lib -L/usr/local/opt/tcl-tk/lib -lm -lcairo \
-lX11 -lXrender -lxcb -lxcb-render -lX11-xcb -lXpm -ltcl8.6 -ltk8.6` -lX11 -lXrender -lxcb -lxcb-render -lX11-xcb -lXpm -ltcl8.6 -ltk8.6
```
Finally, we compile and install the application. Finally, we compile and install the application.
`make ```
make install` make
make install
```
The application will be placed in /Users/$(whoami)/xschem-macos/bin and can be started with The application will be placed in /Users/$(whoami)/xschem-macos/bin and can be started with
./xschem in that folder. ./xschem in that folder.