The International Simutrans Forum

PakSets and Customization => General Resources and Tools => PakSet Maintainers and Artists Corner => Topic started by: prissi on February 12, 2022, 01:21:29 PM

Title: Location of hosting stable paksets
Post by: prissi on February 12, 2022, 01:21:29 PM
Simutrans features a built-in pak set downloader (since r10483, although not active on most OS yet), which is essential especially for Android, but useful for other platforms as well.

Unfortunately, this downloader can only handle http downloads, not https. This is not a problem for sourceforge, but at least three paks are hosted at github (pak192, pak48.excentrique, pak.nippon).

The simplest solution would mirror those manually on sourceforge.
Title: Re: Location of hosting stable paksets
Post by: Roboron on February 12, 2022, 01:33:12 PM
I have not had any problems downloading from the GitHub https linkns using the installer (read: pak48.Excentrique). Where is this a problem?
Title: Re: Location of hosting stable paksets
Post by: prissi on February 13, 2022, 12:02:30 PM
The shell script does not work on Android, or at least on non of the Android devices I could get my hand one, with the exception of bluestacks. The old built-in attempt in pakinstaller used libcurl. However, libs curl add 33 MB application size, and more severe, crashes on Android in the SDL2 framework setup by Pelya (as did zzip lib there).

Since this is hard to change, I used the http download facility already inside Simutrans (to query the list server) to download the zip archives on Android. Since for the sake of downloading a zip I do not want to program https support to simutrans, the simplest way is to host on sourceforge, which still supports both.

More technically, any http on sourceforge gets a http 302 to a http proxy, but on github a http link gets a 301 (moved permanently with https). So no way to download from githbu without https support.
Title: Re: Location of hosting stable paksets
Post by: Roboron on February 13, 2022, 12:07:34 PM
What about wget? There seems to be a port from pelya too, and it is only 1 MB in size https://github.com/pelya/wget-android
Title: Re: Location of hosting stable paksets
Post by: prissi on February 13, 2022, 01:55:03 PM
The C++ on Android must bundle all their libraries themselves. The shell tools from each devices deviate a lot. Bluestacks had wget. The Fire7 tablet did not.

In principle there is a Java libary (DefaultHttpClient ) which could do this, if I had any Java or Android knowledge and not just keeping the build system working.