warlock-manager 2.2.1__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/PKG-INFO +1 -1
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/pyproject.toml +1 -1
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/apps/steam_app.py +31 -10
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/services/base_service.py +13 -5
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager.egg-info/PKG-INFO +1 -1
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/LICENSE +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/README.md +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/setup.cfg +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_base_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_base_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_cli_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_cli_formatter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_cmd.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_config_key.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_ini_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_sensitive_data_filter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_socket_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_unreal_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_unreal_config_ark_spawn_entities.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_unreal_save.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_version.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/apps/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/apps/base_app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/apps/manual_app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/base_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/cli_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/config_key.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/ini_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/json_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/properties_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/config/unreal_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/formatters/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/formatters/cli_formatter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/app_runner.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/cache.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/cmd.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/download.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/firewall.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/get_wan_ip.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/java.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/meta.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/ports.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/sensitive_data_filter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/tui.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/utils.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/version.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/mods/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/mods/base_mod.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/mods/warlock_nexus_mod.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/nexus/nexus.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/services/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/services/http_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/services/rcon_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/services/socket_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager.egg-info/SOURCES.txt +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager.egg-info/dependency_links.txt +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager.egg-info/requires.txt +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager.egg-info/top_level.txt +0 -0
|
@@ -6,7 +6,8 @@ from abc import ABC
|
|
|
6
6
|
import logging
|
|
7
7
|
|
|
8
8
|
from .base_app import BaseApp
|
|
9
|
-
from
|
|
9
|
+
from warlock_manager.libs.cmd import Cmd
|
|
10
|
+
from warlock_manager.libs import utils
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
def guess_steamcmd_path() -> str:
|
|
@@ -209,7 +210,12 @@ def steamcmd_parse_manifest(manifest_content):
|
|
|
209
210
|
|
|
210
211
|
class SteamApp(BaseApp, ABC):
|
|
211
212
|
"""
|
|
212
|
-
Game application manager
|
|
213
|
+
Game application manager for Steam-based games
|
|
214
|
+
|
|
215
|
+
Expects the game to have the following configuration keys:
|
|
216
|
+
|
|
217
|
+
* Steam Branch - Branch to install the game from (default: public)
|
|
218
|
+
* Steam Branch Password - Password for the Steam branch (optional)
|
|
213
219
|
"""
|
|
214
220
|
|
|
215
221
|
def __init__(self):
|
|
@@ -262,7 +268,7 @@ class SteamApp(BaseApp, ABC):
|
|
|
262
268
|
|
|
263
269
|
# Run the steamcmd command
|
|
264
270
|
cmd = Cmd(command)
|
|
265
|
-
cmd.sudo(
|
|
271
|
+
cmd.sudo(utils.get_app_uid())
|
|
266
272
|
cmd.is_cacheable()
|
|
267
273
|
|
|
268
274
|
# Output from command should be Steam manifest format, parse it
|
|
@@ -293,13 +299,25 @@ class SteamApp(BaseApp, ABC):
|
|
|
293
299
|
|
|
294
300
|
return list(info['depots']['branches'].keys())
|
|
295
301
|
|
|
302
|
+
def get_option_options(self, option: str):
|
|
303
|
+
"""
|
|
304
|
+
Get the list of possible options for a configuration option
|
|
305
|
+
:param option:
|
|
306
|
+
:return:
|
|
307
|
+
"""
|
|
308
|
+
if option == 'Steam Branch':
|
|
309
|
+
# Steam branch should be pulled automatically from Steam
|
|
310
|
+
return self.get_steam_branches()
|
|
311
|
+
else:
|
|
312
|
+
return super().get_option_options(option)
|
|
313
|
+
|
|
296
314
|
def check_update_available(self) -> bool:
|
|
297
315
|
"""
|
|
298
316
|
Check if a SteamCMD update is available for this game
|
|
299
317
|
|
|
300
318
|
:return:
|
|
301
319
|
"""
|
|
302
|
-
app_manifest = os.path.join(
|
|
320
|
+
app_manifest = os.path.join(utils.get_app_directory(), 'AppFiles', 'steamapps', 'appmanifest_%s.acf' % self.steam_id)
|
|
303
321
|
|
|
304
322
|
if not os.path.exists(app_manifest):
|
|
305
323
|
print(f"App manifest file {app_manifest} does not exist.", file=sys.stderr)
|
|
@@ -377,21 +395,24 @@ class SteamApp(BaseApp, ABC):
|
|
|
377
395
|
cmd = Cmd([
|
|
378
396
|
guess_steamcmd_path(),
|
|
379
397
|
'+force_install_dir',
|
|
380
|
-
os.path.join(
|
|
398
|
+
os.path.join(utils.get_app_directory(), 'AppFiles'),
|
|
381
399
|
'+login',
|
|
382
400
|
'anonymous',
|
|
383
401
|
'+app_update',
|
|
384
402
|
self.steam_id,
|
|
385
403
|
])
|
|
386
|
-
cmd.sudo(
|
|
404
|
+
cmd.sudo(utils.get_app_uid())
|
|
387
405
|
cmd.stream_output()
|
|
388
406
|
|
|
389
|
-
|
|
407
|
+
branch = self.get_option_value('Steam Branch')
|
|
408
|
+
branch_password = self.get_option_value('Steam Branch Password')
|
|
409
|
+
|
|
410
|
+
if branch != 'public':
|
|
390
411
|
cmd.append('-beta')
|
|
391
|
-
cmd.append(
|
|
392
|
-
if
|
|
412
|
+
cmd.append(branch)
|
|
413
|
+
if branch_password != '':
|
|
393
414
|
cmd.append('-betapassword')
|
|
394
|
-
cmd.append(
|
|
415
|
+
cmd.append(branch_password)
|
|
395
416
|
|
|
396
417
|
cmd.append('validate')
|
|
397
418
|
cmd.append('+quit')
|
|
@@ -1227,6 +1227,18 @@ class BaseService(ABC):
|
|
|
1227
1227
|
'loader': self.get_loader(),
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
1230
|
+
def build_environment_file(self):
|
|
1231
|
+
"""
|
|
1232
|
+
Build the environment file for this service
|
|
1233
|
+
|
|
1234
|
+
:return:
|
|
1235
|
+
"""
|
|
1236
|
+
with open(self._env_file, 'w') as f:
|
|
1237
|
+
env = self.get_environment()
|
|
1238
|
+
for key in env:
|
|
1239
|
+
f.write('%s=%s\n' % (key, env[key]))
|
|
1240
|
+
self.game.ensure_file_ownership(self._env_file)
|
|
1241
|
+
|
|
1230
1242
|
def build_systemd_config(self):
|
|
1231
1243
|
"""
|
|
1232
1244
|
Build and save the systemd service file for this service
|
|
@@ -1249,12 +1261,8 @@ class BaseService(ABC):
|
|
|
1249
1261
|
logging.info('Created systemd service file for %s at %s' % (self.service, self._service_file))
|
|
1250
1262
|
|
|
1251
1263
|
# Save the environmental variable file for this service
|
|
1252
|
-
|
|
1253
|
-
env = self.get_environment()
|
|
1254
|
-
for key in env:
|
|
1255
|
-
f.write('%s=%s\n' % (key, env[key]))
|
|
1264
|
+
self.build_environment_file()
|
|
1256
1265
|
logging.info('Created environment file for %s at %s' % (self.service, self._env_file))
|
|
1257
|
-
self.game.ensure_file_ownership(self._env_file)
|
|
1258
1266
|
|
|
1259
1267
|
# Grab the ports from this service and try to automatically update them to the next available port
|
|
1260
1268
|
# NOTICE, this will only check against services within this same game,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{warlock_manager-2.2.1 → warlock_manager-2.2.3}/tests/test_unreal_config_ark_spawn_entities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager/libs/sensitive_data_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{warlock_manager-2.2.1 → warlock_manager-2.2.3}/warlock_manager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|