New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use logical file/folder names, Fix Linux file locations #100
Conversation
|
||
Windows: C:\Users\[username]\AppData\Roaming\OsrsBot\Scripts\Precompiled | ||
Linux: /home/[username]/.config/OsrsBot/Scripts/Precompiled | ||
MacOS: /Users/[username]/Library/Application Support/OsrsBot/Scripts/Precompiled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't test Windows or MacOS but I assume it's something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meyer can find out for us later.
} else if (GlobalConfiguration.getCurrentOperatingSystem() == OperatingSystem.LINUX) { | ||
path = Paths.getUnixHome() + File.separator | ||
+ ".config" + File.separator | ||
+ GlobalConfiguration.NAME_LOWERCASE + "_acct.ini"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux users don't like when you pollute ~
- Config files should be in .config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understandable. I don't have a Linux environment and am not heavy into it at the moment.
} else { | ||
path = Paths.getUnixHome() + File.separator + "." | ||
+ GlobalConfiguration.NAME_LOWERCASE + "acct"; | ||
} | ||
return path; | ||
} | ||
|
||
public static String getHomeDirectory() { | ||
public static String GetOsrsBotDirectory() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed method to be more useful
Flipped if statement to make smaller branch on top
Made Linux directory go inside .config again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java methods in the repo should be camelcase with a lowercase initial letter.
Not a big deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops used to C#
@@ -149,7 +160,7 @@ public static String getUnixHome() { | |||
} | |||
} | |||
|
|||
public static final String NAME = "GService"; | |||
public static final String NAME = "OsrsBot"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should never have been called GService (BREAKING CHANGE) - People will have to move their stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better now than later tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard agree.
else { | ||
homeDirBuilder = Paths.getUnixHome(); | ||
} | ||
return (homeDirBuilder + File.separator + GlobalConfiguration.NAME); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can actually remove the else statement and let env be the default return right?
Could also opt for a switch case on the if else.
Not sure what would look cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then MacOS users would be screwed
I mean they already were when they bought a Macbook but no need to rub it in their face
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
CONTAINS BREAKING CHANGES
Users will have to move their scripts and accounts file out of "GService" and into "OsrsBot"