Skip to content

Commit 7369f58

Browse files
author
Mirko Brombin
committed
Apply environment configuration if not custom
1 parent db09649 commit 7369f58

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/runner.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,11 +832,33 @@ def async_create_bottle(self, args):
832832
configuration["Creation_Date"] = str(date.today())
833833
configuration["Update_Date"] = str(date.today())
834834

835+
'''
836+
Apply environment configuration
837+
'''
838+
buffer_output.insert(iter, "\nApplying `%s` environment configuration.." % environment)
839+
iter = buffer_output.get_end_iter()
840+
if environment != "Custom":
841+
environment_parameters = self.environments[environment.lower()]["Parameters"]
842+
for parameter in configuration["Parameters"]:
843+
if parameter in environment_parameters:
844+
configuration["Parameters"][parameter] = environment_parameters[parameter]
845+
846+
'''
847+
Save bottle configuration
848+
'''
835849
with open("%s/bottle.json" % bottle_complete_path,
836850
"w") as configuration_file:
837851
json.dump(configuration, configuration_file, indent=4)
838852
configuration_file.close()
839853

854+
'''
855+
Perform dxvk installation if configured
856+
'''
857+
if configuration["Parameters"]["dxvk"]:
858+
buffer_output.insert(iter, "\nInstalling dxvk..")
859+
iter = buffer_output.get_end_iter()
860+
self.install_dxvk(configuration)
861+
840862
'''
841863
Set the list button visible and set UI to usable again
842864
'''

0 commit comments

Comments
 (0)