Note: this is Looooong because I can't use any markup to create code boxes. And I can't attach a zip file :(
Sorry
OK, here's the updates for my script and how I'm set up:
Physical: Running Linux: OpenMandriva, MX, Mint, Manjaro (I multiboot, Mint was primary, but then wanted to play with KDE - OM won the die roll)
4x mech drives all formatted with XFS and set up using
mergerfs (think fake raid - other options would be using an actual raid setup or btrfs - if new to linux ignore this part) mounted to "/mnt/hdd"
Main Directory: /mnt/hdd/GogRepo
Sub Directories: Extras, Linux, Mac, Windows
/mnt/hdd/GogRepo/
-----------------Extras
-----------------Linux
-----------------Mac
-----------------Windows
Scripts (mine and gogrepo.py) go in the Main Directory
I'm just going to include the login, extras and linux download scripts as examples. After these scripts I'll just include the variables at the top that changed.
They're not the prettiest, but they work.
All of these run from the terminal, not the gui. So for Linux Mint, when you open the terminal (be sure to right-click to enable the menu bar) you can actually open up 5 tabs all in the main (GogRepo) directory.
Remember to have the scripts all marked as executable.
Then in tab 1: ./goglogin.sh When that is done (check the log if needed)
Tab 2: ./gogextras.sh
Tab 3: ./gogtux.sh
Tab 4: ./gogmac.sh
Tab 5: ./gogwin.sh
I give each script about a minute to get started before I switch tabs and start the next one. Run until done.
You could us a tool like Kitty terminal or tmux to "window pane" your terminal rather than tabs. Just be sure to leave it open while it's downloading.
''''
Script 1: goglogin.sh
#!/bin/sh
# Get the GOG login token
# -e Exit immediately if a command exits with a non-zero status.
set -e
# User Logins
# ==========================================
GOGemail="xxx@xxx.com"
GOGpw="CoolPasswordHere"
# ------------------------------------------
# Program Variables
# ==========================================
GOGREPOC="python3 $PWD/gogrepoc.py"
LOGREPO="gogrepo.log"
LOGINLOG="loginresults.log"
# ------------------------------------------
# Delete existing log files
# ==========================================
if [ -f "$LOGREPO" ]
then
rm $LOGREPO
fi
# ------------------------------------------
# Login and get tokens
# ==========================================
$GOGREPOC login $GOGemail $GOGpw
if [ -f "$LOGREPO" ]
then
mv $LOGREPO $LOGINLOG
fi
# ------------------------------------------
# Finish up
# ==========================================
cd ..
echo "Done: GOG Login\n"
# ------------------------------------------
''''
````
Script 2: gogextra.sh
#!/bin/sh
# -e Exit immediately if a command exits with a non-zero status.
set -e
# python3 gogrepoc.py update -installers both -full -os mac linux windows -lang en bl ru gk sb ar br jp ko fr cn cz hu pt tr sk nl ro es pl it de da sv fi no
# python3 gogrepoc.py update -installers both -full -os mac linux windows -lang en
# 2023-05-29
# Add -covers and -backgrounds parameters to download command , they download cover images and background images (respectively) for each game to be downloaded.
GOGREPOC="python3 $PWD/gogrepoc.py"
PLATFORM="linux windows mac"
LANGUAGE="en bl ru gk sb ar br jp ko fr cn cz hu pt tr sk nl ro es pl it de da sv fi no"
LIBDIR="$PWD/Extras"
LOGREPO="gogrepo.log"
UPDATELOG="zUpdate.log"
DOWNLOADLOG="zDownload.log"
VERIFYLOG="zVerify.log"
cp gog-token.dat $LIBDIR
cd $LIBDIR
# Delete existing log files
# ==========================================
if [ -f "$LOGREPO" ]
then
rm $LOGREPO
fi
if [ -f "$UPDATELOG" ]
then
rm $UPDATELOG
fi
if [ -f "$DOWNLOADLOG" ]
then
rm $DOWNLOADLOG
fi
if [ -f "$VERIFYLOG" ]
then
rm $VERIFYLOG
fi
# ==========================================
# Update manifest database
# ==========================================
$GOGREPOC update -full -lang $LANGUAGE
if [ -f "$LOGREPO" ]
then
mv $LOGREPO $UPDATELOG
fi
# ==========================================
# Download files
# ==========================================
$GOGREPOC download -os $PLATFORM -skipgames -covers -backgrounds
if [ -f "$LOGREPO" ]
then
mv $LOGREPO $DOWNLOADLOG
fi
# ==========================================
# Verfy files
# ==========================================
$GOGREPOC verify -os $PLATFORM -skipgames
if [ -f "$LOGREPO" ]
then
mv $LOGREPO $VERIFYLOG
fi
# Finish up
# ==========================================
cd ..
echo "Done: Game Extras Downloads\n"
````
````
Script 3: gogtux.sh
#!/bin/sh
# -e Exit immediately if a command exits with a non-zero status.
set -e
# python3 gogrepoc.py update -installers both -full -os mac linux windows -lang en bl ru gk sb ar br jp ko fr cn cz hu pt tr sk nl ro es pl it de da sv fi no
# python3 gogrepoc.py update -installers both -full -os mac linux windows -lang en
GOGREPOC="python3 $PWD/gogrepoc.py"
PLATFORM="linux"
LANGUAGE="en"
LIBDIR="$PWD/Linux"
LOGREPO="gogrepo.log"
UPDATELOG="zUpdate.log"
DOWNLOADLOG="zDownload.log"
VERIFYLOG="zVerify.log"
cp gog-token.dat $LIBDIR/
cd $LIBDIR
# Delete existing log files
# ==========================================
if [ -f "$LOGREPO" ]
then
rm $LOGREPO
fi
if [ -f "$UPDATELOG" ]
then
rm $UPDATELOG
fi
if [ -f "$DOWNLOADLOG" ]
then
rm $DOWNLOADLOG
fi
if [ -f "$VERIFYLOG" ]
then
rm $VERIFYLOG
fi
# ==========================================
# Update manifest database
# ==========================================
$GOGREPOC update -full -os $PLATFORM -lang $LANGUAGE
if [ -f "$LOGREPO" ]
then
mv $LOGREPO $UPDATELOG
fi
# ==========================================
# Download files
# ==========================================
$GOGREPOC download -os $PLATFORM -skipextras
if [ -f "$LOGREPO" ]
then
mv $LOGREPO $DOWNLOADLOG
fi
# ==========================================
# Verfy files
# ==========================================
$GOGREPOC verify -os $PLATFORM -skipextras
if [ -f "$LOGREPO" ]
then
mv $LOGREPO $VERIFYLOG
fi
# Finish up
# ==========================================
cd ..
echo "Done: Linux Downloads\n"
````
For the Mac script:
GOGREPOC="python3 $PWD/gogrepoc.py"
PLATFORM="mac"
LANGUAGE="en"
LIBDIR="$PWD/Mac"
For the windows script
GOGREPOC="python3 $PWD/gogrepoc.py"
PLATFORM="windows"
LANGUAGE="en"
LIBDIR="$PWD/Windows"
Dawnsinger: Is there a way to copy over the authentication tokens from a browser like it can be done with lgogdownloader? A plain copy isn't working, from the code the token layout is different, but maybe I'm missing an option?
In theory yes. I've never been able to. But in my scripts I just copy it over:
cp gog-token.dat $LIBDIR/
cd $LIBDIR