LukeShortCloud / rootpages

Root Pages is a collection of easy-to-reference tutorials and guides primarily for Linux and other UNIX-like systems.
Other
56 stars 6 forks source link

[graphics][gaming] Manually download Steam bootstrap files #1051

Open LukeShortCloud opened 11 months ago

LukeShortCloud commented 11 months ago

These are required before the Linux steam package will work. These are automatically downloaded when the Steam client is opened. The license for Steam does NOT allow bundling the bootstrap files in an OS (or other software bundle) but they can be part of a first-time setup / downloaded once Internet connection is made.

STEAM_DIST_NAME = 'steam_1.0.0.75.tar.gz'
steam_root = File.join(ENV['HOME'], '.steam')
FileUtils.mkdir_p(steam_root)

Dir.chdir(steam_root) do

  set_up_file('steam/ubuntu12_32') do

    set_up_file(STEAM_DIST_NAME) do
      puts 'Downloading Steam...'
      system("fetch http://repo.steampowered.com/steam/pool/steam/s/steam/#{STEAM_DIST_NAME} || fetch http://repo.steampowered.com/steam/archive/stable/#{STEAM_DIST_NAME}")
    end

    verify_checksum(STEAM_DIST_NAME)

    FileUtils.mkdir_p('steam')

    puts 'Extracting bootstrap...'
    system("tar -xf #{STEAM_DIST_NAME} --strip-components 1 --to-stdout steam-launcher/bootstraplinux_ubuntu12_32.tar.xz | tar -C steam -xf -")
  end

  for symlink, target in {
    'root'    => 'steam',
    'bin32'   => 'steam/ubuntu12_32',
    'bin64'   => 'steam/ubuntu12_64',
    'sdk32'   => 'steam/linux32',
    'sdk64'   => 'steam/linux64',
  }
    if not File.symlink?(symlink)
      puts "Creating symlink #{symlink} -> #{target}"
      FileUtils.ln_s(target, symlink)
    end
  end

https://github.com/shkhln/linuxulator-steam-utils/blob/master/bin/steam-install

LukeShortCloud commented 11 months ago

This is also useful for gamescope-sesssion-steam where it will not work without the bootstrap files.