A little while back I made mention of some Minecraft Server Automation programs that I would be working on. They were nearly finished when I had some data loss on my development machine. Sadly my backups were not very current. Fortunately this gives me the opportunity to rework the programs in a more interesting manner.
Tag Archive for C++
Doing my server automation programs on the windows platform, it was inevitable that I would have to
#include <Windows.h> at one point and deal with one of the many 12 argument functions it has. Alas that day has come.
For those of you wanting to know what exactly the numbers that errno is set to correlate to, I have listed them below: (this way you can set errno and then when someone uses strerror(errno) they'll get the right error)
My logging function looks like this, it's very handy (especially since my server automation programs run for no more than a few seconds). It basically appends the error to the file saying what time the error occurred, what the error is, and the name of the exe that generated the error (pulled from argv so even when the exe is renamed it is still accurate).
After doing some looking around, and trying to get the Boost File System library to work I realized that had I spent the same amount of time and energy into writing my own file system library, it'd be done and usable by now.
Don't get me wrong, the Boost libraries are very comprehensive, I just had trouble building the extra libraries, getting them properly integrated, and when all was said and done it didn't even work properly due to "Improper Permissions" (despite running my .exe as an administrator).
So I'm going to make a library/dll combo to manage some basic file operations (copy, move, delete, rename).
If there's a file op you want just comment and I'll work it into the C++ source.
I've been working on some executables to automate plugin downloading, server updating, server world backup, map rendering, and world restoration processes. The idea is to make it so you will not need to touch your Minecraft server except for major changes. This way even when Minecraft releases a new version, you will be as current as it within 24 hours (depending on compatible plugin release times).