mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 09:39:15 +00:00
UI: Copy OBS command line arguments to updater launch
This commit is contained in:
parent
cf8a8cce72
commit
38f41f4f94
|
@ -345,13 +345,25 @@ try {
|
|||
execInfo.cbSize = sizeof(execInfo);
|
||||
execInfo.lpFile = wUpdateFilePath;
|
||||
|
||||
string parameters = "";
|
||||
if (App()->IsPortableMode())
|
||||
parameters += "--portable";
|
||||
if (branch != WIN_DEFAULT_BRANCH) {
|
||||
string parameters;
|
||||
if (branch != WIN_DEFAULT_BRANCH)
|
||||
parameters += "--branch=" + branch;
|
||||
|
||||
obs_cmdline_args obs_args = obs_get_cmdline_args();
|
||||
for (int idx = 1; idx < obs_args.argc; idx++) {
|
||||
if (!parameters.empty())
|
||||
parameters += " ";
|
||||
parameters += "--branch=" + branch;
|
||||
|
||||
parameters += obs_args.argv[idx];
|
||||
}
|
||||
|
||||
/* Portable mode can be enabled via sentinel files, so copying the
|
||||
* command line doesn't guarantee the flag to be there. */
|
||||
if (App()->IsPortableMode() &&
|
||||
parameters.find("--portable") == string::npos) {
|
||||
if (!parameters.empty())
|
||||
parameters += " ";
|
||||
parameters += "--portable";
|
||||
}
|
||||
|
||||
BPtr<wchar_t> lpParameters;
|
||||
|
|
Loading…
Reference in a new issue