-
Notifications
You must be signed in to change notification settings - Fork 27
添加了代理命令(包装命令) #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
添加了代理命令(包装命令) #173
Conversation
@@ -394,9 +402,11 @@ public override async Task<LaunchResult> LaunchTaskAsync(LaunchSettings settings | |||
else | |||
{ | |||
var normalJavaPath = java!.JavaPath.Replace("javaw", "java", StringComparison.OrdinalIgnoreCase); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this pr but @laolarou726 what's this? what if the path is "myjavawow/javaw.exe"? as a launcher core i think we should exactly use the given path. the problem that users might accidently select javaw should be addressed by the user inferface part.
var javaCommand = $"\"{normalJavaPath}\" {string.Join(' ', arguments)}"; | ||
var javaCommand = string.IsNullOrWhiteSpace(commandProxy) | ||
? $"\"{normalJavaPath}\" {string.Join(' ', arguments)}" | ||
: $"\"{commandProxy}\" \"{normalJavaPath}\" {string.Join(' ', arguments)}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we shouldn't use "
for commandProxy
, as it might be something like dotnet run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, what about to use a commandFormat
instead of commandProxy
? For example we could directly change the format to "prime-run {java} even to put something here {args} maybe something more"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
阿巴阿巴()好像说太多了()木有为难的意思,现在这样也可以()我先approve了()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we shouldn't use
"
forcommandProxy
, as it might be something likedotnet run
我想的是,如果用的是/path to/file这样的格式,应该考虑双引号封一起,不然路径有问题。至于dotnet run这种就不太好处理,这个要用dotnet作为程序主体吧,然后run 其他参数。其实也可以是分成代理命令主体和代理命令参数两个部分。但是这样要是用ls | grep 之类的管道符就很复杂了吧。一般就用一个prime-run,问题应该不大
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, what about to use a
commandFormat
instead ofcommandProxy
? For example we could directly change the format to"prime-run {java} even to put something here {args} maybe something more"
.
或许是可行的办法,在useShellExecute的时候通过,在不使用的情况下需要确定命令的主体
预期目标 What does the pull request do
检查清单 Checklist
关联事件 Related
补充说明 Additional Information
无 N/A
PR-Codex overview
This PR introduces a new property and modifies the process launching logic to support a command proxy in
LaunchSettings
. It enhances the flexibility of game launching by allowing an alternative command to be specified.Detailed summary
CommandProxy
property toLaunchSettings
.ProcessStartInfo psi
withProcessStartInfo processStartInfo
.CommandProxy
.processStartInfo
.