Skip to content

Commit

Permalink
Merge pull request #3211 from koplo199/bottlesdevs-pr
Browse files Browse the repository at this point in the history
fix: run program from CLI and launch preferences
  • Loading branch information
mirkobrombin committed Jan 22, 2024
2 parents 55942cb + d4abcc3 commit ed765a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion bottles/backend/models/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Samples:
"d3dcompiler_47",
"mono",
"gecko",
"faudio",
]
},
"application": {
Expand Down
5 changes: 3 additions & 2 deletions bottles/frontend/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,9 @@ def run_program(self):

program = [p for p in programs if p["name"] == _program][0]
_executable = program.get("path", "")
if _keep:
_args = program.get("arguments", "") + " " + _args
_program_args = program.get("arguments")
if _keep and _program_args:
_args = _program_args + " " + _args
_cwd = program.get("folder", "")
_script = program.get("script", None)

Expand Down
3 changes: 2 additions & 1 deletion bottles/frontend/windows/launchoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def __init__(self, parent, config, program, **kwargs):
self.set_transient_for(self.window)

# set widget defaults
self.entry_arguments.set_text(program.get("arguments", ""))
if program.get("arguments") not in ["", None]:
self.entry_arguments.set_text(program.get("arguments"))

# keeps track of toggled switches
self.toggled = {}
Expand Down

0 comments on commit ed765a9

Please sign in to comment.