ZLib is on SourceForge!
After almost an entire year and nearly 3500 downloads, ZLib r37 is done with its long run. ZLib is now a SourceForge project, and can be installed automatically by typing
Code:
svn checkout https://svn.code.sf.net/p/zlib/code
in your CLI.
I'm calling this r38 so that users of r37 will see the update notification, but actually since moving to SourceForge the revision numbers started over, so we're now at revision 4. Sometime in the future I will be removing the version number from the first post so as to avoid confusion.
What's new in r38/r4
I fixed the issue Bale reported about unascended characters not having access to exactly-three-sided boxes, but of course the big news is a
check_version() that works for SVN projects, and which ZLib now uses itself, so it will stay current without needing to navigate here to download it.
The check_version() we've known thus far had four parameters: one printable-format script name, one property-format scriptname, the current version, and the script thread.
This update adds another version of check_version() with nearly all the same parameters: printable-format script name, project name, and the script thread. The project name is the name of the SVN repo mafia should access to update your script, which in the case of ZLib is "zlib". Just as with the forum post version, your script's current version and the last date checked is stored in zversions.txt, along with scripts which are checked via the four-parameter version, and maps which are checked via load_current_map().
Important things to know about the SVN check_version:
- As with the forum post version, it only checks once a day.
- It still returns a string -- an empty string if no update occurred, or an informative message if either 1) it automatically updated the script, or 2) the script was previously updated but has not yet notified the user of the update. This message is both printed to the CLI and also returned inside a <div class="versioninfo">.
- It will automatically update scripts which are not at head using "cli update <proj>". It does not, however, stop operation at this point. If you want to abort so that the user needs to restart (this time with the updated script), you'd need to do that in the calling script based on check_version's return value.
- If you've already updated the script since it last ran (for example automatically at login or by manually updating), it detects this and prints an informational message letting users know the script has updated, with two or three links: one to the forum thread (first post), one to the forum thread last post, and if the repository is hosted on SourceForge, a link to the SourceForge changelog. Users who want more information about the update can then easily view the updates and participate in discussion about them.
- When the forum post version of check_version is called, it checks to see if you have switched to SVN -- it checks svn_exists(provided property name). If this exists, it calls the three-parameter version of check_version() instead. This ought to allow script authors to migrate incredibly gracefully, in the event that their previous property parameter shares the name of their SVN project.
- Authors releasing scripts via SVN which use ZLib can now include ZLib as a dependency, and it will be automatically installed when your users install your script.
If you want to see the exact function syntax, I have edited the
ZLib Wiki page with information about the new function.
Enjoy migrating to an update experience that is vastly more convenient, without leaving users in the dark!