{% extends "base.html" %} {% block title %}Bootstrapping Instructions{% endblock %} {% block content %}

Bootstrapping Instructions

1. Setting Up a POSIX Environment

A. Installing MSYS2

MSYS2 is a POSIX environment which provides extensive compiler support for the more modern programming languages used by Murfey's package dependencies.

The Murfey server supports the forwarding of download requests to network-restricted client PCs. To install MSYS2, download the setup executable using this mirror, then run it using the default settings. This will install MSYS2 to C:\msys64 .

B. Setting Up MSYS2

i. Setting Up the MSYS2 Package Manager (If Network-Restricted)

By default, MSYS2 comes with preset lists of mirrors and servers that it installs its packages from. On a network-restricted PC, these will need to be replaced with files that point to the Murfey server instead. They can be downloaded via this link.

Once downloaded, extract the files to %MSYS64%\etc\pacman.d. If MSYS2 was installed at the default location, this will be:

    C:\msys64\etc\pacman.d

ii. Installing Dependencies

MSYS2 comes with multiple environments, but UCRT64 is the most modern one. In order for the Murfey client to be able to install and run its dependencies properly, the following packages will need to be installed in the UCRT64 environment. This can be achieved using the following commands:

    $ pacman -Syu
    $ pacman -S msys2-runtime
    $ pacman -S rsync
    $ pacman -S mingw-w64-ucrt-x86_64-python-pip
    $ pacman -S mingw-w64-ucrt-x86_64-rust

Other utility packages such as vim can also be installed by running pacman -S <package-name>. You can browse the other packages available on MSYS2 by searching the repo using pacman -Ss <package-name>

iii. Configuring the Rust Package Manager (If Network-Restricted)

Many newer Python packages now have dependencies written in Rust that allow them to operate more efficiently. MSYS2 supports the compilation and installation of such packages, and is thus our recommended POSIX environment to use Murfey with.

Rust packages and their associated metadata are, by default, stored in https://crates.io. Package download and installation is in turn conducted by the package manager cargo. For network-restricted client PCs, Murfey also supports mirroring https://crates.io to facilitate the installation of Rust packages.

To configure cargo, simply download the pre-configured config.toml file via this link. This file should then be pasted in a .cargo folder, which, by default, should be located in your User Profile homespace:

    %USERPROFILE%\.cargo

For a user named Murfey, for example, this would take the form:

    C:\Users\Murfey\.cargo

With this file configured, cargo will know to look for package metadata and files via the Murfey mirror instead.

2. Setting Up Python

Once Python and pip are installed in the terminal, you have the option to install Murfey in either the base environment or a virtual environment. The base environment is simpler, but uninstallation of the Python packages in the future could potentially interfere with the base environment's functionality.

A. (Optional) Setting Up a Virtual Environment

To set up a virtual environment, run the following commands:

    $ pip install virtualenv --index-url {{ request.url.scheme }}://{{ netloc }}{{ proxy_path }}/pypi --trusted-host {{ netloc }}
    $ virtualenv your-env-name  # Create the virtual environment
    $ source your-env-name/bin/activate  # Activate the virtual environment

B. Installing Murfey

You can install Murfey in the Python environment (the base one or a virtual environment) in the UCRT64 terminal using the following commands:

    $ pip install murfey --index-url {{ request.url.scheme }}://{{ netloc }}{{ proxy_path }}/pypi/index --trusted-host {{ netloc }}
{% endblock %}