warlock-manager 2.2.1__tar.gz → 2.2.2__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.2}/PKG-INFO +1 -1
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/pyproject.toml +1 -1
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/apps/steam_app.py +44 -10
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/services/base_service.py +13 -5
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager.egg-info/PKG-INFO +1 -1
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/LICENSE +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/README.md +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/setup.cfg +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_base_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_base_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_cli_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_cli_formatter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_cmd.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_config_key.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_ini_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_sensitive_data_filter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_socket_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_unreal_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_unreal_config_ark_spawn_entities.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_unreal_save.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/tests/test_version.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/apps/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/apps/base_app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/apps/manual_app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/base_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/cli_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/config_key.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/ini_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/json_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/properties_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/config/unreal_config.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/formatters/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/formatters/cli_formatter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/app.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/app_runner.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/cache.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/cmd.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/download.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/firewall.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/get_wan_ip.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/java.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/meta.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/ports.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/sensitive_data_filter.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/tui.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/utils.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/libs/version.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/mods/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/mods/base_mod.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/mods/warlock_nexus_mod.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/nexus/nexus.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/services/__init__.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/services/http_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/services/rcon_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager/services/socket_service.py +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager.egg-info/SOURCES.txt +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager.egg-info/dependency_links.txt +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/warlock_manager.egg-info/requires.txt +0 -0
- {warlock_manager-2.2.1 → warlock_manager-2.2.2}/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,38 @@ class SteamApp(BaseApp, ABC):
|
|
|
293
299
|
|
|
294
300
|
return list(info['depots']['branches'].keys())
|
|
295
301
|
|
|
302
|
+
def option_value_updated(self, option: str, previous_value, new_value):
|
|
303
|
+
"""
|
|
304
|
+
Handle any special actions needed when an option value is updated
|
|
305
|
+
|
|
306
|
+
:param option:
|
|
307
|
+
:param previous_value:
|
|
308
|
+
:param new_value:
|
|
309
|
+
:return:
|
|
310
|
+
"""
|
|
311
|
+
if option == 'Steam Branch':
|
|
312
|
+
# If the steam branch is updated, update the game binaries automatically.
|
|
313
|
+
self.update()
|
|
314
|
+
|
|
315
|
+
def get_option_options(self, option: str):
|
|
316
|
+
"""
|
|
317
|
+
Get the list of possible options for a configuration option
|
|
318
|
+
:param option:
|
|
319
|
+
:return:
|
|
320
|
+
"""
|
|
321
|
+
if option == 'Steam Branch':
|
|
322
|
+
# Steam branch should be pulled automatically from Steam
|
|
323
|
+
return self.get_steam_branches()
|
|
324
|
+
else:
|
|
325
|
+
return super().get_option_options(option)
|
|
326
|
+
|
|
296
327
|
def check_update_available(self) -> bool:
|
|
297
328
|
"""
|
|
298
329
|
Check if a SteamCMD update is available for this game
|
|
299
330
|
|
|
300
331
|
:return:
|
|
301
332
|
"""
|
|
302
|
-
app_manifest = os.path.join(
|
|
333
|
+
app_manifest = os.path.join(utils.get_app_directory(), 'AppFiles', 'steamapps', 'appmanifest_%s.acf' % self.steam_id)
|
|
303
334
|
|
|
304
335
|
if not os.path.exists(app_manifest):
|
|
305
336
|
print(f"App manifest file {app_manifest} does not exist.", file=sys.stderr)
|
|
@@ -377,21 +408,24 @@ class SteamApp(BaseApp, ABC):
|
|
|
377
408
|
cmd = Cmd([
|
|
378
409
|
guess_steamcmd_path(),
|
|
379
410
|
'+force_install_dir',
|
|
380
|
-
os.path.join(
|
|
411
|
+
os.path.join(utils.get_app_directory(), 'AppFiles'),
|
|
381
412
|
'+login',
|
|
382
413
|
'anonymous',
|
|
383
414
|
'+app_update',
|
|
384
415
|
self.steam_id,
|
|
385
416
|
])
|
|
386
|
-
cmd.sudo(
|
|
417
|
+
cmd.sudo(utils.get_app_uid())
|
|
387
418
|
cmd.stream_output()
|
|
388
419
|
|
|
389
|
-
|
|
420
|
+
branch = self.get_option_value('Steam Branch')
|
|
421
|
+
branch_password = self.get_option_value('Steam Branch Password')
|
|
422
|
+
|
|
423
|
+
if branch != 'public':
|
|
390
424
|
cmd.append('-beta')
|
|
391
|
-
cmd.append(
|
|
392
|
-
if
|
|
425
|
+
cmd.append(branch)
|
|
426
|
+
if branch_password != '':
|
|
393
427
|
cmd.append('-betapassword')
|
|
394
|
-
cmd.append(
|
|
428
|
+
cmd.append(branch_password)
|
|
395
429
|
|
|
396
430
|
cmd.append('validate')
|
|
397
431
|
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.2}/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.2}/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.2}/warlock_manager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|