feat: add Windows compatibility for external process execution
Some checks are pending
Build eismuliplexer for linux / Build (push) Waiting to run
Some checks are pending
Build eismuliplexer for linux / Build (push) Waiting to run
This PR introduces cross-platform support for launching external binaries (`ace-lm` and `ace-synth`) on Windows systems. **Key changes:** * Introduced `EXE_EXT` constant in `AceStepWorker.h` using `Q_OS_WIN` macro to handle `.exe` extensions automatically. * Updated binary path construction to ensure `QFileInfo::isExecutable()` and `QProcess` work correctly on Windows. * The code remains fully compatible with Linux/macOS (extension remains empty). **Why this is needed:** On Windows, `QProcess` and `QFileInfo` require the `.exe` suffix to correctly identify and execute binary files. Without this change, the application fails to find the required tools even if they are present in the directory.
This commit is contained in:
parent
227ee981a3
commit
cb096388c8
3 changed files with 32 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ bool AceStep::requestGeneration(SongItem song, QString requestTemplate, QString
|
|||
|
||||
request = {song, QRandomGenerator::global()->generate(), aceStepPath, textEncoderModelPath, ditModelPath, vaeModelPath};
|
||||
|
||||
QString qwen3Binary = aceStepPath + "/ace-lm";
|
||||
QString qwen3Binary = aceStepPath + "/ace-lm" + EXE_EXT;
|
||||
QFileInfo qwen3Info(qwen3Binary);
|
||||
if (!qwen3Info.exists() || !qwen3Info.isExecutable())
|
||||
{
|
||||
|
|
@ -141,7 +141,7 @@ void AceStep::qwenProcFinished(int code, QProcess::ExitStatus status)
|
|||
return;
|
||||
}
|
||||
|
||||
QString ditVaeBinary = request.aceStepPath + "/ace-synth";
|
||||
QString ditVaeBinary = request.aceStepPath + "/ace-synth" + EXE_EXT;
|
||||
QFileInfo ditVaeInfo(ditVaeBinary);
|
||||
if (!ditVaeInfo.exists() || !ditVaeInfo.isExecutable())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@
|
|||
|
||||
#include "SongItem.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
inline const QString EXE_EXT = ".exe";
|
||||
#else
|
||||
inline const QString EXE_EXT = "";
|
||||
#endif
|
||||
|
||||
class AceStep : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue