mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a5190f151c | |||
| 95f6640212 | |||
| 78a47e89d3 | |||
| e47efab901 | |||
| dbd5e79678 | |||
| 925579b9e0 | |||
| 1d969e5b9c | |||
| dbf396a187 |
@@ -43,6 +43,8 @@ PrivilegesRequiredOverridesAllowed=dialog
|
||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||
ArchitecturesAllowed=x64compatible
|
||||
ArchitecturesInstallIn64BitMode=x64compatible
|
||||
CloseApplications=yes
|
||||
RestartApplications=yes
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
@@ -121,24 +121,24 @@ def settings_dialog(self):
|
||||
# IMAGE PATH #
|
||||
###############
|
||||
|
||||
image_path_container = QWidget()
|
||||
image_path_layout = QHBoxLayout()
|
||||
# image_path_container = QWidget()
|
||||
# image_path_layout = QHBoxLayout()
|
||||
|
||||
image_path = QLineEdit()
|
||||
image_path_layout.addWidget(QLabel("Image Path (requires restart):"))
|
||||
image_path_layout.addWidget(image_path)
|
||||
image_path_container.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||
image_path_container.setLayout(image_path_layout)
|
||||
image_path.setText(state.image_path)
|
||||
# image_path = QLineEdit()
|
||||
# image_path_layout.addWidget(QLabel("Image Path (requires restart):"))
|
||||
# image_path_layout.addWidget(image_path)
|
||||
# image_path_container.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||
# image_path_container.setLayout(image_path_layout)
|
||||
# image_path.setText(state.image_path)
|
||||
|
||||
def browse_image_path():
|
||||
file_path = QFileDialog.getOpenFileName(dialog, "Select Image File", state.image_path, "Image Files (*.png *.jpg)")[0]
|
||||
if file_path:
|
||||
image_path.setText(file_path)
|
||||
# def browse_image_path():
|
||||
# file_path = QFileDialog.getOpenFileName(dialog, "Select Image File", state.image_path, "Image Files (*.png *.jpg)")[0]
|
||||
# if file_path:
|
||||
# image_path.setText(file_path)
|
||||
|
||||
browse_button = QPushButton("📁")
|
||||
image_path_layout.addWidget(browse_button)
|
||||
browse_button.clicked.connect(browse_image_path)
|
||||
# browse_button = QPushButton("📁")
|
||||
# image_path_layout.addWidget(browse_button)
|
||||
# browse_button.clicked.connect(browse_image_path)
|
||||
|
||||
##################
|
||||
# SPEED LIMITING #
|
||||
@@ -246,7 +246,7 @@ def settings_dialog(self):
|
||||
download_path.text(),
|
||||
down_speed_limit.value(),
|
||||
up_speed_limit.value(),
|
||||
image_path.text(),
|
||||
# image_path.text(),
|
||||
autoresume_checkbox.isChecked(),
|
||||
max_connections.value(),
|
||||
max_downloads.value(),
|
||||
@@ -258,7 +258,7 @@ def settings_dialog(self):
|
||||
|
||||
self.tabs = QTabWidget()
|
||||
self.tab1 = general_tab("General", autoresume_container, update_checkbox_container, transparent_window_container, self.tabs)
|
||||
self.tab2 = paths_tab("Paths", download_path_container, image_path_container, self.tabs)
|
||||
self.tab2 = paths_tab("Paths", download_path_container, self.tabs)
|
||||
self.tab3 = network_tab("Network", interface_container, max_connections_container, max_downloads_container, up_speed_limit_container, down_speed_limit_container, api_url_container, self.tabs)
|
||||
|
||||
dialog.layout().addWidget(self.tabs)
|
||||
|
||||
@@ -135,8 +135,8 @@ SVG_FOLDER = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path
|
||||
|
||||
|
||||
def download_update(latest_version):
|
||||
new_filename = f"SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
||||
url = f"https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
||||
new_filename = f"SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows-setup.exe"
|
||||
url = f"https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows-setup.exe"
|
||||
|
||||
print("Downloading update...", True)
|
||||
response = r.get(url, allow_redirects=True)
|
||||
@@ -144,7 +144,8 @@ def download_update(latest_version):
|
||||
f.write(response.content)
|
||||
if not os.path.exists(new_filename):
|
||||
raise FileNotFoundError("Executable not found")
|
||||
subprocess.Popen([new_filename], shell=True)
|
||||
subprocess.run([new_filename, "/SILENT", "/SUPPRESSMSGBOXES", "/NORESTART", "/SP-"])
|
||||
# subprocess.Popen(["SoftwareManager.exe"])
|
||||
time.sleep(0.5)
|
||||
|
||||
msg = QMessageBox()
|
||||
|
||||
@@ -30,11 +30,11 @@ def general_tab(title, autoresume, update_checkbox, transparent_window, tabs):
|
||||
tabs.addTab(tab, title)
|
||||
return tab
|
||||
|
||||
def paths_tab(title, download_path, image_path, tabs):
|
||||
def paths_tab(title, download_path, tabs):
|
||||
tab = QWidget()
|
||||
layout = QVBoxLayout()
|
||||
layout.addWidget(download_path)
|
||||
layout.addWidget(image_path)
|
||||
# layout.addWidget(image_path)
|
||||
layout.addStretch()
|
||||
tab.setLayout(layout)
|
||||
tabs.addTab(tab, title)
|
||||
|
||||
Reference in New Issue
Block a user