love.system.getOS() - More detailed information about the OS.

Issue #845 wontfix
Antonio Moder
created an issue

It would be nice if, instead of obtaining a general OS name (OS X, Windows, or Linux), to obtain accurate information about the operating system (for example: Windows 7 Home Premium, Ubuntu 12.04.3, OS 10.6).

To gather information about the system players via the Internet (send to email with Luasocket SMTP). To find out what OS support.

Comments (13)

  1. Alex Szpakowski

    I was looking into this a little while ago - Linux in particular is a little tricky because apparently there's no real standard for getting the distro name that all distributions adhere to.

    I would also want to make sure the performance of getOS isn't significantly affected by something like this.

  2. Antonio Moder reporter

    Bart van Strien: "What would you use this for?"

    My answer:

    If player have bug on his PC, then game will automatically send bug-report to developer with detailed information about player's OS. This is useful for developers and players.

  3. Landon Manning

    @Bart van Strien A particular use case I've employed for checking the OS is for sending OS commands to open a URL is the user's default browser. All the OSs have unique commands so you need a switch to determine which to execute.

    if love._os == "Windows" then os.execute("start http://love2d.org") end
    if love._os == "OS X" then os.execute("open http://love2d.org") end
    if love._os == "Linux" then os.execute("xdg-open http://love2d.org") end
    
  4. Alex Szpakowski

    But love.system.getOS already exists and I don't think the ways for opening a browser are different in between versions of each OS, just between the major operating systems.

    (this issue is about adding additional more detailed information to getOS, i.e. Windows XP vs. Windows 7.)

  5. Landon Manning

    Oh, I'm not suggesting I agree or disagree with the expansion of getOS(), I am just commenting that knowing which OS the user is using can be very useful in some cases. If a game were to use a launcher and display some info, being able to click through to the game's website would be super useful.

  6. Bart van Strien

    Wontfix until there is a concrete proposal about what to expose, why it needs to be exposed and how to obtain the information. Bonus points if you can tell us why love would need to support it itself.

  7. Log in to comment