mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-02 04:11:23 +00:00
Fix ProcessUtils compilation on Linux/Mac
* Only compile the Windows command-line conversion function on Windows
This commit is contained in:
parent
d1848ff35a
commit
62bf142f06
2 changed files with 7 additions and 1 deletions
|
@ -401,6 +401,8 @@ std::string ProcessUtils::currentProcessPath()
|
|||
return fileName;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
void ProcessUtils::convertWindowsCommandLine(LPCWSTR commandLine, int& argc, char**& argv)
|
||||
{
|
||||
argc = 0;
|
||||
|
@ -438,3 +440,5 @@ void ProcessUtils::convertWindowsCommandLine(LPCWSTR commandLine, int& argc, cha
|
|||
}
|
||||
LocalFree(argvUnicode);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,11 +23,13 @@ class ProcessUtils
|
|||
|
||||
static bool waitForProcess(PLATFORM_PID pid);
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
/** Convert a unicode command line returned by GetCommandLineW()
|
||||
* to a standard (argc,argv) pair. The resulting argv array and each
|
||||
* element of argv must be freed using free()
|
||||
*/
|
||||
static void convertWindowsCommandLine(LPCWSTR commandLine, int& argc, char**& argv);
|
||||
#endif
|
||||
|
||||
private:
|
||||
static void runElevatedLinux(const std::string& executable,
|
||||
|
|
Loading…
Reference in a new issue