Class: Factorix::Runtime::Windows
- Defined in:
- lib/factorix/runtime/windows.rb
Overview
Windows runtime environment
This implementation uses Windows environment variables (APPDATA, LOCALAPPDATA) to locate Factorio directories. It 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.
Direct Known Subclasses
Defined Under Namespace
Classes: WindowsPath
Instance Method Summary collapse
-
#data_dir ⇒ Pathname
Get the Factorio data directory path.
-
#executable_path ⇒ Pathname
Get the Factorio executable path.
-
#initialize(path: WindowsPath.new) ⇒ Windows
constructor
Initialize Windows runtime environment.
-
#user_dir ⇒ Pathname
Get the Factorio user directory path.
Methods inherited from Base
#current_log_path, #factorix_cache_dir, #factorix_config_path, #factorix_log_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
Constructor Details
#initialize(path: WindowsPath.new) ⇒ Windows
Initialize Windows runtime environment
15 16 17 18 |
# File 'lib/factorix/runtime/windows.rb', line 15 def initialize(path: WindowsPath.new) super() @path = path end |
Instance Method Details
#data_dir ⇒ Pathname
Get the Factorio data directory path
This directory contains the base game data and built-in expansion MODs.
37 |
# File 'lib/factorix/runtime/windows.rb', line 37 def data_dir = path.program_files_x86.join("Steam/steamapps/common/Factorio/data") |
#executable_path ⇒ Pathname
Get the Factorio executable path
Returns the default Steam installation path on Windows.
25 |
# File 'lib/factorix/runtime/windows.rb', line 25 def executable_path = path.program_files_x86.join("Steam/steamapps/common/Factorio/bin/x64/factorio.exe") |
#user_dir ⇒ Pathname
Get the Factorio user directory path
30 |
# File 'lib/factorix/runtime/windows.rb', line 30 def user_dir = path.app_data.join("Factorio") |