mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
allow user to set empty dcs install dir
This will allow expert users to disable the automatic MissionScripting.lua replacement. There are many warnings and errors which have to be ignored to achieve this because DCS Liberation will not work with unmodified MissionScripting.lua
This commit is contained in:
@@ -95,6 +95,22 @@ def run_ui(game: Optional[Game]) -> None:
|
||||
uiconstants.load_aircraft_banners()
|
||||
uiconstants.load_vehicle_banners()
|
||||
|
||||
# Show warning if no DCS Installation directory was set
|
||||
if liberation_install.get_dcs_install_directory() == "":
|
||||
QtWidgets.QMessageBox.warning(
|
||||
splash,
|
||||
"No DCS installation directory.",
|
||||
"The DCS Installation directory is not set correctly. "
|
||||
"This will prevent DCS Liberation to work properly as the MissionScripting "
|
||||
"file will not be modified."
|
||||
"<br/><br/>To solve this problem, you can set the Installation directory "
|
||||
"within the preferences menu. You can also manually edit or replace the "
|
||||
"following file:"
|
||||
"<br/><br/><strong><dcs_installation_directory>/Scripts/MissionScripting.lua</strong>"
|
||||
"<br/><br/>The easiest way to do it is to replace the original file with the file in dcs-liberation distribution (<dcs_liberation_installation>/resources/scripts/MissionScripting.lua)."
|
||||
"<br/><br/>You can find more information on how to manually change this file in the Liberation Wiki (Page: Dedicated Server Guide) on GitHub.</p>",
|
||||
QtWidgets.QMessageBox.StandardButton.Ok,
|
||||
)
|
||||
# Replace DCS Mission scripting file to allow DCS Liberation to work
|
||||
try:
|
||||
liberation_install.replace_mission_scripting_file()
|
||||
|
||||
Reference in New Issue
Block a user