Code Monkey home page Code Monkey logo

Comments (19)

flavioislima avatar flavioislima commented on May 17, 2024 1

I wonder, is it necessary to do this in a terminal emulator at all? I imagine it'd be nicer to just paste the SID into the application directly.

That's true.

Most of the things we have now are part of this first MVP I did, there is a lot of things that need to be improved.

For some things, I'm limited on how NodeJS handle execution on external programs, like Legendary. Node does not support getting the output of the execution in real-time, I can only get the result of the call. Because Javascript is Single-threaded. So I searched everywhere and discovered that this is a feature request not implemented yet.

So that's why I will never be able to show the output of the installation process, the terminal will need to be used in that case.

For the login, it is possible to call legendary auth, without the xterm, and open a dialog to put the SID, and then call legendary auth --sid ${sid}.

I'll make this change on the next release. But after that I'll start working on personalizing the WINEPREFIX and Wine version to launch games, I think this will be the most important one.

My wife is working on the Logo and on the design. So I'll make some visual improvements soon as well.

from heroicgameslauncher.

flavioislima avatar flavioislima commented on May 17, 2024 1

Yeah, that would be ideal.
There are some people asking about an API and they have already one that works with Python but they said that do not will implement it for other languages: derrod/legendary#129

It is possible to call Python functions from Node.js via e.g. zerorpc though it would require you to create some sort of bindings manually I think.

So I don't know, I think I'll need to deal with those limitations or implement an API in Javascript but I was looking for it on the EGS website and I could not find anything related to how to use theirs to implement mine.

Pretty sure it's all reverse-engineered.

Nice, I'll take a look.

For now, I'll replace Xterm with a shell inside the app using this: https://shelljs.io/examples.
looks good but I never used it before.

from heroicgameslauncher.

yuyutsupoudel avatar yuyutsupoudel commented on May 17, 2024

Yea. Just a black screen is not helpful at all. Having error message would be really nice.

from heroicgameslauncher.

SergeyLatyshev avatar SergeyLatyshev commented on May 17, 2024

Yea. Just a black screen is not helpful at all. Having error message would be really nice.

You can see one when you launch it in your terminal.
Anyway, I think that specifying a terminal should be added to the HGL config.

from heroicgameslauncher.

KaffeinatedKat avatar KaffeinatedKat commented on May 17, 2024

You can see one when you launch it in your terminal.

Yea but to the average user there gunna open it and the window will just be blank and they wont think to launch it via the terminal and think its just broke

from heroicgameslauncher.

flavioislima avatar flavioislima commented on May 17, 2024

Hey guys! Thanks for testing this!
I'm trying to figure out a way of getting the default terminal but it seems there is none right now.
I'll add a check for xterm and if there is no xterm I'll check for the most common ones like Konsole, gnome-terminal, and rxvt.
I thought would be possible to get from $TERMINAL or $TERM but at least on my distro, this returns nothing.

from heroicgameslauncher.

SergeyLatyshev avatar SergeyLatyshev commented on May 17, 2024

I'll add a check for xterm and if there is no xterm I'll check for the most common ones like Konsole, gnome-terminal, and rxvt.

Don't forget about lxterminal and xfce4-terminal.

from heroicgameslauncher.

flavioislima avatar flavioislima commented on May 17, 2024

I'll add a check for xterm and if there is no xterm I'll check for the most common ones like Konsole, gnome-terminal, and rxvt.

Don't forget about lxterminal and xfce4-terminal.

That's why would be nice to have a ENV variable with the default terminal on all distros.
I'll try to put an embedded terminal on the app, that would be easier.

from heroicgameslauncher.

KaffeinatedKat avatar KaffeinatedKat commented on May 17, 2024

You can just replace xterm in the code with x-terminal-emulator, x-terminal-emulator opens in the system default terminal

from heroicgameslauncher.

flavioislima avatar flavioislima commented on May 17, 2024

You can just replace xterm in the code with x-terminal-emulator, x-terminal-emulator opens in the system default terminal

I saw some people saying this but on Manjaro it just says that not exists so I don't think this will work on all distros :(

from heroicgameslauncher.

KaffeinatedKat avatar KaffeinatedKat commented on May 17, 2024

A stack exchange post says you can run update-alternatives --config x-terminal-emulator and then it should work so you can try that. and if that does make it work you can configure heroic to run that the first time you open it

from heroicgameslauncher.

Newbytee avatar Newbytee commented on May 17, 2024

I wonder, is it necessary to do this in a terminal emulator at all? I imagine it'd be nicer to just paste the SID into the application directly.

from heroicgameslauncher.

SergeyLatyshev avatar SergeyLatyshev commented on May 17, 2024

x-terminal-emulator opens in the system default terminal

AFAIK, it's for Debian/Ubuntu only.

from heroicgameslauncher.

Newbytee avatar Newbytee commented on May 17, 2024

x-terminal-emulator opens in the system default terminal

AFAIK, it's for Debian/Ubuntu only.

Seems to be available on Fedora as well.

from heroicgameslauncher.

SergeyLatyshev avatar SergeyLatyshev commented on May 17, 2024

Seems to be available on Fedora as well.

But not on Arch or Manjaro.

from heroicgameslauncher.

Newbytee avatar Newbytee commented on May 17, 2024

I wonder, is it necessary to do this in a terminal emulator at all? I imagine it'd be nicer to just paste the SID into the application directly.

For some things, I'm limited on how NodeJS handle execution on external programs, like Legendary. Node does not support getting the output of the execution in real-time, I can only get the result of the call. Because Javascript is Single-threaded. So I searched everywhere and discovered that this is a feature request not implemented yet.

So that's why I will never be able to show the output of the installation process, the terminal will need to be used in that case.

I'm thinking a possible way of handling this better would be to team up with the Legendary developer and let Legendary expose a programmer-friendly API that can be used instead of shell commands. Granted, this would require a fair bit of work and I imagine there are more pressing issues at the moment.

from heroicgameslauncher.

flavioislima avatar flavioislima commented on May 17, 2024

I wonder, is it necessary to do this in a terminal emulator at all? I imagine it'd be nicer to just paste the SID into the application directly.

For some things, I'm limited on how NodeJS handle execution on external programs, like Legendary. Node does not support getting the output of the execution in real-time, I can only get the result of the call. Because Javascript is Single-threaded. So I searched everywhere and discovered that this is a feature request not implemented yet.
So that's why I will never be able to show the output of the installation process, the terminal will need to be used in that case.

I'm thinking a possible way of handling this better would be to team up with the Legendary developer and let Legendary expose a programmer-friendly API that can be used instead of shell commands. Granted, this would require a fair bit of work and I imagine there are more pressing issues at the moment.

Yeah, that would be ideal.
There are some people asking about an API and they have already one that works with Python but they said that do not will implement it for other languages: derrod/legendary#129

So I don't know, I think I'll need to deal with those limitations or implement an API in Javascript but I was looking for it on the EGS website and I could not find anything related to how to use theirs to implement mine.

from heroicgameslauncher.

Newbytee avatar Newbytee commented on May 17, 2024

Yeah, that would be ideal.
There are some people asking about an API and they have already one that works with Python but they said that do not will implement it for other languages: derrod/legendary#129

It is possible to call Python functions from Node.js via e.g. zerorpc though it would require you to create some sort of bindings manually I think.

So I don't know, I think I'll need to deal with those limitations or implement an API in Javascript but I was looking for it on the EGS website and I could not find anything related to how to use theirs to implement mine.

Pretty sure it's all reverse-engineered.

from heroicgameslauncher.

flavioislima avatar flavioislima commented on May 17, 2024

So, as version 0.4.0 changed the Login Flow, I'll close this Issue. Thanks!

from heroicgameslauncher.

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.