* new switches for the generate_emu_config tool

- `-skip_ach`: skip downloading & generating achievements and their images
  - `-skip_con`: skip downloading & generating controller configuration files
  - `-skip_inv`: skip downloading & generating inventory data (`items.json` & `default_items.json`)

* copy the readme of the migration tool after build
* let the migration tool exit with code 1 if nothing was found
This commit is contained in:
otavepto 2024-04-20 20:15:47 +02:00
parent 0c50f6b4c7
commit 0cd1711bcf
5 changed files with 46 additions and 17 deletions

View File

@ -17,11 +17,18 @@
* allow changing the name of the base folder used to store save data, suggested by **[Clompress]**
by default it would be the new folder `GSE Saves` (instead of `Goldberg SteamEmu Saves`)
this could be changed only by setting the option `saves_folder_name` inside the local file `steam_settings/configs.user.ini`, the global one will not work
* new switches for the `generate_emu_config` tool
- `-skip_ach`: skip downloading & generating achievements and their images
- `-skip_con`: skip downloading & generating controller configuration files
- `-skip_inv`: skip downloading & generating inventory data (`items.json` & `default_items.json`)
suggested by **[M4RCK5]**
* new tool `migrate_gse` to convert either your global `settings` folder, or your local `steam_settings` folder from the old format to the new one
- run the tool without arguments to let it convert the global settings folder
- run the tool and pass the target `steam_settings` or `settings` folder as an argument to convert the structure of that folder
in both cases, the tool will create a new folder `steam_settings` in the current directory with all the results of the conversion
check its own dedicated readme
* **[breaking]** changed the environment variable `SteamAppPath` to `GseAppPath`, which is used to override the program path detected by the emu
* **[breaking]** removed the setting `disable_account_avatar` in favor of the new one `enable_account_avatar`, this feature is now disabled by default
* new option `add_steam_preowned_ids` in `configs.main.ini` which allows adding a lot of Steam builtin and preowned IDs to the DLC list, and the emu's list of installed apps

View File

@ -540,6 +540,9 @@ def help():
print(" -de: disable some extra features by generating the corresponding config files in steam_settings folder")
print(" -cve: enable some convenient extra features by generating the corresponding config files in steam_settings folder")
print(" -reldir: generate temp files/folders, and expect input files, relative to the current working directory")
print(" -skip_ach: skip downloading & generating achievements and their images")
print(" -skip_con: skip downloading & generating controller configuration files")
print(" -skip_inv: skip downloading & generating inventory data (items.json & default_items.json)")
print("\nAll switches are optional except app id, at least 1 app id must be provided")
print("\nAutomate the login prompt:")
print(" * You can create a file called 'my_login.txt' beside the script, then add your username on the first line")
@ -586,6 +589,9 @@ def main():
CLEANUP_BEFORE_GENERATING = False
ANON_LOGIN = False
RELATIVE_DIR = False
SKIP_ACH = False
SKIP_CONTROLLER = False
SKIP_INVENTORY = False
prompt_for_unavailable = True
@ -621,6 +627,12 @@ def main():
CONVENIENT_EXTRA = True
elif f'{appid}'.lower() == '-reldir':
RELATIVE_DIR = True
elif f'{appid}'.lower() == '-skip_ach':
SKIP_ACH = True
elif f'{appid}'.lower() == '-skip_con':
SKIP_CONTROLLER = True
elif f'{appid}'.lower() == '-skip_inv':
SKIP_INVENTORY = True
else:
print(f'[X] invalid switch: {appid}')
help()
@ -802,6 +814,7 @@ def main():
#print(f"generating achievement stats")
#if "community_visible_stats" in game_info_common: #NOTE: checking this seems to skip stats on a few games so it's commented out
if not SKIP_ACH:
achievements = generate_achievement_stats(client, appid, emu_settings_dir, backup_dir)
if "supported_languages" in game_info_common:
@ -878,7 +891,7 @@ def main():
config_generated = False
if "config" in game_info:
if "steamcontrollerconfigdetails" in game_info["config"]:
if not SKIP_CONTROLLER and "steamcontrollerconfigdetails" in game_info["config"]:
controller_details = game_info["config"]["steamcontrollerconfigdetails"]
print('downloading controller vdf files')
for id in controller_details:
@ -897,7 +910,7 @@ def main():
print(f'controller type is supported')
parse_controller_vdf.generate_controller_config(out_vdf.decode('utf-8'), os.path.join(emu_settings_dir, "controller"))
config_generated = True
if "steamcontrollertouchconfigdetails" in game_info["config"]:
if not SKIP_CONTROLLER and "steamcontrollertouchconfigdetails" in game_info["config"]:
controller_details = game_info["config"]["steamcontrollertouchconfigdetails"]
for id in controller_details:
details = controller_details[id]
@ -968,6 +981,8 @@ def main():
if out_config_app_ini:
write_ini_file(emu_settings_dir, out_config_app_ini)
inventory_data = None
if not SKIP_INVENTORY:
inventory_data = generate_inventory(client, appid)
if inventory_data is not None:
out_inventory = {}

View File

@ -457,6 +457,9 @@ def main():
write_ini_file('steam_settings', out_dict_ini)
print(f'new settings written inside: "{os.path.join(os.path.curdir, "steam_settings")}"')
else:
print('nothing found!', file=sys.stderr)
sys.exit(1)
if __name__ == "__main__":

View File

@ -18,6 +18,8 @@ source "./$venv/bin/activate"
echo building migrate_gse...
pyinstaller "main.py" --distpath "$out_dir" -y --clean --onedir --name "migrate_gse" --noupx --console -i "NONE" --workpath "$build_temp_dir" || exit 1
cp -f "README.md" "$out_dir/migrate_gse"
echo;
echo =============
echo Built inside: "$out_dir/"

View File

@ -36,6 +36,8 @@ pyinstaller "main.py" --distpath "%out_dir%" -y --clean --onedir --name "migrate
)
call "%signer_tool%" "%out_dir%\migrate_gse\migrate_gse.exe"
copy /y README.md "%out_dir%\migrate_gse\"
echo:
echo =============
echo Built inside: "%out_dir%\"