Jump to content

[All OS][Java][0.2.19] DataSwitcher- Instance Manager


magico13

Recommended Posts

DataSwitcher is a Java program for every OS that allows you to have multiple instances of KSP (currently just the folders). How is this useful? It allows for multiple sets of mod installations that you can quickly and easily change between. For example, say you regularly swap between playing stock and playing with a bunch of mods, but occasionally you play on a KMP server. Each time you want to change between them you have to either copy GameData folders that you've backed up or you have to delete/reinstall the mods. With DataSwitcher it's as easy as selecting the instance from a list and pressing Activate!

I made DataSwitcher because I needed it for that very reason. I had previously written a batch script to handle my multiple mod sets, but it wasn't easily expandable if I wanted to add another. DataSwitcher is written so you can have as many instances as you would like, can add more quickly and easily, and can swap between them with ease.

Don't want to reinstall all your mods when you try DataSwitcher? Don't! The new version lets you import any folder into newly created instances on a per-instance setting! You've got nothing to lose by trying it out. Though, make sure to remove the instance if you decide not to use DataSwitcher anymore (or copy the folders back to the KSP folder) as the newest versions use symbolic links.

(Probable) FAQ:

Q: What is DataSwitcher?

A: An application to manage multiple folders for different sets of mod installs.

Q: Why Java? Java is slow and bulky and annoying and nobody likes it.

A: Because it's multi-platform and I know it better than C++ (thanks to playing around with Minecraft modding).

Q: Will this run on (Linux, Mac OS, a toaster)?

A: It has been tested on Windows and Linux, but is written primarily on Windows. It should run on anything that runs Java.

Q: Isn't this just like [insert addon/program] but lacks 98% of the features?

A: Maybe, I've never used any mod managers or anything like that for KSP. I wrote this because I needed it and thought it would be fun/a good learning experience. I uploaded it for others to use in case they also wanted a tool like this, and to possibly learn from my source code.

Q: Can I view the source/fork this?

A: Yes, DataSwitcher is open source and I am allowing forks without asking, as long as I receive attribution. To view the official license (Creative Commons Attribution-ShareAlike 4.0 International) click here: http://creativecommons.org/licenses/by-sa/4.0/legalcode

Q: Where is the source?

A: http://magico13.net/svn/DataSwitcher should have the latest up-to-date source code, otherwise each release I will try to include the source. That link is an SVN repository, and can be checked out just like any other svn repository (using tortoisesvn, or the subversion client in linux)

Q: I looked at the source, this is not written all that well. What gives?

A: I have never been formally trained in programming, so it's all self-taught. As a result, I'm not the most efficient or even that good at programming. But it's fun to do, and when I've got the need for something I can usually write something functional.

Q: I found a bug! How can I report it?

A: Probably here on the forum is easiest. I can't promise to get to it right away, but I will try. Send me the log.txt file that gets created and let me know exactly what you were doing when the bug popped up.

Q: What else are you planning on doing with this?

A: I'd like to allow full KSP instances to exist, so you can run multiple versions. Also, save game backing up would be good. I will primarily make changes based on what I need/want, but please offer up your suggestions!

Q: Where does this place the instances/settings.cfg/log.txt?

A: As of 0.1.10, in the DataSwitcher folder that gets created in the same folder as the executable. Previously it was in ${HOME}/DataSwitcher

Q: My instance didn't load into the list when I started DataSwitcher? What gives?

A: Check the log.txt! Did you use an illegal character in the name? ; \ / are all forbidden (probably more), but it doesn't actually prevent you from using them in the name. If it's a semi-colon, open the settings.cfg.bak file in notepad and remove the extra ; between the instance name and the game path. Then rename the instance folder to not include the semi-colon and rename settings.cfg.bak to settings.cfg. It should work now.

Q: What does each button do again?

A: The "+" opens the create new instance dialog, the "-" deletes the currently selected instance, and the "Activate" button will apply the current instance to the KSP install.

Q: How can I select multiple folders to import? How about viewing what folders I have selected?

A: Use the control (ctrl) or shift keys to select multiple files/folders. You can view the current selected ones by hovering your mouse over the "Select Items to Import" button.

Q: So I can import any file or folder? Even saves and KSP.exe?

A: Yes. However, as of 0.2.16 importing KSP.exe or Launcher.exe won't allow the game to run (not sure why yet). If you import the saves folder, DO NOT USE FALLBACK MODE or you will lose information. You can tell if fallback mode is active by checking the settings.cfg or seeing if there's an arrow on the icon for the folders in the Kerbal Space Program folder (steam/SteamApps/common/Kerbal Space Program for steam installs). If you don't want conflicts, every instance should have the same files and folders, if not then switching from one to another may leave links to instances that aren't supposed to be active (which may be useful somehow).

Q: What is Fallback Mode and why does it suck?

A: The normal mode of operation uses symbolic links to reduce the amount of time and space required when activating an instance. As a happy side effect, any changes the game makes to these folders are actually made to the instance (such as saving the game). Fallback mode is for when the system doesn't support symbolic links or the user is not running as an Administrator. It works by copying the folders directly, which works great for things like the GameData folder as long as no mods or the game make changes to the folder. The instance will not know that changes were made, and so when the instance is changed the changes will be overwritten (in the case of the saves folder, all progress since the instance was created will be lost). In the future I want to try to fix this issue, but in the meantime don't use fallback mode unless you absolutely have to. If you get the message about insufficient privileges, simply exit and right click DataSwitcher-0.x.y.jar and click "Run as administrator".

Q: I enabled Fallback Mode and want to disable it!

A: Locate the settings.cfg file in the DataSwitcher folder. Open it with wordpad/notepad/etc. and change "FallbackMode;true" to "FallbackMode;false". Start DataSwitcher and you're done.

Q: I told an instance to Always/Never autostart the game and want to change it!

A: Locate the instances.txt file in the DataSwitcher folder. Open it with wordpad/notepad/etc. and find the name of the instance you want to change. At the very end of the line is a number, it controls the default action for launching the game. 0 means 'ask', 1 means 'always', and 2 means 'never'. Change it appropriately (it is always safe to set it to 0 and make the selection from the popup)

Q: Alright, I'm interested. So, how do I use this?

A: Simple! Run it (might require java 7), then click the "+" to add a new instance. You will have to enter a name for the instance and browse to the "Kerbal Space Program" folder. For steam on Windows and Linux it should autodetect the folder (if anyone knows the Mac steam folder let me know what it is!). The path is saved per instance, not globally. You can optionally import existing folders into the new instance (I highly suggest selecting at least the GameData folder!). Locate the newly made folder and merge the stock GameData folder into the GameData folder located in the instance (already complete if you import it). Add mods into the instance GameData folder as desired. Then press the "Activate" button with the new instance selected and it will replace the folders in the game directory with the ones in the instance. You can have multiple instances and they won't interfere with each other.

Pictures (v0.0.1.6), slightly outdated but the GUI is mostly the same:

Javascript is disabled. View full album

Warning: This tool manipulates files and folders on your computer and so there is a possibility for data loss. I HIGHLY RECOMMEND BACKING UP YOUR GAME (you can copy and paste the entire KSP folder or just backup GameData and your saves) BEFORE TRYING THIS FOR THE FIRST TIME. I use it myself nearly every day without issue on my primary computer, but under other conditions there could be unexpected problems.

Download: DataSwitcher-0.2.19.jar (dropbox)

Source: http://magico13.net/svn/DataSwitcher/

Changelog:

 

Spoiler

-- 0.2.19 (8/24/15) --
 * Fix for hang caused by files being symlinked as well as directories

-- 0.2.18 (3/7/15) --
 * Fix for creating instances with non-steam KSP.
 * Made folders get backed up prior to deletion until symlink creation is successful, just to further reduce chance of data loss

-- 0.2.17 --
 * Removed adding empty GameData folder to instance on creation to reduce chance of accidentally overwriting your GameData folder
 * Changed import dialog to use a list instead of a file chooser. This should fix issues with trying to import with symbolic links.

-- 0.2.16 --
 * Added fallback for if the user has insufficient privileges to make symbolic links. Falls back to copying the directory. Fixed by running as administrator.
 * Split settings and instances into separate files (I want to add more settings in the future, without conflicting with the instances)
 * Removed Instance Activated popup because of concurrency issues (it would popup before completion)
 * Added progress bar that indicates the progress of copy and delete actions. No longer will you be left wondering what's going on.
 * Enabled support for any file/folder to be copied/linked to. Currently only GameData is officially supported. If you make/import a saves folder inside each instance, they will also be tracked. ONLY DO THIS WHEN SYMLINKS ARE FUNCTIONING (sufficient privileges), OR ELSE YOU WILL DEFINITLY LOSE SAVES WHEN SWITCHING INSTANCES. This will hopefully be fixed in later versions.
 * Added ability to import any files or folders from the game. Select using the "Select Items to Import" button. Use shift or control to select multiples. If you hover over it, you can see what items are currently selected. Seems to have issue with the KSP.exe and Launcher.exe.
 * Added support for converting old single file system to two file system
 * Added ability to autostart game after activating an instance. Wait until the main buttons come back before choosing "yes" or "always"!

-- 0.1.10 --
 * Switched to using symbolic links instead of copying during activation of instance. Saves time, space, and writes!
 * Added autodetection of Steam KSP for Linux (HOME/.steam/...)
 * Changed directory for instances to the DataSwitcher folder created in the same directory as the executable. If you want this to be a configurable parameter, let me know.
 * Added file chooser to the New Instance dialog for Game Path selection. Select the "Kerbal Space Program" folder (not GameData)!
 * Began adding a status indicator to the main window. Not totally functional yet. 
 * Redid versioning. Major-Minor-BuildNumber
 * Copying and deleting is performed on a separate thread now. All buttons are disabled during file operations but the GUI won't lockup as much anymore when performing file operations.
 * Fixed issue with New Instance dialog in Linux not showing content.
 * Added tracking of the current used instance, which opens the door for save backups. As a result, the current instance is now displayed below the instance list.
 * Small changes to the GUI to widen the instance list and the current instance notifier. New instance is in the bottom left, delete is in the bottom right.
 * Fixed a bug with log.txt creation on first run due to the DataSwitcher folder not existing yet.

-- 0.0.1.7 --
 * Added log.txt file which contains any text that is normally printed to the screen. Send me this along with any bug reports!
 * Added option to import an existing GameData folder from the Game Path
 * Added the version to the log.txt file on startup
 * Prevented creating two instances with identical names.

-- 0.0.1.6 --
 * Initial release. Currently only supports multiple GameData folder instances.

 

 

 

I just recently discovered that you can have CKAN manage each instance independently by importing the CKAN folder along with the GameData folder. I am extremely happy about this, because it will make keeping each instance up to date much, much easier :D

Edited by magico13
Update link to dropbox
Link to comment
Share on other sites

I just posted a new release (0.1.10) with some rather substantial changes. I have confirmed that it will run properly on Linux (at least 0.1.9, I didn't test 0.1.10 on Linux) and so should run on Macs too. I redid versioning a bit to Major.Minor.BuildNumber which I think is a little better. BuildNumber directly corresponds to revision in the svn repository. Some notable changes since the first release:

* Buttons are disabled when deleting or copying files. If they go grey, just give it a moment. It's taken nearly 40 seconds on my tablet to do a GameData import, but is 3 seconds on my desktop.

* Ability to import the current GameData directory (this allows copying an instance by activating it and then creating a new instance with import checked)

* Use of symbolic links (when the filesytem supports it). This means that activating an instance is much faster and doesn't use twice the hard drive space.

* Added current instance indicator and "status" indicator. The status indicator is still a WIP but will let you know that the program is doing something. GUI lockups won't be as frequent.

* Added log.txt file. Please send this to me when reporting bugs.

The pictures are a little out of date, but overall functionality is the same.

As of right now (a few days after its creation), nobody has replied to this thread (or probably tried DataSwitcher out). For those of you who have looked and possibly considered downloading but chose not to, could you let me know why? I would like to make a program that others find useful, so it would be beneficial to me. I'm always willing to take suggestions (though may not be skilled enough yet to fully implement them). Thank you!

Link to comment
Share on other sites

  • 3 weeks later...
I'm trying this out right now! I need to switch between my realistic "challenges" game data folder and my sort-of stock career folder a lot.

Let me know what you think! I've done some more work on it that isn't in the public release yet. If you run into issues with the folders not copying correctly (namely issues with the creation of the symbolic links) then try running as an administrator. That issue is recognized in the latest version and will pop up a warning but I have some things I need to fix before releasing it.

Link to comment
Share on other sites

  • 2 weeks later...

Just uploaded a new release, 0.2.16, which has a couple new features. A summary of them follows:

* Added ability to autostart game after activating an instance. Wait until the main buttons come back before choosing "yes" or "always"! (If installed through steam, it runs through steam, otherwise it runs with the KSP.exe)

* Enabled support for any file/folder to be copied/linked to. If symlinks are working correctly, then you can have different saves folders for each instance!

* Added ability to import any files or folders from the game. Select using the "Select Items to Import" button. Use shift or control to select multiples. If you hover over it, you can see what items are currently selected. Seems to have issue with the KSP.exe and Launcher.exe.

* Added progress bar that indicates the progress of copy and delete actions. No longer will you be left wondering what's going on!

* Split settings and instances into separate files (I want to add more settings in the future, without conflicting with the instances)

* Removed Instance Activated popup because of concurrency issues (it would popup before completion, just look for "Ready" in status indicator/buttons being usable again)

* Added Fallback Mode for if the user has insufficient privileges to make symbolic links. Falls back to copying the directory. Fixed by running as administrator.

Fallback Mode:

Fallback mode is my attempt at making this still useful when you can't use symbolic links. I haven't developed it much yet, but in general it sucks and you shouldn't use it. The symlink method is faster, takes less space, and any changes the game makes to the folders will be reflected automatically in the instance. Fallback mode should only be used when necessary (and a popup will let you know if you may have to enable it because of permissions) and I will try to make it better in future versions.

If you have any questions/comments/concerns, just let me know. This will probably be put on the back burner for a little while as I've just taken over development of a mod (Kerbal Construction Time) and am also balancing college and a youtube channel. (And want to have some time to actually play KSP!)

Link to comment
Share on other sites

This mod just NUKED my entire GameData folder and i've lost the entire mod setup I had configured... so I am a little hesitant to trust it with my game now.

Cool idea in theory though.

I'm really sorry, but did you make sure to import the GameData folder when creating the instance? Either that or copy the GameData folder from the game into the one located in the DataSwitcher/{Instance Name} folder? Both methods should work just fine and are mentioned in the "How Do I Use This?" question. Did you receive an error popup when trying to activate the instance? If so, was it the Fallback mode popup and did you choose to enable it or exit? If you exit, I think it still deletes the folders (the error comes in during the symbolic link generation which comes after folder removal).

If you got the fallback mode popup and clicked exit, but imported your GameData folder then a perfectly good copy of your GameData folder will be located in DataSwitcher/{Instance Name}/GameData which you can copy back to your game directory.

Other info, such as operating system, filesystem of hard drive that the game/dataswitcher program are on (if windows and in the C:/ drive then it's ntfs, if Linux then most likely ext3 or ext4, if Mac then HFS. Secondary hard drives may be FAT32, which doesn't support symbolic links, all the others do though), and anything else you deem relevant would be of great use to me in trying to see what the issue is.

A word of warning for anyone trying this, which I have stated in the OP (hmm, maybe I removed that message for some reason, I'll be adding that back in). Backup your files before testing this. Under normal operation there shouldn't be any issues, I literally use this every time I play (I'm using it right now to test a plugin I'm developing) so I trust it that much, but I still have a couple back ups just in case.

Link to comment
Share on other sites

  • 7 months later...

You may have to run with administrative privileges. Does it generate a log.txt file? And if so, does it contain any errors. I haven't worked on this in a while (like 7 months) so I don't remember all the details of all the logs.

Do your laptop and desktop run different operating systems (like Windows 7 vs Windows 8)?

Link to comment
Share on other sites

You may have to run with administrative privileges. Does it generate a log.txt file? And if so, does it contain any errors. I haven't worked on this in a while (like 7 months) so I don't remember all the details of all the logs.

Do your laptop and desktop run different operating systems (like Windows 7 vs Windows 8)?

Both my laptop and desktop run Windows 8.1. Also, I can't run the programs as administrator. I'm not sure why. It might have to due with the fact that I have WinRAR which can open up Jar files and show me the guts of the program.

Link to comment
Share on other sites

I also have winrar, but I can still right-click, then go to Open With... and then choose java.

I just did some testing on my win8 computer and also can't run it as administrator. Apparently it's because it's a .jar. I'm going to try a workaround.

I thought I could write a short batch script that would run it when you run as an administrator, but apparently that also changes the current directory and I can't use relative paths. Unfortunately, since this is packaged as a jar file (and I don't think I can really package it as anything else) it might not work in windows 8 if the user isn't an administrator. It should at least open as a normal user, it just would require fallback mode (and so would still work for your purposes, it would just be slower and you can't use the saves folder)

Edit: if you're comfortable at all with the command line you can run the "cmd" command as an administrator and then navigate to the directory with DataSwitcher in it, then run "java -jar DataSwitcher-0.2.17.jar" and it should work fine. But that's not the most straightforward thing to do for people without command line experience (and for people with it that's a trivial task)

Edited by magico13
Link to comment
Share on other sites

I got it to work, but I'm a little confused on how it works. Should it take out folders inside the gamedata then put the news in?

I'd suggest backing up your saves and GameData folder just in case.

The easiest thing to do would be to create an instance based on what you have already in GameData. Load up DataSwitcher, press the "+" button, give it a name and browse to the Game Path (if it doesn't recognize it already). Note that the game path is to the Kerbal Space Program folder, not GameData. Then select what folders you want to import (GameData is likely one of them, you may also want to import the saves folder if you want separate save games per instance. Use the CTRL key to select multiples). Press Create and it should import the folders (it may take a while. It should say "Copying GameData" with a progressbar). When that's finished, go into the DataSwitcher folder (same place as the DataSwitcher jar file) and check to see if there's a folder with the same name as the instance you created. If you open that folder you should see whatever folders you imported.

If you select and Activate the instance you created, it will delete the folders from the main KSP folder and create new links to the folders in the DataSwitcher folder. Any changes made to one will be changed in the other (and it doesn't take up any more space). That means you can install new mods into the GameData folder in the DataSwitcher folder, or in the normal KSP folder. When you switch to a different instance it makes the link in the KSP folder point to a different folder in the DataSwitcher folder.

If you didn't import any folders you can either delete the instance and make a new one, or manually copy the folders into the instance folder.

If you have to use Fallback mode it doesn't make links but instead copies the folders. That means that whatever changes are made in the KSP folder version aren't kept in the DataSwitcher version, which is why I don't suggest using the saves folder in Fallback mode.

Link to comment
Share on other sites

I'd suggest backing up your saves and GameData folder just in case.

The easiest thing to do would be to create an instance based on what you have already in GameData. Load up DataSwitcher, press the "+" button, give it a name and browse to the Game Path (if it doesn't recognize it already). Note that the game path is to the Kerbal Space Program folder, not GameData. Then select what folders you want to import (GameData is likely one of them, you may also want to import the saves folder if you want separate save games per instance. Use the CTRL key to select multiples). Press Create and it should import the folders (it may take a while. It should say "Copying GameData" with a progressbar). When that's finished, go into the DataSwitcher folder (same place as the DataSwitcher jar file) and check to see if there's a folder with the same name as the instance you created. If you open that folder you should see whatever folders you imported.

If you select and Activate the instance you created, it will delete the folders from the main KSP folder and create new links to the folders in the DataSwitcher folder. Any changes made to one will be changed in the other (and it doesn't take up any more space). That means you can install new mods into the GameData folder in the DataSwitcher folder, or in the normal KSP folder. When you switch to a different instance it makes the link in the KSP folder point to a different folder in the DataSwitcher folder.

If you didn't import any folders you can either delete the instance and make a new one, or manually copy the folders into the instance folder.

If you have to use Fallback mode it doesn't make links but instead copies the folders. That means that whatever changes are made in the KSP folder version aren't kept in the DataSwitcher version, which is why I don't suggest using the saves folder in Fallback mode.

Still a little confused...

Link to comment
Share on other sites

Ok, I'll try to be more clear. Is there any specific part that is confusing?

When you run it you first have to create a new instance (with the + button). You give it a name in the first field, locate the Kerbal Space Program folder for the second field, then choose which folders you want to have multiples of. Then you create the instance (I suggest double checking that the folder was created in the DataSwitcher folder after creating it) and activate it. If you want to have a different instance (say, to use a different set of mods. AKA a different GameData folder) you just create a separate instance for that and put whatever mods you want in the GameData folder for that instance (in the DataSwitcher folder). You can then switch between them by selecting and activating the instance (mods) you want to use.

Example:

You currently have a totally stock version of KSP. You go to create a new instance named "Stock" and the KSP folder is located at "C:\Program Files (x86)\Steam\SteamApps\common\Kerbal Space Program\". You select the GameData folder to be imported into the new instance. You press "Create" and it copies the GameData folder to the DataSwitcher folder. You double check that DataSwitcher\Stock\GameData exists and has the Squad and NASAMission folders. You then activate the Stock instance and can play KSP with stock as normal.

Later on you decide to add some mods, but want to have a pristine Stock folder in case you want to use different mods later/want to play stock. The "Stock" instance is still activated when you open DataSwitcher. You go to create a new instance called "Modded" with the same KSP folder location as before. You once again select to import the GameData folder. After creating the instance you double check that DataSwitcher\Modded\GameData exists and has the Squad and NASAMission folders. You then add your mods to that GameData folder and activate the "Modded" instance in DataSwitcher. Now when you run KSP you'll have mods.

If you want to play with Stock again, just activate "Stock" and start KSP. No more mods. You can freely swap between them.

The next bit of info is a little more advanced and isn't necessary at first:

Maybe later you decide you want to try out another set of mods. If you activate the Stock instance first, then import the GameData folder like before then you'll only have the Squad and NASAMission folders in it (DataSwitcher\NewInstance\GameData). If you activate the Modded instance before creating the new one it will copy everything from the Modded GameData folder into the new one, so you can essentially copy the instance and then add new mods on top of that.

So then maybe you have these instances which you can swap between:

Stock

Basic (created by activating Stock and then creating a new one. Contains visual enhancements/kerbal engineer/KAC/etc)

Modded (created by activating Basic and then adding even more mods)

Test (created by activating Stock first, then adding new mods you want to try out without having everything else installed)

Link to comment
Share on other sites

Ok, I'll try to be more clear. Is there any specific part that is confusing?

When you run it you first have to create a new instance (with the + button). You give it a name in the first field, locate the Kerbal Space Program folder for the second field, then choose which folders you want to have multiples of. Then you create the instance (I suggest double checking that the folder was created in the DataSwitcher folder after creating it) and activate it. If you want to have a different instance (say, to use a different set of mods. AKA a different GameData folder) you just create a separate instance for that and put whatever mods you want in the GameData folder for that instance (in the DataSwitcher folder). You can then switch between them by selecting and activating the instance (mods) you want to use.

Example:

You currently have a totally stock version of KSP. You go to create a new instance named "Stock" and the KSP folder is located at "C:\Program Files (x86)\Steam\SteamApps\common\Kerbal Space Program\". You select the GameData folder to be imported into the new instance. You press "Create" and it copies the GameData folder to the DataSwitcher folder. You double check that DataSwitcher\Stock\GameData exists and has the Squad and NASAMission folders. You then activate the Stock instance and can play KSP with stock as normal.

Later on you decide to add some mods, but want to have a pristine Stock folder in case you want to use different mods later/want to play stock. The "Stock" instance is still activated when you open DataSwitcher. You go to create a new instance called "Modded" with the same KSP folder location as before. You once again select to import the GameData folder. After creating the instance you double check that DataSwitcher\Modded\GameData exists and has the Squad and NASAMission folders. You then add your mods to that GameData folder and activate the "Modded" instance in DataSwitcher. Now when you run KSP you'll have mods.

If you want to play with Stock again, just activate "Stock" and start KSP. No more mods. You can freely swap between them.

The next bit of info is a little more advanced and isn't necessary at first:

Maybe later you decide you want to try out another set of mods. If you activate the Stock instance first, then import the GameData folder like before then you'll only have the Squad and NASAMission folders in it (DataSwitcher\NewInstance\GameData). If you activate the Modded instance before creating the new one it will copy everything from the Modded GameData folder into the new one, so you can essentially copy the instance and then add new mods on top of that.

So then maybe you have these instances which you can swap between:

Stock

Basic (created by activating Stock and then creating a new one. Contains visual enhancements/kerbal engineer/KAC/etc)

Modded (created by activating Basic and then adding even more mods)

Test (created by activating Stock first, then adding new mods you want to try out without having everything else installed)

Okay, I think I get it now.

Link to comment
Share on other sites

  • 5 months later...
Any chance of updating this for Java8?

The main window opens, but the Add button does nothing.

Sure! I didn't realize anyone other than me ever used this. I should be able to do that pretty easily. I should take some time to update this a bit. I've thought of a few ways to make it a bit better.

Edit: So it seems to work fine for me with Java 8, but just to be sure I opened it up in eclipse using Java 8 and rebuilt the jar. I'll link to that below. It's otherwise identical to the one in the OP. If you're still having issues, please let me know what operating system you're using (I had issues with it in the past on Linux) and maybe send me the log.txt file since it might contain an error message.

http://www./download/6zb64hzdk5z6mlu/DataSwitcher.jar

Edited by magico13
Link to comment
Share on other sites

Edit: So it seems to work fine for me with Java 8, but just to be sure I opened it up in eclipse using Java 8 and rebuilt the jar. I'll link to that below. It's otherwise identical to the one in the OP. If you're still having issues, please let me know what operating system you're using (I had issues with it in the past on Linux) and maybe send me the log.txt file since it might contain an error message.

http://www./download/6zb64hzdk5z6mlu/DataSwitcher.jar

Sorry to report that this has the same problem.. main window opens but Add button does nothing. So I'm guessing it's something to do with my system, but no idea what that would be.

Windows 7 64bit, fully up to date.

Java 8, update 25.

Being run from an Administrator account.

No log.txt file is being generated.

Link to comment
Share on other sites

When I get home I'll try with a similar setup. I think my Windows 7 system uses Java 7, but my Windows 8 uses Java 8. It works fine on both for me.

The log.txt should be in the DataSwitcher folder that gets made when you start DataSwitcher. If that's not being made, you might have antivirus software that's blocking it?

When you click the "+" button, the window doesn't appear, correct? Or is it that when you press the "Create" button, nothing happens? You could try running it through the command line to see if it outputs anything there. Just hold shift and right click on the folder where you have the DataSwitcher jar file. Select the "Open Command Window Here" or similar action. A black box will appear. Just type (without quotes) "java -jar DataSwitcher-0.2.17.jar" (using whatever the file is named, which would be DataSwitcher-java8.jar for the new file). It should open the main window like normal, and you might see some text printed to the command window when you try to create a new instance. If you can take a screenshot of that text (assuming there is some) that would be great!

Link to comment
Share on other sites

The log.txt should be in the DataSwitcher folder that gets made when you start DataSwitcher. If that's not being made, you might have antivirus software that's blocking it?
Turns out the DataSwitcher folder IS being made.. just that my Explorer window didn't auto-refresh for some reason, so I didn't spot it at the time. The log file is there.. see below.
When you click the "+" button, the window doesn't appear, correct?
Correct.

You could try running it through the command line to see if it outputs anything there. Just hold shift and right click on the folder where you have the DataSwitcher jar file. Select the "Open Command Window Here" or similar action. A black box will appear. Just type (without quotes) "java -jar DataSwitcher-0.2.17.jar" (using whatever the file is named, which would be DataSwitcher-java8.jar for the new file). It should open the main window like normal, and you might see some text printed to the command window when you try to create a new instance. If you can take a screenshot of that text (assuming there is some) that would be great!
No text appears in the console window when I try this.

Here's the log file:

Starting DataSwitcher v0.2.17

Reading settings file.

Reading instances file.

Loaded 0 instances.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

at dataswitcher.GuiConfirmCreate.updateList(GuiConfirmCreate.java:138)

at dataswitcher.GuiConfirmCreate.<init>(GuiConfirmCreate.java:127)

at dataswitcher.GuiMain$3.actionPerformed(GuiMain.java:148)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at javax.swing.JComponent.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$400(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue$4.run(Unknown Source)

at java.awt.EventQueue$4.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Writing instance file.

Writing settings file.

Link to comment
Share on other sites

Thank you for that! I know what the issue is now, you don't have KSP through steam so when it sets the default directory to the steam directory it fails. I can reproduce it on my end quite easily now. I'll get you an update asap.

Edit: Alright, this one should work properly now! http://www./download/y6z4s49bswd121p/DataSwitcher-0.2.18.jar

Edited by magico13
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...