"
- r'[\s]*Pre-release'
- )
- # Older packages in the repo are named "Color Tools"; omit them
- colortool_pattern = r'Color Tool[\w\s]+'
-
- # Iterate through repository pages
- for p in range(num_pages):
- url = f"{windows_terminal_url}?page={p + 1}"
- response = requests.get(url)
- headers = response.headers
- if not headers["content-type"].startswith("text/html"):
- raise HTTPException("Unable to parse non-HTML page for package versions")
- text = response.text
-
- # Collect only stable releases
- releases = re.findall(release_pattern, text)
- prereleases = re.findall(prerelease_pattern, text)
- colortool = re.findall(colortool_pattern, text)
- stable = set(releases) - (set(prereleases) | set(colortool))
- versions.extend(stable)
-
- # Construct HTML document for available versions
- html_head = "\n".join(
- (
- "",
- "",
- "",
- " Links to Windows Terminal Versions",
- "",
- "",
- " Links to Windows Terminal Versions
",
- )
- )
- # Construct hyperlinks
- link_list = []
- base_url = str(request.base_url).strip("/") # Remove trailing '/'
- path = request.url.path.strip("/") # Remove leading '/'
-
- for v in range(len(versions)):
- version = versions[v]
- hyperlink = f'{quote(version, safe="")}
'
- link_list.append(hyperlink)
- hyperlinks = "\n".join(link_list)
-
- html_tail = "\n".join(
- (
- "",
- "",
- )
- )
-
- # Combine
- content = "\n".join((html_head, hyperlinks, html_tail))
-
- # Return FastAPI response
- return Response(
- content=content.encode("utf-8"),
- status_code=response.status_code,
- media_type="text/html",
- )
-
-
-@windows_terminal.get("/releases/{version}", response_class=Response)
-def get_windows_terminal_version_assets(
- version: str,
- request: Request,
-):
- """
- Returns a list of packages for the selected version of Windows Terminal.
- """
-
- # Validate inputs
- if bool(re.match(r"^[\w\-\.]+$", version)) is False:
- raise HTTPException("Invalid version format")
-
- # https://github.com/{owner}/{repo}/releases/expanded_assets/{version}
- url = f'{windows_terminal_url}/expanded_assets/{quote(version, safe="")}'
-
- response = requests.get(url)
- headers = response.headers
- if not headers["content-type"].startswith("text/html"):
- raise HTTPException("Unable to parse non-HTML page for page numbers")
- text = response.text
-
- # Find hyperlinks
- pattern = (
- r'href="[/\w\.]+/releases/download/'
- + f'{quote(version, safe="")}'
- + r'/([\w\.\-]+)"'
- )
- assets = re.findall(pattern, text)
-
- # Construct HTML document for available assets
- html_head = "\n".join(
- (
- "",
- "",
- "",
- f' Links to Windows Terminal {quote(version, safe="")} Assets',
- "",
- "",
- f' Links to Windows Terminal {quote(version, safe="")} Assets
',
- )
- )
- # Construct hyperlinks
- link_list = []
- base_url = str(request.base_url).strip("/") # Remove trailing '/'
- path = request.url.path.strip("/") # Remove leading '/'
-
- for a in range(len(assets)):
- asset = assets[a]
- hyperlink = f'{quote(asset, safe="")}
'
- link_list.append(hyperlink)
- hyperlinks = "\n".join(link_list)
-
- html_tail = "\n".join(
- (
- "",
- "",
- )
- )
-
- # Combine
- content = "\n".join((html_head, hyperlinks, html_tail))
-
- # Return FastAPI response
- return Response(
- content=content.encode("utf-8"),
- status_code=response.status_code,
- media_type="text/html",
- )
-
-
-@windows_terminal.get("/releases/{version}/{file_name}", response_class=Response)
-def get_windows_terminal_package_file(
- version: str,
- file_name: str,
-):
- """
- Returns a package from the GitHub repository.
- """
-
- # Validate version and file names
- if bool(re.match(r"^[\w\.\-]+$", version)) is False:
- raise HTTPException("Invalid version format")
- if bool(re.match(r"^[\w\.\-]+$", file_name)) is False:
- raise HTTPException("Invalid file name")
-
- # https://github.com/{owner}/{repo}/releases/download/{version}/{file_name}
- url = f'{windows_terminal_url}/download/{quote(version, safe="")}/{quote(file_name, safe="")}'
- response = requests.get(url)
- if response.status_code == 200:
- return Response(
- content=response.content,
- status_code=response.status_code,
- headers=response.headers,
- )
- else:
- raise HTTPException(status_code=response.status_code)
-
-
"""
=======================================================================================
PYPI-RELATED FUNCTIONS AND ENDPOINTS
diff --git a/src/murfey/server/main.py b/src/murfey/server/main.py
index 61ab08201..96533fd7d 100644
--- a/src/murfey/server/main.py
+++ b/src/murfey/server/main.py
@@ -65,7 +65,6 @@ class Settings(BaseSettings):
app.include_router(murfey.server.api.bootstrap.bootstrap)
app.include_router(murfey.server.api.bootstrap.cygwin)
app.include_router(murfey.server.api.bootstrap.msys2)
-app.include_router(murfey.server.api.bootstrap.windows_terminal)
app.include_router(murfey.server.api.bootstrap.pypi)
app.include_router(murfey.server.api.bootstrap.plugins)
app.include_router(murfey.server.api.clem.router)
diff --git a/src/murfey/templates/bootstrap.html b/src/murfey/templates/bootstrap.html
index abc83e4bf..deb83f6ba 100644
--- a/src/murfey/templates/bootstrap.html
+++ b/src/murfey/templates/bootstrap.html
@@ -63,80 +63,6 @@ Installing MSYS2
$ pacman -S mingw-w64-x86_64-rust --disable-download-timeout
-Installing Windows Terminal
-
- There is currently a bug with MSYS2 terminals on Windows 10 that prevents its
- user interface from working properly. Our current solution is to use
- Microsoft's
- Windows Terminal as a
- wrapper for MSYS2.
-
-
- The latest release of Windows Terminal can be downloaded directly from
- GitHub, or
- through this mirror. This will
- download a ZIP file, which can be extracted to a directory of your choosing
- and used out of the box.
-
-
- In order to run the UCRT64 environment in Windows Terminal, Windows Terminal
- will need to be directed to it by adding a dictionary entry in its settings
- JSON file. To do so:
-
-
- - Open Windows Terminal.
- -
- Click on the dropdown arrow to the right of the "new tab" button on the
- title bar.
-
- -
- Click "Settings" (alternatively, use the "Ctrl + ," keyboard shortcut).
-
- -
- On the bottom left corner of the window, click on the "Open JSON file"
- option. This will bring up the JSON file managing Windows Terminal's
- settings in your default code editor.
-
- - Under "profiles" > "list", Add this dictionary entry for UCRT64:
-
-
- "profiles":
- {
- "defaults": {},
- "list":
- [
- {
- "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
- "hidden": false,
- "name": "Windows PowerShell"
- },
- {
- "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
- "hidden": false,
- "name": "Command Prompt"
- },
- {
- "guid": "{17da3cac-b318-431e-8a3e-7fcdefe6d114}",
- "name": "UCRT64 / MSYS2",
- "commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -ucrt64",
- "startingDirectory": "C:/msys64/home/%USERNAME%",
- "icon": "C:/msys64/ucrt64.ico"
- }
- ]
- },
-
-
- -
- Additionally, if you want Windows Terminal to always start using UCRT64, you
- can replace the "defaultProfile" key with the "guid" value of UCRT64.
-
- - Save your changes and close.
-
-
- With these changes, you should now be able to run UCRT64 in the Windows
- Terminal.
-
-
Setting Up Python
Once Python and pip are installed in the terminal, you have the option to