Automatically download the newest daily build

See attached for the updated exe. Also uploaded the modified source code (as a .txt because of file extension restrictions in the upload process) in case we run into this sort of issue in the future.
 

Attachments

Thanks! I used the DailyDownloader for the past week, but this is just so much faster... downloads and launches in under 5 seconds rather than giving up at 64 percent after 40 seconds.
 
Hi Theraze, not sure why that would be. You know Java, right? Could you do me a favor and look at the source for DailyDownloader's downloader? Here's the link if you need it: https://github.com/wrldwzrd89/kolma...ysoftware/dailydownloader/DLProgressTask.java

Two major possibilities come to mind.
One, the C# implementation of WebClient.DownloadFile is faster than the Java implementation of InputStream.read into FileOutputString.write. It makes sense that something designed to download files works faster than something meant to show individual characters.
Two, displaying the download progress might potentially slow down the download itself - though on repeated attempts, the DLPT did skip numbers when it actually got more than a percent in a second. Most runs though, I did get every percentage point marked. This is more likely related to the first point though.

I briefly considered whether flash mode was actually causing slowness, but on examining the source saw that it could also be called 'portable mode' or something similar, as it merely controls whether the settings files (xml and version timestamp) are used from the folder or from inside your profile. No chance of that causing the problems, and it did have the same results (sometimes fast, sometimes slow) regardless on multiple runs - my first few runs didn't make that clear as the flash were always slow and profile was not due to random luck. That did help me to remove the scattered 'cache' files which weren't useful though, so at least that's something. :)

I think it's just a feature of how the file is being collected off the server. Based on a bit of quick reading, it looks like changing from IS.r/FOS.w to something else might speed things up.
http://stackoverflow.com/questions/...rl-and-write-in-a-file-java/30394778#30394778

There's a bunch of different options, but most either are noted as similar, slower, or security issues.
http://stackoverflow.com/questions/921262/how-to-download-and-save-a-file-from-internet-using-java

Anyways, looks like the core issue is simply that Java's legacy implementation isn't the fastest at downloading. :)
 
For some reason that began crapping out on me today:

Code:
---------------
5/18/2016 12:00:47 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: Unable to connect to the remote server
---------------
5/18/2016 12:05:46 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: Unable to connect to the remote server
---------------
5/18/2016 12:08:01 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: Unable to connect to the remote server
---------------
5/18/2016 6:32:44 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: Unable to connect to the remote server
---------------
5/18/2016 6:39:46 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: Unable to connect to the remote server

It worked yesterday, and I can physically navigate to ci.kolmafia.us and download a working copy.

I suspect I probably did something wrong
 
Code:
---------------
2016-05-18 20:05:38
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
KoLmafia-16946.jar is the latest version
Attempting to download http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/artifact/dist/KoLmafia-16946.jar...
Works fine for me. Sounds like you're blocking access to the webserver for some reason.
 
Or possibly proxy configuration (where the browser knows how to automatically detect this and accomodate, but java requires system properties wizardry).
 
It used to work fine on its own. Now I can make it work by running it as administrator. Obviously something happened in my environment
 
I promise I didn't bundle any malware! If you want, you can compile the source yourself (look into a C# compiler, such as visual c# or mono), after confirming that it isn't trying to do anything malicious.
 
Security Essentials just has the worst definitions. If you ever have something get flagged with SE, especially when it's worked before that day, throw it into VirusTotal and see if actual reputable companies detect anything.

When SE gets false positives, they tend to fix them several days later, after it's already trashed your hard drive. :)
 
Back
Top