Can I carry Mafia's data with me on the go?

finvara

New member
At present, I transition between any one of three different computers.
What I'm looking for is a way to carry my information with me from PC to PC so that Mafia doesn't get confused about things like Semi-rares whenever I happen to move this way.
 

lostcalpolydude

Developer
Staff member
If all computers are running Windows, you can have mafia on a USB drive and everything will be saved on there by default. (If you want to transition to doing that, mafia made several folders in the same place where you put mafia, and you want to move all of them over.)

Another common option is to use something like Dropbox or SugarSync to automatically keep files updated between your computers.
 

finvara

New member
So I would just sync the folders in question between PCs and that should take care of it. Gotcha. I don't suppose there's any way to merge data that's already split?
 

fronobulax

Developer
Staff member
So I would just sync the folders in question between PCs and that should take care of it. Gotcha. I don't suppose there's any way to merge data that's already split?

Before I just used Dropbox to contain everything I needed to run mafia, I used a diff tool on the various files in the settings directory and the data directory and compared directory listings on scripts. You will note that this is not an automatic merge process.
 

xKiv

Active member
If using windows you can just run it from a USB drive, no syncing required, I do.

Technically, you could do it that way even on unix-like machines - just make ~/.kolmafia a symlink to wherever you mount your USB drive.
I wouldn't do it though, because I have this irrational notion that USB drives are not built for much write traffic, and I don't know how mafia's configuration and logging would affect the USB's longevity.


Problems happen when
1) you have different screen resolutions and want them remembered separately
2) you need to set different paths to browsers for relay browsing
3) anything else system-dependent that you want to set on each computer separately

I only switch mafia between machines a couple times every year, and always for at least a full weekend, so I always merge by hand. But ... how about a set of little scripts that would just set your setting for each computer, and you run the correct one when you log in?
 

fronobulax

Developer
Staff member
Problems happen when
1) you have different screen resolutions and want them remembered separately
2) you need to set different paths to browsers for relay browsing
3) anything else system-dependent that you want to set on each computer separately

Running Windows 7 on two different laptops with different screen resolutions...

1) exists but has been workable for me. I just expect to resize for the first character I log in with when I switch machines.
2) has never been a problem for me since I have Firefox installed as the default browser on both machines. I have never had to configure mafia to use anything - it gets the OS default just fine.
3) examples? I'm sure they exist but I can't think of many others at the moment.

2) and 3) are real issues but my experience has been they are less likely or non-existent the closer your machines are to the same, vanilla configuration.
 

Winterbay

Active member
3) examples? I'm sure they exist but I can't think of many others at the moment.

If you, like me, have Notepad++ installed in different locations on the two different computers (home and work) you can only use the shift+right click on a script in the script-menu to open the editor on one of them since for the other one the path will be incorrect.
 

fronobulax

Developer
Staff member
If you, like me, have Notepad++ installed in different locations on the two different computers (home and work) you can only use the shift+right click on a script in the script-menu to open the editor on one of them since for the other one the path will be incorrect.

Thanks. vim is in the same place on both machines but I have never bothered to invoke it from KoLmafia.
 

xKiv

Active member
2) has never been a problem for me since I have Firefox installed as the default browser on both machines. I have never had to configure mafia to use anything - it gets the OS default just fine.

I need the OS default on the windows machine (notebook) to stay MSIE (for work), but want to use firefox.

3) examples? I'm sure they exist but I can't think of many others at the moment.

I had relayUsesCachedImages=true on the notebook, because I always used it on vacations with limited connectivity and thought any extra caching would help ... and =false on my home machine because it seemed to hurt performance (see the "performance issues" thread for recent improvements).

ETA:
Thanks. vim is in the same place on both machines but I have never bothered to invoke it from KoLmafia.
My vim is *definitely not* in the same place on windows and linux!
 

emc2

New member
OK, so I have been switching between windows machines forever using just a USB stick, but I stupidly(?) purchased a macbook pro this weekend, and so far, all I have done is scream when trying to use mafia. I guess the deal is that I lose everything and just start over if I want to switch to a new OS (beyond windows or linux?) I am seriously contemplating taking the new machine back, since it is SO completely foreign to me, but I have some other issues that I thought a mac would easily fix - and so far it has, but if I have to do absolutely nothing beyond those things, the computer is a big ole bust!

Exactly what files would I need to change for a move to mac - anyone know?
 
Last edited:

Ethelred

Member
I play on a mac and have no particular issues. I guess I don't understand what the problem is. If you could be more specific about what you want to do that is causing you trouble, perhaps I could help.
 

emc2

New member
sorry - I was so overwhelmed, I left important details out, so lemme try again:

I have always used Windows, and using a USB stick (or previously dropbox) I have moved between machines easily w/o any problems, but I was talked into purchasing a Mac this weekend when I went to replace my computer b/c of various non-Kol issues that have indeed been solved simply by using a mac.

However, KoLMafia is sort of a different story. I am wondering if it is even possible to save all of the various info currently saved in my folders: CCS, data, scripts, relay etc. Or do I just start completely over and hope to someday reconfigure it all again?

I am basically asking: CAN I move my scripts etc to a mafia folder or whatever the mac equivalent is and will they work? How might I do that, if anyone knows or can point me to a place to figure it out.

Or do I have to build it up from the beginning again?

(My biggest gripe with this is that it loses all of the various things mafia is so great at tracking if I cannot move at least some basic data from one OS to another.)

I am not asking you guys to fix this for me, or give me a walk-through of the issue, but if it is impossible, that would be good to know, and if it is possible, then I would love to know where to start this operation. Thanks for any answers, even if they are depressing.
 

lostcalpolydude

Developer
Staff member
On OS X, the files are stored in ~/Library/Application Support/KoLmafia (where ~ means your home folder, which if I remember correctly (and if it hasn't changed) is /Users/username). As a command line parameter, you can add -DuseCWDasROOT to have files saved in the same folder as the .jar regardless of OS.

It isn't hard to sync those files using Dropbox. If you're just using the USB stick to move files once, it should be straightforward to do that too. If you regularly switch computers and don't want to use something like Dropbox, I'm not sure what the best solution is.
 

emc2

New member
On OS X, the files are stored in ~/Library/Application Support/KoLmafia (where ~ means your home folder, which if I remember correctly (and if it hasn't changed) is /Users/username). As a command line parameter, you can add -DuseCWDasROOT to have files saved in the same folder as the .jar regardless of OS.

It isn't hard to sync those files using Dropbox. If you're just using the USB stick to move files once, it should be straightforward to do that too. If you regularly switch computers and don't want to use something like Dropbox, I'm not sure what the best solution is.

OK - I am going to get some food, think about it & try once more before giving up completely. I do at least understand this! That is a major plus!

And I can use a clean dropbox acct to start as well, so maybe tomorrow I will feel less insane about it & try again before giving up completely.

Thanks Lost & everyone else!

---
PS -- So I should still use the .jar files via dropbox, rather than the ones specified in the wiki specifically for macs? This was the biggest issue I had yesterday - the .jar files were not working from the computer itself, so I switched to the mac files, then realized that the latest update to those was a while ago. Now I am trying w/ jar files, and before I twist things up too much, I want to be sure that is the correct thing. My basic installation is to dropbox using the regular updates (jar files) and I am about to copy everything over to the Mac from the thumb drive, then keep it all running from dropbox, once I figure out how to organize it all.

Is that right?
 
Last edited:

fronobulax

Developer
Staff member
I wonder if there are a couple of incorrect assumptions behind your question? Mafia uses the same data file formats and (sub)directory structure no matter which operating system you use. All mafia files are in a directory tree, so that if you need a copy of everything mafia knows about, including scripts and preferences, you just copy the tree with subdirectories. So sharing mafia installations between computers (or just moving them) is just a process of synchronizing or copying files from one machine to another. Mafia does not care whether one of the machines is a Mac or a Windows machine although how you copy the files and where they are copied from/to does differ.

As for the jar files, they two are operating system independent and if you know how to run a jar file on your OS then you don't need to use any of the special packages.
 

lostcalpolydude

Developer
Staff member
First, double posting is preferable to editing your post here. Your edits have a high chance of being missed by people that you want to see them.

Second, the .jar file is what you want. I've wondered for a while if getting rid of the other file formats would be beneficial.

I wonder if there are a couple of incorrect assumptions behind your question? Mafia uses the same data file formats and (sub)directory structure no matter which operating system you use. All mafia files are in a directory tree, so that if you need a copy of everything mafia knows about, including scripts and preferences, you just copy the tree with subdirectories. So sharing mafia installations between computers (or just moving them) is just a process of synchronizing or copying files from one machine to another. Mafia does not care whether one of the machines is a Mac or a Windows machine although how you copy the files and where they are copied from/to does differ.
To be fair, it's not exactly trivial to know where the files are kept on a non-Windows system if you don't know where to start looking.

As for the jar files, they two are operating system independent and if you know how to run a jar file on your OS then you don't need to use any of the special packages.
I think getting a jar file to run on a new OS is where she is running into issues.
 

fronobulax

Developer
Staff member
First, double posting is preferable to editing your post here. Your edits have a high chance of being missed by people that you want to see them.

Second, the .jar file is what you want. I've wondered for a while if getting rid of the other file formats would be beneficial.


To be fair, it's not exactly trivial to know where the files are kept on a non-Windows system if you don't know where to start looking.


I think getting a jar file to run on a new OS is where she is running into issues.

OK.

Past discussions about eliminating non-jar formats in the distribution have ultimately floundered because it was easier to provide alternative packaging than it was to teach people who had no clue how to run a jar file how to do so on their OS. The latter can be a very fiddly process. (Indeed a side effect of of wiping Java and then reinstalling on my work machine destroyed the file association, the usual solutions are not working and it is presently easier to just open a command window and do "java -jar KolMafia.jar" than it is to actually figure out why the file association remains broken).

As for the directory, since your answer agreed with http://wiki.kolmafia.us/index.php?title=Mafia_directories I figured that should not be the issue.

I remember when people actually believed Java was "write once, run anywhere" and it was supposed to Just Work :)
 

emc2

New member
OK, you guys can stop trying to help me because I have given up for now. I certainly never had trouble figuring out where to look for things on a PC, and if I did, I knew explorer or grep would find it for me -- even when I was very new to it. Also, my PC experience goes back 20+ years, and I will never achieve that with Mac, so I am going to the Apple store for a lesson w/ my list of questions.

If you would like a blow by blow of the many ways I installed it, the versions I used etc to help you PTB figure out what to do about the other build for mac, I can send you the blow-by-blow.

Just to be clear, I wanted to simply USE (even if I had to convert, knowing I would have to move, files) my many scripts, preferences, moods, settings, ccs, all the tiny ash scripts I have created, the relay script I find vital (namely the new mafia-based raidmgr) as well as the aliases, passwords and the other scripts found here to a new computer, which happened to be a Mac. I can do that whole process in under a minute on a PC, so never did I imagine it was something that I would not be able to do or figure out.

I started w/ the latest daily .jar build, and yet - despite all of my files working from that exact set-up on a PC, they DO NOT simply branch from the Mac OS I have - Mac OS X El Capitan -- like they do on a PC. They are not findable in Finder, nor did they show up in a complete computer search. I am guessing they are hidden or blocked from my view, but that makes a daily download which I have to move from the downloads box to the proper place rather difficult. USB stick did NOT work from a mac b/c as both Lost & the wiki said, the files are not kept w/ the mafia build. After doing that, I went to the wiki > install portion and was told to use the whatever file for Macs, so I did that second. After installing that one, it told me my java was too new, and to download an old, unsupported version of java, so I researched running a second/old version of java from something like a USB stick on Macs, and while I have done that begrudgingly on PCs before, a cursory search turned up nothing & I finally asked my first, second & third question (s).

Sorry for not double-posting, but honestly, a full 15 hours -- simply devoted to seeing my own stuff in mafia from the mac had me quite defeated and assuming I would be going to apple to return or get some lessons. When it would be so much simpler to use a PC environment I know well, that seems obvious, but I told them I would give it two weeks, so Apple is in charge of teaching me now and you guys can delete all of this or leave it for posterity - in case I ever get some bright idea about changing to a whole new environment that comes w/o even a mention of what is in the box.

Thank you for your help though, as it has given me a clear idea of what I need to know at the Apple store - whenever I get the time to devote to a lesson on the most simple thing I can think of. Be well - Emma
 

Theraze

Active member
as both Lost & the wiki said, the files are not kept w/ the mafia build.

Not quite true. Lost told you exactly how to make the mafia build keep the files, just like on a PC. But if you'd rather replace the computer, that's fine. :)
 
Top