diff --git a/bootstrap/archlinux/index.html b/bootstrap/archlinux/index.html new file mode 100644 index 0000000..87b1fe0 --- /dev/null +++ b/bootstrap/archlinux/index.html @@ -0,0 +1,65 @@ + + + + + + + Developer bootstrap - FRC Team 3512 + + + + + +
+

Arch Linux bootstrap

+

Dual-booting Arch Linux on a + PC

+

Tutorial for this coming soon. For now, refer to here,

+

Tools installation

+

Visual Studio Code

+

Follow the installation guide from + WPILib Docs.

+

To build robot projects in a terminal, run the following command to set + JAVA_HOME in ~/.bashrc:

echo 'export + JAVA_HOME=~/wpilib/2021/jdk' >> ~/.bashrc +

GCC

sudo pacman -S gcc +

Git

sudo pacman -S git +

Formatter

+

This requires a package from the AUR. Use either the manual installation + method (shown below) or an AUR helper.

+
+sudo pacman -S python
+cd /tmp
+git clone https://aur.archlinux.org/python-wpiformat-git
+makepkg -si
+

CMake

sudo pacman -S cmake +
+ + diff --git a/bootstrap/index.html b/bootstrap/index.html index ac218f5..6c7c2d5 100644 --- a/bootstrap/index.html +++ b/bootstrap/index.html @@ -49,82 +49,20 @@

Developer bootstrap

highly recommended to back up all of your valuable data to a seperate location to avoid data loss. -

Dual-booting Ubuntu on a PC

-

The first thing to do is to make space for your Ubuntu installation. - Most of the time, the best way of achieving this is to shrink your existing - OS partition (In this tutorial, we will be dealing with dual-booting with - Windows. If you are a Mac user, please use the tutorial on dual-booting for - a Mac.)

-

Windows has its own built-in partition creator. Here is a really simple - tutorial on dummies.com that can help you with that. The link is - here.

-

To begin the creation of your USB, grab an empty USB stick and download - an Ubuntu .iso file (you have a choice between the stable and lastest - releases. Stable versions are recommended.) at the official Ubuntu website.

-

Next, you need to install a "USB creator" to help create your bootable - USB stick. Some USB creators include Universal - USB Installer (or UUI) and Balena Etcher. Instructions are - provided on both of the websites on how to use each individual creator.

-

After doing so, you can then close the installer once it states that the - bootable USB is ready. At this point, you can restart your PC enable to - start the installation process.

-

To boot off your newly-created USB, you would need to access your - computer's BIOS. This can be access by pressing a certain key(s) when you - first boot up. Your BIOS keys depend on your PC's manufacturer, which can - usually be found with a quick Google search.

-

After you have successfully accessed your BIOS, press your appropriate - key to open up your boot options. Select your USB device that with the - Ubuntu installer installed onto it. Once you see the Ubuntu start up - screen, all you have to do is to follow onscreen instructions. When Ubuntu - asks for where you would like to have the Ubuntu OS installed, click - "Something Else". Only select this option, as the others may mess up your - existing Windows installation. It would then ask you to select an empty - partition for you to install on. Select the empty partition that you - created using the Windows shrinking tool and select next. After that, - installation is pretty straight forward.

-

Congrats! You now have Ubuntu and Windows at the same time!

-

Dual-booting Ubuntu on a - Macbook

-

Dual-booting any Linux distro on a Macbook requires you to get your - hands more dirty. For this tutorial, I'll be referencing this article by - Chris Hoffman on HowToGeek.com on how to do this. The website is - here.

-

Before doing anything, make sure that you have full-disk encryption - disabled. Otherwise, you may come across some weird issues when setting up - the necessary tools to start the dual-boot process.

-

First, you need to install rEFInd onto your Macbook, which allows you to - boot onto many other operating systems installed onto your - machine.

Download it - here. Select the .zip file of the latest, stable build. Open a terminal - window, drag the install.sh file on to the window, and press enter to begin - the installation process. It may require your password (or admin password - if you are not the admin) to allow this action, so have that handy. Once it - is done, restart your Mac and you should see the boot manager menu. -

Next, we need to shrink the existing Mac OS space to make some space for - Ubuntu. This can be achieved by using the Disk Utility tool preinstalled - onto your Mac. Just open the tool and shrink your current storage amount - for the Mac OSX. Although the minimum storage limit for Ubuntu is 5GB, it - is recommended allow storage greater than 5GBs. Most recommend 20GB to - 30GB, but it depends on what you want. Just leave adequate amount of room - for OSX is you plan on continuing to add data to your machine. Don't create - a partition, just leave the empty storage alone.

-

Create your USB creator as usual (software is compatable with Mac). - After creation, simply restart your computer and you will approach the boot - menu for rEFInd. Select the inserted USB stick with the Ubuntu installer - installed to boot into the boot launcher. From there, installation is the - same as what is descibed in the Windows tutorial. After the installation, - your Mac will boot into the same menu at startup always. From there, you - can change between booting into Mac and booting into Ubuntu.

-

That is all you have to do! You can also follow the article I used (link - at top) to do this tutorial as well.

-

Dual-booting Arch Linux

-

Tutorial for this coming soon. For now, refer to here,

+

The tools

Visual Studio Code

Visual Studio Code is an integrated development environment which makes @@ -139,7 +77,7 @@

Visual Studio Code

the executable was built successfully.

GCC compiler

This is the compiler gradle or CMake will use to build the programs you - write. MSYS2 provides a Linux-like environment with this compiler.

+ write.

CMake

CMake will be used to build your personal projects. For better integration with VS Code, download the "CMake Tools" extension under VS @@ -151,8 +89,8 @@

Gradle

more.

Git

Git is a version control system used to manage the code you write. See - Intro to Git for more - information and detailed setup.

+ Intro to Git for more information and + detailed setup.

GitHub

GitHub provides web based code review and repository management for the Git version control system. Our GitHub organization is Formatter practice to be familiar with the enforced style guide and be able to write code in that style directly. -

Tools installation on Ubuntu

-

The command blocks below should be run in a terminal, where each line is - entered separately and followed by the Enter key.

-

Visual Studio Code

-

Follow the installation guide from - WPILib Docs.

-

To build robot projects in a terminal, run the following command to set - JAVA_HOME in ~/.bashrc:

-

echo 'export JAVA_HOME=~/wpilib/2021/jdk' >> - ~/.bashrc

-

GCC

sudo apt-get install gcc -

Git

sudo apt-get install git -

Formatter

-
-sudo apt-get install clang-format python3-pip
-pip3 install --user wpiformat
-

CMake

sudo apt-get install cmake -

Tools installation on Arch - Linux

-

Visual Studio Code

-

Follow the installation guide from - WPILib Docs.

-

To build robot projects in a terminal, run the following command to set - JAVA_HOME in ~/.bashrc:

echo 'export - JAVA_HOME=~/wpilib/2021/jdk' >> ~/.bashrc -

GCC

sudo pacman -S gcc -

Git

sudo pacman -S git -

Formatter

-

This requires a package from the AUR. Use either the manual installation - method (shown below) or an AUR helper.

-
-sudo pacman -S python
-cd /tmp
-git clone https://aur.archlinux.org/python-wpiformat-git
-makepkg -si
-

CMake

sudo pacman -S cmake -

Tools installation on Windows

-

Visual Studio Code

-

Follow the installation guide from - WPILib Docs.

-

GCC Compiler

-
    -
  1. Download the MSYS2 installer from here and run it. Use the default - installation directory. -
  2. -
  3. pacman -Syu, then close all terminals when directed to - do so.
  4. -
  5. pacman -Su
  6. -
  7. Add MSYS2 to your system-wide PATH environment variable. - -
  8. -
  9. Create a desktop shortcut for "MSYS2 MSYS" if desired.
  10. -
  11. pacman -S --needed base-devel gcc, then when prompted - for which packages in the base-devel group to install, press Enter to - select the default option (all of them).
  12. -
-

Git

pacman -S git -

Formatter

-

Download the latest version of LLVM from here under "Pre-Built - Binaries" and run it. The default installation options are fine. Don't - worry if you see the following; it's irrelevant to our use.

-
Installing MSVC integration...
-Failed to find MSBuild toolsets directory.
-MSVC integration install failed.
-

MSYS2 keeps a separate PATH environment variable from the operating - system. Run the following command to add the LLVM installation to it.

-

echo 'export PATH=$PATH:/c/Program\ Files/LLVM/bin' >> - ~/.bashrc

-

The following commands install Python and pip, then use pip to install - wpiformat.

-
-pacman -S python
-wget https://bootstrap.pypa.io/get-pip.py
-python get-pip.py
-pip install wpiformat
-

After those commands complete, close and reopen the terminal so the PATH - environment variable change from earlier takes effect.

-

CMake

-

Download the CMake installer from here under "Latest Release". When running - the installer, make sure to add CMake to the PATH environment variable - (either for all users or just one). Any existing terminals will need to be - closed and reopened to receive the PATH update.

-

What to do now?

-

Once you have setup your computer, you can now learn more about programming!

diff --git a/bootstrap/macos/index.html b/bootstrap/macos/index.html new file mode 100644 index 0000000..86eb549 --- /dev/null +++ b/bootstrap/macos/index.html @@ -0,0 +1,46 @@ + + + + + + + Developer bootstrap - FRC Team 3512 + + + + + +
+

macOS bootstrap

+

Native setup

+

TODO

+

Tools installation

+

TODO: via homebrew

+
+ + diff --git a/bootstrap/ubuntu/index.html b/bootstrap/ubuntu/index.html new file mode 100644 index 0000000..1b2287d --- /dev/null +++ b/bootstrap/ubuntu/index.html @@ -0,0 +1,139 @@ + + + + + + + Developer bootstrap - FRC Team 3512 + + + + + +
+

Ubuntu bootstrap

+
+ Note: To those installing Ubuntu on their PC for the first time, + there is a risk of wiping your existing OS on accident. Therefore, it is + highly recommended to back up all of your valuable data to a seperate + location to avoid data loss. +
+

Dual-booting Ubuntu on a PC

+

The first thing to do is to make space for your Ubuntu installation. + Most of the time, the best way of achieving this is to shrink your existing + OS partition (In this tutorial, we will be dealing with dual-booting with + Windows. If you are a Mac user, please use the tutorial on dual-booting for + a Mac.)

+

Windows has its own built-in partition creator. Here is a really simple + tutorial on dummies.com that can help you with that. The link is + here.

+

To begin the creation of your USB, grab an empty USB stick and download + an Ubuntu .iso file (you have a choice between the stable and lastest + releases. Stable versions are recommended.) at the official Ubuntu website.

+

Next, you need to install a "USB creator" to help create your bootable + USB stick. Some USB creators include Universal + USB Installer (or UUI) and Balena Etcher. Instructions are + provided on both of the websites on how to use each individual creator.

+

After doing so, you can then close the installer once it states that the + bootable USB is ready. At this point, you can restart your PC enable to + start the installation process.

+

To boot off your newly-created USB, you would need to access your + computer's BIOS. This can be access by pressing a certain key(s) when you + first boot up. Your BIOS keys depend on your PC's manufacturer, which can + usually be found with a quick Google search.

+

After you have successfully accessed your BIOS, press your appropriate + key to open up your boot options. Select your USB device that with the + Ubuntu installer installed onto it. Once you see the Ubuntu start up + screen, all you have to do is to follow onscreen instructions. When Ubuntu + asks for where you would like to have the Ubuntu OS installed, click + "Something Else". Only select this option, as the others may mess up your + existing Windows installation. It would then ask you to select an empty + partition for you to install on. Select the empty partition that you + created using the Windows shrinking tool and select next. After that, + installation is pretty straight forward.

+

Congrats! You now have Ubuntu and Windows at the same time!

+

Dual-booting Ubuntu on a + Macbook

+

Dual-booting any Linux distro on a Macbook requires you to get your + hands more dirty. For this tutorial, I'll be referencing this article by + Chris Hoffman on HowToGeek.com on how to do this. The website is + here.

+

Before doing anything, make sure that you have full-disk encryption + disabled. Otherwise, you may come across some weird issues when setting up + the necessary tools to start the dual-boot process.

+

First, you need to install rEFInd onto your Macbook, which allows you to + boot onto many other operating systems installed onto your + machine.

Download it + here. Select the .zip file of the latest, stable build. Open a terminal + window, drag the install.sh file on to the window, and press enter to begin + the installation process. It may require your password (or admin password + if you are not the admin) to allow this action, so have that handy. Once it + is done, restart your Mac and you should see the boot manager menu. +

Next, we need to shrink the existing Mac OS space to make some space for + Ubuntu. This can be achieved by using the Disk Utility tool preinstalled + onto your Mac. Just open the tool and shrink your current storage amount + for the Mac OSX. Although the minimum storage limit for Ubuntu is 5GB, it + is recommended allow storage greater than 5GBs. Most recommend 20GB to + 30GB, but it depends on what you want. Just leave adequate amount of room + for OSX is you plan on continuing to add data to your machine. Don't create + a partition, just leave the empty storage alone.

+

Create your USB creator as usual (software is compatable with Mac). + After creation, simply restart your computer and you will approach the boot + menu for rEFInd. Select the inserted USB stick with the Ubuntu installer + installed to boot into the boot launcher. From there, installation is the + same as what is descibed in the Windows tutorial. After the installation, + your Mac will boot into the same menu at startup always. From there, you + can change between booting into Mac and booting into Ubuntu.

+

That is all you have to do! You can also follow the article I used (link + at top) to do this tutorial as well.

+

Tools installation

+

The command blocks below should be run in a terminal, where each line is + entered separately and followed by the Enter key.

+

Visual Studio Code

+

Follow the installation guide from + WPILib Docs.

+

To build robot projects in a terminal, run the following command to set + JAVA_HOME in ~/.bashrc:

+

echo 'export JAVA_HOME=~/wpilib/2021/jdk' >> + ~/.bashrc

+

GCC

sudo apt-get install gcc +

Git

sudo apt-get install git +

Formatter

+
+sudo apt-get install clang-format python3-pip
+pip3 install --user wpiformat
+

CMake

sudo apt-get install cmake +
+ + diff --git a/bootstrap/windows/index.html b/bootstrap/windows/index.html new file mode 100644 index 0000000..bb247d4 --- /dev/null +++ b/bootstrap/windows/index.html @@ -0,0 +1,80 @@ + + + + + + + Developer bootstrap - FRC Team 3512 + + + + + +
+

Windows bootstrap

+

Setting up WSL2 on Windows + 10/11

+

WSL2 (short for "Windows Subsystem for Linux 2") allows users to build + and run Linux applications within their Windows environment. This is a + great alternative to students who have no interest in setting up a dual + boot of Windows and a Linux distro.

+

First, we need to enable two different features: HyperV and WSL2 itself. + This can be achieved by opening up PowerShell as an administrator and + running the following commands:

+

HyperV

dism.exe /online /enable-feature + /featurename:VirtualMachinePlatform /all /norestart +

WSL2

dism.exe /online /enable-feature + /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart +
+ Note: The previous iteration, WSL1, is also available when + installing new distros onto your system. To ensure you are using WSL2 + when installing any distro: run the following command: wsl + --set-default-version 2 +
+

Next, you can open up the Microsoft + Store WSL page and select a distro you wish to install We recommend + using Ubuntu, the latest version + will work fine. To install, press the "Get" button. Please note a Microsoft + account is required to download.

+

Once it's finished, launch the app from the Start Menu. A terminal will + fire up and ask for a new username and password if being used for the first + time. Set them to your preference, but choose a password you will remember + as it will be needed when performing some commands like installing any + packages.

+

Congrats! Your new WSL2 system is ready to be used.

+

Tools installation

+

See Ubuntu tools + installation.

+

Since WSL2 runs seperately from base Windows, a seperate extension is + needed for VSCode to have the ability of accessing WSL2 file system. This + extension can be downloaded by opening Quick Search (Ctrl+P) and typing in: + ext install ms-vscode-remote.remote-wsl to install it.

+
+ + diff --git a/check_links.py b/check_links.py index 2b8e2ab..a1cad15 100755 --- a/check_links.py +++ b/check_links.py @@ -31,6 +31,11 @@ def verify_url(filename, line_number, url): True if verification succeeded or False otherwise """ if url.startswith("http://") or url.startswith("https://"): + # Ignore .ms links since they only return success on Windows + m = re.search(r"^https?://([^/]+).*?$", url) + if m.group(1).endswith(".ms"): + return True + try: r = requests.head(url, headers={"User-Agent": "Python Requests"}) if r.status_code != 200: diff --git a/sitemap.xml b/sitemap.xml index 459f27a..b7128b4 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -29,9 +29,21 @@ https://frc3512.github.io/archives/index.html + + https://frc3512.github.io/bootstrap/archlinux/index.html + https://frc3512.github.io/bootstrap/index.html + + https://frc3512.github.io/bootstrap/macos/index.html + + + https://frc3512.github.io/bootstrap/ubuntu/index.html + + + https://frc3512.github.io/bootstrap/windows/index.html + https://frc3512.github.io/ci/advanced-cpp/concurrency-and-atomics/index.html