Skip to content

Contributors Guide

the Sane. edited this page Sep 9, 2024 · 1 revision

Contributors' Guide

This document seeks to provide a high level overview of the Helper's functions

Setup

Note

The setup portion of the script performs dependency checks, initializes variables, and sets configuration options for the rest of the script

Helper abstractions

Note

These functions aim to provide easy access to actions frequently used by the Helper

Privilege escalation

  • try_exec()

Messaging and menu building

  • debug_print()
  • message()
  • menu()
  • menu_loop_done()

Fetch and set directories used by the Helper and Star Citizen

  • getdirs()

Preflight Check Functions

Note

The preflight check is managed by one main function. It calls several auxiliary functions to perform its various actions

Main preflight check function

  • preflight_check()

Auxiliary preflight check functions

  • lutris_check()
  • lutris_detect()
  • wine_check()
  • winetricks_check()
  • winetricks_update()
  • memory_check()
  • avx_check()
  • mapcount_check()
  • mapcount_set()
  • mapcount_once()
  • mapcount_confirm()
  • filelimit_check()
  • filelimit_set()
  • filelimit_confirm()

Download functions

Note

Downloads are managed by one main function and a secondary function for each download type. It calls several auxiliary functions to perform its various actions

Main download managers

  • download_manage()
  • runner_manage()
  • dxvk_manage()

Auxiliary download functions

  • download_select_install()
  • download_install()
  • download_select_delete()
  • download_delete()
  • post_download()
  • get_lutris_dirs()
  • lutris_restart()
  • download_file()

Maintenance menu functions

Note

The maintenance menu is managed by one main function. It calls several auxiliary functions to perform its various actions

Main maintenance menu

  • maintenance_menu()

Auxiliary maintenance functions

  • set_version()
  • switch_prefix()
  • rm_userdir()
  • rm_shaders()
  • rm_dxvkcache()
  • display_dirs()
  • display_wiki()
  • reset_helper()

Install functions

Note

These functions handle game installation

  • install_game_lutris()
  • install_game_wine()
  • install_powershell()

Helper helper functions

Note

Most of these functions perform actions needed by the Helper

  • format_urls()
  • get_latest_release()
  • referral_randomizer()
  • quit()

Main

Note

The main logic of the script begins after all the functions are declared