114 lines
6.3 KiB
Batchfile
114 lines
6.3 KiB
Batchfile
@echo off
|
|
::Shrink window in production builds!
|
|
::mode con: cols=65 lines=10
|
|
set "currentver=2.0.2"
|
|
TITLE Tackle Debug Console
|
|
echo checking version
|
|
curl -sL -o C:\Users\Public\Downloads\ver.txt https://git.lainiwakura.xyz/uncreativecultist/TackleSimpleInstaller/raw/branch/main/ver.txt >nul
|
|
set /p ver=<C:\Users\Public\Downloads\ver.txt
|
|
del /q C:\Users\Public\Downloads\ver.txt
|
|
|
|
::Debug version warning
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('You are running a debug version! Here be dragons!', 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
|
|
|
|
)
|
|
if %ver%==%currentver% (
|
|
goto checklocation
|
|
) else (
|
|
echo DEBUG: uh oh, outdated version.
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('You are running an outdated version of Tackle! You are running %currentver% while the latest version is %ver%! Please check the UncreativeGit Repository for an updated version!', 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
|
|
goto checklocation
|
|
)
|
|
|
|
:checklocation
|
|
if exist "C:\Program Files (x86)\Steam\steamapps\common\WEBFISHING\" (
|
|
mklink /j "C:\Users\Public\Downloads\WEBFISHINGLINK" "C:\Program Files (x86)\Steam\steamapps\common\WEBFISHING"
|
|
echo DEBUG: creasting symlink because tar is stupid and can't handle spaces apparently
|
|
set "WFDIR=C:\Users\Public\Downloads\WEBFISHINGLINK"
|
|
goto verifypath
|
|
) else (
|
|
goto setup
|
|
)
|
|
|
|
:setup
|
|
echo DEBUG: webfishing isn't in the default steamapps folder
|
|
echo DEBUG: checking if we have a different spot saved...
|
|
if exist "C:\Users\Public\Downloads\bait.txt" (
|
|
echo DEBUG: yup, we do. using that
|
|
set /p WFDIR=<C:\Users\Public\Downloads\bait.txt
|
|
goto verifypath
|
|
) else (
|
|
echo DEBUG: nope, we don't. ask em for a location please
|
|
powershell -Command "& {Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::InputBox('Please enter your WEBFISHING path! Please make sure it starts with the drive letter, does NOT end with \', 'Tackle Simple Installer v%currentver% - @uncreativecultist')}" > C:\Users\Public\Downloads\bait.txt
|
|
echo DEBUG: cool, save that location for later please
|
|
set /p WFDIR=<C:\Users\Public\Downloads\bait.txt
|
|
goto verifypath
|
|
)
|
|
|
|
:verifypath
|
|
if exist "%WFDIR%\webfishing.exe" (
|
|
goto verifyweave
|
|
) else (
|
|
echo DEBUG: hmm, cant find webfishing here.
|
|
goto manualsetup
|
|
)
|
|
|
|
:verifyweave
|
|
if exist "%WFDIR%\GDWeave\" (
|
|
goto verifydotnet
|
|
) else (
|
|
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('It looks like you are missing GDWeave! Tackle will now automatically download and install GDWeave!', 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
|
|
echo DEBUG: downloading GDWeave...
|
|
curl -sL https://github.com/NotNite/GDWeave/releases/latest/download/GDWeave.zip -o C:\Users\Public\Downloads\GDWeave.zip
|
|
echo DEBUG: GDWeave downloaded, time to install
|
|
tar -xf "C:\Users\Public\Downloads\GDWeave.zip" -C %WFDIR%\
|
|
echo DEBUG: GDWeave has been installed, continue on with your day
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('GDWeave has been successfully installed! Press OK to continue with mod installation.', 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
|
|
echo DEBUG: cleanup time
|
|
del /q C:\Users\Public\Downloads\GDWeave.zip
|
|
goto verifyweave
|
|
)
|
|
|
|
:verifydotnet
|
|
if exist "C:\Program Files\dotnet\sdk\8.0.403" (
|
|
goto main
|
|
) else (
|
|
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('It looks like you are missing .NET 8! Tackle will now automatically download and install .NET 8!', 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
|
|
echo DEBUG: downloading GDWeave...
|
|
curl -sL https://download.visualstudio.microsoft.com/download/pr/6224f00f-08da-4e7f-85b1-00d42c2bb3d3/b775de636b91e023574a0bbc291f705a/dotnet-sdk-8.0.403-win-x64.exe -o C:\Users\Public\Downloads\dotnet-sdk-8.0.403-win-x64.exe
|
|
echo DEBUG: .NET downloaded, time to install
|
|
start /w "DOTNET 8 SDK" "C:\Users\Public\Downloads\dotnet-sdk-8.0.403-win-x64.exe" /passive /norestart
|
|
echo DEBUG: .NET has been installed, continue on with your day
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('.NET 8 has been successfully installed! Press OK to continue with mod installation.', 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
|
|
echo DEBUG: cleanup time
|
|
del /q C:\Users\Public\Downloads\dotnet-sdk-8.0.403-win-x64.exe
|
|
goto main
|
|
)
|
|
|
|
:manualsetup
|
|
powershell -Command "& {Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::InputBox('Please enter your WEBFISHING path! Please make sure it starts with the drive letter, does NOT end with \', 'Tackle Simple Installer v%currentver% - @uncreativecultist')}" > C:\Users\Public\Downloads\bait.txt
|
|
set /p WFDIR=<C:\Users\Public\Downloads\bait.txt
|
|
goto verifypath
|
|
|
|
:main
|
|
IF [%1] EQU [] Goto:error
|
|
|
|
if exist "%WFDIR%\GDWeave\mods" (
|
|
goto pass
|
|
) else (
|
|
md "%WFDIR%\GDWeave\mods"
|
|
goto pass
|
|
)
|
|
:pass
|
|
echo DEBUG: Installing mod...
|
|
cd "%WFDIR%\GDWeave\mods\"
|
|
tar -xf "%~1" -C %WFDIR%\GDWeave\mods
|
|
echo DEBUG: Mod has been installed
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; Add-Type -AssemblyName System.Drawing; $notify = New-Object System.Windows.Forms.NotifyIcon; $notify.Icon = [System.Drawing.SystemIcons]::Information; $notify.Visible = $true; $notify.ShowBalloonTip(0, 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'Mod has been installed!', [System.Windows.Forms.ToolTipIcon]::None)}"
|
|
exit
|
|
|
|
:error
|
|
echo DEBUG: Incorrect usage, whoopsie daisy!
|
|
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Please drag and drop a mod file onto the bat file to continue!', 'Tackle Simple Installer v%currentver% - @uncreativecultist', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}" |