mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-12 22:14:42 +00:00
Install uncompressed data files from cd
This commit is contained in:
parent
9d1daf7dc2
commit
d3748cd5bb
@ -212,13 +212,13 @@ namespace
|
|||||||
for ( bfs::directory_iterator end, dir(from); dir != end; ++dir )
|
for ( bfs::directory_iterator end, dir(from); dir != end; ++dir )
|
||||||
{
|
{
|
||||||
if(bfs::is_directory(dir->path()))
|
if(bfs::is_directory(dir->path()))
|
||||||
installToPath(dir->path(), to / dir->path().filename());
|
installToPath(dir->path(), to / dir->path().filename(), copy);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!copy)
|
if(copy)
|
||||||
bfs::rename(dir->path(), to / dir->path().filename());
|
|
||||||
else
|
|
||||||
bfs::copy_file(dir->path(), to / dir->path().filename());
|
bfs::copy_file(dir->path(), to / dir->path().filename());
|
||||||
|
else
|
||||||
|
bfs::rename(dir->path(), to / dir->path().filename());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ namespace
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for ( bfs::recursive_directory_iterator end, dir(in); dir != end; ++dir )
|
for ( bfs::directory_iterator end, dir(in); dir != end; ++dir )
|
||||||
{
|
{
|
||||||
if(Misc::StringUtils::lowerCase(dir->path().filename().string()) == filename)
|
if(Misc::StringUtils::lowerCase(dir->path().filename().string()) == filename)
|
||||||
return dir->path();
|
return dir->path();
|
||||||
@ -368,6 +368,14 @@ bool UnshieldThread::extract()
|
|||||||
installToPath(videosPath, outputDataFilesDir / "Video", true);
|
installToPath(videosPath, outputDataFilesDir / "Video", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bfs::path cdDFiles = findFile(mMorrowindPath.parent_path(), "data files", false);
|
||||||
|
if(cdDFiles.string() != "")
|
||||||
|
{
|
||||||
|
emit signalGUI(QString("Installing Uncompressed Data files from CD..."));
|
||||||
|
installToPath(cdDFiles, outputDataFilesDir, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bfs::rename(findFile(mwExtractPath, "morrowind.ini"), outputDataFilesDir / "Morrowind.ini");
|
bfs::rename(findFile(mwExtractPath, "morrowind.ini"), outputDataFilesDir / "Morrowind.ini");
|
||||||
|
|
||||||
mTribunalDone = contains(outputDataFilesDir, "tribunal.esm");
|
mTribunalDone = contains(outputDataFilesDir, "tribunal.esm");
|
||||||
@ -391,6 +399,13 @@ bool UnshieldThread::extract()
|
|||||||
if(soundsPath.string() != "")
|
if(soundsPath.string() != "")
|
||||||
installToPath(soundsPath, outputDataFilesDir / "Sounds");
|
installToPath(soundsPath, outputDataFilesDir / "Sounds");
|
||||||
|
|
||||||
|
bfs::path cdDFiles = findFile(mTribunalPath.parent_path(), "data files", false);
|
||||||
|
if(cdDFiles.string() != "")
|
||||||
|
{
|
||||||
|
emit signalGUI(QString("Installing Uncompressed Data files from CD..."));
|
||||||
|
installToPath(cdDFiles, outputDataFilesDir, true);
|
||||||
|
}
|
||||||
|
|
||||||
mBloodmoonDone = contains(outputDataFilesDir, "bloodmoon.esm");
|
mBloodmoonDone = contains(outputDataFilesDir, "bloodmoon.esm");
|
||||||
|
|
||||||
fix_ini(outputDataFilesDir, bfs::path(mTribunalPath).parent_path(), mTribunalDone, mBloodmoonDone);
|
fix_ini(outputDataFilesDir, bfs::path(mTribunalPath).parent_path(), mTribunalDone, mBloodmoonDone);
|
||||||
@ -412,6 +427,13 @@ bool UnshieldThread::extract()
|
|||||||
bfs::path tbPatchPath = findFile(bmExtractPath, "tribunal.esm");
|
bfs::path tbPatchPath = findFile(bmExtractPath, "tribunal.esm");
|
||||||
if(tbPatchPath.string() != "")
|
if(tbPatchPath.string() != "")
|
||||||
bfs::rename(tbPatchPath, outputDataFilesDir / "Tribunal.esm");
|
bfs::rename(tbPatchPath, outputDataFilesDir / "Tribunal.esm");
|
||||||
|
|
||||||
|
bfs::path cdDFiles = findFile(mBloodmoonPath.parent_path(), "data files", false);
|
||||||
|
if(cdDFiles.string() != "")
|
||||||
|
{
|
||||||
|
emit signalGUI(QString("Installing Uncompressed Data files from CD..."));
|
||||||
|
installToPath(cdDFiles, outputDataFilesDir, true);
|
||||||
|
}
|
||||||
|
|
||||||
fix_ini(outputDataFilesDir, bfs::path(mBloodmoonPath).parent_path(), false, mBloodmoonDone);
|
fix_ini(outputDataFilesDir, bfs::path(mBloodmoonPath).parent_path(), false, mBloodmoonDone);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user