It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hi there,
I had the idea to create a Java port of the lgogdownloader for a while.
So I have now created a Github repository and also created an issue with information about the needed libraries.

https://github.com/DanielRuf/xgogdownloader

I am currently working on the Java versions of the C++ files, so it may take a while until I am uploading the first working Java files.

Current status:
Converting C++ files to Java using generator: done
Searching the needed libraries: done
Creating compilable class files and packages: WIP
- Main: done
- Config: done
- ProgressBar: done
- Downloader: done
- Util: done
- GlobalConstants: done
- Api: done
Importing classes and packages: done
Manually converting methods for new libraries: WIP
- Main: 0/1
- Config: 0/0
- ProgressBar: 1/1
- Downloader: 15/24
- Util: 4/4
- Timer: 1/1
- GlobalConstants: 0/0
- Api: 19/20
Restructure / Cleanup: TBD

I hope this project/idea will have some support and you find it good, because I do this in my freetime and I belief in crossplatform solutions, which run everywhere without any issues.

Also the Java port has fewer dependencies than lgogdownloader and they will be shipped with the final jar file/program, so you do not have to install or compile anything.

This will be a console app. So it runs in a console. I plan to make a version with some GUI when there is enough support and demand.

What do you think? =)

FAQ:
Q: Why is the name of the port xgogdownloader?
A: Because it will be a (x)cross-platform app

Q: Why this project?
A: because I love to develop in my freetime, improve my skills and missed a version which works on all platforms
Post edited February 23, 2014 by Daniel Ruf
avatar
Daniel Ruf: What do you think? =)
Yes please, though I'd prefer it to be C++ instead of Java. Should you need any help with testing, feel free to send me a PM, have a collection I've been neglecting.
avatar
Daniel Ruf: What do you think? =)
avatar
JMich: Yes please, though I'd prefer it to be C++ instead of Java. Should you need any help with testing, feel free to send me a PM, have a collection I've been neglecting.
Well, I have seen myself how hard it is to crosscompile C++ projects. And it has so many dependencies. Most of the libraries are part of the Java7 core, but C++ is also cool ;-)

It should not replace lgogdownloader or so, but be an alternative.
And it is some experiment and sideproject for me.

Any help is welcome =)

(Did you try to compile it on Windows? The GCC compiler from Mingw/Cygwin is not fully C++11 compatible - std::to_string and other functions are not available - you have to manually apply a patch - weird that is is not yet implemented in the latest version of the TDM-GCC proect ... =( )
avatar
Daniel Ruf: (Did you try to compile it on Windows? The GCC compiler from Mingw/Cygwin is not fully C++11 compatible - std::to_string and other functions are not available - you have to manually apply a patch - weird that is is not yet implemented in the latest version of the TDM-GCC proect ... =( )
My attempts were a bit weirder than that, since I didn't use Mingw or Cygwin, but tried with VS2013. First step was trying to find the needed libraries, then trying to see what functions were used from unistd.h, then try to see why it didn't like what it found. When std::time (or was it random?) wasn't found in the libraries, I dropped the testing.

The lgogdownloader has some functions I'd like to have (mostly the mass download/checking), but my programming knowledge isn't advanced enough for this kind of troubleshooting and/or porting.
avatar
Daniel Ruf: (Did you try to compile it on Windows? The GCC compiler from Mingw/Cygwin is not fully C++11 compatible - std::to_string and other functions are not available - you have to manually apply a patch - weird that is is not yet implemented in the latest version of the TDM-GCC proect ... =( )
avatar
JMich: My attempts were a bit weirder than that, since I didn't use Mingw or Cygwin, but tried with VS2013. First step was trying to find the needed libraries, then trying to see what functions were used from unistd.h, then try to see why it didn't like what it found. When std::time (or was it random?) wasn't found in the libraries, I dropped the testing.

The lgogdownloader has some functions I'd like to have (mostly the mass download/checking), but my programming knowledge isn't advanced enough for this kind of troubleshooting and/or porting.
My first attempt using make in Cygwin was the right one, but I changed then to Codeblocks and the GCC compiler included in it as Sude uses also Codeblocks https://github.com/Sude-/lgogdownloader/issues/6

Maybe this may help you. I have downloaded and unzipped all libraries, moved the needed .h files and directories into the include directory and reran the make command a few times in Cygwin. It shows what is missing.

At some time I thought I should better use some virtual image of a Linux distribution but this would be crazy to download 700MB - 2GB just to make lgogdownloader work :D

So my initial idea (since I am active on the forums) to create a Java port was realized ;-)

Well, I will study informatics and I know they are using Java at this university so I practice a bit for the courses =)
You can take a look at some of my projects here: https://github.com/DanielRuf/Plain-of-JARs/tree/master/sources
Many of them have mass download feature ;-) If you take a look at the small code, it is not so hard to realize =)
avatar
Daniel Ruf: My first attempt using make in Cygwin was the right one, but I changed then to Codeblocks and the GCC compiler included in it as Sude uses also Codeblocks https://github.com/Sude-/lgogdownloader/issues/6
I think that this thread shows most of the problems I had, and it seems that they were solved as well. Will have to try it again tomorrow (or during the weekend), since as I recall VS2013 is C++11 compatible (or am I recalling this wrong?)
avatar
Daniel Ruf: My first attempt using make in Cygwin was the right one, but I changed then to Codeblocks and the GCC compiler included in it as Sude uses also Codeblocks https://github.com/Sude-/lgogdownloader/issues/6
avatar
JMich: I think that this thread shows most of the problems I had, and it seems that they were solved as well. Will have to try it again tomorrow (or during the weekend), since as I recall VS2013 is C++11 compatible (or am I recalling this wrong?)
I think so. But I am not using VS2013 and mainly use interchangeable compilers on the console and also work the most time on the console ;-) Good luck, hopefully it works on your PC as many C++ libraries are not part of the Windows compilers. The Linux compilers have much better support =)
avatar
Daniel Ruf: Good luck, hopefully it works on your PC as many C++ libraries are not part of the Windows compilers.
But most of the libraries are available as .h files, and dropping them in an included folder does usually work. Assuming they remember to use proper folder structure syntax, grumble.
avatar
Daniel Ruf: Good luck, hopefully it works on your PC as many C++ libraries are not part of the Windows compilers.
avatar
JMich: But most of the libraries are available as .h files, and dropping them in an included folder does usually work. Assuming they remember to use proper folder structure syntax, grumble.
Right, and the Github issue helps you to resolve the last problems =)
Made some (maybe interesting) updates to the initial post of the thread for the project. =)
Some update: all files except the Api class are compiled, but many code parts still have to be manually converted. So far so good. The first working Java port is much nearer and the initial structure is created. Now the hard work begins.

I think I can later replace many code parts using some methods/functions as it seems in some places there is the same code used. (DRY principle)
I have uploaded all files to Github, so anyone can contribute to the project and the current development of the first working Java port of lgogdownloader.

https://github.com/DanielRuf/xgogdownloader
All (working) updates will be pushed to this repository.
Be aware that there is already a Java GOG downloader project. Not that one more would hurt in any way. :)

http://www.gog.com/forum/general/jgogdownloader/page1
avatar
Trilarion: Be aware that there is already a Java GOG downloader project. Not that one more would hurt in any way. :)

http://www.gog.com/forum/general/jgogdownloader/page1
pretty old and:
http://ww2.xenon1170.com/?folio=7POYGN0G2
[i]This domain name expired on Jan 07 2014 04:07AM
Click here to renew it.[/i]

But didn't see this, thanks for the hint.
I am using Github, because it is meant for the community, shouzld be open (source) and be easy to contribute to, fork it and download it.

Then it will not happen, that a domain is no more available and all the code is lost in the nowhere ;-)

Well, I own my domain for over 9 years but hosting on my own website is not the best solution so I choose always Github for my opensource projects over own hosting, so there is a local Git repository on my computer, the public Git repository on Github.com and possibly other forks on Github.com =)

Much better than just one source
Also my xgogdownloader is a direct port of lgogdownloader so it will have the same features
Post edited February 04, 2014 by Daniel Ruf
So, let me know if I get it, with this version you're going to make the lgogdownloader work also in Win and Mac?

Is that the goal of this project, or there is something I didn't understand due to my little knowledge on programming?

Thanks, +1 for the project and the best luck with it.