mirror of
https://github.com/indetectables-net/toolkit.git
synced 2026-10-28 19:40:47 +00:00
Update universal updater
This commit is contained in:
1 parent
a39eafc5c6
commit
39512d0e9c
16 files changed
+31
-29
No files matched your search
@@ -122,5 +122,5 @@ SCHTASKS /DELETE /TN "ToolkitUpdater"
|
||||
|
||||
```bash
|
||||
pip install pyinstaller
|
||||
pyinstaller --onefile updater.py --icon=assets/appicon.ico
|
||||
pyinstaller --onefile UpdateManager.py --icon=../assets/appicon.ico
|
||||
```
|
||||
@@ -120,5 +120,5 @@ SCHTASKS /DELETE /TN "ToolkitUpdater"
|
||||
|
||||
```bash
|
||||
pip install pyinstaller
|
||||
pyinstaller --onefile updater.py --icon=assets/appicon.ico
|
||||
pyinstaller --onefile UpdateManager.py --icon=../assets/appicon.ico
|
||||
```
|
||||
@@ -5,9 +5,9 @@ import os
|
||||
import colorama
|
||||
import logging
|
||||
|
||||
from src.Updater import Updater
|
||||
from src.ConfigManager import ConfigManager
|
||||
from src.ColoredFormatter import ColoredFormatter
|
||||
from universal_updater.Updater import Updater
|
||||
from universal_updater.ConfigManager import ConfigManager
|
||||
from universal_updater.ColoredFormatter import ColoredFormatter
|
||||
|
||||
|
||||
class UpdateManager:
|
||||
@@ -19,7 +19,7 @@ class UpdateManager:
|
||||
"""
|
||||
Initialize the UpdateManager with a ConfigManager instance and command-line arguments.
|
||||
"""
|
||||
self.version = '2.1.0'
|
||||
self.version = '2.1.1'
|
||||
self.config_file_name = 'tools.ini'
|
||||
self.config_section_defaults = 'UpdaterConfig'
|
||||
self.config_section_self_update = 'UpdaterAutoUpdater'
|
||||
@@ -100,7 +100,7 @@ class UpdateManager:
|
||||
dest='disable_clean',
|
||||
help='disable tool folder clean',
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=self.get_argparse_default('disable_clean', False)
|
||||
default=self.get_argparse_default('disable_clean', True)
|
||||
)
|
||||
parser.add_argument(
|
||||
'-dr',
|
||||
@@ -108,7 +108,7 @@ class UpdateManager:
|
||||
dest='disable_repack',
|
||||
help='disable tool repack',
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=self.get_argparse_default('disable_repack', False)
|
||||
default=self.get_argparse_default('disable_repack', True)
|
||||
)
|
||||
parser.add_argument(
|
||||
'-dic',
|
||||
@@ -289,3 +289,9 @@ class UpdateManager:
|
||||
self.set_logging_level()
|
||||
self.update_default_params()
|
||||
self.handle_updates()
|
||||
|
||||
|
||||
# Entry point for the script
|
||||
if __name__ == '__main__':
|
||||
# Initialize and run the main method of UpdateManager
|
||||
UpdateManager().main()
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,7 @@ import pathlib
|
||||
import shutil
|
||||
import logging
|
||||
|
||||
from src.Helpers import Helpers
|
||||
from universal_updater.Helpers import Helpers
|
||||
|
||||
|
||||
class FileManager:
|
||||
File renamed without changes.
@@ -7,7 +7,7 @@ import shutil
|
||||
import colorama
|
||||
import logging
|
||||
|
||||
from src.Helpers import Helpers
|
||||
from universal_updater.Helpers import Helpers
|
||||
|
||||
|
||||
class Packer:
|
||||
@@ -87,12 +87,15 @@ class Packer:
|
||||
:return: None
|
||||
:raises: Exception if file extension is not supported
|
||||
"""
|
||||
if file_ext == '.zip':
|
||||
return self.unpack_zip(file_path, unpack_path, file_pass)
|
||||
elif file_ext == '.rar':
|
||||
return self.unpack_rar(file_path, unpack_path, file_pass)
|
||||
elif file_ext == '.7z':
|
||||
return self.unpack_7z(file_path, unpack_path, file_pass)
|
||||
try:
|
||||
if file_ext == '.zip':
|
||||
return self.unpack_zip(file_path, unpack_path, file_pass)
|
||||
elif file_ext == '.rar':
|
||||
return self.unpack_rar(file_path, unpack_path, file_pass)
|
||||
elif file_ext == '.7z':
|
||||
return self.unpack_7z(file_path, unpack_path, file_pass)
|
||||
except Exception as error:
|
||||
raise Exception(colorama.Fore.RED + f'An error occurred during unpacking: {error}')
|
||||
|
||||
raise Exception(colorama.Fore.RED + f'{file_ext} extension not accepted by internal unpacker')
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -3,12 +3,12 @@ import pathlib
|
||||
import colorama
|
||||
import logging
|
||||
|
||||
from src.Scraper import Scraper
|
||||
from src.Downloader import Downloader
|
||||
from src.Packer import Packer
|
||||
from src.FileManager import FileManager
|
||||
from src.ScriptExecutor import ScriptExecutor
|
||||
from src.Helpers import Helpers
|
||||
from universal_updater.Scraper import Scraper
|
||||
from universal_updater.Downloader import Downloader
|
||||
from universal_updater.Packer import Packer
|
||||
from universal_updater.FileManager import FileManager
|
||||
from universal_updater.ScriptExecutor import ScriptExecutor
|
||||
from universal_updater.Helpers import Helpers
|
||||
|
||||
|
||||
class Updater:
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
# Import the UpdateManager class from the src package
|
||||
from src.UpdateManager import UpdateManager
|
||||
|
||||
# Entry point for the script
|
||||
if __name__ == '__main__':
|
||||
# Initialize and run the main method of UpdateManager
|
||||
UpdateManager().main()
|
||||
Reference in new issue
Block a user