-
-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathSetup MacOS.txt
209 lines (179 loc) · 5.25 KB
/
Setup MacOS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#
# Install XCode 16.2 from the App-Store and also install the command
# line tools by running:
#
xcode-select --install
#
# Install CMake by downloading https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-macos-universal.dmg
# and copy the app file from the .dmg file to "Applications", then open terminal window or ssh session and run:
#
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
#
# Install Ninja
#
cd /usr/local/bin
sudo curl -LO https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-mac.zip
sudo unzip ninja-mac.zip
sudo rm -f ninja-mac.zip
#
# Download and install openmp stuff for use with XCode 16.0.4
#
cd ~/Downloads
curl -O https://mac.r-project.org/openmp/openmp-17.0.6-darwin20-Release.tar.gz
sudo tar -zxvf sudo tar -zxvf openmp-17.0.6-darwin20-Release.tar.gz -C /
#
# Install Qt 6.8.2
#
cd ~/Downloads
curl -O https://d13lb3tujbc8s0.cloudfront.net/onlineinstallers/qt-online-installer-macOS-x64-4.8.1.dmg
#
# Open the .dmg file in Finder and run the installer (you will probably be prompted to install Rosetta).
# Make sure you specify the install location as /opt/Qt
#
#
# Install GitHub CLI
#
curl -LO https://github.com/cli/cli/releases/download/v2.65.0/gh_2.65.0_macOS_universal.pkg
#
# Open the .pkg file in Finder and run the installation procedure
#
#
# Setup to login to github
#
# Choose github.com, HTTPS, Use github credentials, and Login with a web browser
# It will then display an authentication code.
# Then press enter again:
#
BROWSER=false gh auth login
#
# Here's what you should see:
#
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations? HTTPS
? Authenticate Git with your GitHub credentials? Yes
? How would you like to authenticate GitHub CLI? Login with a web browser
! First copy your one-time code: 1C26-43EB
- Press Enter to open github.com in your browser...
! Failed opening a web browser at https://github.com/login/device
exit status 1
Please try entering the URL in your browser manually
#
# Open Safari and goto:
# https://github.com/login/device
#
# enter your credentials to login to github and then enter the authentication code
#
# Once that has been accepted, return to the terminal session where you should see
# something like this:
#
✓ Authentication complete. Press Enter to continue...
- gh config set -h github.com git_protocol https
✓ Configured git protocol
✓ Logged in as perdrix52
#
#
# Install vcpkg
#
cd ~
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh
cd ~
#
# Edit .zshenv using (e.g.) nano (should be empty to start with), and and add these lines:
#
# remove duplicate entries from $PATH
# zsh uses $path array along with $PATH
typeset -U PATH path
pathadd () {
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
}
export VCPKG_ROOT=~/vcpkg
pathadd $VCPKG_ROOT
pathadd /usr/local/bin
#
# Install pkg-config
#
cd ~/Downloads
curl -O https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
tar -zxvf pkg-config-0.29.2.tar.gz
rm pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
LDFLAGS="-framework CoreFoundation -framework Carbon" CFLAGS="-Wno-int-conversion" CXXFLAGS="-Wno-int-conversion" ./configure --with-internal-glib
make
make install
#
# Install openssl
#
cd ~/Downloads
curl -OL https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz
tar -zxvf openssl-3.4.0.tar.gz
rm openssl-3.4.0.tar.gz
cd openssl-3.4.0
./configure
make
sudo make install
#
# Link the system cert file to the openssl cert file location
# (it took ages to find what was needed).
#
sudo ln -s /etc/ssl/cert.pem /usr/local/ssl/cert.pem
#
# Install pcre2 (Perl Compatible Regular Expressions)
#
cd ~/Downloads
curl -OL https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.gz
tar -zxvf pcre2-10.44.tar.gz
rm pcre2-10.44.tar.gz
cd pcre2-10.44
./configure
make
sudo make install
#
# Install wget (can't use curl to DL CFITSIO).
#
cd ~/Downloads
curl -O http://ftp.gnu.org/gnu/wget/wget-1.25.0.tar.gz
tar -zxvf wget-1.25.0.tar.gz
rm wget-1.25.0.tar.gz
cd wget-1.25.0
./configure --with-ssl=openssl
make
sudo make install
#
# SmtpClient 2.0 for Qt
#
# Revert to using bluetiger9/SmtpClient-for-Qt as pull request #182 from deepskystacker/SmtpClient-for-Qt was accepted
# on 24th Feb. 2025 (allowing this to build as a static library).
#
cd ~/Downloads
gh repo clone bluetiger9/SmtpClient-for-Qt
cd SmtpClient-for-Qt
#
# create a build directory
#
mkdir build
cmake -B ./build -G Ninja -DBUILD_SHARED_LIBS=OFF -D"CMAKE_OSX_ARCHITECTURES:STRING=x86_64;arm64" -DCMAKE_INSTALL_PREFIX:STRING="/usr/local" -DCMAKE_PREFIX_PATH:STRING="/opt/Qt/6.8.2/macos"
cd build
ninja
sudo ninja install
#
# Install CFITSIO 4.5.0
#
cd ~/Downloads
wget https://github.com/HEASARC/cfitsio/archive/refs/tags/cfitsio4_5_0_20240826.tar.gz
#
# Get the CMake fixes
#
wget https://www.dropbox.com/scl/fi/drt4dcvsn0hd8xaa8ix2y/cfitsio_cmake.tar
tar -zxvf cfitsio4_5_0_20240826.tar.gz
cd cfitsio-cfitsio4_5_0_20240826
tar -xvf ../cfitsio_cmake.tar
mkdir build
cmake -B build -G Ninja -DBUILD_SHARED_LIBS=OFF -D"CMAKE_OSX_ARCHITECTURES:STRING=x86_64;arm64" -DBUILD_SHARED_LIBS=OFF -DUSE_PTHREADS=ON -DUSE_BZIP2=OFF
cd build
ninja
sudo ninja install