clean up installer.py, delete Mods folder for now

This commit is contained in:
Obie Hinojosa 2025-05-21 21:28:42 -05:00
parent 1a98cea3ef
commit ac56a6d960
85 changed files with 53 additions and 603 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.venv

View File

@ -1 +0,0 @@
{}

View File

@ -1,3 +0,0 @@
{
"volume": 20
}

View File

@ -1 +0,0 @@
{}

View File

@ -1,3 +0,0 @@
{
"SomeSetting": true
}

View File

@ -1,4 +0,0 @@
{
"bonus_content": true,
"bonus_prompt": false
}

View File

@ -1,12 +0,0 @@
{
"DynamicZonesEnabled": true,
"LoadingWaitTimeoutEnabled": true,
"LobbyQolEnabled": true,
"MapSoundOptimizationsEnabled": true,
"MeshGpuInstancingEnabled": true,
"MultiThreadNetworkingEnabled": true,
"PlayerOptimizationsEnabled": true,
"ReducePhysicsUpdatesEnabled": true,
"SmoothCameraEnabled": true,
"ZzCompatOverrideMayCauseCrash": false
}

View File

@ -1,4 +0,0 @@
{
"DebugAttackSelf": false,
"RespawnOnAttackedWithGun": true
}

View File

@ -1,37 +0,0 @@
flat assembler version 1.73
Copyright (c) 1999-2014, Tomasz Grysztar.
All rights reserved.
This program is free for commercial and non-commercial use as long as
the following conditions are adhered to.
Copyright remains Tomasz Grysztar, and as such any Copyright notices
in the code are not to be removed.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The licence and distribution terms for any publically available
version or derivative of this code cannot be changed. i.e. this code
cannot simply be copied and put under another distribution licence
(including the GNU Public Licence).

Binary file not shown.

Binary file not shown.

View File

@ -1,216 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"GDWeave/2.0.14.0": {
"dependencies": {
"Reloaded.Hooks": "4.3.0",
"Reloaded.Memory.Sigscan": "3.1.6",
"Serilog.Sinks.Console": "6.0.0",
"Serilog.Sinks.File": "6.0.0"
},
"runtime": {
"GDWeave.dll": {}
}
},
"Iced/1.17.0": {
"runtime": {
"lib/netstandard2.1/Iced.dll": {
"assemblyVersion": "1.17.0.0",
"fileVersion": "1.17.0.0"
}
}
},
"Reloaded.Assembler/1.0.14": {
"dependencies": {
"Reloaded.Memory.Buffers": "2.0.0"
},
"runtime": {
"lib/net6.0/Reloaded.Assembler.dll": {
"assemblyVersion": "1.0.14.0",
"fileVersion": "1.0.14.0"
}
}
},
"Reloaded.Hooks/4.3.0": {
"dependencies": {
"Iced": "1.17.0",
"Reloaded.Assembler": "1.0.14",
"Reloaded.Hooks.Definitions": "1.15.0",
"Reloaded.Memory.Buffers": "2.0.0"
},
"runtime": {
"lib/net7.0/Reloaded.Hooks.dll": {
"assemblyVersion": "4.3.0.0",
"fileVersion": "4.3.0.0"
}
}
},
"Reloaded.Hooks.Definitions/1.15.0": {
"runtime": {
"lib/net6.0/Reloaded.Hooks.Definitions.dll": {
"assemblyVersion": "1.15.0.0",
"fileVersion": "1.15.0.0"
}
}
},
"Reloaded.Memory/8.0.1": {
"runtime": {
"lib/net6.0/Reloaded.Memory.dll": {
"assemblyVersion": "8.0.1.0",
"fileVersion": "8.0.1.0"
}
}
},
"Reloaded.Memory.Buffers/2.0.0": {
"dependencies": {
"Reloaded.Memory": "8.0.1"
},
"runtime": {
"lib/net6.0/Reloaded.Memory.Buffers.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "2.0.0.0"
}
}
},
"Reloaded.Memory.Sigscan/3.1.6": {
"dependencies": {
"Reloaded.Memory": "8.0.1",
"Reloaded.Memory.Sigscan.Definitions": "1.1.1"
},
"runtime": {
"lib/net6.0/Reloaded.Memory.Sigscan.dll": {
"assemblyVersion": "3.1.6.0",
"fileVersion": "3.1.6.0"
}
}
},
"Reloaded.Memory.Sigscan.Definitions/1.1.1": {
"runtime": {
"lib/net5.0/Reloaded.Memory.Sigscan.Definitions.dll": {
"assemblyVersion": "1.1.1.0",
"fileVersion": "1.1.1.0"
}
}
},
"Serilog/4.0.0": {
"runtime": {
"lib/net8.0/Serilog.dll": {
"assemblyVersion": "4.0.0.0",
"fileVersion": "4.0.0.0"
}
}
},
"Serilog.Sinks.Console/6.0.0": {
"dependencies": {
"Serilog": "4.0.0"
},
"runtime": {
"lib/net8.0/Serilog.Sinks.Console.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.0.0"
}
}
},
"Serilog.Sinks.File/6.0.0": {
"dependencies": {
"Serilog": "4.0.0"
},
"runtime": {
"lib/net8.0/Serilog.Sinks.File.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.0.0"
}
}
}
}
},
"libraries": {
"GDWeave/2.0.14.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Iced/1.17.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw==",
"path": "iced/1.17.0",
"hashPath": "iced.1.17.0.nupkg.sha512"
},
"Reloaded.Assembler/1.0.14": {
"type": "package",
"serviceable": true,
"sha512": "sha512-y4I1ktSnHPIz3t1JcWk5Xiu0C0BmrlJ6nDnQGwiyz65RH6hjn9vPCcKYjpQDveuTtsebBFdTdUjxTUSw+qtZ2w==",
"path": "reloaded.assembler/1.0.14",
"hashPath": "reloaded.assembler.1.0.14.nupkg.sha512"
},
"Reloaded.Hooks/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LhrqGeYMYCrcnlWCmSyQmdRJ7coizUixzCAHF3FVCdYT5ZHLzZnJWZoMrmYHbay762vtOYlgzQGenQgsWMxdbw==",
"path": "reloaded.hooks/4.3.0",
"hashPath": "reloaded.hooks.4.3.0.nupkg.sha512"
},
"Reloaded.Hooks.Definitions/1.15.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-bLY20vYB0fS2xwu6RDQVwlJxt2//KXLigYrCsCuzt5QFQqkvft4abq9FWPeCJYcvEeg/GQpJ3LC+108/4I2l+g==",
"path": "reloaded.hooks.definitions/1.15.0",
"hashPath": "reloaded.hooks.definitions.1.15.0.nupkg.sha512"
},
"Reloaded.Memory/8.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-GGshpShMtSsa7T7kMhm339nim0beVZGYH/OfTLkuDmjf6Ir/nY9u6m9US1J44YlcEFSVcexvENUf1a9fCfkZNg==",
"path": "reloaded.memory/8.0.1",
"hashPath": "reloaded.memory.8.0.1.nupkg.sha512"
},
"Reloaded.Memory.Buffers/2.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LghMip4Q1mpr9+HsZCGYazlaxnZyMtbiGf87Ttao8Al2F+wvnRet1gPPA5qEaTWnBFg/3DNILwBBbC0W6o0tsw==",
"path": "reloaded.memory.buffers/2.0.0",
"hashPath": "reloaded.memory.buffers.2.0.0.nupkg.sha512"
},
"Reloaded.Memory.Sigscan/3.1.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ocy4BoSo2OpOTMGN/W++w3SwHsVqUZn57JZfAhd3tV81wvLETbAENkQzoDaw0z5/Ih8nx2yAKQTiwImkzNLeWA==",
"path": "reloaded.memory.sigscan/3.1.6",
"hashPath": "reloaded.memory.sigscan.3.1.6.nupkg.sha512"
},
"Reloaded.Memory.Sigscan.Definitions/1.1.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-yzlH3DJIc2XCEaH4aS9sJ9otiV/IVEoKOWrc53cKkx1hU8SHf3A3kE+VpPWlQmfVO5WwRKzRJ8vIr8u8RdGLGw==",
"path": "reloaded.memory.sigscan.definitions/1.1.1",
"hashPath": "reloaded.memory.sigscan.definitions.1.1.1.nupkg.sha512"
},
"Serilog/4.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-2jDkUrSh5EofOp7Lx5Zgy0EB+7hXjjxE2ktTb1WVQmU00lDACR2TdROGKU0K1pDTBSJBN1PqgYpgOZF8mL7NJw==",
"path": "serilog/4.0.0",
"hashPath": "serilog.4.0.0.nupkg.sha512"
},
"Serilog.Sinks.Console/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-fQGWqVMClCP2yEyTXPIinSr5c+CBGUvBybPxjAGcf7ctDhadFhrQw03Mv8rJ07/wR5PDfFjewf2LimvXCDzpbA==",
"path": "serilog.sinks.console/6.0.0",
"hashPath": "serilog.sinks.console.6.0.0.nupkg.sha512"
},
"Serilog.Sinks.File/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-lxjg89Y8gJMmFxVkbZ+qDgjl+T4yC5F7WSLTvA+5q0R04tfKVLRL/EHpYoJ/MEQd2EeCKDuylBIVnAYMotmh2A==",
"path": "serilog.sinks.file/6.0.0",
"hashPath": "serilog.sinks.file.6.0.0.nupkg.sha512"
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +0,0 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

Binary file not shown.

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<NativeLibs Include="$(MSBuildThisFileDirectory)*.*" />
<None Include="@(NativeLibs)">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,10 +0,0 @@
{
"Id": "BlueberryWolfi.APIs",
"PackPath": "APIs.pck",
"Metadata": {
"Name": "BlueberryWolfiAPIs",
"Author": "BlueberryWolfi",
"Version": "v1.0.2",
"Description": "Comfy APIs for Webfishing Mods"
}
}

View File

@ -1,13 +0,0 @@
{
"Id": "BlueberryWolfi.ReelChat",
"PackPath": "ReelChat.pck",
"Dependencies": [
"BlueberryWolfi.APIs"
],
"Metadata": {
"Name": "ReelChat",
"Author": "BlueberryWolfi",
"Version": "v1.1.0",
"Description": "Proximity Voice Chat Mod for Webfishing"
}
}

View File

@ -1,14 +0,0 @@
{
"Id": "colorsexpandedpluspatterns",
"PackPath": "ColorsExpanded+Patterns.pck",
"Dependencies": [
"Sulayre.Lure"
],
"Metadata": {
"Name": "ColorsExpanded+Patterns",
"Author": "PawsBeGamin",
"Version": "1.0.0",
"Description": "Adds over 190 new fur colors and 5 new fur patterns!",
"Homepage": "https://github.com/FerretPaws/Buoy"
}
}

View File

@ -1,4 +0,0 @@
{
"Id": "FailPunch",
"AssemblyPath": "FailPunch.dll"
}

View File

@ -1,11 +0,0 @@
{
"Id": "Kittenji.MetalGearAlert",
"PackPath": "kittenji.metal_gear_alert.pck",
"AssemblyPath": "Kittenji.MetalGearAlert.dll",
"Metadata": {
"Name": "Metal Gear Alert",
"Author": "Kittenji",
"Version": "1.0.1",
"Description": "Plays the alert sound from Metal Gear when you catch a fish."
}
}

View File

@ -1,8 +0,0 @@
{
"Id": "PotatoRadio",
"AssemblyPath": "PotatoRadioPathFetcher.dll",
"Dependencies": [
"Sulayre.Lure"
],
"PackPath": "PotatoRadio.pck"
}

View File

@ -1,23 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"RingsABell/1.0.0.0": {
"runtime": {
"RingsABell.dll": {}
}
}
}
},
"libraries": {
"RingsABell/1.0.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@ -1,11 +0,0 @@
{
"Id": "RingsABell",
"AssemblyPath": "RingsABell.dll",
"PackPath": "RingsABell.pck",
"Metadata": {
"Name": "RingsABell",
"Author": "lunakittyyy",
"Version": "1.0.0",
"Description": "Makes the bell collar in WEBFISHING make cute ringing noises :3 "
}
}

View File

@ -1,10 +0,0 @@
{
"Id": "Sproutian.ShowClicks",
"AssemblyPath": "Sproutian.ShowClicks.dll",
"Metadata": {
"Name": "Show Clicks Mod",
"Author": "Sproutian",
"Version": "1.0.5",
"Description": "Show the number of clicks required to break a bar"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -1,13 +0,0 @@
{
"Id": "Sulayre.Lure",
"AssemblyPath": "Sulayre.Lure.dll",
"PackPath": "Sulayre.Lure.pck",
"Dependencies": [],
"Metadata": {
"Name": "Lure",
"Author": "Sulayre, ZeaTheMays and GitHub Contributors",
"Version": "4.2.2",
"Description": "Legacy (Pre-Rewrite) version of a project that aims to restore unused game functionality, also used as an API to make adding content to WEBFISHING easier, faster and compatible.",
"Homepage": "https://github.com/Sulayre/WebfishingLure"
}
}

View File

@ -1,23 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"TackleBox/1.0.0": {
"runtime": {
"TackleBox.dll": {}
}
}
}
},
"libraries": {
"TackleBox/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,13 +0,0 @@
{
"Id": "TackleBox",
"AssemblyPath": "TackleBox.dll",
"PackPath": "TackleBox.pck",
"Dependencies": [],
"Metadata": {
"Name": "TackleBox",
"Author": "Jade and Contributors",
"Version": "0.5.2",
"Description": "A mod menu for WEBFISHING and config API for mod devs!",
"Homepage": "https://github.com/puppy-girl/TackleBox"
}
}

View File

@ -1,11 +0,0 @@
{
"Id": "TitleAPI",
"PackPath": "TitleAPI.pck",
"AssemblyPath": "TitleAPI.dll",
"Metadata": {
"Name": "TitleAPI",
"Author": "IamKikin & Nowaha",
"Version": "1.0.5",
"Description": "Register your own Titles! **DEVELOPER API!**"
}
}

View File

@ -1,11 +0,0 @@
{
"Id": "WebWardrobe",
"AssemblyPath": "WebWardrobe.dll",
"PackPath": "WebWardrobe.pck",
"Metadata": {
"Name": "WebWardrobe",
"Author": "Nowaha",
"Version": "1.0.5",
"Description": "Load and save outfits!"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,11 +0,0 @@
{
"Id": "bytefrags.BetterFireplace",
"PackPath": "bytefrags.BetterFireplace.pck",
"Metadata": {
"Name": "BetterFireplace",
"Author": "bytefrags",
"Version": "1.0.5",
"Description": "This mod enhances the campfire atmosphere by amplifying the crackling fireplace sound.",
"Homepage": "https://thunderstore.io/"
}
}

View File

@ -1,9 +0,0 @@
{
"id": "bytefrags.BetterFireplace",
"title": "BetterFireplace",
"author": "bytefrags",
"description": "This mod enhances the campfire atmosphere by amplifying the crackling fireplace sound.",
"version": "1.0.5",
"enabled": true,
"third_party": true
}

View File

@ -1,10 +0,0 @@
{
"Id": "Meepso.NLag",
"AssemblyPath": "Meepso.NLag.dll",
"Metadata": {
"Name": "NLag",
"Author": "Meepso",
"Version": "1.0.5",
"Description": "Make the fish multithreaded"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,12 +0,0 @@
{
"Id": "webfishing_gun",
"AssemblyPath": "webfishing_gun.dll",
"PackPath": "webfishing_gun.pck",
"Dependencies": [ "Sulayre.Lure" ],
"Metadata": {
"Name": "webfishing_gun",
"Description": "Adds a Gun",
"Author": "Lily",
"Version": "1.0.0"
}
}

View File

@ -1,23 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"webfishing_gun/1.0.0": {
"runtime": {
"webfishing_gun.dll": {}
}
}
}
},
"libraries": {
"webfishing_gun/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@ -1,5 +0,0 @@
{
"Id": "Zea.CosmeticPack",
"PackPath": "zea.cosmetics.pck",
"Dependencies" : ["Sulayre.Lure"]
}

Binary file not shown.

View File

@ -21,5 +21,11 @@ Yup. Here are the mods. Nothin to see here. Just, y'know, a bunch of mods. That
- might have to account for whether the game is installed on the main drive or another one
- would reallllyyyy not be fun if i had to please god dont make me do this i have no idea how to dynamically find a steam game directory
misc:
1. Backup and export of save files for cross-device sync?
- maybe host save files on my domain? could get seriously out of hand if it blows up, but i kinda doubt it
- how would they access their save on the other device? a link to files? a link to a script that asks for a username/key? would be weird to figure out
*Copyright (c) 2024-2025 Obie Hinojosa*

View File

@ -25,9 +25,14 @@ from pathlib import Path
# -----------define some functions ahead of time------------
# idea! consolidate both delete things and add an extra optino to the functions that toggles-
# idea! consolidate both delete things and add an extra option to the functions that toggles-
# -error outputs using an if statement in the function's code `if quiet = true then... else...`
def delete_directory_warn(directory_to_delete):
# as far as i can tell, i wanted to add an "option" to the function that toggled the warning m-
# -essage, so i dont have to use all this space here defining functions i dont really need.
def delete_directory_warn(directory_to_delete, warn=False):
#this defines a function to delete a directory (no shit)
try:
shutil.rmtree(str(directory_to_delete))
@ -35,26 +40,32 @@ def delete_directory_warn(directory_to_delete):
print("[ERR!]: %s - %s." % (e.filename, e.strerror))
def delete_file_warn(file_to_delete):
#this defines a function to delete a directory (no shit)
#this defines a function to delete a file (no shit)
try:
os.remove(str(file_to_delete))
except OSError as e:
print("[ERR!]: %s - %s." % (e.filename, e.strerror))
def delete_directory(directory_to_delete):
#this defines a function to delete a directory (no shit)
#this defines a function to delete a directory (without any warnings)
try:
shutil.rmtree(str(directory_to_delete))
except:
pass
def delete_file(file_to_delete):
#this defines a function to delete a directory (no shit)
#this defines a function to delete a file (without any warnings)
try:
os.remove(str(file_to_delete))
except:
pass
def compress_tar(folder_path, output_file):
#this defines a function to compress a folder into a tarball
with tarfile.open(output_file, "w:gz") as tar:
tar.add(folder_path, arcname=os.path.basename(folder_path))
#gemini lowkey slayed w this one
def extract_tar(tar_file_path, extract_to):
#this defines a function to decompress a tar.gz file
with tarfile.open(tar_file_path, 'r') as tar:
@ -99,41 +110,22 @@ def print_ascii_art():
print(" ....")
print()
def windows_check_folder_exists(folder):
#checks for mod folder existence and outputs [WARN!]
dir = os.path.normpath(str(Path.cwd()) + "/" + str(folder))
# fuck you microsoft
# this is some high-tier BULLSHIT right here
# print(dir)
if not os.path.exists(dir):
print()
print("[WARN!]: Mod folder not found. (is Fabric installed?)")
print("[WARN!]: (note: the script will go on as usual without breaking anything, but if")
print("[WARN!]: you don't have fabric installed, your mods won't load when you start the game.")
os.mkdir("mods")
print()
time.sleep(20)
def check_for_old_mod_archive(filepath):
def checkfor_and_delete_file(filepath):
#deletes old downloaded mod archives
if os.path.exists(filepath):
print("Found previously downloaded archive, deleting...")
os.remove(filepath)
def compress_tar(folder_path, output_file):
with tarfile.open(output_file, "w:gz") as tar:
tar.add(folder_path, arcname=os.path.basename(folder_path))
#gemini lowkey slayed w this one
# --------------------the real shit!------------------------
#`global` sets these variables to exist outside of the scope of these specific `if` statements.
#`global` sets these variables to exist outside of the scope of these specific `if` statements
#why do i need that?
global gamedir
global homedir
global savedir
#can i group these together?
#can i group these?
#do i still need these to be global vars?
homedir = os.path.expanduser("~")
@ -144,60 +136,60 @@ if platform.system() == "Linux":
time.sleep(1)
print("Operating system detected: GNU/Linux")
time.sleep(1) # import time
time.sleep(1)
print("Backing up save files...")
print("Don't close the window! This'll take a moment...")
# here we cd to the save folder and save that path as a variable
#first, we cd to the save folder and save that path as a variable
os.chdir(".steam/steam/steamapps/compatdata/3146520/pfx/drive_c/users/steamuser/AppData/Roaming/Godot/app_userdata/webfishing_2_newver/")
savedir = Path.cwd()
os.chdir(homedir)
#in this block we cd to savedir and then zip the old save file
#...then in this block we cd to savedir and then zip the old save file
os.chdir(savedir)
os.chdir('..') #go up one folder
compress_tar("webfishing_2_newver", "webfishing-save-backup.tar.gz")
# here we cd to the game files and
# here we cd to the game files and...
os.chdir(homedir)
os.chdir(".local/share/Steam/steamapps/common/WEBFISHING/")
gamedir = Path.cwd()
print("[INFO] Changed current working directory to '" + str(gamedir) + "'")
# try deleting existing mods
#...try deleting existing mods
print("Cleaning game install...")
delete_directory("GDWeave") #delete mods if they already exist
delete_file("winmm.dll") #this probably doesn't actually need to be removed before updating but for now we're doing it
delete_file("winmm.dll") #this probably doesn't actually need to be removed but for now we're doing it
mod_url = 'https://git.adolin.xyz/saru/webfishing-sync-tool/raw/branch/main/image.ico'
mod_url = 'https://placeholder.url' #define mod url
print("Fetching mod pack... This may take a few moments.")
wget.download(url=mod_url)
try:
wget.download(url=mod_url)
except:
print()
print("[ERR!] FATAL: Couldn't fetch new mods from the git repository. (is Adolin online?)")
time.sleep(2) # import time
print("[ERR!] FATAL: Couldn't fetch new mods from the git repository. (Is Adolin online?)")
time.sleep(2)
print("[ERR!] Exiting...")
time.sleep(2) # import time
time.sleep(5)
exit
elif platform.system() == "Windows":
print("Operating system detected: Microsoft Windows")
os.chdir("AppData/Godot/app_userdata/webfishing_2_newver")
savedir = Path.cwd()
os.chdir(homedir)
os.chdir("C:/Program Files (x86)/Steam/steamapps/common/WEBFISHING/")
gamedir = Path.cwd()
delete_directory("GDWeave") #delete mods if they already exist
delete_file("winmm.dll") #this probably doesn't actually need to be removed before updating but for now we're doing it
os.chdir(savedir)
os.chdir('..') #go up one folder
compress_tar("webfishing_2_newver", "webfishing-save-backup.tar.gz")
# elif platform.system() == "Windows":
# print("Operating system detected: Microsoft Windows")
#
# os.chdir("AppData/Godot/app_userdata/webfishing_2_newver") #?
# savedir = Path.cwd()
# os.chdir(homedir)
#
# os.chdir("C:/Program Files (x86)/Steam/steamapps/common/WEBFISHING/") #?
# gamedir = Path.cwd()
#
# delete_directory("GDWeave") #delete mods if they already exist
# delete_file("winmm.dll") #this probably doesn't actually need to be removed before updating but for now we're doing it
#
# os.chdir(savedir)
# os.chdir('..') #go up one folder
# compress_tar("webfishing_2_newver", "webfishing-save-backup.tar.gz")
# --------------------the real shit!------------------------