mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
147
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
043a5fa941 | ||
|
|
b1af3eed10 | ||
|
|
a4679b6fac | ||
|
|
d541f982a5 | ||
|
|
93028df242 | ||
|
|
e69c84d40e | ||
|
|
3d56e17dd8 | ||
|
|
1f3133059e | ||
|
|
ff7fd68c0b | ||
|
|
5f8c95e78e | ||
|
|
6a19ac3de5 | ||
|
|
bca9f0ec56 | ||
|
|
a337972ffb | ||
|
|
6dd246363e | ||
|
|
1f50d61ecb | ||
|
|
c3ff652ff8 | ||
|
|
d141258357 | ||
|
|
5ba369680d | ||
|
|
b6be2863f2 | ||
|
|
5b6f16f06a | ||
|
|
4144684d8d | ||
|
|
84be4c5440 | ||
|
|
968cc4b495 | ||
|
|
be93ce0690 | ||
|
|
7819a1aa27 | ||
|
|
105a112f3c | ||
|
|
df142f8310 | ||
|
|
c49fce871a | ||
|
|
e8e7f70ded | ||
|
|
abfbf68469 | ||
|
|
d26c4e8ea2 | ||
|
|
c1210714f8 | ||
|
|
57c14681f2 | ||
|
|
c28750d0fb | ||
|
|
035cf9e767 | ||
|
|
78954b0b9f | ||
|
|
a6c32d0c3d | ||
|
|
aaeb0e8570 | ||
|
|
77bcfdfdb3 | ||
|
|
d5ba880283 | ||
|
|
70bcd97bd2 | ||
|
|
2eecead236 | ||
|
|
6c0f5202ce | ||
|
|
d5332c5080 | ||
|
|
09a68079bb | ||
|
|
0174423841 | ||
|
|
dfc992f467 | ||
|
|
fa44740193 | ||
|
|
249745c6b1 | ||
|
|
667ef70cc8 | ||
|
|
899fa6e78d | ||
|
|
bcca611176 | ||
|
|
ceb0ea65ed | ||
|
|
ba8ce395cf | ||
|
|
208f389300 | ||
|
|
77d6b71395 | ||
|
|
570dc369b7 | ||
|
|
ef80a8baca | ||
|
|
0798e102ba | ||
|
|
01203bb467 | ||
|
|
5812ad3d46 | ||
|
|
8f0f41f08c | ||
|
|
6984711a01 | ||
|
|
3a290b8a5a | ||
|
|
8027fea667 | ||
|
|
9dbac137ef | ||
|
|
277e0ffded | ||
|
|
78be0744f9 | ||
|
|
330ff910d1 | ||
|
|
067d605a58 | ||
|
|
51c02718b1 | ||
|
|
b62dff5fd6 | ||
|
|
8d5cfc2470 | ||
|
|
1a123d2dfa | ||
|
|
9ec158dcee | ||
|
|
046a72346c | ||
|
|
f9ac64c65d | ||
|
|
9634549f92 | ||
|
|
d2120a9c55 | ||
|
|
70a9cf9429 | ||
|
|
61842daf93 | ||
|
|
b43ab45493 | ||
|
|
ec0a0a2beb | ||
|
|
42ae919c96 | ||
|
|
f7d1ce1fae | ||
|
|
2b9d2f32fb | ||
|
|
5a7d0243c6 | ||
|
|
b59c44aaa1 | ||
|
|
3f86a94ff7 | ||
|
|
8bc9db23d9 | ||
|
|
eb575e2f92 | ||
|
|
ae74c7ff2b | ||
|
|
d86d2f704a | ||
|
|
a873c7be23 | ||
|
|
177f5c0446 | ||
|
|
91e909bc45 | ||
|
|
17b36957ff | ||
|
|
34a374fce8 | ||
|
|
f7220cdd22 | ||
|
|
2b5862ef01 | ||
|
|
78ae7072c9 | ||
|
|
7f56407b91 | ||
|
|
d08b836265 | ||
|
|
b7d2a608d8 | ||
|
|
f04c437960 | ||
|
|
42d8bba5d4 | ||
|
|
b751b070e5 | ||
|
|
2454690813 | ||
|
|
bbed7c0a32 | ||
|
|
6b9e94473a | ||
|
|
5aed35d2b6 | ||
|
|
04c6c6da5c | ||
|
|
c7c4a8b08e | ||
|
|
6030a1d1fc | ||
|
|
f07f6b8904 | ||
|
|
ef286a938d | ||
|
|
a305ea2270 | ||
|
|
370e010a1a | ||
|
|
4932c52136 | ||
|
|
23ff0bea74 | ||
|
|
72de94ee89 | ||
|
|
56f9ba159b | ||
|
|
f6dcc77158 | ||
|
|
b4a9dd410c | ||
|
|
b6805f2730 | ||
|
|
b6498abaf3 | ||
|
|
fbbff08fb8 | ||
|
|
4bea346b26 | ||
|
|
7de78b6697 | ||
|
|
9fe2f6126d | ||
|
|
bd9cc6254c | ||
|
|
f0f672f9b7 | ||
|
|
63134bc94a | ||
|
|
24ef8c56d2 | ||
|
|
fa9427d22a | ||
|
|
3a1a381b9b | ||
|
|
57fd35fc47 | ||
|
|
ee266e5220 | ||
|
|
d0a6321a39 | ||
|
|
b1f91d28fb | ||
|
|
c19ba15337 | ||
|
|
4b98a3f5b6 | ||
|
|
55249ba3a6 | ||
|
|
600b0786eb | ||
|
|
02c5b083dc | ||
|
|
4d8920cec1 | ||
|
|
2106f29224 |
@@ -0,0 +1,28 @@
|
||||
version: 1.0.{build}
|
||||
skip_branch_with_pr: true
|
||||
image: Visual Studio 2017
|
||||
environment:
|
||||
WEBHOOK_URL:
|
||||
secure: gOKbXaZM9ImtMD5XrYITvdyZUW/az082G9OIN1EC1VYoNNsKROB4s6VsQiL6qbLNLc4XQhc8Y9DhdU9Hfh49vhypcjUEQmMsENxnp+1hYMJctTqIYDunVSd767eez5wz6rKHqk+XOHmg5gyVNCV9u4DVcCZJSVe4UTKn1lc47H0=
|
||||
build_script:
|
||||
- cmd: >-
|
||||
git clone --depth=1 --branch=%APPVEYOR_REPO_BRANCH% https://github.com/ModOrganizer2/modorganizer-umbrella.git c:\projects\modorganizer-umbrella 2> $null
|
||||
|
||||
mkdir c:\projects\modorganizer-build -type directory
|
||||
|
||||
cd c:\projects\modorganizer-umbrella
|
||||
|
||||
C:\Python37-x64\python.exe unimake.py -d c:\projects\modorganizer-build -s Appveyor_Build=True %APPVEYOR_PROJECT_NAME%
|
||||
artifacts:
|
||||
- path: vsbuild\src\RelWithDebInfo\ModOrganizer.exe
|
||||
name: modorganizer_exe
|
||||
- path: vsbuild\src\RelWithDebInfo\ModOrganizer.pdb
|
||||
name: modorganizer_pdb
|
||||
on_success:
|
||||
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
|
||||
- ps: ./send.ps1 success $env:WEBHOOK_URL
|
||||
on_failure:
|
||||
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
|
||||
- ps: ./send.ps1 failure $env:WEBHOOK_URL
|
||||
@@ -1,3 +1,5 @@
|
||||
[](https://ci.appveyor.com/project/Modorganizer2/modorganizer)
|
||||
|
||||
# Mod Organizer
|
||||
|
||||
Mod Organizer (MO) is a tool for managing mod collections of arbitrary size. It is specifically designed for people who like to experiment with mods and thus need an easy and reliable way to install and uninstall them.
|
||||
@@ -82,4 +84,3 @@ Here is a complete list:
|
||||
### Unused Repositories
|
||||
* https://github.com/Modorganizer2/modorganizer-hookdll
|
||||
* https://github.com/TanninOne/modorganizer-tool_nmmimport
|
||||
|
||||
|
||||
+8
-8
@@ -79,7 +79,6 @@ SET(organizer_SRCS
|
||||
previewgenerator.cpp
|
||||
previewdialog.cpp
|
||||
aboutdialog.cpp
|
||||
json.cpp
|
||||
modflagicondelegate.cpp
|
||||
genericicondelegate.cpp
|
||||
organizerproxy.cpp
|
||||
@@ -173,7 +172,6 @@ SET(organizer_HDRS
|
||||
previewgenerator.h
|
||||
previewdialog.h
|
||||
aboutdialog.h
|
||||
json.h
|
||||
modflagicondelegate.h
|
||||
genericicondelegate.h
|
||||
organizerproxy.h
|
||||
@@ -250,7 +248,8 @@ SOURCE_GROUP(Headers FILES ${organizer_HDRS})
|
||||
SOURCE_GROUP(UI FILES ${organizer_UIS})
|
||||
|
||||
# MO projects
|
||||
SET(default_project_path "${CMAKE_SOURCE_DIR}/..")
|
||||
SET(dependency_project_path "${DEPENDENCIES_DIR}")
|
||||
SET(default_project_path "${DEPENDENCIES_DIR}/modorganizer_super")
|
||||
GET_FILENAME_COMPONENT(${default_project_path} ${default_project_path} REALPATH)
|
||||
|
||||
SET(project_path "${default_project_path}" CACHE PATH "path to the other mo projects")
|
||||
@@ -267,6 +266,7 @@ FIND_PACKAGE(Qt5Quick REQUIRED)
|
||||
FIND_PACKAGE(Qt5Network REQUIRED)
|
||||
FIND_PACKAGE(Qt5WinExtras REQUIRED)
|
||||
FIND_PACKAGE(Qt5WebEngineWidgets REQUIRED)
|
||||
FIND_PACKAGE(Qt5WebSockets REQUIRED)
|
||||
FIND_PACKAGE(Qt5Qml REQUIRED)
|
||||
FIND_PACKAGE(Qt5LinguistTools)
|
||||
QT5_WRAP_UI(organizer_UIHDRS ${organizer_UIS})
|
||||
@@ -296,7 +296,7 @@ INCLUDE_DIRECTORIES(${project_path}/uibase/src
|
||||
${project_path}/bsatk/src
|
||||
${project_path}/esptk/src
|
||||
${project_path}/archive/src
|
||||
${project_path}/../usvfs/include
|
||||
${dependency_project_path}/usvfs/include
|
||||
${project_path}/game_gamebryo/src/gamebryo
|
||||
${project_path}/game_gamebryo/src/creation
|
||||
${project_path}/game_features/src
|
||||
@@ -325,12 +325,12 @@ ENDIF()
|
||||
ADD_EXECUTABLE(ModOrganizer WIN32 ${organizer_HDRS} ${organizer_SRCS} ${organizer_UIHDRS} ${organizer_RCS} ${organizer_RCCPPS} ${organizer_translations_qm})
|
||||
TARGET_LINK_LIBRARIES(ModOrganizer
|
||||
Qt5::Widgets Qt5::WinExtras Qt5::WebEngineWidgets Qt5::Quick
|
||||
Qt5::Qml Qt5::QuickWidgets Qt5::Network
|
||||
Qt5::Qml Qt5::QuickWidgets Qt5::Network Qt5::WebSockets
|
||||
${Boost_LIBRARIES}
|
||||
zlibstatic
|
||||
uibase esptk bsatk githubpp
|
||||
${usvfs_name}
|
||||
Dbghelp advapi32 Version Shlwapi liblz4)
|
||||
Dbghelp advapi32 Version Shlwapi liblz4 Crypt32)
|
||||
|
||||
IF (MSVC)
|
||||
SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES COMPILE_FLAGS "/std:c++latest")
|
||||
@@ -368,12 +368,12 @@ SET(windeploy_parameters "--no-translations --plugindir qtplugins --libdir dlls
|
||||
INSTALL(
|
||||
CODE
|
||||
"EXECUTE_PROCESS(COMMAND
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets ${windeploy_parameters}
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets --websockets ${windeploy_parameters}
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
# run it a second time because on the first run it misses some files
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets ${windeploy_parameters}
|
||||
${qt5bin}/windeployqt.exe ModOrganizer.exe --webenginewidgets --websockets ${windeploy_parameters}
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
|
||||
)
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
|
||||
@@ -32,16 +32,6 @@ CredentialsDialog::~CredentialsDialog()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QString CredentialsDialog::username() const
|
||||
{
|
||||
return ui->usernameEdit->text();
|
||||
}
|
||||
|
||||
QString CredentialsDialog::password() const
|
||||
{
|
||||
return ui->passwordEdit->text();
|
||||
}
|
||||
|
||||
bool CredentialsDialog::store() const
|
||||
{
|
||||
return ui->rememberCheck->isChecked();
|
||||
|
||||
@@ -34,9 +34,6 @@ public:
|
||||
explicit CredentialsDialog(QWidget *parent = 0);
|
||||
~CredentialsDialog();
|
||||
|
||||
QString username() const;
|
||||
QString password() const;
|
||||
|
||||
bool store() const;
|
||||
bool neverAsk() const;
|
||||
|
||||
|
||||
@@ -178,10 +178,9 @@ void DirectoryRefresher::refresh()
|
||||
std::wstring dataDirectory = QDir::toNativeSeparators(game->dataDirectory().absolutePath()).toStdWString();
|
||||
m_DirectoryStructure->addFromOrigin(L"data", dataDirectory, 0);
|
||||
|
||||
// TODO what was the point of having the priority in this tuple? the list is already sorted by priority
|
||||
std::sort(m_Mods.begin(), m_Mods.end(), [](auto lhs, auto rhs){return lhs.priority < rhs.priority;});
|
||||
auto iter = m_Mods.begin();
|
||||
|
||||
//TODO i is the priority here, where higher = more important. the input vector is also sorted by priority but inverted!
|
||||
for (int i = 1; iter != m_Mods.end(); ++iter, ++i) {
|
||||
try {
|
||||
addModToStructure(m_DirectoryStructure, iter->modName, i, iter->absolutePath, iter->stealFiles, iter->archives);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<file name="Qt5Svg.dll"/>
|
||||
<file name="Qt5WebEngineCore.dll"/>
|
||||
<file name="Qt5WebEngineWidgets.dll"/>
|
||||
<file name="Qt5WebSockets.dll"/>
|
||||
<file name="Qt5Widgets.dll"/>
|
||||
<file name="Qt5WinExtras.dll"/>
|
||||
</assembly>
|
||||
</assembly>
|
||||
|
||||
@@ -104,8 +104,9 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const
|
||||
case DownloadManager::STATE_CANCELED: return tr("Canceled");
|
||||
case DownloadManager::STATE_PAUSED: return tr("Paused");
|
||||
case DownloadManager::STATE_ERROR: return tr("Error");
|
||||
case DownloadManager::STATE_FETCHINGMODINFO: return tr("Fetching Info 1");
|
||||
case DownloadManager::STATE_FETCHINGFILEINFO: return tr("Fetching Info 2");
|
||||
case DownloadManager::STATE_FETCHINGMODINFO: return tr("Fetching Info");
|
||||
case DownloadManager::STATE_FETCHINGFILEINFO: return tr("Fetching Info");
|
||||
case DownloadManager::STATE_FETCHINGMODINFO_MD5: return tr("Fetching Info");
|
||||
case DownloadManager::STATE_READY: return tr("Downloaded");
|
||||
case DownloadManager::STATE_INSTALLED: return tr("Installed");
|
||||
case DownloadManager::STATE_UNINSTALLED: return tr("Uninstalled");
|
||||
@@ -133,7 +134,7 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const
|
||||
text += tr("Information missing, please select \"Query Info\" from the context menu to re-retrieve.");
|
||||
} else {
|
||||
const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(index.row());
|
||||
return QString("%1 (ID %2) %3<br><span>%4</span>").arg(info->modName).arg(m_Manager->getModID(index.row())).arg(info->version.canonicalString()).arg(info->description);
|
||||
return QString("%1 (ID %2) %3<br><span>%4</span>").arg(info->modName).arg(m_Manager->getModID(index.row())).arg(info->version.canonicalString()).arg(info->description.chopped(4096));
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -199,8 +199,8 @@ void DownloadListWidget::onCustomContextMenu(const QPoint &point)
|
||||
|
||||
if (state >= DownloadManager::STATE_READY) {
|
||||
menu.addAction(tr("Install"), this, SLOT(issueInstall()));
|
||||
if (m_Manager->isInfoIncomplete(m_ContextRow))
|
||||
menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfo()));
|
||||
if (m_Manager->isInfoIncomplete(m_ContextRow))
|
||||
menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfoMd5()));
|
||||
else
|
||||
menu.addAction(tr("Visit on Nexus"), this, SLOT(issueVisitOnNexus()));
|
||||
menu.addAction(tr("Open File"), this, SLOT(issueOpenFile()));
|
||||
@@ -252,6 +252,11 @@ void DownloadListWidget::issueQueryInfo()
|
||||
emit queryInfo(m_ContextRow);
|
||||
}
|
||||
|
||||
void DownloadListWidget::issueQueryInfoMd5()
|
||||
{
|
||||
emit queryInfoMd5(m_ContextRow);
|
||||
}
|
||||
|
||||
void DownloadListWidget::issueDelete()
|
||||
{
|
||||
if (QMessageBox::question(nullptr, tr("Delete Files?"),
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
signals:
|
||||
void installDownload(int index);
|
||||
void queryInfo(int index);
|
||||
void queryInfoMd5(int index);
|
||||
void removeDownload(int index, bool deleteFile);
|
||||
void restoreDownload(int index);
|
||||
void cancelDownload(int index);
|
||||
@@ -109,6 +110,7 @@ private slots:
|
||||
void issueRemoveFromViewCompleted();
|
||||
void issueRemoveFromViewUninstalled();
|
||||
void issueQueryInfo();
|
||||
void issueQueryInfoMd5();
|
||||
|
||||
private:
|
||||
DownloadManager *m_Manager;
|
||||
|
||||
+2066
-1853
File diff suppressed because it is too large
Load Diff
+575
-568
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QCoreApplication>
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -53,6 +55,17 @@ void ExecutablesList::init(IPluginGame const *game)
|
||||
info.steamAppID());
|
||||
}
|
||||
}
|
||||
ExecutableInfo explorerpp = ExecutableInfo("Explore Virtual Folder", QFileInfo(QCoreApplication::applicationDirPath() + "/explorer++/Explorer++.exe" ))
|
||||
.withArgument(QString("\"%1\"").arg(QDir::toNativeSeparators(game->dataDirectory().absolutePath())));
|
||||
|
||||
if (explorerpp.isValid()) {
|
||||
addExecutableInternal(explorerpp.title(),
|
||||
explorerpp.binary().absoluteFilePath(),
|
||||
explorerpp.arguments().join(" "),
|
||||
explorerpp.workingDirectory().absolutePath(),
|
||||
explorerpp.steamAppID());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ExecutablesList::getExecutables(std::vector<Executable>::iterator &begin, std::vector<Executable>::iterator &end)
|
||||
|
||||
@@ -80,7 +80,8 @@ static T resolveFunction(QLibrary &lib, const char *name)
|
||||
|
||||
InstallationManager::InstallationManager()
|
||||
: m_ParentWidget(nullptr),
|
||||
m_SupportedExtensions({"zip", "rar", "7z", "fomod", "001"}) {
|
||||
m_SupportedExtensions({"zip", "rar", "7z", "fomod", "001"}),
|
||||
m_IsRunning(false) {
|
||||
QLibrary archiveLib(QCoreApplication::applicationDirPath() +
|
||||
"\\dlls\\archive.dll");
|
||||
if (!archiveLib.load()) {
|
||||
@@ -560,7 +561,7 @@ bool InstallationManager::ensureValidModName(GuessedValue<QString> &name) const
|
||||
|
||||
bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString gameName, int modID,
|
||||
const QString &version, const QString &newestVersion,
|
||||
int categoryID, const QString &repository)
|
||||
int categoryID, int fileCategoryID, const QString &repository)
|
||||
{
|
||||
if (!ensureValidModName(modName)) {
|
||||
return false;
|
||||
@@ -640,6 +641,7 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, QString game
|
||||
if (!settingsFile.contains("category")) {
|
||||
settingsFile.setValue("category", QString::number(categoryID));
|
||||
}
|
||||
settingsFile.setValue("nexusFileStatus", fileCategoryID);
|
||||
settingsFile.setValue("installationFile", m_CurrentFile);
|
||||
settingsFile.setValue("repository", repository);
|
||||
settingsFile.setValue("url", m_URL);
|
||||
@@ -664,6 +666,11 @@ bool InstallationManager::wasCancelled()
|
||||
return m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED;
|
||||
}
|
||||
|
||||
bool InstallationManager::isRunning()
|
||||
{
|
||||
return m_IsRunning;
|
||||
}
|
||||
|
||||
|
||||
void InstallationManager::postInstallCleanup()
|
||||
{
|
||||
@@ -705,6 +712,9 @@ bool InstallationManager::install(const QString &fileName,
|
||||
bool &hasIniTweaks,
|
||||
int modID)
|
||||
{
|
||||
m_IsRunning = true;
|
||||
ON_BLOCK_EXIT([this]() { m_IsRunning = false; });
|
||||
|
||||
QFileInfo fileInfo(fileName);
|
||||
if (m_SupportedExtensions.find(fileInfo.suffix()) == m_SupportedExtensions.end()) {
|
||||
reportError(tr("File format \"%1\" not supported").arg(fileInfo.suffix()));
|
||||
@@ -720,6 +730,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
QString version = "";
|
||||
QString newestVersion = "";
|
||||
int categoryID = 0;
|
||||
int fileCategoryID = 1;
|
||||
QString repository = "Nexus";
|
||||
|
||||
QString metaName = fileName + ".meta";
|
||||
@@ -738,6 +749,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
metaFile.value("category", 0).toInt());
|
||||
categoryID = CategoryFactory::instance().getCategoryID(categoryIndex);
|
||||
repository = metaFile.value("repository", "").toString();
|
||||
fileCategoryID = metaFile.value("fileCategory", 1).toInt();
|
||||
}
|
||||
|
||||
if (version.isEmpty()) {
|
||||
@@ -815,7 +827,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
// the simple installer only prepares the installation, the rest
|
||||
// works the same for all installers
|
||||
if (!doInstall(modName, gameName, modID, version, newestVersion, categoryID,
|
||||
repository)) {
|
||||
fileCategoryID, repository)) {
|
||||
installResult = IPluginInstaller::RESULT_FAILED;
|
||||
}
|
||||
}
|
||||
@@ -871,6 +883,7 @@ bool InstallationManager::install(const QString &fileName,
|
||||
|
||||
reportError(tr("None of the available installer plugins were able to handle that archive.\n"
|
||||
"This is likely due to a corrupted or incompatible download or unrecognized archive format."));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,11 @@ public:
|
||||
**/
|
||||
bool wasCancelled();
|
||||
|
||||
/**
|
||||
* @return true if an installation is currently in progress
|
||||
**/
|
||||
bool isRunning();
|
||||
|
||||
/**
|
||||
* @brief retrieve a string describing the specified error code
|
||||
*
|
||||
@@ -171,7 +176,7 @@ private:
|
||||
MOBase::DirectoryTree::Node *getSimpleArchiveBase(MOBase::DirectoryTree *dataTree);
|
||||
|
||||
bool doInstall(MOBase::GuessedValue<QString> &modName, QString gameName,
|
||||
int modID, const QString &version, const QString &newestVersion, int categoryID, const QString &repository);
|
||||
int modID, const QString &version, const QString &newestVersion, int categoryID, int fileCategoryID, const QString &repository);
|
||||
|
||||
//QString generateBackupName(const QString &directoryName) const;
|
||||
|
||||
@@ -202,6 +207,8 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
bool m_IsRunning;
|
||||
|
||||
QWidget *m_ParentWidget;
|
||||
|
||||
QString m_ModsDirectory;
|
||||
|
||||
-522
File diff suppressed because it is too large
Load Diff
-94
@@ -1,94 +0,0 @@
|
||||
/**
|
||||
* QtJson - A simple class for parsing JSON data into a QVariant hierarchies and vice-versa.
|
||||
* Copyright (C) 2011 Eeli Reilin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file json.h
|
||||
*/
|
||||
|
||||
#ifndef JSON_H
|
||||
#define JSON_H
|
||||
|
||||
#include <QVariant>
|
||||
#include <QString>
|
||||
|
||||
|
||||
/**
|
||||
* \namespace QtJson
|
||||
* \brief A JSON data parser
|
||||
*
|
||||
* Json parses a JSON data into a QVariant hierarchy.
|
||||
*/
|
||||
namespace QtJson {
|
||||
typedef QVariantMap JsonObject;
|
||||
typedef QVariantList JsonArray;
|
||||
|
||||
/**
|
||||
* Parse a JSON string
|
||||
*
|
||||
* \param json The JSON data
|
||||
*/
|
||||
QVariant parse(const QString &json);
|
||||
|
||||
/**
|
||||
* Parse a JSON string
|
||||
*
|
||||
* \param json The JSON data
|
||||
* \param success The success of the parsing
|
||||
*/
|
||||
QVariant parse(const QString &json, bool &success);
|
||||
|
||||
/**
|
||||
* This method generates a textual JSON representation
|
||||
*
|
||||
* \param data The JSON data generated by the parser.
|
||||
*
|
||||
* \return QByteArray Textual JSON representation in UTF-8
|
||||
*/
|
||||
QByteArray serialize(const QVariant &data);
|
||||
|
||||
/**
|
||||
* This method generates a textual JSON representation
|
||||
*
|
||||
* \param data The JSON data generated by the parser.
|
||||
* \param success The success of the serialization
|
||||
*
|
||||
* \return QByteArray Textual JSON representation in UTF-8
|
||||
*/
|
||||
QByteArray serialize(const QVariant &data, bool &success);
|
||||
|
||||
/**
|
||||
* This method generates a textual JSON representation
|
||||
*
|
||||
* \param data The JSON data generated by the parser.
|
||||
*
|
||||
* \return QString Textual JSON representation
|
||||
*/
|
||||
QString serializeStr(const QVariant &data);
|
||||
|
||||
/**
|
||||
* This method generates a textual JSON representation
|
||||
*
|
||||
* \param data The JSON data generated by the parser.
|
||||
* \param success The success of the serialization
|
||||
*
|
||||
* \return QString Textual JSON representation
|
||||
*/
|
||||
QString serializeStr(const QVariant &data, bool &success);
|
||||
}
|
||||
|
||||
#endif //JSON_H
|
||||
+23
-15
@@ -51,21 +51,24 @@ LogBuffer::~LogBuffer()
|
||||
void LogBuffer::logMessage(QtMsgType type, const QString &message)
|
||||
{
|
||||
if (type >= m_MinMsgType) {
|
||||
Message msg = {type, QTime::currentTime(), message};
|
||||
if (m_NumMessages < m_Messages.size()) {
|
||||
beginInsertRows(QModelIndex(), static_cast<int>(m_NumMessages),
|
||||
static_cast<int>(m_NumMessages) + 1);
|
||||
}
|
||||
m_Messages.at(m_NumMessages % m_Messages.size()) = msg;
|
||||
if (m_NumMessages < m_Messages.size()) {
|
||||
endInsertRows();
|
||||
} else {
|
||||
emit dataChanged(createIndex(0, 0),
|
||||
createIndex(static_cast<int>(m_Messages.size()), 0));
|
||||
}
|
||||
++m_NumMessages;
|
||||
if (type >= QtCriticalMsg) {
|
||||
write();
|
||||
QStringList messagelist = message.split("\n");
|
||||
for (auto split_message : messagelist) {
|
||||
Message msg = {type, QTime::currentTime(), split_message};
|
||||
if (m_NumMessages < m_Messages.size()) {
|
||||
beginInsertRows(QModelIndex(), static_cast<int>(m_NumMessages),
|
||||
static_cast<int>(m_NumMessages) + 1);
|
||||
}
|
||||
m_Messages.at(m_NumMessages % m_Messages.size()) = msg;
|
||||
if (m_NumMessages < m_Messages.size()) {
|
||||
endInsertRows();
|
||||
} else {
|
||||
emit dataChanged(createIndex(0, 0),
|
||||
createIndex(static_cast<int>(m_Messages.size()), 0));
|
||||
}
|
||||
++m_NumMessages;
|
||||
if (type >= QtCriticalMsg) {
|
||||
write();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,6 +114,8 @@ char LogBuffer::msgTypeID(QtMsgType type)
|
||||
switch (type) {
|
||||
case QtDebugMsg:
|
||||
return 'D';
|
||||
case QtInfoMsg:
|
||||
return 'I';
|
||||
case QtWarningMsg:
|
||||
return 'W';
|
||||
case QtCriticalMsg:
|
||||
@@ -200,6 +205,7 @@ QVariant LogBuffer::data(const QModelIndex &index, int role) const
|
||||
if (index.column() == 1) {
|
||||
switch (m_Messages[msgIndex].type) {
|
||||
case QtDebugMsg:
|
||||
case QtInfoMsg:
|
||||
return QIcon(":/MO/gui/information");
|
||||
case QtWarningMsg:
|
||||
return QIcon(":/MO/gui/warning");
|
||||
@@ -215,6 +221,8 @@ QVariant LogBuffer::data(const QModelIndex &index, int role) const
|
||||
switch (m_Messages[msgIndex].type) {
|
||||
case QtDebugMsg:
|
||||
return "D";
|
||||
case QtInfoMsg:
|
||||
return "I";
|
||||
case QtWarningMsg:
|
||||
return "W";
|
||||
case QtCriticalMsg:
|
||||
|
||||
+724
-737
File diff suppressed because it is too large
Load Diff
+6941
-6543
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user