Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
v2.1.0 - Cleanup after itself and works on windows 7
Browse files Browse the repository at this point in the history
  • Loading branch information
brysondev committed Sep 15, 2022
1 parent 19e01d1 commit 0ab7c94
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions of_install.bat
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ goto murse
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:murse
setlocal ENABLEEXTENSIONS
set MURSE_PATH="%TEMP%\murse\"
set MURSE_PATH=%TEMP%\murse\
set PATH_STEAM=HKEY_CURRENT_USER\SOFTWARE\Valve\Steam
set VALUE_STEAM=SourceModInstallPath
set STEAM_EXE=SteamExe
Expand All @@ -60,15 +60,18 @@ if not exist %STEAM_REG_PATH%\NUL > nul 2>&1(
)
)

if not exist "%MURSE_PATH%\murse.exe" (
if not exist "%MURSE_PATH%murse.exe" (
echo Installing Murse CLI...
echo.
cd %TEMP%
md "murse"
cd "murse"
powershell -Command "Invoke-WebRequest https://dl.spiderden.net/murse/windows -Outfile murse.exe"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://git.sr.ht/~welt/murse/refs/download/v0.3.0/murse-v0.3.0-windows-386.zip', 'murse.zip')"
Call :UnZipFile "%MURSE_PATH%" "%MURSE_PATH%murse.zip"
)

goto verify
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:verify
echo Verifying Murse exists...
cd /D "%MURSE_PATH%"
murse.exe -h
Expand All @@ -83,22 +86,38 @@ echo Murse verified!
:: cd /D %STEAM_REG_PATH%
goto installOF

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:UnZipFile <ExtractTo> <newzipfile>
set vbs="%temp%\_.vbs"
if exist %vbs% del /f /q %vbs%
>>%vbs% echo Set fso = CreateObject("Scripting.FileSystemObject")
>>%vbs% echo If NOT fso.FolderExists(%1) Then
>>%vbs% echo fso.CreateFolder(%1)
>>%vbs% echo End If
>>%vbs% echo set objShell = CreateObject("Shell.Application")
>>%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
>>%vbs% echo objShell.NameSpace(%1).CopyHere(FilesInZip)
>>%vbs% echo Set fso = Nothing
>>%vbs% echo Set objShell = Nothing
cscript //nologo %vbs%
if exist %vbs% del /f /q %vbs%
goto verify
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:installOF
echo.
echo Installing Open Fortress...
echo.

:: TODO: Possibly let them input threads, but honestly this should be fine for now...
murse.exe upgrade "%STEAM_REG_PATH%\open_fortress"
murse.exe upgrade "%STEAM_REG_PATH%\open_fortress" -u "https://toast3.openfortress.fun/toast"
if %ERRORLEVEL% EQU 1 (
echo Something went wrong...
goto exitmain
)
echo Validating just in case...
echo This will take a while...
echo.
murse.exe verify "%STEAM_REG_PATH%\open_fortress" -r
murse.exe verify "%STEAM_REG_PATH%\open_fortress" -r -u "https://toast3.openfortress.fun/toast"
if %ERRORLEVEL% EQU 1 (
echo Something went wrong...
goto exitmain
Expand Down Expand Up @@ -166,11 +185,19 @@ echo MMMMMMMMMMMMMMMMWKkl;''''''''''''''''''''''''''''''''';lkKWMMMMMMMMMMMMMMMM
echo MMMMMMMMMMMMMMMMMMWWKkdc;''''.''''''....''''..'''';cokKWWMMMMMMMMMMMMMMMMMM
echo MMMMMMMMMMMMMMMMMMMMMMWNKOxol:;,,'''''''''',;:loxOKNWMMMMMMMMMMMMMMMMMMMMMM
echo MMMMMMMMMMMMMMMMMMMMMMMMMMMWWNXK00OOOkOOO00KXNWWMMMMMMMMMMMMMMMMMMMMMMMMMMM
echo.
echo Cleaning up...
if exist %MURSE_PATH% (
cd %TEMP%
@RD /S /Q %TEMP%\murse
)
goto exitmain

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:exitmain
echo.
echo For any issues you are unsure about regarding the install, kindly ping bryson on the offical public Open Fortress Discord in #windows-troubleshooting.
echo Discord: https://discord.gg/mKjW2ACCrm
echo.
PAUSE
PAUSE
EXIT

0 comments on commit 0ab7c94

Please sign in to comment.