Alright, so here's my initial release of this program. I've done a fair bit of testing on a couple different machines and operating systems, so it should be fairly stable. Though please let me know if you encounter any bugs.
Links:
Istaria Chatlog Backup: Program
Istaria Chatlog Backup: Source Code (You don't need this to run the program, it's for the programmers out there)
There's no installing required, I just recommend putting IstariaChatlogBackup.exe and config.txt in a unique folder (make sure they're together).
Here's what you need to do:
Open up config.txt and change the Source Folder file path to point at your logs folder.
Example: $Source Folder="C:\Program Files\Virtrium\Horizons\logs"
And change the Destination Folder file path to point at wherever you want the logs copied to.
Example: $Destination Folder="C:\Program Files\Virtrium\ChatLogBackup"
(You can use forward slashes (/) if you want, the program doesn't care.)
---
- If the source folder can't be found, an error will be thown. If the destination folder can't be found, it will ask you if you wish for the missing folder(s) to be created.
- If the program is run and it can't find config.txt, a new one will be generated.
- If the config file is corrupt or missing variables (If you delete $Source Folder= for example) the program will throw an error that there are missing variables and will ask that you delete config.txt and run it again to generate a new one.
---
Once you've specified source and destination folders, the next step is to edit BatchFile.txt if you wish to run the program along with the launcher (Or you could just make your own if you know what you're doing).
in BatchFile.txt you'll see a number of lines with REM // .. These are just comments that are completely ignored, but are there to help provide details within the file.
The lines you want to edit are those between the
REM -- CODE --
REM ----------
lines.
What this will essentially do is navigate to and start IstariaChatlogBackup.exe and then navigate and start launcher.exe.
What you need to do is, again, change the file paths to point towards the backup program and the Istaria launcher. (Keep in mind your Istaria launcher may be launcher.jar and not launcher.exe if you've been testing the new launcher).
When you're done, save the file as BatchFile.bat (Or IstariaLauncher.bat, or WhateverNameYouWant.bat, so long as it ends in .bat).
You'll essentially use this as your new shortcut. It will run the backup program when you start the Istaria launcher, copying the chat log from logs folder before it's replaced by the new instance of istaria.exe (It works just fine with dual logging)
If you want to use the Istaria icon (Or the icon of my program even though it's fail xD), you can make a shortcut of the batch file and change the icon.
-- Alternative (Sorta) --
If you don't want to use a batch file, you can instead point config.txt to logs_old and manually run it every few days. It will over-write existing files so you don't get a bunch of duplicate copies. Of course you'll have to make sure to run it on your own, and there's a chance you may lose some logs by not making a copy before Istaria clears the folder.
Questions, comments and suggestions are most definitely welcome (And encouraged)!
Also: Thanks goes to Starstilanx and Raptress for testing help.