Skip to content

Customize Your Save Path

Andrew Meyers edited this page Aug 30, 2015 · 3 revisions

##Summary

As of v0.3.23 Shuffle Move can be launched with a customized save path. All logs, downloads, configurations, and bug reports will be saved here. In the installer there are five ways to launch the program:

  • The Jar
  • The normal executable
  • The portable executable
  • The *.bat script
  • The *.sh script

Note that if the Jar, *.bat, or *.sh are launched without any arguments they will default to the standard of ${user.home}/Shuffle-Move which is the standard since v0.3.14. It is recommended to not redirect the pathway unless you want to either a) have the program portable, backing up settings via a cloud sharing folder, or b) define the location for easier access. Note that in either case you will want to copy over the folder from the previous save path to your new path to retain all your roster and team settings.

####Disclaimer Use with caution, as I give no warranty or guarantee of any kind that it will not cause the deletion or removal of any file within the target directory or at the target directory itself - this is due to uncertainty in OS-dependent interaction for saving, and is out of my control.

##The Path The relative root for paths (the place that relative path names start from) will vary depending on your current Java defaults. For Windows, this is usually the folder you click the executable in. Alternatively, you can define the path by an absolute pathway which is independent of your Java defaults and allows precision in the exact location where your folders and updates will be placed.

All pathways that include slashes should use the forward slash '/' and NOT the backslash '' so that the path names themselves will not experience any problems with escape sequences or platform-dependent behaviour.

The path must be encapsulated in a pair of double quotation marks:

"C:/path/to/directory/ShuffleMove/"

Note that the final slash does not matter, since the program will assume it is a folder. If the folder does not exit it will be created for you in most cases. If this fails to work, please create the folder's complete path manually and try again.

##Usage ###The Jar To use the Jar with a customized path, simply launch either from the command line or from a shortcut to the jar while giving the path as an argument.

Example: java -jar "Shuffle Move v0.3.23.jar" "C:/ShuffleMove" This will launch the program, pointing all files to be created and read from C:/ShuffleMove Note that any downloaded updates will appear at C:/ShuffleMove/Shuffle Move vX.X.X.zip

###The *.bat script ####Modify the script For Windows users, this will allow you to customize a simple script that will point the jar to a defined folder for all saving and loading. Simply modify the line

start "Shuffle Move" /MIN java -jar "Shuffle Move v0.3.23_eclipse.jar" %* To something like this: start "Shuffle Move" /MIN java -jar "Shuffle Move v0.3.23_eclipse.jar" "C:/ShuffleMove" This example will cause the *.bat script to always launch the program pointing to D:/ShuffleMove

####Pass an argument to the script Simply call the script while passing "C:/ShuffleMove" as the argument. Ensure that the path is properly encapsulated in double quotation marks.

###The *.sh script Note that for either method, the script will need to be made executable to be used. On Ubuntu this is accomplished through chmod +x <file name> ####Modify the script For Linux and Macintosh users, this will allow you to customize a simple script that will point the jar to a defined folder for all saving and loading. Simply modify the line

java -jar "Shuffle Move v0.3.23_eclipse.jar" "$@" To something like this: java -jar "Shuffle Move v0.3.23_eclipse.jar" "/home/username/.shufflemove/" This example will cause the *.sh script to always launch the program pointing to /home/username/.shufflemove/ ####Pass an argument to the script Simply call the script while passing "/path/to/folder/" as the argument. Ensure that the path is properly encapsulated in double quotation marks.

###The executables ####Normal This will use the default pathway, and accepts no arguments (simple *.exe) This is equivalent to simply launching the Jar with no argument. ####Portable This will use the relative pathway for the java home directory, and accepts no arguments (simple *.exe). This is equivalent to launching the Jar with "." as the argument.

###Conclusion There are now many ways to start the program, to better allow the user to define their own save location and to allow the capability for portable usage and cloud backups.