Class: Factorix::Runtime::MacOS

Inherits:
Base
  • Object
show all
Defined in:
lib/factorix/runtime/mac_os.rb

Overview

macOS runtime environment

This implementation assumes Factorio is installed via Steam. For other installation methods (GOG, itch.io, standalone), users should configure the installation path in the Factorix configuration file.

Instance Method Summary collapse

Methods inherited from Base

#current_log_path, #factorix_cache_dir, #factorix_config_path, inherited, #launch, #lock_path, #mod_dir, #mod_list_path, #mod_settings_path, #player_data_path, #previous_log_path, #running?, #save_dir, #script_output_dir, #xdg_cache_home_dir, #xdg_config_home_dir, #xdg_data_home_dir, #xdg_state_home_dir

Instance Method Details

#data_dirPathname

Get the Factorio data directory path

This directory contains the base game data and built-in expansion MODs.

Returns:

  • (Pathname)

    the Factorio data directory



28
# File 'lib/factorix/runtime/mac_os.rb', line 28

def data_dir = Pathname(Dir.home) + "Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data"

#executable_pathPathname

Get the Factorio executable path

Returns the default Steam installation path on macOS.

Returns:

  • (Pathname)

    the Factorio executable path



16
# File 'lib/factorix/runtime/mac_os.rb', line 16

def executable_path = Pathname(Dir.home) + "Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio"

#factorix_log_pathPathname

Get the Factorix log file path

Returns the path to the Factorix log file using macOS convention.

Returns:

  • (Pathname)

    the Factorix log file path



35
# File 'lib/factorix/runtime/mac_os.rb', line 35

def factorix_log_path = Pathname(Dir.home) + "Library/Logs/factorix/factorix.log"

#user_dirPathname

Get the Factorio user directory path

Returns:

  • (Pathname)

    the Factorio user directory



21
# File 'lib/factorix/runtime/mac_os.rb', line 21

def user_dir = Pathname(Dir.home) + "Library/Application Support/factorio"