pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.92k stars 543 forks source link

Problem setting up in windows. Help #60

Closed deveshk103 closed 2 years ago

deveshk103 commented 2 years ago

Whenever I am trying to make it, it throws me some error. Screenshot 2021-10-18 232653 Please look into the matter.

LachlanMalec commented 2 years ago

possible workaround: using WSL2 and WSLg you can run graphical linux apps on windows, try "wsl --install" to install and setup wsl as well as install ubuntu as the default distro, see https://docs.microsoft.com/en-us/windows/wsl/install

deveshk103 commented 2 years ago

If I need to install a wsl then there's no point making this version. This version is all about running this thing on windows directly and without any linux vm or subsytems.

avidhy-chan commented 2 years ago

I am running the original script (not windows fork) and it works just fine. The steps are below to make it work. Try this once.

Windows install instructions

  1. Install git bash from https://gitforwindows.org/ It has all the depedencies except mpv.
  2. Install scoop by following the instructions in https://scoop.sh/ , the Powershell instructions from the website are listed below.
    Set-ExecutionPolicy RemoteSigned -scope CurrentUser
    iwr -useb get.scoop.sh | iex
    Set-ExecutionPolicy Restricted -scope CurrentUser
  3. After installing scoop, run the below commands in git-bash.
    scoop bucket add extras
    scoop install mpv
  4. Go to ani-cli folder, open git-bash in that location and run the below to start the script.
    ./ani-cli
deveshk103 commented 2 years ago

I beileve it just created some make configs and then cracked the system. image What to do now? It's still not working

kubeden commented 2 years ago

Hey, I believe this is because you don't have a .cache folder under /c/Users/deves/

Try running the following to create the directory:

mkdir /c/Users/deves/.cache

Try running ani-cli again

./ani-cli
deveshk103 commented 2 years ago

Thanks, that worked, but I still have this last issue. I've already install mpv player but it's not loading the screen. I mean it just stops here. image Nothing further happen i.e. video doesn't start and no dialog or application is open.

kubeden commented 2 years ago

Hey @deveshk103! Sorry if I'm a little confused but I get you are on Windows?

In order for me to make it work (on Windows), I had to switch the branch to the Windows one. You do that by executing the command below within the root directory of the project (where ani-cli is located).

git checkout windows-vlc

Then I made it an executable:

chmod +x ani-cli-win

Should be fine when you do ./ani-cli-win in the directory.

Let me know.

RuiNtD commented 2 years ago

I am running the original script (not windows fork) and it works just fine. The steps are below to make it work. Try this once.

That's what I did btw. I installed MPV using Scoop so it's automatically added to path. However, I'm using WSL (which btw is incredibly easy to install and doesn't require a VM 🙂) and had to add .exe to the mpv path at the top. I also added an ani-cli.bat that just runs bash ani-cli %* so I can run the command from Windows. c:

taep96 commented 2 years ago

I am running the original script (not windows fork) and it works just fine. The steps are below to make it work. Try this once.

That's what I did btw. I installed MPV using Scoop so it's automatically added to path. However, I'm using WSL (which btw is incredibly easy to install and doesn't require a VM 🙂) and had to add .exe to the mpv path at the top. I also added an ani-cli.bat that just runs bash ani-cli %* so I can run the command from Windows. c:

@FayneAldan I tried doing that but mpv doesn't start for me when using ani-cli. Works if I try to play a file manually though. Which version of wsl are you using?

RuiNtD commented 2 years ago

I tried doing that but mpv doesn't start for me when using ani-cli. Works if I try to play a file manually though.

MPV still has to be in PATH, which Scoop does automatically, and you have to change mpv to mpv.exe (or mpv.com) at the top of the script so WSL finds and executes mpv.exe from PATH. Alternatively, if you have WSLg you can just install MPV in WSL.

taep96 commented 2 years ago

I tried doing that but mpv doesn't start for me when using ani-cli. Works if I try to play a file manually though.

MPV still has to be in PATH, which Scoop does automatically, and you have to change mpv to mpv.exe (or mpv.com) at the top of the script so WSL finds and executes mpv.exe from PATH. Alternatively, if you have WSLg you can just install MPV in WSL.

@FayneAldan MPV is in PATH and I can execute it in both powershell and wsl. I tried using gwsl from microsoft store(not wslg) but it didn't work, I was getting a black window which turned white when I tried to resize or move it around.

taep96 commented 2 years ago

Can you run wsl --status in powershell and send the output here?

RuiNtD commented 2 years ago

Are you able to open MPV from WSL Bash by typing mpv.exe?

taep96 commented 2 years ago

I noticed that both mpv and mpv.exe worked so I tried removing linux version with sudo apt remove mpv. Seems like ani-cli is still trying to use linux mpv even though I change player to mpv.exe

taep96 commented 2 years ago

ani-cli.zip here is my current version of the script

taep96 commented 2 years ago

If you have wslg it could be launching linux mpv automatically even though you also have .exe in the script. Could you check that please?

deveshk103 commented 2 years ago

Thanks to @asciiden everything worked for me. I am mentioning some steps to get it running in Windows Just install "Scoop" using cmd. (You can find that in google)

In cmd, type

Scoop bucket add extras

In cmd, type

scoop install vlc

Now go to windows branch through github and download it's zip and extract it.

It will ask to install git and 7zip (it's dependencies). Just install everything

Now in cmd, create a folder in current user directory named ".cache" using mkdir function

Now navigate to ani-cli-windows folder and run git bash there.

Now run command

chmod +x ani-cli-windows-vlc

Now just type the command

./ani-cli-windows

It will work for sure .

kubeden commented 2 years ago

@deveshk103 Great stuff! Happy you got it going.

deveshk103 commented 2 years ago

I think someone should update the README for windows.

sudo make

is unnecessary and will create problems.