# Install Scid from source on macOS Catalina 

Read [Compile Scid](https://sourceforge.net/p/scid/wiki/CompileScid/) 

The macOS binary distribution on the download link is built against Tcl/Tk 
8.5. Per the instructions on the Wiki, it's better to build against a later 
version. To do that, it's necessary to build from source. Here are the steps 
I performed to accomplish that. 

key: 
* a step to perform or a comment by me 
--definitely a comment by me 
% a command in macOS Terminal 
redacted := my macOS username, replace this with yours 

## Overview 

1. Install Xcode 
2. Install command line tools 
3. Install tcl 8.6
4. Install tk 8.6 
5. Install scid 

## Steps 

### 1. Install Xcode 

 * App Store | Search | Xcode | Get 
 * test Xcode as below 

'''
% mkdir foo 
% cd foo
% touch Makefile 
% make -f Makefile 
'''

 * macos might prompt you to accept the Xcode license 
 * accept (if needed) then repeat the `make` command 
 * output of the `make` command: 
    `Makefile:1: *** missing separator.  Stop.` 
 * --OK :-) 

### 2. Install command line tools 

 * the easiest way is simply to execute a command that needs them 
 * --for example, `configure` tcl, see next section 

### 3. Install tcl 8.6 

 * read [Compiling for Macintosh](https://www.tcl.tk/doc/howto/compile.html) 
 * visit [download page](https://www.tcl.tk/software/tcltk/download.html) 
 * download [Tcl 8.6.10 
Sources](https://prdownloads.sourceforge.net/tcl/tcl8.6.10-src.tar.gz)  
 * --safari automatically unzips when downloading 

'''
% mkdir ~/Documents/tcl 
% cp ~/Downloads/tcl8.6.10-src.tar ~/Documents/tcl 
% cd ~/Documents/tcl 
% tar -xf tcl8.6.10-src.tar
% cd ~/Documents/tcl/tcl8.6.10/unix
% CC=/usr/bin/cc ./configure --enable-framework --enable-aqua --enable-threads 
'''

 * macos might prompt you to `download the command line developer tools` 
 * download (if needed) then repeat the `configure` command 
 * output of the `configure` command: 
    `checking ...`
    [BIG SNIP/]
    `configure: creating ./config.status
    config.status: creating Tcl-Info.plist
    config.status: creating Tclsh-Info.plist
    config.status: creating Makefile
    config.status: creating dltest/Makefile
    config.status: creating tclConfig.sh
    config.status: creating tcl.pc
    config.status: executing Tcl.framework commands`

 * --macos has a different idea of where the man-pages should go 

'''
% nano Makefile 
--CHANGE FROM: 
mandir             = ${prefix}/man

--CHANGE TO:
mandir             = ${prefix}/share/man

--1 line changed 
CTRL+O
CTRL+X
'''

 * `make test` (3rd command below) is optional
 * --contrary to tcl/tk docs, do `make test` AFTER `make install`

'''
% make
% sudo make install
% NATIVE_TCLSH=/usr/local/bin/tclsh8.6 sudo make test 
% sudo ln /usr/local/bin/tclsh /usr/local/bin/tclsh8.6
'''

 * output of the `make` command (showing only warnings): 
   - 1x `incompatible redeclaration of library function` : 'strstr' 
   - 24x `'OSSpinLock' is deprecated: first deprecated in macOS 10.12` 
   - 24x `'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12` 
   - 13x `configure ... unrecognized options: --enable-framework, 
--enable-aqua` 
   - 1x `configure ... unrecognized options: --with-tclinclude, 
--enable-framework, --enable-aqua, --enable-shared` 
   - 4x `configure ... Found Makefile - using build library specs...` 
   - 4x `configure ... Looking for "/Users/.../Makefile"`
   - 4x `configure ... Found Makefile - using build include spec...` 
   - 3x `variable 'i' is incremented both in the loop header and in the loop 
body` 
   - 1x `overlapping comparisons always evaluate to false` 
   - 1x `shifting a negative signed value is undefined` 
   - 16x `adding 'int' to a string does not append to the string` 

 * output of the `make install` command (showing only errors): 
   - 1x : 
    `ERROR: version conflict for package "Tcl": have 8.5.9, need 8.6-
     If running this script from 'make html', set the NATIVE_TCLSH environment
     variable to point to an installed tclsh8.6 (or the equivalent tclsh86.exe
     on Windows).
     make: *** [html-tcl] Error 1` 

 * --I see a bootstrapping problem there. Obviously we can't set the 
    NATIVE_TCLSH environment variable to a valid path BEFORE we do the 
    `make install`. So I ignored it and hoped for the best. It seemed 
    to work okay. 

### 4. Install tk 8.6 

 * --steps are very similar to installing tcl 8.6 
 * visit [download page](https://www.tcl.tk/software/tcltk/download.html) 
 * download [Tk 8.6.10 
Sources](https://prdownloads.sourceforge.net/tcl/tk8.6.10-src.tar.gz) 
 * --safari automatically unzips when downloading 

'''
% cp ~/Downloads/tk8.6.10-src.tar ~/Documents/tcl 
% cd ~/Documents/tcl 
% tar -xf tk8.6.10-src.tar 
% cd ~/Documents/tcl/tk8.6.10/unix 
% CC=/usr/bin/cc ./configure 
--with-tcl=/Users/redacted/Documents/tcl/tcl8.6.10/unix --prefix=/usr/local 
--enable-framework --enable-aqua
'''

 * output of the `configure` command: 
    `checking for Tcl configuration... 
    checking ...`
    [BIG SNIP/]
    `configure: creating ./config.status 
    config.status: creating Tk-Info.plist 
    config.status: creating Wish-Info.plist 
    config.status: creating Makefile 
    config.status: creating tkConfig.sh 
    config.status: creating tk.pc 
    config.status: executing Tk.framework commands` 

 * --macos has a different idea of where the man-pages should go 

'''
% nano Makefile 
--CHANGE FROM: 
mandir             = ${prefix}/man

--CHANGE TO:
mandir             = ${prefix}/share/man

--1 line changed 
CTRL+O
CTRL+X
'''

 * `make test` (3rd command below), I could not get to link 
 * --contrary to tcl/tk docs, do `make test` AFTER `make install` 

'''
% make
% sudo make install
% NATIVE_TCLSH=/usr/local/bin/tclsh8.6 sudo make test
'''

 * output of the `make` command (showing only warnings): 
   - 1x `warning: 'scrollRect:by:' is deprecated: first deprecated in macOS 
10.14` 

 * output of the `make install` command: 
    no warnings, no errors 


### 5. Install scid 

 * read [Framework 
Headers](https://community.activestate.com/t/tcl-tk-applications-in-c-on-macos/1893)
 
 * visit [code page](https://sourceforge.net/p/scid/code/ci/master/tree/) 
 * click [Download Snapshot](Download) 
 * --safari does NOT automatically unzip when downloading 
 * looks like "scid-code-49948d684e3ef9726de131e1ebaf1df1a7ad579c.zip" (YMMV) 
 * we will do a rename (5th command below)

'''
% mkdir ~/Documents/scid
% cp ~/Downloads/scid-code-*.zip ~/Documents/scid
% cd ~/Documents/scid
% unzip scid-code-*.zip
% rm scid-code-*.zip 
% mv scid-code-* scid-code 
'''

 * scid is hard-coded to check for version 8.5 on startup (basically an assert) 
    modify the startup script to check for 8.6 
    --Maybe the third line below doesn't need changing, I don't know. 

'''
% cd ~/Documents/scid/scid-code/tcl
% nano start.tcl 
--CHANGE FROM: 
package require Tcl 8.5
package require Tk  8.5
if {$tcl_version == 8.5} { catch {package require img::png} }

--CHANGE TO:
package require Tcl 8.6
package require Tk  8.6
if {$tcl_version == 8.6} { catch {package require img::png} }

--3 lines changed 
CTRL+O
CTRL+X
'''

 * To actually compile against version 8.6 (separate from the startup check) 
    modify the Makefile.conf according to the Framework Headers link above. 
    --What the Makefile.conf does otherwise is not even close. 

'''
% cd ~/Documents/scid/scid-code 
% nano Makefile.conf
--CHANGE FROM: 
TCL_VERSION = @TCL_VERSION@ 
TCL_INCLUDE = @TCL_INCLUDE@
TCL_LIBRARY = @TCL_LIBRARY@

--CHANGE TO:
TCL_VERSION = 8.6 
TCL_INCLUDE = -I/Library/Frameworks/Tcl.framework/Headers 
-I/Library/Frameworks/Tk.framework/Headers
TCL_LIBRARY = -F/Library/Frameworks -framework Tcl -framework Tk

--3 lines changed 
CTRL+O
CTRL+X
'''

 * --note that `configure` (see output below) is reporting 8.6 :-) 
 * --          `configure` is NOT reporting the correct Framework path :-( 
 * --           why we couldn't leave the three @TCL_*@ variables above 
 * `scid` (3rd command below) will test that Scid is working 
 * copying to Applications makes it available in Launchpad 

'''
% ./configure 
% sudo make install 
% ~/Documents/scid/scid-code/dist/Scid.app/Contents/Resources/bin/scid 
% sudo cp ~/Documents/scid/scid-code/dist/Scid.app /Applications 
'''

 * output of the `configure` command: 
    `configure: Makefile configuration program for Scid 
        Tcl/Tk version: 8.6 
        Your operating system is: Darwin 19.6.0 
        Location of Tcl/Tk Aqua frameworks: /Library/Frameworks 
        Using Makefile.conf. 
    The Makefile configured for your system was written. 
    Now just type "make" to compile Scid.` 

 * output of the `make install` command: 
    no warnings, no errors 

 * output of the `scid` command: 
    scid starts :-# Install Scid from source on macOS Catalina 

Read [Compile Scid](https://sourceforge.net/p/scid/wiki/CompileScid/) 

The macOS binary distribution on the download link is built against Tcl/Tk 
8.5. Per the instructions on the Wiki, it's better to build against a later 
version. To do that, it's necessary to build from source. Here are the steps 
I performed to accomplish that. 

key: 
* a step to perform or a comment by me 
--definitely a comment by me 
% a command in macOS Terminal 
redacted := my macOS username, replace this with yours 

## Overview 

1. Install Xcode 
2. Install command line tools 
3. Install tcl 8.6
4. Install tk 8.6 
5. Install scid 

## Steps 

### 1. Install Xcode 

 * App Store | Search | Xcode | Get 
 * test Xcode as below 

'''
% mkdir foo 
% cd foo
% touch Makefile 
% make -f Makefile 
'''

 * macos might prompt you to accept the Xcode license 
 * accept (if needed) then repeat the `make` command 
 * output of the `make` command: 
    `Makefile:1: *** missing separator.  Stop.` 
 * --OK :)

### 2. Install command line tools 

 * the easiest way is simply to execute a command that needs them 
 * --for example, `configure` tcl, see next section 

### 3. Install tcl 8.6 

 * read [Compiling for Macintosh](https://www.tcl.tk/doc/howto/compile.html) 
 * visit [download page](https://www.tcl.tk/software/tcltk/download.html) 
 * download [Tcl 8.6.10 
Sources](https://prdownloads.sourceforge.net/tcl/tcl8.6.10-src.tar.gz)  
 * --safari automatically unzips when downloading 

'''
% mkdir ~/Documents/tcl 
% cp ~/Downloads/tcl8.6.10-src.tar ~/Documents/tcl 
% cd ~/Documents/tcl 
% tar -xf tcl8.6.10-src.tar
% cd ~/Documents/tcl/tcl8.6.10/unix
% CC=/usr/bin/cc ./configure --enable-framework --enable-aqua --enable-threads 
'''

 * macos might prompt you to `download the command line developer tools` 
 * download (if needed) then repeat the `configure` command 
 * output of the `configure` command: 
    `checking ...`
    [BIG SNIP/]
    `configure: creating ./config.status
    config.status: creating Tcl-Info.plist
    config.status: creating Tclsh-Info.plist
    config.status: creating Makefile
    config.status: creating dltest/Makefile
    config.status: creating tclConfig.sh
    config.status: creating tcl.pc
    config.status: executing Tcl.framework commands`

 * --macos has a different idea of where the man-pages should go 

'''
% nano Makefile 
--CHANGE FROM: 
mandir             = ${prefix}/man

--CHANGE TO:
mandir             = ${prefix}/share/man

--1 line changed 
CTRL+O
CTRL+X
'''

 * `make test` (3rd command below) is optional
 * --contrary to tcl/tk docs, do `make test` AFTER `make install`

'''
% make
% sudo make install
% NATIVE_TCLSH=/usr/local/bin/tclsh8.6 sudo make test 
% sudo ln /usr/local/bin/tclsh /usr/local/bin/tclsh8.6
'''

 * output of the `make` command (showing only warnings): 
   - 1x `incompatible redeclaration of library function` : 'strstr' 
   - 24x `'OSSpinLock' is deprecated: first deprecated in macOS 10.12` 
   - 24x `'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12` 
   - 13x `configure ... unrecognized options: --enable-framework, 
--enable-aqua` 
   - 1x `configure ... unrecognized options: --with-tclinclude, 
--enable-framework, --enable-aqua, --enable-shared` 
   - 4x `configure ... Found Makefile - using build library specs...` 
   - 4x `configure ... Looking for "/Users/.../Makefile"`
   - 4x `configure ... Found Makefile - using build include spec...` 
   - 3x `variable 'i' is incremented both in the loop header and in the loop 
body` 
   - 1x `overlapping comparisons always evaluate to false` 
   - 1x `shifting a negative signed value is undefined` 
   - 16x `adding 'int' to a string does not append to the string` 

 * output of the `make install` command (showing only errors): 
   - 1x : 
    `ERROR: version conflict for package "Tcl": have 8.5.9, need 8.6-
     If running this script from 'make html', set the NATIVE_TCLSH environment
     variable to point to an installed tclsh8.6 (or the equivalent tclsh86.exe
     on Windows).
     make: *** [html-tcl] Error 1` 

 * --I see a bootstrapping problem there. Obviously we can't set the 
    NATIVE_TCLSH environment variable to a valid path BEFORE we do the 
    `make install`. So I ignored it and hoped for the best. It seemed 
    to work okay. 

### 4. Install tk 8.6 

 * --steps are very similar to installing tcl 8.6 
 * visit [download page](https://www.tcl.tk/software/tcltk/download.html) 
 * download [Tk 8.6.10 
Sources](https://prdownloads.sourceforge.net/tcl/tk8.6.10-src.tar.gz) 
 * --safari automatically unzips when downloading 

'''
% cp ~/Downloads/tk8.6.10-src.tar ~/Documents/tcl 
% cd ~/Documents/tcl 
% tar -xf tk8.6.10-src.tar 
% cd ~/Documents/tcl/tk8.6.10/unix 
% CC=/usr/bin/cc ./configure 
--with-tcl=/Users/redacted/Documents/tcl/tcl8.6.10/unix --prefix=/usr/local 
--enable-framework --enable-aqua
'''

 * output of the `configure` command: 
    `checking for Tcl configuration... 
    checking ...`
    [BIG SNIP/]
    `configure: creating ./config.status 
    config.status: creating Tk-Info.plist 
    config.status: creating Wish-Info.plist 
    config.status: creating Makefile 
    config.status: creating tkConfig.sh 
    config.status: creating tk.pc 
    config.status: executing Tk.framework commands` 

 * --macos has a different idea of where the man-pages should go 

'''
% nano Makefile 
--CHANGE FROM: 
mandir             = ${prefix}/man

--CHANGE TO:
mandir             = ${prefix}/share/man

--1 line changed 
CTRL+O
CTRL+X
'''

 * `make test` (3rd command below), I could not get to link 
 * --contrary to tcl/tk docs, do `make test` AFTER `make install` 

'''
% make
% sudo make install
% NATIVE_TCLSH=/usr/local/bin/tclsh8.6 sudo make test
'''

 * output of the `make` command (showing only warnings): 
   - 1x `warning: 'scrollRect:by:' is deprecated: first deprecated in macOS 
10.14` 

 * output of the `make install` command: 
    no warnings, no errors 


### 5. Install scid 

 * read [Framework 
Headers](https://community.activestate.com/t/tcl-tk-applications-in-c-on-macos/1893)
 
 * visit [code page](https://sourceforge.net/p/scid/code/ci/master/tree/) 
 * click [Download Snapshot](Download) 
 * --safari does NOT automatically unzip when downloading 
 * looks like "scid-code-49948d684e3ef9726de131e1ebaf1df1a7ad579c.zip" (YMMV) 
 * we will do a rename (5th command below)

'''
% mkdir ~/Documents/scid
% cp ~/Downloads/scid-code-*.zip ~/Documents/scid
% cd ~/Documents/scid
% unzip scid-code-*.zip
% rm scid-code-*.zip 
% mv scid-code-* scid-code 
'''

 * scid is hard-coded to check for version 8.5 on startup (basically an assert) 
    modify the startup script to check for 8.6 
    --Maybe the third line below doesn't need changing, I don't know. 

'''
% cd ~/Documents/scid/scid-code/tcl
% nano start.tcl 
--CHANGE FROM: 
package require Tcl 8.5
package require Tk  8.5
if {$tcl_version == 8.5} { catch {package require img::png} }

--CHANGE TO:
package require Tcl 8.6
package require Tk  8.6
if {$tcl_version == 8.6} { catch {package require img::png} }

--3 lines changed 
CTRL+O
CTRL+X
'''

 * To actually compile against version 8.6 (separate from the startup check) 
    modify the Makefile.conf according to the Framework Headers link above. 
    --What the Makefile.conf does otherwise is not even close. 

'''
% cd ~/Documents/scid/scid-code 
% nano Makefile.conf
--CHANGE FROM: 
TCL_VERSION = @TCL_VERSION@ 
TCL_INCLUDE = @TCL_INCLUDE@
TCL_LIBRARY = @TCL_LIBRARY@

--CHANGE TO:
TCL_VERSION = 8.6 
TCL_INCLUDE = -I/Library/Frameworks/Tcl.framework/Headers 
-I/Library/Frameworks/Tk.framework/Headers
TCL_LIBRARY = -F/Library/Frameworks -framework Tcl -framework Tk

--3 lines changed 
CTRL+O
CTRL+X
'''

 * --note that `configure` (see output below) is reporting 8.6 :-) 
 * --          `configure` is NOT reporting the correct Framework path :-( 
 * --           why we couldn't leave the three @TCL_*@ variables above 
 * `scid` (3rd command below) will test that Scid is working 
 * copying to Applications makes it available in Launchpad 

'''
% ./configure 
% sudo make install 
% ~/Documents/scid/scid-code/dist/Scid.app/Contents/Resources/bin/scid 
% sudo cp ~/Documents/scid/scid-code/dist/Scid.app /Applications 
'''

 * output of the `configure` command: 
    `configure: Makefile configuration program for Scid 
        Tcl/Tk version: 8.6 
        Your operating system is: Darwin 19.6.0 
        Location of Tcl/Tk Aqua frameworks: /Library/Frameworks 
        Using Makefile.conf. 
    The Makefile configured for your system was written. 
    Now just type "make" to compile Scid.` 

 * output of the `make install` command: 
    no warnings, no errors 

 * output of the `scid` command: 
    scid starts :) 

) 

# Install Scid from source on macOS Catalina 

Read [Compile Scid](https://sourceforge.net/p/scid/wiki/CompileScid/) 

The macOS binary distribution on the download link is built against Tcl/Tk 
8.5. Per the instructions on the Wiki, it's better to build against a later 
version. To do that, it's necessary to build from source. Here are the steps 
I performed to accomplish that. 

key: 
* a step to perform or a comment by me 
--definitely a comment by me 
% a command in macOS Terminal 
redacted := my macOS username, replace this with yours 

## Overview 

1. Install Xcode 
2. Install command line tools 
3. Install tcl 8.6
4. Install tk 8.6 
5. Install scid 

## Steps 

### 1. Install Xcode 

 * App Store | Search | Xcode | Get 
 * test Xcode as below 

'''
% mkdir foo 
% cd foo
% touch Makefile 
% make -f Makefile 
'''

 * macos might prompt you to accept the Xcode license 
 * accept (if needed) then repeat the `make` command 
 * output of the `make` command: 
    `Makefile:1: *** missing separator.  Stop.` 
 * --OK :-) 

### 2. Install command line tools 

 * the easiest way is simply to execute a command that needs them 
 * --for example, `configure` tcl, see next section 

### 3. Install tcl 8.6 

 * read [Compiling for Macintosh](https://www.tcl.tk/doc/howto/compile.html) 
 * visit [download page](https://www.tcl.tk/software/tcltk/download.html) 
 * download [Tcl 8.6.10 
Sources](https://prdownloads.sourceforge.net/tcl/tcl8.6.10-src.tar.gz)  
 * --safari automatically unzips when downloading 

'''
% mkdir ~/Documents/tcl 
% cp ~/Downloads/tcl8.6.10-src.tar ~/Documents/tcl 
% cd ~/Documents/tcl 
% tar -xf tcl8.6.10-src.tar
% cd ~/Documents/tcl/tcl8.6.10/unix
% CC=/usr/bin/cc ./configure --enable-framework --enable-aqua --enable-threads 
'''

 * macos might prompt you to `download the command line developer tools` 
 * download (if needed) then repeat the `configure` command 
 * output of the `configure` command: 
    `checking ...`
    [BIG SNIP/]
    `configure: creating ./config.status
    config.status: creating Tcl-Info.plist
    config.status: creating Tclsh-Info.plist
    config.status: creating Makefile
    config.status: creating dltest/Makefile
    config.status: creating tclConfig.sh
    config.status: creating tcl.pc
    config.status: executing Tcl.framework commands`

 * --macos has a different idea of where the man-pages should go 

'''
% nano Makefile 
--CHANGE FROM: 
mandir             = ${prefix}/man

--CHANGE TO:
mandir             = ${prefix}/share/man

--1 line changed 
CTRL+O
CTRL+X
'''

 * `make test` (3rd command below) is optional
 * --contrary to tcl/tk docs, do `make test` AFTER `make install`

'''
% make
% sudo make install
% NATIVE_TCLSH=/usr/local/bin/tclsh8.6 sudo make test 
% sudo ln /usr/local/bin/tclsh /usr/local/bin/tclsh8.6
'''

 * output of the `make` command (showing only warnings): 
   - 1x `incompatible redeclaration of library function` : 'strstr' 
   - 24x `'OSSpinLock' is deprecated: first deprecated in macOS 10.12` 
   - 24x `'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12` 
   - 13x `configure ... unrecognized options: --enable-framework, 
--enable-aqua` 
   - 1x `configure ... unrecognized options: --with-tclinclude, 
--enable-framework, --enable-aqua, --enable-shared` 
   - 4x `configure ... Found Makefile - using build library specs...` 
   - 4x `configure ... Looking for "/Users/.../Makefile"`
   - 4x `configure ... Found Makefile - using build include spec...` 
   - 3x `variable 'i' is incremented both in the loop header and in the loop 
body` 
   - 1x `overlapping comparisons always evaluate to false` 
   - 1x `shifting a negative signed value is undefined` 
   - 16x `adding 'int' to a string does not append to the string` 

 * output of the `make install` command (showing only errors): 
   - 1x : 
    `ERROR: version conflict for package "Tcl": have 8.5.9, need 8.6-
     If running this script from 'make html', set the NATIVE_TCLSH environment
     variable to point to an installed tclsh8.6 (or the equivalent tclsh86.exe
     on Windows).
     make: *** [html-tcl] Error 1` 

 * --I see a bootstrapping problem there. Obviously we can't set the 
    NATIVE_TCLSH environment variable to a valid path BEFORE we do the 
    `make install`. So I ignored it and hoped for the best. It seemed 
    to work okay. 

### 4. Install tk 8.6 

 * --steps are very similar to installing tcl 8.6 
 * visit [download page](https://www.tcl.tk/software/tcltk/download.html) 
 * download [Tk 8.6.10 
Sources](https://prdownloads.sourceforge.net/tcl/tk8.6.10-src.tar.gz) 
 * --safari automatically unzips when downloading 

'''
% cp ~/Downloads/tk8.6.10-src.tar ~/Documents/tcl 
% cd ~/Documents/tcl 
% tar -xf tk8.6.10-src.tar 
% cd ~/Documents/tcl/tk8.6.10/unix 
% CC=/usr/bin/cc ./configure 
--with-tcl=/Users/redacted/Documents/tcl/tcl8.6.10/unix --prefix=/usr/local 
--enable-framework --enable-aqua
'''

 * output of the `configure` command: 
    `checking for Tcl configuration... 
    checking ...`
    [BIG SNIP/]
    `configure: creating ./config.status 
    config.status: creating Tk-Info.plist 
    config.status: creating Wish-Info.plist 
    config.status: creating Makefile 
    config.status: creating tkConfig.sh 
    config.status: creating tk.pc 
    config.status: executing Tk.framework commands` 

 * --macos has a different idea of where the man-pages should go 

'''
% nano Makefile 
--CHANGE FROM: 
mandir             = ${prefix}/man

--CHANGE TO:
mandir             = ${prefix}/share/man

--1 line changed 
CTRL+O
CTRL+X
'''

 * `make test` (3rd command below), I could not get to link 
 * --contrary to tcl/tk docs, do `make test` AFTER `make install` 

'''
% make
% sudo make install
% NATIVE_TCLSH=/usr/local/bin/tclsh8.6 sudo make test
'''

 * output of the `make` command (showing only warnings): 
   - 1x `warning: 'scrollRect:by:' is deprecated: first deprecated in macOS 
10.14` 

 * output of the `make install` command: 
    no warnings, no errors 


### 5. Install scid 

 * read [Framework 
Headers](https://community.activestate.com/t/tcl-tk-applications-in-c-on-macos/1893)
 
 * visit [code page](https://sourceforge.net/p/scid/code/ci/master/tree/) 
 * click [Download Snapshot](Download) 
 * --safari does NOT automatically unzip when downloading 
 * looks like "scid-code-49948d684e3ef9726de131e1ebaf1df1a7ad579c.zip" (YMMV) 
 * we will do a rename (5th command below)

'''
% mkdir ~/Documents/scid
% cp ~/Downloads/scid-code-*.zip ~/Documents/scid
% cd ~/Documents/scid
% unzip scid-code-*.zip
% rm scid-code-*.zip 
% mv scid-code-* scid-code 
'''

 * scid is hard-coded to check for version 8.5 on startup (basically an assert) 
    modify the startup script to check for 8.6 
    --Maybe the third line below doesn't need changing, I don't know. 

'''
% cd ~/Documents/scid/scid-code/tcl
% nano start.tcl 
--CHANGE FROM: 
package require Tcl 8.5
package require Tk  8.5
if {$tcl_version == 8.5} { catch {package require img::png} }

--CHANGE TO:
package require Tcl 8.6
package require Tk  8.6
if {$tcl_version == 8.6} { catch {package require img::png} }

--3 lines changed 
CTRL+O
CTRL+X
'''

 * To actually compile against version 8.6 (separate from the startup check) 
    modify the Makefile.conf according to the Framework Headers link above. 
    --What the Makefile.conf does otherwise is not even close. 

'''
% cd ~/Documents/scid/scid-code 
% nano Makefile.conf
--CHANGE FROM: 
TCL_VERSION = @TCL_VERSION@ 
TCL_INCLUDE = @TCL_INCLUDE@
TCL_LIBRARY = @TCL_LIBRARY@

--CHANGE TO:
TCL_VERSION = 8.6 
TCL_INCLUDE = -I/Library/Frameworks/Tcl.framework/Headers 
-I/Library/Frameworks/Tk.framework/Headers
TCL_LIBRARY = -F/Library/Frameworks -framework Tcl -framework Tk

--3 lines changed 
CTRL+O
CTRL+X
'''

 * --note that `configure` (see output below) is reporting 8.6 :-) 
 * --          `configure` is NOT reporting the correct Framework path :-( 
 * --           why we couldn't leave the three @TCL_*@ variables above 
 * `scid` (3rd command below) will test that Scid is working 
 * copying to Applications makes it available in Launchpad 

'''
% ./configure 
% sudo make install 
% ~/Documents/scid/scid-code/dist/Scid.app/Contents/Resources/bin/scid 
% sudo cp ~/Documents/scid/scid-code/dist/Scid.app /Applications 
'''

 * output of the `configure` command: 
    `configure: Makefile configuration program for Scid 
        Tcl/Tk version: 8.6 
        Your operating system is: Darwin 19.6.0 
        Location of Tcl/Tk Aqua frameworks: /Library/Frameworks 
        Using Makefile.conf. 
    The Makefile configured for your system was written. 
    Now just type "make" to compile Scid.` 

 * output of the `make install` command: 
    no warnings, no errors 

 * output of the `scid` command: 
    scid starts :-) 

My first email to the group, hope I did it right.

-- 
Alan
_______________________________________________
Scid-users mailing list
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users

Reply via email to