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
Release npm package #219
Comments
On Windows I just installed git and nodejs, cloned the repository and added a cmd-script which will handle everything else automatically like downloading and/or updating the browser, updating the repository and so on; cd /d "%~dp0"
REM uncomment next line if you want to use browser window login
REM set SHOW=1
@REM if script is called with "log" as argument / parameter,
@REM restart with logging to file f.e. for Windows Task Scheduler
if "%~1" == "log" (
"%~f0" nil > "%~dp0\free-games-claimer.log" 2>&1
exit
)
git reset -q --hard
git pull -q
@REM by default all browsers (chromium, firefox, webkit) are downloaded
@REM disable browser download during npm update/install
set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
cmd /c npm update --silent
@REM by default browsers are downloaded to %LOCALAPPDATA%\pw-browsers
@REM set browser download location to a path inside the free-games-claimer directory
set PLAYWRIGHT_BROWSERS_PATH=%~dp0\pw-browsers
cmd /c npx --quiet playwright install firefox
node epic-games
node unrealengine
node gog
node prime-gaming
@REM cleanup firefox cache
rmdir /s /q "%LOCALAPPDATA%\ms-playwright" "%~dp0\data\screenshots\" "%~dp0\data\browser\cache2" "%~dp0\data\browser\startupCache" "%~dp0\data\browser\storage"
del /f "%~dp0\data\browser\favicons.sqlite" "%~dp0\data\browser\places.sqlite"
if "%~1" == "" pause So if its's double clicked, the repository gets updated and you see the progress inside a command line window, if called by task scheduler with |
Any reason you delete the cache? Just to save space or did it help with something? |
No real reason to delete the cache, The reason to use the cmd version instead of the docker image is to save space. I would even prefer to use the globally installed firefox or the much smaller webkit browser instead of 200megs for an extra firefox, but yeah that's just my paranoid way of using as less space as possible. As your initial issue topic is about an npm package, it means it would have to be JavaScript? I think the cmd-file is quite okay for Windows users to adapt and if someon adds an equivalent sh-file for Linux it would be a quite minimalistic solutions for interested users? |
You can use your global Firefox by setting $ du -hs ~/Library/Caches/ms-playwright/*
281M chromium-XXXXXX
187M firefox-XXXX
180M webkit-XXXX |
To have a lightweight alternative to the Docker image (currently shows captcha),
it would be good to be able to do
npx free-games-claimer
.People than just have to install Node.js/npm instead of Docker.
Notifications would still require
pip install apprise
. Maybe there's some similar npm package one could use.The text was updated successfully, but these errors were encountered: