-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux Support? #35
Comments
Yes, the thing is, the GUI suite I'm using should work properly on Linux as well, and all cases where a Windows-only code is used, already have some extra conditions to avoid throwing an error. This code just never been tested on a Linux - you can try running it there from source, and report back any errors or issues that'd appear. If everything would work, I can think about adding a release packaging flow for Linux as well. |
So I tried it and I have a problem with pywin32 library, which is only available for windows, I tried workarounds but was unsuccessful... |
Traceback please. I know this library won't work on Linux, but all places where it's used, already have a condition in place that makes it work without the library. At least in theory - in practice, I'd need the traceback to see where the issue is. |
@bricep I see, thank you for taking interest! Because the Linux support was never really planned when I was making this application, we can both expect some heavy steps (and hopefully not impassable walls) along the way, hence why I've created a new branch for testing this: https://github.com/DevilXD/TwitchDropsMiner/tree/linux Please give it a try and let me know how far it gets you this time. Also, just a cursory question - are you trying to run this on a headless machine? Because this application comes with a GUI that currently cannot handle headless in any capacity, mostly due to the non-headless Chrome login flow that's required for authentication. |
Eh, I thought this one was protected already. How is it now? |
All required libraries can be installed via It took me a while to figure out how to handle this import, as I only intend to proceed with the loading and disable the functionality wherever needed. Proper care would need to be taken later on when actually handling all of these cases, for now we're trying to get this thing to load at all. Try again please? |
Awesome! The requirements error out at pywin32... pip won't install it. After that, I get this error now when I run main.py: I have confirmed the icon file is present and isn't corrupted. I found this old thread and attempted to use an xbm version but that threw the same error. |
I could split the requirements into windows and linux ones easily, that should solve that. The probable cause is that the ICO file format is windows-specific. I've ran out of time today, but I'll get back to this tomorrow and over the weekend, see what I can do. |
Hi, I managed to launch the program under Linux by modifying the lines that refer to the icon. First of all, I converted the icon to GIF.
It's possible to run in headless mode to dockerize app ? |
This belongs more to #17 rather than here, but the short answer is no, because the miner is currently strictly tied with the GUI framework, which you can't control from headless. And even if I would want to make it headless, then I can't because of the non-headless Chrome backup login flow. If you'd still want to say something about this topic, please do so under #17. Regarding the rest, yeah, the icon format was being the culprit here, and I just had not enough free time to really get to it. I was also wondering which file format I could use for this, that'd support and make sense on both windows and linux. Your It could be just a result of local vars being garbage-collected, and the Even with all of this being "solved", there's still a matter of the functionality that had to be "disabled" to make this thing run on Linux, specifically:
Not sure what to do with these cases. @sanjuant Have you done any additional usage tests (using the gui, logging in and trying to mine) besides launching it? |
The backup Chrome login currently ceased to work due to Kasada (Twitch's anti-bot protection) updating against the undetected_chromedriver. I've opened an issue regarding that here: ultrafunkamsterdam/undetected-chromedriver#897 There's a different, old way of logging in available in the latest master, which I've just merged into the linux branch. Please try using that instead. If the chrome browser would open again, see which login error code you've got, it should be printed out in the output window. |
That's my fault, it was already handled previously (3fdeb73), but I messed up the merge commit (b86dd3c) and it got overwritten by the master branch. I've fixed it yet again now: c80bccd
Pretty sure that one is from one of the icon changes you made. I just pushed out the icon change of my own, see if it works for you with no further changes required or not please. Additional changes included gating "Load points" won't do anything if there's no channels on the channel list. On the inventory tab, to see all campaigns, you have to check all filters, uncheck "Linked only", and only then press the "Refresh" button. To mine a campaign, ensure it's state is "Active" and it shows your account is "Linked" - if it's not, click on the "Not linked" text to proceed to linking. Links can also be handled from the campaigns page: https://www.twitch.tv/drops/campaigns With a linked campaign, ensure it's on the Priority list, or uncheck the "Priority only" option, then hit "Reload" to see if everything works. I haven't considered the Chinese characters not being visible on some systems. I might change the language names to be strictly English names (Chinese, German, Chech) to avoid this. |
This error occurs before I have changed anything on my end. With new version, icon work.
If in channel you only see the current campaigns then everything is ok :) I thought I would see the channels I follow that are online there. The only error I could see is the characters that are not displayed. |
Glad it works =) Can replace the Chinese characters, but there's no good replacement for emojis. In the last pic, I could theoretically just use a capital I think it's safe to merge the linux branch into the master branch now. |
Can someone write a condensed "how-to" and add it to the wiki? I'm trying to follow along in this issue's comments but it'd be much easier if we had a page that directly explained how to run it. |
@dethmourne I just did so today though, here's a link: https://github.com/DevilXD/TwitchDropsMiner/wiki/Setting-up-the-environment,-building-and-running It's as condensed as it can get, really couldn't make it simpler. Can't auto-install Python and Git with proper configuration, but at least once you do so, it's all just a matter of running some batch scripts that do all the thinking and calls for you. The only thing that's still missing is maintenance section AKA what to do when a new version of source code becomes available, but I'll add it soon / at some point in the future. That's for running this project from the Github's master branch, which always has the latest changes implemented. Normally, the newest stable version is available in releases: https://github.com/DevilXD/TwitchDropsMiner/releases, although the current |
@DevilXD To the best of my knowledge you can't run .bat files in linux, though. |
Okay, apparently I was wrong on that front. I do get output from the build.bat but it says: ./build.bat: line 1: @echo: command not found |
I was able to get it running by just running |
Right. Sorry, I'm not a linux user >.> I should make a set of In terms of installation, what you did was install all required libraries and run it from your global Python installation. This is barely okay for a new Python installation, and only gets worse from there. If you'd ever consider using another project and install it's libraries too, PyInstaller would bundle them when building an executable for this project. I've ran into this at There's no good way for you to undo it for your global installation, but you can still go through the venv process to separate the libraries. A venv is like a separate space for libraries to be installed into, with it's own separate
Instead of the venv activation step, you can use |
Hi @DevilXD , This is command i have typed to execute on WSL2 pip install --user virtualenv
git pull
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
python3 main.py I don't think pythonw works on Linux. But I may be wrong. |
@sanjuant You don't need to All you need to do is run |
Been using https://github.com/Zaarrg/TTVDropBot for some time now, but it has fallen into disarray. A lightweight docker image release (dependent on #17 and linux support) would instantly take its place on my server. I'll be messing around with it for fun in the meantime |
@Juice805 The headless mode is still on the table, but not the docker image - you'd have to create that one yourself. Also please note that this project is more or less a personal miner rather than something you're supposed to run 24/7 on some kind of server. I'm still wondering how I could tackle the headless mode, as all effort put into the project since |
Linux support is now a part of |
Hey, would it be possible to make Linux support as it's a python file? Thanks
The text was updated successfully, but these errors were encountered: