fix: religate export zip to launcher app only

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

fix(MMCZip): include QUrl

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

fix(FileLink): drop FreeConsole

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

fix(filelink exe): add console sources

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2023-07-30 14:43:04 -07:00
parent f03924478b
commit 5d68a4c992
No known key found for this signature in database
GPG Key ID: E10E321EB160949B
4 changed files with 16 additions and 5 deletions

View File

@ -577,6 +577,9 @@ set(ATLAUNCHER_SOURCES
)
set(LINKEXE_SOURCES
WindowsConsole.cpp
WindowsConsole.h
filelink/FileLink.h
filelink/FileLink.cpp
FileSystem.h
@ -1206,7 +1209,6 @@ endif()
# Add executable
add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${LAUNCHER_SOURCES} ${LAUNCHER_UI} ${LAUNCHER_RESOURCES})
target_compile_definitions(Launcher_logic PUBLIC LAUNCHER_APPLICATION)
target_include_directories(Launcher_logic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(Launcher_logic PUBLIC LAUNCHER_APPLICATION)
target_link_libraries(Launcher_logic

View File

@ -42,7 +42,11 @@
#include <QCoreApplication>
#include <QDebug>
#include <QUrl>
#if defined(LAUNCHER_APPLICATION)
#include <QtConcurrentRun>
#endif
namespace MMCZip {
// ours
@ -424,6 +428,7 @@ bool collectFileListRecursively(const QString& rootDir, const QString& subDir, Q
return true;
}
#if defined(LAUNCHER_APPLICATION)
void ExportToZipTask::executeTask()
{
setStatus("Adding files...");
@ -502,5 +507,7 @@ bool ExportToZipTask::abort()
}
return false;
}
#endif
} // namespace MMCZip
} // namespace MMCZip

View File

@ -151,6 +151,8 @@ bool extractFile(QString fileCompressed, QString file, QString dir);
*/
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter);
#if defined(LAUNCHER_APPLICATION)
class ExportToZipTask : public Task {
public:
ExportToZipTask(QString outputPath, QDir dir, QFileInfoList files, QString destinationPrefix = "", bool followSymlinks = false)
@ -193,4 +195,5 @@ class ExportToZipTask : public Task {
QFuture<ZipResult> m_build_zip_future;
QFutureWatcher<ZipResult> m_build_zip_watcher;
};
#endif
} // namespace MMCZip

View File

@ -269,7 +269,7 @@ void FileLinkApp::runLink()
FS::LinkResult result = { src_path, dst_path, QString::fromStdString(os_err.message()), os_err.value() };
m_path_results.append(result);
} else {
FS::LinkResult result = { src_path, dst_path };
FS::LinkResult result = { src_path, dst_path, "", 0};
m_path_results.append(result);
}
}
@ -329,7 +329,7 @@ void FileLinkApp::readPathPairs()
in >> numLinks;
qDebug() << "numLinks" << numLinks;
for (int i = 0; i < numLinks; i++) {
for (unsigned int i = 0; i < numLinks; i++) {
FS::LinkPair pair;
in >> pair.src;
in >> pair.dst;
@ -352,7 +352,6 @@ FileLinkApp::~FileLinkApp()
fclose(stdout);
fclose(stdin);
fclose(stderr);
FreeConsole();
}
#endif
}