Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions entrypoint/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ fn handle_splash() {
}
}

fn handle_debug() {
if std::env::var("SWIFTNAV_CONSOLE_DEBUG").is_ok() {
for (key, value) in std::env::vars() {
eprintln!("{key}={value}");
}
}
}

fn app_dir() -> Result<PathBuf> {
let current_exe = std::env::current_exe()?;
current_exe
Expand Down Expand Up @@ -66,6 +74,7 @@ fn pythonhome_dir() -> Result<PathBuf> {
fn main() -> Result<()> {
attach_console();
handle_wayland();
handle_debug();
let args: Vec<_> = std::env::args().collect();
std::env::set_var("SWIFTNAV_CONSOLE_FROZEN", app_dir()?);
std::env::set_var("PYTHONHOME", pythonhome_dir()?);
Expand Down
4 changes: 4 additions & 0 deletions swiftnav_console/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

from PySide2.QtQml import QQmlComponent, qmlRegisterType

from PySide2.QtQuickControls2 import QQuickStyle

import swiftnav_console.console_resources # type: ignore # pylint: disable=unused-import

from .constants import ApplicationMetadata, ConnectionState, ConnectionType, Keys, Tabs
Expand Down Expand Up @@ -724,6 +726,8 @@ def main(passed_args: Optional[Tuple[str, ...]] = None) -> int:
QFontDatabase.addApplicationFont(":/fonts/Roboto-Regular.ttf")
QFontDatabase.addApplicationFont(":/fonts/Roboto-Bold.ttf")
QFontDatabase.addApplicationFont(":/fonts/RobotoCondensed-Regular.ttf")
QQuickStyle.setStyle("SwiftNav")
QQuickStyle.setFallbackStyle("Material")
# We specifically *don't* want the RobotoCondensed-Bold.ttf font so we get the right look when bolded.

qmlRegisterType(LogPanelData, "SwiftConsole", 1, 0, "LogPanelData") # type: ignore
Expand Down