mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
1.1.2
This commit is contained in:
parent
35169eafd9
commit
2ebafda806
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ generator.log
|
|||||||
templates/Scenarios/user
|
templates/Scenarios/user
|
||||||
templates/Scenarios/downloaded
|
templates/Scenarios/downloaded
|
||||||
config/user-data.yaml
|
config/user-data.yaml
|
||||||
|
*.exe
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import qtmodern.windows
|
|||||||
# UPDATE BUILD VERSION
|
# UPDATE BUILD VERSION
|
||||||
maj_version = 1
|
maj_version = 1
|
||||||
minor_version = 1
|
minor_version = 1
|
||||||
patch_version = 1
|
patch_version = 2
|
||||||
|
|
||||||
user_files_url = 'https://dcs-helicopters.com/user-files/'
|
user_files_url = 'https://dcs-helicopters.com/user-files/'
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
"transport_drop_qty": self.troop_drop_spinBox.value(),
|
"transport_drop_qty": self.troop_drop_spinBox.value(),
|
||||||
"smoke_pickup_zones": self.smoke_pickup_zone_checkBox.isChecked(),
|
"smoke_pickup_zones": self.smoke_pickup_zone_checkBox.isChecked(),
|
||||||
"player_slots": self.player_slots,
|
"player_slots": self.player_slots,
|
||||||
"player_hotstart": self.hotstart_checkBox.isChecked,
|
"player_hotstart": self.hotstart_checkBox.isChecked(),
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info("Generating mission with options:")
|
logger.info("Generating mission with options:")
|
||||||
@ -645,7 +645,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
params["package"] = self.scenario.packageID
|
params["package"] = self.scenario.packageID
|
||||||
params["rating"] = rating
|
params["rating"] = rating
|
||||||
QApplication.setOverrideCursor(Qt.WaitCursor)
|
QApplication.setOverrideCursor(Qt.WaitCursor)
|
||||||
r = requests.get(ratings_url, allow_redirects=False, timeout=3, params=params)
|
r = requests.get(ratings_url, allow_redirects=False, timeout=7, params=params)
|
||||||
QApplication.restoreOverrideCursor()
|
QApplication.restoreOverrideCursor()
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
logger.info("Rating successfully submitted for " + self.scenario.packageID)
|
logger.info("Rating successfully submitted for " + self.scenario.packageID)
|
||||||
@ -676,7 +676,7 @@ def checkVersion(splashscreen):
|
|||||||
|
|
||||||
version_url = 'https://dcs-helicopters.com/app-updates/versioncheck.yaml'
|
version_url = 'https://dcs-helicopters.com/app-updates/versioncheck.yaml'
|
||||||
try:
|
try:
|
||||||
r = requests.get(version_url, allow_redirects=False, timeout=3)
|
r = requests.get(version_url, allow_redirects=False, timeout=7)
|
||||||
v = yaml.safe_load(r.content)
|
v = yaml.safe_load(r.content)
|
||||||
avail_build = v["version"]
|
avail_build = v["version"]
|
||||||
if version.parse(avail_build) > version.parse(version_string):
|
if version.parse(avail_build) > version.parse(version_string):
|
||||||
@ -700,10 +700,15 @@ ratings_url = 'https://dcs-helicopters.com/user-files/ratings.php'
|
|||||||
|
|
||||||
def loadModules(splashscreen):
|
def loadModules(splashscreen):
|
||||||
|
|
||||||
r = requests.get(modules_map_url, allow_redirects=False, timeout=5)
|
try:
|
||||||
|
r = requests.get(modules_map_url, allow_redirects=False, timeout=7)
|
||||||
if not r.status_code == 200:
|
if not r.status_code == 200:
|
||||||
logger.error("Could not retrieve the modules map.")
|
logger.error("Could not retrieve the modules map.")
|
||||||
return
|
return
|
||||||
|
except:
|
||||||
|
logger.error("Failed to retrieve module map.")
|
||||||
|
return
|
||||||
|
|
||||||
module_list = yaml.safe_load(r.content)
|
module_list = yaml.safe_load(r.content)
|
||||||
files_success = []
|
files_success = []
|
||||||
files_failed = []
|
files_failed = []
|
||||||
@ -745,12 +750,19 @@ def loadModules(splashscreen):
|
|||||||
|
|
||||||
# download files in remote package
|
# download files in remote package
|
||||||
for filename in module_list[module]["files"]:
|
for filename in module_list[module]["files"]:
|
||||||
|
broken_file = False
|
||||||
splash.showMessage("Downloading " + filename + " ...", Qt.AlignHCenter | Qt.AlignTop, Qt.white)
|
splash.showMessage("Downloading " + filename + " ...", Qt.AlignHCenter | Qt.AlignTop, Qt.white)
|
||||||
app.processEvents()
|
app.processEvents()
|
||||||
|
|
||||||
url = modules_url + module + "/" + filename
|
url = modules_url + module + "/" + filename
|
||||||
r = requests.get(url, allow_redirects=False)
|
try:
|
||||||
if r.status_code == 200:
|
r = requests.get(url, allow_redirects=False, timeout=10)
|
||||||
|
except:
|
||||||
|
logger("Request for " + url + " failed.")
|
||||||
|
broken_file = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if r and r.status_code == 200:
|
||||||
os.makedirs(module_dir, exist_ok=True)
|
os.makedirs(module_dir, exist_ok=True)
|
||||||
file_path = os.path.join(module_dir, filename)
|
file_path = os.path.join(module_dir, filename)
|
||||||
open(file_path, 'wb+').write(r.content)
|
open(file_path, 'wb+').write(r.content)
|
||||||
@ -763,10 +775,12 @@ def loadModules(splashscreen):
|
|||||||
else:
|
else:
|
||||||
updated_scenarios.append(module_list[module]["name"])
|
updated_scenarios.append(module_list[module]["name"])
|
||||||
else:
|
else:
|
||||||
|
broken_file = True
|
||||||
files_failed.append(filename)
|
files_failed.append(filename)
|
||||||
logger.error("Download failed: " + filename)
|
logger.error("Download failed: " + filename)
|
||||||
|
|
||||||
# create the local package file
|
# create the local package file
|
||||||
|
if not broken_file:
|
||||||
logger.info("Creating local package file for module " + module)
|
logger.info("Creating local package file for module " + module)
|
||||||
package = {}
|
package = {}
|
||||||
package['version'] = module_list[module]['version']
|
package['version'] = module_list[module]['version']
|
||||||
@ -787,14 +801,16 @@ def loadModules(splashscreen):
|
|||||||
msg.setWindowTitle("Downloaded Files")
|
msg.setWindowTitle("Downloaded Files")
|
||||||
message = ""
|
message = ""
|
||||||
if len(new_scenarios) > 0:
|
if len(new_scenarios) > 0:
|
||||||
message = message + "New scenarios added: \n"
|
message = message + "New scenarios added: \n\n"
|
||||||
for name in new_scenarios:
|
for name in new_scenarios:
|
||||||
message = message + name + "\n"
|
message = message + name + "\n"
|
||||||
if len(updated_scenarios) > 0:
|
if len(updated_scenarios) > 0:
|
||||||
message = message + "\nScenarios updated: \n"
|
message = message + "\nScenarios updated: \n"
|
||||||
for name in updated_scenarios:
|
for name in updated_scenarios:
|
||||||
message = message + name + "\n"
|
message = message + name + "\n"
|
||||||
msg.setText(message + "\n\n" + str(len(files_failed)) + " files failed.")
|
if len(files_failed) > 0:
|
||||||
|
message = message + "\n\n" + str(len(files_failed)) + " files failed."
|
||||||
|
msg.setText(message)
|
||||||
x = msg.exec_()
|
x = msg.exec_()
|
||||||
else:
|
else:
|
||||||
logger.info("All packages up to date.")
|
logger.info("All packages up to date.")
|
||||||
@ -802,7 +818,7 @@ def loadModules(splashscreen):
|
|||||||
def getRatings(splashscreen):
|
def getRatings(splashscreen):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = requests.get(ratings_url, allow_redirects=False, timeout=3)
|
r = requests.get(ratings_url, allow_redirects=False, timeout=7)
|
||||||
j = json.loads(r.text)
|
j = json.loads(r.text)
|
||||||
# for entry in j:
|
# for entry in j:
|
||||||
# print(entry["package"])
|
# print(entry["package"])
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class UH_60L(HelicopterType):
|
|||||||
chaff_charge_size = 1
|
chaff_charge_size = 1
|
||||||
flare_charge_size = 1
|
flare_charge_size = 1
|
||||||
|
|
||||||
pylons: Set[int] = {1, 2, 3, 4}
|
pylons: Set[int] = {1, 2, 3, 4, 5, 6, 7}
|
||||||
|
|
||||||
tasks = [task.Transport]
|
tasks = [task.Transport]
|
||||||
task_default = task.Transport
|
task_default = task.Transport
|
||||||
|
|||||||
Binary file not shown.
34
Generator/installforge_constants.txt
Normal file
34
Generator/installforge_constants.txt
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
for reference from here: https://installforge.net/forums/viewtopic.php?t=2
|
||||||
|
|
||||||
|
<InstallPath>
|
||||||
|
|
||||||
|
<AppName>
|
||||||
|
<ProgramVersion>
|
||||||
|
<Company>
|
||||||
|
<Website>
|
||||||
|
<Language>
|
||||||
|
<Username>
|
||||||
|
<Organisation>
|
||||||
|
<Serial>
|
||||||
|
|
||||||
|
<Windows>
|
||||||
|
<System>
|
||||||
|
<Temp>
|
||||||
|
<Font>
|
||||||
|
|
||||||
|
<ProgramFiles>
|
||||||
|
|
||||||
|
<Desktop>
|
||||||
|
<DesktopPublic>
|
||||||
|
|
||||||
|
<Startup>
|
||||||
|
<StartupPublic>
|
||||||
|
|
||||||
|
<Documents>
|
||||||
|
<DocumentsPublic>
|
||||||
|
|
||||||
|
<StartmenuPrograms>
|
||||||
|
<StartmenuProgramsPublic>
|
||||||
|
|
||||||
|
<AppData>
|
||||||
|
<AppDataPublic>
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user