diff --git a/func/checkparameters.py b/func/checkparameters.py index 1e7e5be..5b24767 100644 --- a/func/checkparameters.py +++ b/func/checkparameters.py @@ -49,17 +49,12 @@ def checkparameters(appname, gamejsonfile, gametype): #eacRuntime eacRuntimeArgs = [] if gameSettings.get("eacRuntime"): - environment["PROTON_EAC_RUNTIME"] = configpath.runtimepath - eacRuntimeArgs = ["eac_runtime"] - wrapperArgs += eacRuntimeArgs + environment["PROTON_EAC_RUNTIME"] = os.path.join(configpath.runtimepath, "eac_runtime") #battlEyeRuntime battlEyeRuntimeArgs = [] if gameSettings.get("battlEyeRuntime"): - environment["PROTON_BATTLEYE_RUNTIME"] = configpath.runtimepath - battlEyeRuntimeArgs = ["battleye_runtime"] - wrapperArgs += battlEyeRuntimeArgs - + environment["PROTON_BATTLEYE_RUNTIME"] = os.path.join(configpath.runtimepath, "battleye_runtime") #nvidiaPrime if gameSettings.get("nvidiaPrime"): diff --git a/func/configpath.py b/func/configpath.py index 18151b9..f1057a6 100644 --- a/func/configpath.py +++ b/func/configpath.py @@ -65,7 +65,7 @@ def is_flatpak_installed(application_id: str) -> bool: storejsonpath = os.path.join(actual_config_path, "heroic/store/config.json") -runtimepath = os.path.join(actual_config_path, "heroic/tools/runtimes/") +runtimepath = os.path.join(actual_config_path, "heroic/tools/runtimes") # Check if Steam is Flatpak is_steam_flatpak = is_flatpak_installed(STEAM_FLATPAK_APPID) diff --git a/tests/testcheckparameters.py b/tests/testcheckparameters.py index a850ef4..1ea3c94 100644 --- a/tests/testcheckparameters.py +++ b/tests/testcheckparameters.py @@ -178,9 +178,9 @@ def test_getparameters_epic_proton_all_options(self): # maxSharpness 'WINE_FULLSCREEN_FSR_STRENGTH': str(MOCK_GAME_CONFIG_FULL_OBJ[MOCK_APP_NAME]['maxSharpness']), # eacRuntime - 'PROTON_EAC_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_EAC_RUNTIME': f"{MOCK_RUNTIME_PATH}/eac_runtime", # battlEyeRuntime - 'PROTON_BATTLEYE_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_BATTLEYE_RUNTIME': f"{MOCK_RUNTIME_PATH}/battleye_runtime", # nvidiaPrime 'DRI_PRIME': '1', '__NV_PRIME_RENDER_OFFLOAD': '1', @@ -196,9 +196,9 @@ def test_getparameters_epic_proton_all_options(self): expected_environment = expected_environment | MOCK_ENVIRONMENT expected_arguments = [ # eacRuntime - 'eac_runtime', + #'eac_runtime', # battlEyeRuntime - 'battleye_runtime', + #'battleye_runtime', # wrapperOptions MOCK_GAME_CONFIG_FULL_OBJ[MOCK_APP_NAME]['wrapperOptions'][0]['exe'], # unpack list of wrapper args @@ -241,9 +241,9 @@ def test_getparameters_epic_proton_steam_runtime_all_options(self): # maxSharpness 'WINE_FULLSCREEN_FSR_STRENGTH': str(MOCK_GAME_CONFIG_FULL_OBJ[MOCK_APP_NAME]['maxSharpness']), # eacRuntime - 'PROTON_EAC_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_EAC_RUNTIME': f"{MOCK_RUNTIME_PATH}/eac_runtime", # battlEyeRuntime - 'PROTON_BATTLEYE_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_BATTLEYE_RUNTIME': f"{MOCK_RUNTIME_PATH}/battleye_runtime", # nvidiaPrime 'DRI_PRIME': '1', '__NV_PRIME_RENDER_OFFLOAD': '1', @@ -259,9 +259,9 @@ def test_getparameters_epic_proton_steam_runtime_all_options(self): expected_environment = expected_environment | MOCK_ENVIRONMENT expected_arguments = [ # eacRuntime - 'eac_runtime', + #'eac_runtime', # battlEyeRuntime - 'battleye_runtime', + #'battleye_runtime', # wrapperOptions MOCK_GAME_CONFIG_PROTON_OBJ[MOCK_APP_NAME]['wrapperOptions'][0]['exe'], # unpack list of wrapper args @@ -306,9 +306,9 @@ def test_checkparameters_gog_linux(self): # maxSharpness 'WINE_FULLSCREEN_FSR_STRENGTH': str(MOCK_GAME_CONFIG_FULL_OBJ[MOCK_APP_NAME]['maxSharpness']), # eacRuntime - 'PROTON_EAC_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_EAC_RUNTIME': f"{MOCK_RUNTIME_PATH}/eac_runtime", # battlEyeRuntime - 'PROTON_BATTLEYE_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_BATTLEYE_RUNTIME': f"{MOCK_RUNTIME_PATH}/battleye_runtime", # nvidiaPrime 'DRI_PRIME': '1', '__NV_PRIME_RENDER_OFFLOAD': '1', @@ -317,7 +317,7 @@ def test_checkparameters_gog_linux(self): } # environmentOptions expected_environment = expected_environment | MOCK_ENVIRONMENT - expected_arguments = ['eac_runtime', 'battleye_runtime', '/my/test/wrapper', '--my', '--test', '--args', 'mangohud', '--dlsym', 'gamemoderun', '/path/to/gog-dl', 'launch', '"/path/to/gog/game"', 'TestGameId', '--override-exe', '"/path/to/override/exe"', '--offline', '--platform=linux', 'launcherArgsValue'] + expected_arguments = ['/my/test/wrapper', '--my', '--test', '--args', 'mangohud', '--dlsym', 'gamemoderun', '/path/to/gog-dl', 'launch', '"/path/to/gog/game"', 'TestGameId', '--override-exe', '"/path/to/override/exe"', '--offline', '--platform=linux', 'launcherArgsValue'] expected_cloudsync = "/path/to/gog-dl sync-saves --save-path \"/path/to/saves\" TestGameId -y" actual_environment, actual_arguments, actual_cloudsync = checkparameters.checkparameters( MOCK_APP_NAME, MOCK_GAME_JSON_PATH, "gog-linux") @@ -342,9 +342,9 @@ def test_checkparameters_epic_wine_custom_libs(self): # enableFsync 'WINEFSYNC': '1', # eacRuntime - 'PROTON_EAC_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_EAC_RUNTIME': f"{MOCK_RUNTIME_PATH}/eac_runtime", # battlEyeRuntime - 'PROTON_BATTLEYE_RUNTIME': MOCK_RUNTIME_PATH, + 'PROTON_BATTLEYE_RUNTIME': f"{MOCK_RUNTIME_PATH}/battleye_runtime", # nvidiaPrime 'DRI_PRIME': '1', '__NV_PRIME_RENDER_OFFLOAD': '1', @@ -357,7 +357,7 @@ def test_checkparameters_epic_wine_custom_libs(self): } # environmentOptions expected_environment = expected_environment | MOCK_ENVIRONMENT - expected_arguments = ['eac_runtime', 'battleye_runtime', '/my/test/wrapper', '--my', '--test', '--args', 'mangohud', '--dlsym', 'gamemoderun', '/path/to/heroic', 'launch', 'TestGameId', '--override-exe', '"/path/to/override/exe"', '--offline', '--language', 'fr', '--wine-prefix', '"/path/to/TestGameId/pfx"', '--wine', '/path/to/game/wine/bin/wine', 'launcherArgsValue'] + expected_arguments = ['/my/test/wrapper', '--my', '--test', '--args', 'mangohud', '--dlsym', 'gamemoderun', '/path/to/heroic', 'launch', 'TestGameId', '--override-exe', '"/path/to/override/exe"', '--offline', '--language', 'fr', '--wine-prefix', '"/path/to/TestGameId/pfx"', '--wine', '/path/to/game/wine/bin/wine', 'launcherArgsValue'] expected_cloudsync = "/path/to/heroic sync-saves --save-path \"/path/to/saves\" TestGameId -y" actual_environment, actual_arguments, actual_cloudsync = checkparameters.checkparameters( MOCK_APP_NAME, MOCK_GAME_JSON_PATH, "epic")