예제 #1
0
QString filestuff::mcDir()
{
    QString result = st.read("general", "mcdir", "none").toString();
    if (result == "none")
    {
        QString os = getOS();
        if (os == "Win"){
            result = QDir::homePath() + "/appdata/roaming/.minecraft";
        } else if (os == "Mac") {
            result = QDir::homePath() + "/Library/Application Support/minecraft";
        } else if (os == "Linux") {
            result = QDir::homePath() + "/.minecraft";
        }
    }
    st.write("general", "mcdir", result);
    return result;
}
예제 #2
0
QString filestuff::appDir()
{
    QString result = st.read("general", "appdir", "none").toString();
    if (result == "none")
    {
        QString os = getOS();
        if (os == "Win"){
            result = QDir::homePath() + "/appdata/roaming/MCMx";
        } else if (os == "Mac") {
            result = QDir::homePath() + "/Library/Application Support/MCMx";
        } else if (os == "Linux") {
            result = QDir::homePath() + "/.MCMx";
        }
    }
    exMake(result);
    exMake(result + "/backups");
    st.write("general", "appdir", result);
    return result;
}