rbjaxter / budhud

A Team Fortress 2 hud inspired by whayay's yahud and rays' rayshud.
MIT License
188 stars 90 forks source link

Updater ps1 file should consider TF2 Linux installation #528

Closed MikeSesketcharba closed 2 months ago

MikeSesketcharba commented 3 months ago

Hi! While executing the powershell script in linux, it says it doesn't find TF2 as an installation. Powershell is multiplatform and can also be installed in Linux to execute windows scripts. So, when executing some functions, we get:

=====================
Checking Installation
=====================
This function will check for common installation problems and provide a potential solution

Checking for hl2 or tf_win64.exe... Could not locate hl2 or tf_win64.exe

Outcome
Default hud will load instead of budhud

Solution
- Verify that budhud is placed in ../tf/custom
- Verify that TF2 is not installed on a separate drive
- Verify that you do not have multiple custom folders
- Verify that you have TF2 installed at all lmao

Press Enter to continue...: 

and

==================
Update from Github
==================

Checking if TF2 is running... TF2 not running
Checking for Invoke-WebRequest... Invoke-WebRequest found.

====================
IMPORTANT DISCLAIMER
====DON'T IGNORE====
====================

If you have EDITED any ORIGINAL budhud fies, they will be OVERWRITTEN.
If you have ADDED any NEW budhud files, they will NOT be OVERWRITTEN.
This script is best used by those making use of #users/custom.

To proceed, you must type r-6969.
To close, type anything else.

Please type your option: r-6969
Downloading files from GitHub...Complete
Unzipping files...MethodInvocationException: /home/francisco/.steam/debian-installation/steamapps/common/Team Fortress 2/tf/custom/budhud-master/budhud Updater.ps1:570
Line |
 570 |              [System.IO.Compression.ZipFileExtensions]::ExtractToDirec …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "ExtractToDirectory" with "2" argument(s): "The file
     | '/home/francisco/budhud-master/#customization/_enabled/@ SOME FILES ARE
     | ENABLED BY DEFAULT BELOW.txt' already exists."
Complete
Moving folders and files out of extracted zip...Copy-Item: /home/francisco/.steam/debian-installation/steamapps/common/Team Fortress 2/tf/custom/budhud-master/budhud Updater.ps1:576
Line |
 576 |              Copy-Item -Path ./budhud-master/* -Destination $PSScriptR …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path
     | '/home/francisco/.steam/debian-installation/steamapps/common/Team
     | Fortress 2/tf/custom/budhud-master/budhud-master' because it does not
     | exist.
Complete
Removing folders and files used in the process..Complete

=============
Task Complete
=============
Latest hud files from GitHub have been downloaded and extracted.
Time Elapsed: 4 second(s)

Press Enter to continue...: 

My suggestion is not to build from scratch a brand new update script for Linux only, but to add how the script checks for path files to consider debian installation as well.

Thanks!