mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-02 03:16:58 +03:00
Implement instance creation.
This commit is contained in:
parent
ff3078b3a6
commit
1626fa013c
6 changed files with 109 additions and 5 deletions
|
|
@ -35,17 +35,16 @@ InstVersionList *StdInstanceType::versionList() const
|
|||
InstanceLoader::InstTypeError StdInstanceType::createInstance(Instance *&inst,
|
||||
const QString &instDir) const
|
||||
{
|
||||
QFileInfo rootDir(instDir);
|
||||
QDir rootDir(instDir);
|
||||
|
||||
if (!rootDir.exists() && !QDir().mkdir(rootDir.path()))
|
||||
qDebug(instDir.toUtf8());
|
||||
if (!rootDir.exists() && !rootDir.mkpath("."))
|
||||
{
|
||||
return InstanceLoader::CantCreateDir;
|
||||
}
|
||||
|
||||
StdInstance *stdInst = new StdInstance(instDir, this);
|
||||
|
||||
// TODO: Verify that the instance is valid.
|
||||
|
||||
inst = stdInst;
|
||||
|
||||
return InstanceLoader::NoError;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue