How ifbars/s1-loader works
Project Type & Purpose
• This is a small, standalone CLI tool (a Windows batch script) whose sole responsibility is to manage dual “Schedule I” installs (IL2CPP vs Mono) under Steam.
• It uses directory junctions (mklink /J) and Steam manifest file swapping to switch branches atomically, preserving Steam’s update and cloud features.
File-Structure Analysis
• Top level:
• s1-loader.bat – the entire tool (batch script)
• README.md, LICENSE, .gitignore – ancillary documentation/config
• No frontend/backend split, no libraries—just one script interacting with:
• Windows OS (file system, junctions)
• Steam (game folder + manifest files)
• Developer workflows (MSBuild/Visual Studio integration points)
Key Components
a. s1-loader.bat (Core Processor)
• Initial-setup wizard
• Branch-switch logic (junction creation/removal, manifest backup/restore)
• Error handling & recovery
b. Windows OS / File System
• Underlying NTFS junction support
• Directory operations (create, delete, copy)
c. Steam
• Steam Library root
• Active manifest appmanifest_<ID>.acf
• Backup manifests (_public, _alternate)
d. Branch Folders
• Schedule I_public (IL2CPP files)
• Schedule I_alternate (Mono files)
• Junction link Schedule I pointing to the “active” folder
e. Developer Integration (Optional)
• MSBuild property groups
• Visual Studio build configurations
• Post-build copy to the appropriate Mods folder
Relationships & Data Flow
• User invokes the batch script → the script reads/writes directories and manifest files
• The script uses mklink /J to repoint Schedule I to either the IL2CPP or Mono branch folder
• It atomically swaps Steam’s appmanifest_*.acf to keep Steam continuously aware of the “active” branch
• Optionally, after compilation, mods are auto-deployed to the branch folder (via MSBuild hooks)
Architectural Patterns & Principles
• Single-responsibility: one script, one job
• Transactional/swappable components: atomic manifest swaps and junction changes
• Extensibility points: hooks for dev workflows (conditional MSBuild tasks)