From e0fb66428a9b78b4c326df8d7e30429a5b271d74 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Sun, 12 Apr 2026 02:40:00 -0500 Subject: Remove dead plugin scaffolds and duplicate lib dirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The *_native C++ ports were replaced by bundled Python + .py plugins in de4db79, but the source dirs were left behind without any CMake wiring — causing confusion when editing them appears to do nothing. Same story for libs/dds_header (stale duplicate of libs/preview_dds, unrelated to the actively-used libs/dds-header) and libs/game_gamebryo (superseded by libs/game_bethesda/src/gamebryo). Removes: - libs/basic_games_native - libs/form43_checker_native - libs/installer_omod_native - libs/preview_dds_native - libs/rootbuilder_native - libs/script_extender_checker_native - libs/dds_header - libs/game_gamebryo --- .../src/gamebryo/gamebryodataarchives.cpp | 80 ---------------------- 1 file changed, 80 deletions(-) delete mode 100644 libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp (limited to 'libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp') diff --git a/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp b/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp deleted file mode 100644 index 3dcba8a..0000000 --- a/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "gamebryodataarchives.h" - -#include - -#include -#include - -#include "gamegamebryo.h" - -GamebryoDataArchives::GamebryoDataArchives(const GameGamebryo* game) : m_Game{game} {} - -QDir GamebryoDataArchives::gameDirectory() const -{ - return QDir(m_Game->gameDirectory()).absolutePath(); -} - -QDir GamebryoDataArchives::localGameDirectory() const -{ - return QDir(m_Game->myGamesPath()).absolutePath(); -} - -QStringList GamebryoDataArchives::getArchivesFromKey(const QString& iniFile, - const QString& key, - const int size) const -{ - wchar_t* buffer = new wchar_t[size]; - QStringList result; - std::wstring iniFileW = QDir::toNativeSeparators(iniFile).toStdWString(); - - // epic ms fail: GetPrivateProfileString uses errno (for whatever reason) to signal a - // fail since the return value has a different meaning (number of bytes copied). - // HOWEVER, it will not set errno to 0 if NO error occured - errno = 0; - - if (::GetPrivateProfileStringW(L"Archive", key.toStdWString().c_str(), L"", buffer, - size, iniFileW.c_str()) != 0) { - result.append(QString::fromStdWString(buffer).split(',')); - } - - for (int i = 0; i < result.count(); ++i) { - result[i] = result[i].trimmed(); - } - delete[] buffer; - return result; -} - -void GamebryoDataArchives::setArchivesToKey(const QString& iniFile, const QString& key, - const QString& value) -{ - if (!MOBase::WriteRegistryValue(L"Archive", key.toStdWString().c_str(), - value.toStdWString().c_str(), - iniFile.toStdWString().c_str())) { - qWarning("failed to set archives in \"%s\"", qUtf8Printable(iniFile)); - } -} - -void GamebryoDataArchives::addArchive(MOBase::IProfile* profile, int index, - const QString& archiveName) -{ - QStringList current = archives(profile); - if (current.contains(archiveName, Qt::CaseInsensitive)) { - return; - } - - current.insert(index != INT_MAX ? index : current.size(), archiveName); - - writeArchiveList(profile, current); -} - -void GamebryoDataArchives::removeArchive(MOBase::IProfile* profile, - const QString& archiveName) -{ - QStringList current = archives(profile); - if (!current.contains(archiveName, Qt::CaseInsensitive)) { - return; - } - current.removeAll(archiveName); - - writeArchiveList(profile, current); -} -- cgit v1.3.1