Code Monkey home page Code Monkey logo

Comments (8)

strycore avatar strycore commented on May 21, 2024

yes, that's a though one. The installer opened from the web is another instance that the already running client. The installer would need to notify other instances of the new game with, for example, DBus. And I know nothing about DBus :/

from lutris.

Letiliel avatar Letiliel commented on May 21, 2024

And if you allow only one instance ?

from lutris.

strycore avatar strycore commented on May 21, 2024

No. Not going to happen any time soon.

from lutris.

strycore avatar strycore commented on May 21, 2024

I mean, it will eventually happen, but when it will, the DBus communication mechanism will be implemented, because I see it as a requirement in order to limit to one instance of the client

from lutris.

Letiliel avatar Letiliel commented on May 21, 2024

Some info and code snippets for what you want to do :
http://lethalman.blogspot.fr/2008/11/single-app-instances-python-and-dbus.html

Otherwise, maybe we could do it the stupid way : create a file when running Lutris, if another instance is launched it checks if the file exists, writes its arguments in it and closes. The first instance then reads the file and treats the args. Like so :

if File exists: 
    write args into File
    end process
else
    create empty File

on_check_File_size_frequently {
    if File.size > 0
        process args
    else
        return
}

on_exit {
    remove File
}

from lutris.

strycore avatar strycore commented on May 21, 2024

Thanks for the link! Tried out the demo, works flawlessly. I originally thought that you had to register a DBus service as root, but it's not the case here.
Makes me want to have a deeper look into Dbus, we may have this for Lutris 0.3.5 ;)

from lutris.

TingPing avatar TingPing commented on May 21, 2024

(Note that Gtk has this built in via GtkApplication as used in my PR)

from lutris.

Letiliel avatar Letiliel commented on May 21, 2024

Argh.
Well, Google, you did a bad job this time.

I'll let @strycore see what he wants to do with that. (Ehh, I suppose the advantage of not using GtkApplication is that it simplifies porting to another toolkit.)

from lutris.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.