From 80afd2ee1fbb09a0da926c38d4e2cb76b725d02d Mon Sep 17 00:00:00 2001 From: John Date: Sat, 20 Sep 2025 04:35:08 +0100 Subject: [PATCH] hardcoded appimage path --- gui/__main__.py | 59 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/gui/__main__.py b/gui/__main__.py index 6044501..5dce5b6 100755 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -4923,7 +4923,7 @@ class Settings(Page): scroll_layout.addWidget(ping_group) - app_path = sys.executable if hasattr(sys, 'frozen') else os.path.abspath(__file__) + app_path = "./hydra-veil-x86_64.AppImage" if hasattr(sys, 'frozen'): app_dir = os.path.dirname(app_path) else: @@ -4965,6 +4965,47 @@ class Settings(Page): """) command_layout.addWidget(self.cli_command) + instruction_label = QLabel("You must be in the same folder as the AppImage, so if it's in Downloads, then go to the Downloads folder") + instruction_label.setWordWrap(True) + instruction_label.setStyleSheet(f""" + QLabel {{ + color: #FFA500; + font-size: 11px; + margin: 5px 0; + {self.font_style} + }} + """) + command_layout.addWidget(instruction_label) + + trouble_label = QLabel("Trouble finding the AppImage?") + trouble_label.setStyleSheet(f""" + QLabel {{ + color: white; + font-size: 12px; + font-weight: bold; + margin-top: 10px; + {self.font_style} + }} + """) + command_layout.addWidget(trouble_label) + + find_command = QLineEdit() + find_command.setReadOnly(True) + find_command.setText("find ~ -name 'hydra-veil-x86_64.AppImage' 2>/dev/null") + find_command.setStyleSheet(f""" + QLineEdit {{ + color: white; + background: rgba(255, 255, 255, 0.1); + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 4px; + padding: 8px; + font-family: 'Courier New', monospace; + font-size: 11px; + margin-bottom: 10px; + }} + """) + command_layout.addWidget(find_command) + copy_button = QPushButton("Copy Command") copy_button.setFixedSize(120, 40) copy_button.setStyleSheet(f""" @@ -5172,7 +5213,14 @@ class Settings(Page): return profile = ProfileController.get(profile_id) + + + if profile and isinstance(profile, SystemProfile): + app_path = "./hydra-veil-x86_64.AppImage" + self.cli_command.setText(f"{app_path} --cli profile enable -i {profile_id}") + self.cli_copy_button.setEnabled(True) + self.cli_execute_button.setEnabled(True) ip_address = self.extract_endpoint_ip(profile) if ip_address: self.ping_instruction_label.setText(f"Step 1, Can you Ping it? Copy-paste the command below into your terminal. This VPN Node's IP address is {ip_address}") @@ -5181,10 +5229,7 @@ class Settings(Page): self.test_ping_button.setEnabled(True) self.ping_result_label.hide() - app_path = sys.executable if hasattr(sys, 'frozen') else os.path.abspath(__file__) - self.cli_command.setText(f"{app_path} --cli profile enable -i {profile_id}") - self.cli_copy_button.setEnabled(True) - self.cli_execute_button.setEnabled(True) + if hasattr(self, 'wg_quick_up_command_widget'): self.wg_quick_up_command_widget.setText(f"sudo wg-quick up '/etc/hydra-veil/profiles/{profile_id}/wg.conf'") @@ -5197,9 +5242,7 @@ class Settings(Page): self.copy_ping_button.setEnabled(False) self.test_ping_button.setEnabled(False) self.ping_result_label.hide() - self.cli_command.setText("Could not load profile configuration") - self.cli_copy_button.setEnabled(False) - self.cli_execute_button.setEnabled(False) + if hasattr(self, 'wg_quick_up_command_widget'): self.wg_quick_up_command_widget.setText("Could not load profile configuration") self.wg_quick_down_command_widget.setText("Could not load profile configuration")