Sha256: a5c55458575eccc1050410e34f7ff1f388d79ed652d7cb140647f0a03ea2ce8c

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

# frozen_string_literal: true
require 'uname'

module GDM
  module Platform
    module_function

    def windows_editor_filename
      "#{::GDM::Workspace::GODOT_WORKSPACE}/#{::GDM::GODOT}.exe"
    end

    def linux_editor_filename
      "#{::GDM::Workspace::GODOT_WORKSPACE}/#{::GDM::GODOT}.o"
    end

    def linux_server_filename
      "#{::GDM::Workspace::GODOT_SERVER_WORKSPACE}/#{::GDM::GODOT}.o"
    end

    def linux_headless_filename
      "#{::GDM::Workspace::GODOT_HEADLESS_WORKSPACE}/#{::GDM::GODOT}.o"
    end

    def windows?
      Gem.win_platform? || Uname.invokeUname('-a').include?('Microsoft')
    end

    def linux?
      !windows? && RUBY_PLATFORM.include?('linux')
    end

    def osx?
      raise 'Must be implemented :)'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gdm-3.2.3 lib/gdm/platform.rb