Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shakeyourbunny/33e228844bd04e5ca6ce750cc287c24d to your computer and use it in GitHub Desktop.
Save shakeyourbunny/33e228844bd04e5ca6ce750cc287c24d to your computer and use it in GitHub Desktop.
Building and compiling lgogdownloader on CentOS 7
Running and Compiling lgogdownloader on CentOS 7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Requirements:
- CentOS 7 (at least bare-bones, minimal install), download it at https://www.centos.org/download/
- working internet connection
- access to the lgogdownloader git repository
- access to the CentOS, EPEL and City-Fan.org repositories
- you have some basic linux knowledge what the commands generally do, otherwise look them up before executing them
If you see here '#' as the first character on a line, enter the commands in as root, '$' means that you should do it
with normal user account.
( user root: install missing software )
You need the city-fan.org repository for curl, system distribution version is way too old, alternative is compiling
and installation (lib)curl for yourself.
# yum install wget yum-utils epel-release
# rpm -Uvh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm
# yum-config-manager --enable city-fan.org
# yum install git cmake3 gcc gcc-c++ boost boost-devel libcurl-devel liboauth jsoncpp-devel rhash-devel help2man tinyxml2-devel
# yum check-update && yum update
Not strictly necessary, but to activate kernel updates.
# reboot
( switch to your local unprivileged user account! )
$ mkdir -p "$HOME/sources" && cd "$HOME/sources"
In earlier revisions of CentOS 7 you would to have to compile jsoncpp, rhash, oauth and htmlcxx for yourself. The only
dependency you have to compile for yourself is htmlcxx, which has its problems in being recognized by the system after
installing it.
If you come from an internet search here, these are the generic building and compiling instructions for htmlcxx on CentOS 7,
this is not specific to lgogdownloader itself.
( local user: compile HTMLCXX from source )
$ cd "$HOME/sources"
$ wget https://kent.dl.sourceforge.net/project/htmlcxx/htmlcxx/0.86/htmlcxx-0.86.tar.gz
$ tar zxf htmlcxx-0.86.tar.gz && cd htmlcxx-0.86 && ./configure
$ vi +54 html/tree.h ( add '#include "<cstddef>"' without quotes at line 54, if it's not present )
$ make
$ su -c "make install"
$ su -c "echo /usr/local/lib > /etc/ld.so.conf.d/usrlocal.conf"
$ su -c "echo /usr/local/lib64 >> /etc/ld.so.conf.d/usrlocal.conf"
$ su -c "ldconfig"
$ su -c "ln -s /usr/local/lib/pkgconfig/htmlcxx.pc /usr/lib64/pkgconfig/htmlcxx.pc"
These building instructions are derived and adapted from the generic ones on the README.md from
lgogdownloader itself, with a slight variation (see below).
( local user: compile lgogdownloader )
$ [ -d "$HOME/sources/lgogdownloader" ] && rm -f "$HOME/sources/lgogdownloader"
$ cd "$HOME/sources"
$ git clone https://github.com/Sude-/lgogdownloader.git
$ cd "$HOME/sources/lgogdownloader"
$ [ -d build ] && rm -f build && mkdir build && cd build
$ cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release
Note that the '3' of 'cmake3' is important on CentOS, otherwise you are using cmake 2.x. Do not forget to set the
destination path to /usr/local, NOT /usr. If something goes wrong or forgot something just delete the build directory,
enter it and re-issue the last command until there is no error.
Start compiling with
$ make
and install it to /usr/local
$ su -c "make install"
Voila, now you have your brand new lgogdownloader.
Enjoy!
@tgc
Copy link

tgc commented Sep 27, 2018

Instead of building htmlcxx from source you might consider using the rpm package from here:
https://jupiterrise.com/jrpms/el7/x86_64/repoview/index.html

I just updated the package to 0.86 after coming across your guide. The package is basically just a trivial rebuild of the Fedora 28 package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment