-
-
Notifications
You must be signed in to change notification settings - Fork 94
/
Setup WSL.txt
180 lines (161 loc) · 4.35 KB
/
Setup WSL.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
#
# Open a windows command prompt, right click the title bar and select "Properties"
# Select the option tab and ensure that "Use legacy console" is NOT selected.
#
# Run Powershell as Admin and run wsl --install to install Ubuntu
#
# Set up the default user
#
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libgl1-mesa-dev
sudo apt-get install gdb ninja-build zip cmake
sudo apt-get install libglu1-mesa-dev libxcb-xinerama0 libxcb-cursor0
sudo apt-get install \
libfontconfig1-dev \
libfreetype-dev \
libx11-dev \
libx11-xcb-dev \
libxcb-cursor-dev \
libxcb-glx0-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-render-util0-dev \
libxcb-shape0-dev \
libxcb-shm0-dev \
libxcb-sync-dev \
libxcb-util-dev \
libxcb-xfixes0-dev \
libxcb-xinerama0-dev \
libxcb-xkb-dev \
libxcb1-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libxrender-dev
mkdir Downloads
cd Downloads
sudo apt-get install gh
sudo apt-get install firefox
sudo apt-get install nautilus
#
# Now run nautilus to see if you get errors like:
#
# MESA: error: ZINK: failed to choose pdev
# libEGL warning: egl: failed to create dri2 screen
# MESA: error: ZINK: failed to choose pdev
# glx: failed to create drisw screen
#
# If not you can skip to the after the comment * End of Wayland/X11 fix
#
# If so, you will need to install a fix for Wayland/X11 problems
#
# See: <https://stackoverflow.com/questions/79151910/how-to-fix-errors-in-wsl-gui/79151948#79151948>
#
gh repo clone viruscamp/wslg-links
cd wslg-links
sudo cp wslg-tmp-x11.service /usr/lib/systemd/system/
sudo cp wslg-runtime-dir.service /usr/lib/systemd/user/
sudo systemctl --global disable pulseaudio.socket
sudo systemctl enable wslg-tmp-x11
sudo systemctl --global enable wslg-runtime-dir
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade
#
# Exit WSL at this point and use Powershell to do a wsl --shutdown
# Then restart your WSL session
#
# **************************
# * End of Wayland/X11 fix *
# **************************
#
cd ~/Downloads
#
# Download the Qt Online installer for Linux from Qt Website to the Downloads folder
#
wget https://d13lb3tujbc8s0.cloudfront.net/onlineinstallers/qt-online-installer-linux-x64-4.8.1.run
chmod +x qt-online-installer-linux-x64-4.8.1.run
#
# Now run the installer and install Qt 6.8.0
#
sudo ./qt-online-installer-linux-x64-4.8.1.run
#
# Install boost (1.83.0)
#
sudo apt-get install libboost-all-dev
#
# Download CFITSIO from <https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.5.0.tar.gz>
# to your Downloads folder, then untar it, build and install CFITSIO
#
wget https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.5.0.tar.gz
tar -zxvf cfitsio-4.5.0.tar.gz
cd cfitsio-4.5.0
./configure --prefix=/usr/local
make
sudo make install
#
# Install libjpeg
#
sudo apt-get install libjpeg-dev
#
# More stuff added 3 Nov '24 16:20
#
# Install Exiv2
#
sudo apt-get install exiv2
#
# SmtpClient 2.0 for Qt
#
sudo apt-get install cmake-gt-gui
gh repo clone bluetiger9/SmtpClient-for-Qt
cd SmtpClient-for-Qt/src
#
# Change the first few lines of CMakeLists.txt so they look like:
# using e.g. nano CMakeLists.txt
#
cmake_minimum_required(VERSION 3.16)
project(SmtpMime VERSION 2.0 LANGUAGES C CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.8 COMPONENTS Core Network REQUIRED)
add_compile_options(-DSMTP_MIME_LIBRARY)
#
# create a build directory
#
mkdir ../build
cmake -B ../build -G Ninja -DCMAKE_INSTALL_PREFIX:STRING="/usr/local" -DCMAKE_MODULE_PATH:STRING="/usr/share/cmake-3.28/Modules" -D CMAKE_PREFIX_PATH:STRING="/opt/Qt/6.8.0/gcc_64"
cd ../build
ninja
sudo ninja install
#
# Install libexpat
#
cd ~/Downloads
gh repo clone libexpat/libexpat
cd libexpat/expat
mkdir ../build
cmake -B ../build -DEXPAT_SHARED_LIBS:BOOL=OFF -G Ninja
cd ../build
ninja
sudo ninja install
#
# libtiff
# Download https://download.osgeo.org/libtiff/tiff-4.7.0.tar.gz
# and build it ...
#
cd ~/Downloads
wget https://download.osgeo.org/libtiff/tiff-4.7.0.tar.gz
tar -zxvf tiff-4.7.0.tar.gz
cd tiff-4.7.0
cmake -B build -G Ninja -DBUILD_SHARED_LIBS=OFF
cd build
ninja
sudo ninja install