Giter Club home page Giter Club logo

nile's Introduction

Hi ๐Ÿ‘‹

You can contact me through social media links connected to this profile

"Believe you can and you're halfway there." - Theodore Roosevelt

nile's People

Contributors

aquiles23 avatar etaash-mathamsetty avatar gustash avatar imlinguin avatar m3e-g avatar rdbrschf avatar suchipi avatar totalcaesar659 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nile's Issues

Nile not opening a browser tab on auth

It seems like for some reason Nile doesn't want to open the auth url in the browser even though defaults are set and etc so you just get stuck on paste url. I would recommend to also display the url in case of issues like this instead of only saying "a tab will be opened"

Game move functionality

Would be great to have a command which allows installed games to be moved across different locations, with manifests updated accordingly for the Amazon Games Launcher to remain synced to what is installed (no matter location).

This would be similar to the move functionality offered in legendary. But would be particularly helpful, as I've always had problems installing games to network locations via the actual Amazon Games launcher, which tends to complain about 'restricted install locations'.

I tried and fail to run

image

Traceback (most recent call last):
File "/home/manjaro/Desktop/amazon/nile/nile/cli.py", line 12, in
from nile.api import authorization, session, library
File "/home/manjaro/Desktop/amazon/nile/nile/api/authorization.py", line 3, in
from gui import webview
File "/home/manjaro/Desktop/amazon/nile/nile/gui/webview.py", line 4, in
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile, QWebEnginePage
ImportError: /home/manjaro/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5WebEngineCore.so.5: undefined symbol: _ZNSt12out_of_rangeC1EPKc, version Qt_5

qurl error trying to run

all i get is this every time. setup a venv and installed deps

Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/data3/nile/nile/cli.py", line 13, in
from nile.api import authorization, session, library
File "/data3/nile/nile/api/authorization.py", line 3, in
from nile.gui import webview
File "/data3/nile/nile/gui/webview.py", line 2, in
from PyQt5.Qt import QUrl
ImportError: cannot import name 'QUrl' from 'PyQt5.Qt' (/data3/nile/env/lib/python3.10/site-packages/PyQt5/Qt.abi3.so)

FuelPump DRM

Not all games are DRM free. Some require authentication from Amazon Games app to run/login to some online account. This might be a case for online games specifically.

If someone encountered a game that required it please let me know on this issue.

I'll be posting updates related to this feature here.

Doesn't launch on Arch

Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/fulvio/nile/nile/cli.py", line 8, in
from nile.downloading import manager
File "/home/fulvio/nile/nile/downloading/manager.py", line 7, in
from nile.models import manifest, hash_pairs, patch_manifest
File "/home/fulvio/nile/nile/models/manifest.py", line 1, in
from nile.proto import sds_proto2_pb2 as sds
File "/home/fulvio/nile/nile/proto/sds_proto2_pb2.py", line 5, in
from google.protobuf.internal import enum_type_wrapper
ModuleNotFoundError: No module named 'google'

Debian Sid packages

Debian Sid no longer allows installing packages via pip, seems the Debian repo's don't contain the correct crypto package.

14:54:48 โ–ถ sudo apt install python3-pycryptodome python3-requests python3-zstd python3-protobuf

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pycryptodome is already the newest version (3.11.0+dfsg1-4).
python3-requests is already the newest version (2.28.1+dfsg-1).
python3-zstd is already the newest version (1.5.2.5-1+b3).
python3-protobuf is already the newest version (3.21.12-1+b2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

14:55:44 โ–ถ ./bin/nile auth --login

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/tom/builds/nile/nile/cli.py", line 7, in <module>
    from nile.downloading import manager
  File "/home/tom/builds/nile/nile/downloading/manager.py", line 7, in <module>
    from nile.models import manifest, hash_pairs, patch_manifest
  File "/home/tom/builds/nile/nile/models/manifest.py", line 4, in <module>
    from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'

Hello Problem for installation on Pop OS 22.04

Impossible to find the Python-Zstd package
and at the launch of the order ~/nile$ ./bin/nile auth --login
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/benoit/nile/nile/cli.py", line 13, in
from nile.api import authorization, session, library
File "/home/benoit/nile/nile/api/authorization.py", line 3, in
from nile.gui import webview
File "/home/benoit/nile/nile/gui/webview.py", line 4, in
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile, QWebEnginePage
ImportError: /home/benoit/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5WebEngineCore.so.5: undefined symbol: _ZNSt12out_of_rangeC1EPKc, version Qt_5
good luck I can do nothing more I don't know how to code

Not able to install on Linux Mint 21.

Here are the steps I used:

git clone https://github.com/imLinguin/nile
cd nile
pip3 install -r requirements.txt
./bin/nile auth --login

The error I get:

"Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/couper/nile/nile/cli.py", line 13, in
from nile.api import authorization, session, library
File "/home/couper/nile/nile/api/authorization.py", line 3, in
from nile.gui import webview
File "/home/couper/nile/nile/gui/webview.py", line 4, in
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile, QWebEnginePage
ImportError: /home/couper/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5WebEngineCore.so.5: undefined symbol: _ZNSt12out_of_rangeC1EPKc, version Qt_5"

KeyError: 'genres' on "nile library list"

./bin/nile library list
INFO [AUTH_MANAGER]:	Refreshing token
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/deck/nile/nile/cli.py", line 238, in <module>
    sys.exit(main())
  File "/home/deck/nile/nile/cli.py", line 217, in main
    cli.handle_library()
  File "/home/deck/nile/nile/cli.py", line 67, in handle_library
    games_list += f'{"(INSTALLED) " if installed_dict.get(game["id"]) and not self.arguments.installed else ""}{game["product"]["title"]} ID: {game["id"]} GENRES: {game["product"]["productDetail"]["details"]["genres"]}\n'
KeyError: 'genres'

As a workaround I locally removed the {game["product"]["productDetail"]["details"]["genres"]} part.

Running on a native windows machine

I've had some problems getting this to run on a Windows 11 machine with Python installed locally (don't have WSL on my game machine).

I assume running this on Win isn't the intended use case you're going after. But I do see something like this as being handy for my needs, where I want to bulk download all of my AmazonGames to an external drive, such that I can move a particular game over to my primary drive when I'm ready to play it.

Legendary works well for me when it comes to EpicGames. So perhaps you're moving this effort in a similar direction?

UNINSTALL misspelled

UNINSTALL misspelled:

nile uninstall amzn1.adg.product.c42ee7aa-7704-4330-b5b8-79df1317304e
INFO [UNISNTALL]: Game removed successfully

Game doesn't launch on Linux when fuel.json Command contains back-slashes

For games such as Indiana Jones and the Last Crusade, the "Command" part of fuel.json specifies the file path Common\\ScummVM\\scummvm.exe. I haven't tested it on Windows (but would imagine it might work) but obviously on Linux the back-slashes break it.

Here is the full fuel.json:

{
 "SchemaVersion":  "2",
 "PostInstall": [  ],
 "Main": {
   "Command": "Common\\ScummVM\\scummvm.exe",
   "DesktopShortcutIconFile": "Common\\ScummVM\\Indy3.ico",
   "Args": ['-c', 'last-crusade.ini', 'last-crusade']
 }
}

and here is the error thrown by nile:

ERROR:root:Executable file path does not exist or is not accessible by the Flatpak: <path to game>/Indiana Jones/Common\ScummVM\scummvm.exe

SSL: CERTIFICATE_VERIFY_FAILED during install

I attempted to install "Lake" on EndeavourOS (Arch) but hit the error below. I've researched fix actions for python3.12 but I'm coming up short every time. I've had no errors using auth, library list, & library sync.

I'm currently using the latest commit. Thanks!

nile install amzn1.adg.product.9d883273-8960-4ada-a67f-967d2141449c --base-path /media/Games3/heroic

INFO [CLI]: Found: Lake
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 715, in urlopen
File "urllib3/connectionpool.py", line 404, in make_request
File "urllib3/connectionpool.py", line 1058, in validate_conn
File "urllib3/connection.py", line 419, in connect
File "urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
File "urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
File "ssl.py", line 455, in wrap_socket
File "ssl.py", line 1042, in _create
File "ssl.py", line 1320, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "requests/adapters.py", line 486, in send
File "urllib3/connectionpool.py", line 799, in urlopen
File "urllib3/util/retry.py", line 592, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='client.legacy-app.games.a2z.com', port=443): Max retries exceeded withurl: /presigned/manifests/9187d656-4035-42b0-b9f0-5a075ae6993f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240508T073510Z&X-Amz-SignedHeaders=host&X-Amz-Expires=129600&X-Amz-Credential=AKIATBG7JPUZ3XSABLPO%2F20240508%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=ca23082a003cc81d2ff6969186d2fd931a9dc8c04bab81c42b80d8052201a6f4 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "nile/cli.py", line 347, in
File "nile/cli.py", line 328, in main
File "nile/cli.py", line 154, in handle_install
File "nile/downloading/manager.py", line 93, in download
File "nile/downloading/manager.py", line 34, in get_manifest
File "requests/sessions.py", line 602, in get
File "requests/sessions.py", line 589, in request
File "requests/sessions.py", line 703, in send
File "requests/adapters.py", line 517, in send
requests.exceptions.SSLError: HTTPSConnectionPool(host='client.legacy-app.games.a2z.com', port=443): Max retries exceeded with url: /presigned/manifests/9187d656-4035-42b0-b9f0-5a075ae6993f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240508T073510Z&X-Amz-SignedHeaders=host&X-Amz-Expires=129600&X-Amz-Credential=AKIATBG7JPUZ3XSABLPO%2F20240508%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=ca23082a003cc81d2ff6969186d2fd931a9dc8c04bab81c42b80d8052201a6f4 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))
[203305] Failed to execute script 'cli' due to unhandled exception!

Is it possible to get a log file when installing a game with nine?

Is it possible to get the output and generate a log file when installing a game with nine? I've tried many variations to get a log with download information with nine, like:

./nile install "amzn1.adg.product.5d35cae7-39d1-4e53-ba92-36004c4a5211" > ~/log-file.log

or

./nile install "amzn1.adg.product.5d35cae7-39d1-4e53-ba92-36004c4a5211" > ~/log-file.log 2>&1

and

./nile install "amzn1.adg.product.5d35cae7-39d1-4e53-ba92-36004c4a5211" 2>&1 | (pv -n > ~/log-file.log)

I also tried something like:

script -q -c "./nile install "amzn1.adg.product.5d35cae7-39d1-4e53-ba92-36004c4a5211" | (pv -n > ~/log-file.log) 2>&1

As you can see, I've already tried everything and the only things I see in the log file is the following:

INFO [CLI]: Found: Baldur's Gate: Enhanced Edition
INFO [DOWNLOAD]: Generating patches, this might take a second...

Am I doing something wrong or can nile not save its output to a simple log file?

White window when logging in with glibc >=2.35

With glibc 2.35 being released a bunch of chromium programs stopped working, including the Qt web engine.
Setting the QTWEBENGINE_CHROMIUM_FLAGS environment variable to --no-sandbox or --disable-seccomp-filter-sandbox makes it work again

Steam Deck - Failed to load module "canberra-gtk-module"

When attempting to auth on the steam deck the browser opens but I get the following errors.

Paste amazon.com url you got redirected to: Gtk-Message: 10:07:23.051: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:07:23.857: Failed to load module "canberra-gtk-module" 

Can confirm I ran pip3 install -r requirements.txt but didn't see anything referencing this module.

Non-interactive login support

This issue is in relation to the Heroic Games Launcher integration.

Why

Currently, the cli can only login through user interaction.

In theory we could make it work for Heroic, but it would require a lot of work and be finicky. For example, we would need to parse the URL from all the instructions, find a hacky way to stop the tool from opening a separate browser for login, and keep a child process around until login completion.

Proposal

What I propose is a two step solution:

  • Add a --skip-instructions flag that, as the name suggests, skips showing the instructions, prints only the URL to stdout and exits
  • Add an optional --redirect-url argument to auth, so we can send a valid URL whenever available and have Nile then complete the sign-in process

Issues to be addressed

I've already been toying around with these proposals. The only issue right now is that we're storing the code_verifier in the class instance, so we'd need to send whatever data is required to finish login with --skip-instructions.

Discussion

If these proposals sounds, well, sound, my question is on what the output format for --skip-instructions should be. Just newline separated, positional, output? Maybe JSON would be easier to parse? Add support for both through a flag?

I'd like to have a discussion over this before contributing something, to make sure we all agree on implementation details.

No suitable graphics backend found

I installed everything through conda, fixed the "libstdc++" linking problem (see this), and now, when I try to auth --login I get

No suitable graphics backend found

./bin/nile: line 4: 16315 Aborted                 (core dumped) /usr/bin/env python3 -m nile.cli "$@"

Mint 21 Python error

Hey, getting this error:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jay/Downloads/nile/nile/cli.py", line 8, in <module>
    from nile.downloading import manager
  File "/home/jay/Downloads/nile/nile/downloading/manager.py", line 7, in <module>
    from nile.models import manifest, hash_pairs, patch_manifest
  File "/home/jay/Downloads/nile/nile/models/manifest.py", line 4, in <module>
    from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'

I definitely have all the depndicies installed, in particular python3-pycryptodome. Any ideas what to do?

Thanks.

library sync broke nile

I just ran ./nile library sync and now i get this when i try to list the library

nebadon@BIFROST:~/install/nile/bin$ ./nile library list Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/nebadon/install/nile/nile/cli.py", line 247, in <module> sys.exit(main()) File "/home/nebadon/install/nile/nile/cli.py", line 226, in main cli.handle_library() File "/home/nebadon/install/nile/nile/cli.py", line 62, in handle_library games.sort(key=self.sort_by_title) File "/home/nebadon/install/nile/nile/cli.py", line 49, in sort_by_title return element["product"]["title"] KeyError: 'title'

I did a git pull and git reset --hard and git clean and same results.

Missing file sds-proto2.proto in the repo

I found the project uses the protocol buffer compiler library from google for read the manifest binary files. I would like to have a better understanding of that part of the code, however the specs file sds-proto2.proto is not in the repository. Is it possible to add it?

Flatpak package

It would be great to have this available as a Flatpak, similar to Heroic, Steam, Lutris, etc.

JSON error when launching installed game

I'm able to install Amazon Games, but trying to launch it with nile keeps giving me a JSON error

(nile) suollecram@suoldesk:~/dev/nile$ ./bin/nile launch 2f8ca7a1-f0db-4179-bf06-9227f74fcafa
INFO [CLI]:	 Searching for 2f8ca7a1-f0db-4179-bf06-9227f74fcafa
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/suollecram/dev/nile/nile/cli.py", line 238, in <module>
    sys.exit(main())
  File "/home/suollecram/dev/nile/nile/cli.py", line 225, in main
    cli.handle_launch()
  File "/home/suollecram/dev/nile/nile/cli.py", line 184, in handle_launch
    launcher.start(found["path"])
  File "/home/suollecram/dev/nile/nile/utils/launch.py", line 90, in start
    instruction = LaunchInstruction.parse(
  File "/home/suollecram/dev/nile/nile/utils/launch.py", line 22, in parse
    json_data = json.loads(raw_data)
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 9 column 3 (char 181)
(nile) suollecram@suoldesk:~/dev/nile$ 

How do I get games to launch with this app?

How install games?

So, I installed nile and logged successfully, but now I don't know how to use it hahaha.

The install command ask for a id (Probably of the game), where can I get this ID?

Also, if you want help to write a wiki, I can help you (after learning how to use it, ofc)

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.