Created
February 18, 2021 12:39
-
-
Save yogesh-aggarwal/107be5e199b84248855b19c63ef7fae1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Variables (Change to Alter the Environment) | |
BROWSER="firefox" | |
IS_INSTALL_VSCODE=true | |
VSCODE_URL="https://az764295.vo.msecnd.net/stable/622cb03f7e070a9670c94bae1a45d78d7181fbd4/code_1.53.2-1613044664_amd64.deb" | |
# CONSTANT Variables | |
KERNEL_VERSION=$(uname -r) | |
TEMP_DIR=".temp_setup" | |
VSCODE_FILE_NAME="code.deb" | |
readonly KERNEL_VERSION TEMPDIR VSCODE_FILE_NAME | |
# Initial Setups | |
mkdir $TEMP_DIR | |
cd $TEMP_DIR | |
# Base development packages | |
sudo apt install gcc g++ g++-multilib build-essential linux-tools-$KERNEL_VERSION \ | |
python lua-filesystem \ | |
libx11-dev libglm-dev libxcb-dri3-0 libxcb-present0 libpciaccess0 \ | |
libpng-dev libxcb-keysyms1-dev libxcb-dri3-dev libx11-dev libmirclient-dev \ | |
libwayland-dev libxrandr-dev libxcb-ewmh-dev \ | |
libxinerama-dev libxcursor-dev libxi-dev doxygen xorg-dev libglu1-mesa-dev \ | |
-y | |
# Fix some corrupted packages | |
sudo apt install --reinstall libc6 \ | |
libc6-dev \ | |
-y | |
# Toolchain packages | |
sudo apt install git cmake \ | |
$BROWSER \ | |
-y | |
# Graphics packages | |
sudo apt install vulkan-tools \ | |
-y | |
# Preparing profiler | |
# Build DTrace | |
git clone "https://github.com/dtrace4linux/linux.git" dtrace | |
cd dtrace | |
tools/get-deps.pl | |
make all | |
make install | |
sudo make load | |
# Install Profiler | |
sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid' | |
sh -c 'echo 0 >/proc/sys/kernel/kptr_restrict' | |
sh -c 'echo kernel.perf_event_paranoid=1 >> /etc/sysctl.d/99-perf.conf' | |
sh -c 'echo kernel.kptr_restrict=0 >> /etc/sysctl.d/99-perf.conf' | |
sh -c 'sysctl --system' | |
# Preparing development IDE (CLion) | |
sudo snap install clion --classic | |
if $IS_INSTALL_VSCODE; then | |
wget $VSCODE_URL -O $VSCODE_FILE_NAME | |
sudo dpkg -i $VSCODE_FILE_NAME | |
fi | |
# Cleaning up | |
cd .. | |
sudo rm -rf $TEMP_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment