refactor(launcher): Major re-work of launcher

Kudos to Shiz for providing the groundwork for this.

Fundamentally re-think how launcher operates and
bootstrapping the games is managed and configured.

This brings it significantly closer to how the original
bootstrap is doing the job: launcher now utilizes the
data (structures) provided by the bootstrap.xml configuration
file. This creates compatibility with vanilla data dumps
and original stock images. Note that bemanitools does not
include any code or means to run DRM'd data, only decrypted.

But, this allows users to keep decrypted dumps as stock as
possible which means:

* No copying around of property files anymore
* Keep the modules/ folder with the binaries
* Have bemanitools binaries separate in the data
* No need to edit/customize the original configuration files

A list of key features of the "new" launcher:

* Boostrap games by following the configuration provided by
  stock game's bootstrap.xml files
* Custom launcher.xml configuration file that adds further
  launcher configurable features, composability of
  bootstrap.xml configuration(s) as well as configuration
  overriding/stacking of selected types of configurations,
  e.g. eamuse config, avs-config. The latter eliminates
  the need for modifying stock config files in the prop/
  folder
* Unified logging system: launcher and AVS logging uses
  the same logger, all output can now be in a single file
* Original features such as various hook types still
  available

Due to the significant architectural changes, this also
breaks with any backwards compatibility to existing
launcher setups. Thus, users need to migrate by re-applying
the new configuration format and migrating their config
parameters accordingly.

Further migration instructions and updated documentation
will be provided upon release.

Co-authored-by: Shiz <hi@shiz.me>
This commit is contained in:
icex2
2024-08-14 17:53:51 +02:00
co-authored by Shiz
parent 947050d0c8
commit 35ca49fe7e
37 changed files with 4917 additions and 943 deletions
+44 -16
View File
@@ -4,25 +4,53 @@
#include <stdbool.h>
#include <stddef.h>
#include "core/log-bt.h"
#include "core/log.h"
#include "launcher/bootstrap-config.h"
#include "util/array.h"
// Launcher options (cmd params) are limited to:
// - Options to run a (vanilla) game without additional launcher features, e.g.
// hooking
// - Options that are handy to have for development/debugging purpose, e.g.
// quickly switching on/off
// logging levels
//
// Everything else is driven by a composable configuration file (launcher.xml)
struct options {
size_t std_heap_size;
size_t avs_heap_size;
const char *app_config_path;
const char *avs_config_path;
const char *ea3_config_path;
const char *softid;
const char *pcbid;
const char *module;
const char *logfile;
struct array hook_dlls;
struct array before_hook_dlls;
struct array iat_hook_dlls;
bool remote_debugger;
const char *override_service;
bool override_urlslash_enabled;
bool override_urlslash_value;
struct options_launcher {
const char *config_path;
} launcher;
struct options_bootstrap {
const char *config_path;
const char *selector;
} bootstrap;
struct options_log {
enum core_log_bt_log_level *level;
const char *file_path;
} log;
struct options_eamuse {
const char *softid;
const char *pcbid;
const char *service_url;
bool *urlslash;
} eamuse;
struct options_hook {
struct array hook_dlls;
struct array before_hook_dlls;
struct array iat_hook_dlls;
} hook;
struct options_debug {
bool remote_debugger;
bool log_property_configs;
} debug;
};
void options_init(struct options *options);