Results 1 to 15 of 15

Thread: Istaria Chatlog Backup

  1. #1

    Default Istaria Chatlog Backup

    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.
    Last edited by Akrion; April 22nd, 2011 at 03:59 AM.

  2. #2

    Default Re: Istaria Chatlog Backup

    Works great! Thanks for developing this, Aki <3

  3. #3
    Member
    Join Date
    Nov 2004
    Location
    Washington, land of shivering in June.
    Posts
    1,313

    Default Re: Istaria Chatlog Backup

    I'd recommend using the batch file method personally, as the entire point of the program is to take the manual part out of backing up chat logs. x3 Once the batch file and the backup program are setup properly, there is no need to do anything else. The only sign that the program is even there will be a self-closing command prompt window that pops up just before Istaria's launcher.

    I tested this for a couple different circumstances, such as dual-logging, and everything seems to work fine. If anyone encounters a problem, either a bug or just confusion as to how to set everything up, just post. :3

    .:Malestryx:.

    Aegis Shatterer - Scourge of the Scourge - Blight's Own Decay

  4. #4

    Default Re: Istaria Chatlog Backup

    Forgot to add something and I can't edit my post. Awesome.


    A note about the batch file:
    If you want/need to use a drive other than your main drive (the one your OS is installed on) you'll need to add that drive letter before 'cd' and 'start' in the batch file.

    For example, if your main drive is C:\ but Istaria is installed on D:\ do this:
    REM -- CODE --
    D:
    cd D:\Program Files\Virtrium\Horizons
    start Launcher.exe
    REM ----------

    Of course I have rather limited experience with the windows command prompt (or DOS), so there may be a simpler way to do the above. If there is, I'd love to hear it.

  5. #5

    Default Re: Istaria Chatlog Backup

    I have done what it says, but, while the last log loads in the folder I want, I haven't managed to make the program start automatically, and I have to double-click on it to get see last log appear.

    I have tried "D:
    cd D:/Istaria/IstariaChatLogBackup
    start IstariaChatlogBackup.exe"

    "D:
    cd D:/Istaria
    start Launcher.jar", as well as "start Launcher.exe" and "start Launcher", with both launchers (.exe and .jar). I don't get why I can't make the thing auto-start...
    Anyway, I have just discovered the Launcher.jar, as I didn't know I had this thing, and it helps me to check or uncheck the patcher option. I wasn't aware there was an option to modify the names, neither.

  6. #6

    Default Re: Istaria Chatlog Backup

    Quote Originally Posted by LungTien Temeraire View Post
    I have tried "D:
    cd D:/Istaria/IstariaChatLogBackup
    start IstariaChatlogBackup.exe"

    "D:
    cd D:/Istaria
    start Launcher.jar", as well as "start Launcher.exe" and "start Launcher", with both launchers (.exe and .jar). I don't get why I can't make the thing auto-start...
    Anyway, I have just discovered the Launcher.jar, as I didn't know I had this thing, and it helps me to check or uncheck the patcher option. I wasn't aware there was an option to modify the names, neither.
    You caused it to try and read that as all one block, aside from it not being able to parse any command.

    Basically:
    D:
    cd Istaria/IstariaChatLogBackup
    start IstariaChatLogBackup.exe
    cd ..
    start launcher.jar

    Now, if you have the .exe version of the launcher it would be

    start launcher.exe
    Last edited by Starstilanxs; April 22nd, 2011 at 04:14 PM.

  7. #7
    Member
    Join Date
    Nov 2004
    Location
    Washington, land of shivering in June.
    Posts
    1,313

    Default Re: Istaria Chatlog Backup

    If you don't mind, Lung, could you copy-paste the contents of your BatchFile? That way we can see exactly what's going on. With computers, even one misplaced character can break the functionality of an entire program.

    .:Malestryx:.

    Aegis Shatterer - Scourge of the Scourge - Blight's Own Decay

  8. #8

    Default Re: Istaria Chatlog Backup

    I think I'm going to try and integrate a method to start the launcher when you run my program. >.> Really wanted to avoid using a batch file for this very reason. xD

  9. #9

    Default Re: Istaria Chatlog Backup

    Check out exec()

    http://msdn.microsoft.com/en-us/libr...8vs.71%29.aspx

    Exec() should yank out the current process and replace it with whatever you provide as arguments. Note: this means, among other things, that the process calling exec() will cease to exist at the call to exec(), which, in effect, will not return under normal circumstances -- so close all your open files and sockets first!


    Though, a quick glance at your code suggests that a bat file something like this would do the equivalent:

    set hzdir=c:\program files\your istaria directory
    set logdir=c:\your log collection\

    xcopy /y "%hdzir%\logs\client_chat*" "%logdir%"
    xcopy /y "%hzdir%\logs_old\client_chat*" "%logdir%"

    run "%hzdir%\launcher.exe"
    You can get anything you want in life -- just make a lot of noise and bite the right people.

  10. #10

    Default Re: Istaria Chatlog Backup

    _exec will work for now, thanks Steelclaw.

    I know this could work with batch files, but ultimately as seen with LungTien above they're not the most user friendly things in the world. x3 I also don't personally like making a bunch of direct calls to the command prompt, I just feel it's somewhat sloppy and less efficient when you can alternatively program the functionality instead.

    Also, this way I can make various changes and/or additions with only the need for people to re-download the program.

    However by no means am I saying that people should use my program over a batch file. :3 Maybe I'll even make a file based on what you provided, Steelclaw, so that people can choose. There just won't be much support for it, at least from me.

  11. #11

    Default Re: Istaria Chatlog Backup

    ** Update **

    Here's an updated version of the program. No more batch file needed. Just use the new config file (or generate a new one). 3 more variables have been added, you should now see:

    === Configuration ===
    $Source Folder=C:\Program Files\Virtrium\Horizons\logs
    $Destination Folder=C:\Program Files\Virtrium\ChatlogBackups
    $Istaria Launcher=false
    $Launcher Path=C:\Program Files\Virtrium\Horizons
    $Launcher Name=Launcher.exe

    Set Istaria Launcher to true and the program will attempt to launch whatever you direct Launcher Path and Launcher Name to. Quotation marks have been dropped because they were ultimately unnecessary.

    Remember: Your launcher might be Launcher.jar instead.

    The program now further checks the validity of the config file. If there's any missing, duplicate, or blank variables (e.g. just $Source Folder=), the program will throw an error and inform you which of the above is the issue.

    So now you can just run my program to both copy the chat logs and start the launcher.

    Links:
    Istaria Chatlog Backup: Program v1.10
    Istaria Chatlog Backup: Source Code v1.10 (You don't need this to run the program, it's for the programmers out there)

  12. #12

    Default Re: Istaria Chatlog Backup

    Alright, so I've been encountering some strange bugs and am currently working on hammering them out. Since I can't edit the subject post because these forums are silly (and frustrating) like that, I've just broken where the links path to. Sorry about that. :/

  13. #13

    Default Re: Istaria Chatlog Backup

    Ok, so.. The more I think about Steelclaw's batch file method, the more I'm beginning to feel that this program is entirely pointless. I didn't realize that the command prompt could do advanced folder search and copy.

    Maybe I'll switch gears and make something to generate a batch file so you only need to give it file paths/etc and it will format it all. I dunno. The various issues with getting this program to play nicely with the various launchers and do so in a non-controlling manner coupled with the annoyance of being unable to edit the original post coupled with other things I'm dealing with have currently left me with little will or care to keep hammering at this right now.

    If you still want an automatic chat log backup, Steelclaw's batch example a few posts above works great once turned into a complete file.

  14. #14

    Default Re: Istaria Chatlog Backup

    Here is the config I have:

    === Configuration ===
    $Source Folder="D:/Istaria/logs"
    $Destination Folder="D:/Istaria/IstariaChatLogBackup"


    Here is the BatchFile:

    @echo off

    REM // Note: Lines preceeded with 'REM' are just comment lines and have no effect.
    REM // You'll likely have to change the following information to what is appropriate for your computer.
    REM // Just change the contents within the quotes (inside the -- CODE -- lines).
    REM // Save this file as .bat (by just typing "filename.bat" when you save it) when you're done.


    REM // File path to the Chat Log backup program
    REM // Example: cd C:\Path\to\the\folder\containing\the\backup\progra m
    REM // Example: start backup-program-name.exe

    REM -- CODE --
    D:
    cd D:/Istaria/IstariaChatLogBackup
    start IstariaChatlogBackup.exe
    REM ----------


    REM // File path to the Istaria launcher
    REM // Example: cd C:\Path\to\the\folder\containing\the\Istaria\launc her
    REM // Example: start launcher-name.exe ((extention (.exe) may be .jar))

    REM -- CODE --
    cd D:/Istaria
    start Launcher.jar
    REM ----------


    REM // All lines preceeded with 'REM' can be deleted if you wish.

    exit

  15. #15

    Default Re: Istaria Chatlog Backup

    Try this:

    @echo off

    REM // Note: Lines preceeded with 'REM' are just comment lines and have no effect.
    REM // You'll likely have to change the following information to what is appropriate for your computer.
    REM // Just change the contents within the quotes (inside the -- CODE -- lines).
    REM // Save this file as .bat (by just typing "filename.bat" when you save it) when you're done.


    REM // File path to the Chat Log backup program
    REM // Example: cd C:\Path\to\the\folder\containing\the\backup\progra m
    REM // Example: start backup-program-name.exe

    REM -- CODE --
    D:
    cd D:\Istaria\IstariaChatLogBackup
    start IstariaChatlogBackup.exe
    REM ----------


    REM // File path to the Istaria launcher
    REM // Example: cd C:\Path\to\the\folder\containing\the\Istaria\launc her
    REM // Example: start launcher-name.exe ((extention (.exe) may be .jar))

    REM -- CODE --
    D:
    cd D:\Istaria
    start Launcher.jar
    REM ----------


    Otherwise, don't worry about it, Lung. :3 I'm trashing this program in favor for a windowed (as in not console) based program that will generate a batch file to do everything. I've never made a true project outside of a console yet so it may take me a bit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •