glide icon indicating copy to clipboard operation
glide copied to clipboard

State of Windows support

Open fanc999 opened this issue 2 years ago • 8 comments

Hi,

I was able to compile the latest GIT checkout with Rust 1.66.0 with the stable-x86_64-pc-windows-msvc toolchain, along with Visual Studio 2015, however:

  • I had to drop the following lines, for pretty clear reasons:
 fn main() -> anyhow::Result<()> {
-    #[cfg(not(unix))]
-    {
-        return Err(anyhow::anyhow!("Add support for target platform"));
-    }
  • The program panicked on startup, with RUST_BACKTRACE=full I had:
%HOMEPATH%\.cargo\bin\glide e:/mp3/BeyondBeauty/4.mp3
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BoolError { message: "Failed to get cast value to a different type Unexpected None", filename: "C:\\Users\\fanc999\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\glib-0.15.12\\src\\object.rs", function: "glib::object", line: 2353 }', C:\Users\fanc999\.cargo\registry\src\github.com-1ecc6299db9ec823\glib-0.15.12\src\object.rs:2359:42
stack backtrace:
   0:     0x7ff61e2a3972 - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff61e2a3972 - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff61e2a3972 - std::sys_common::backtrace::_print_fmt
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\sys_common\backtrace.rs:65
   3:     0x7ff61e2a3972 - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\sys_common\backtrace.rs:44
   4:     0x7ff61e2bb6cb - core::fmt::write
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\core\src\fmt\mod.rs:1209
   5:     0x7ff61e29f8fa - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\io\mod.rs:1682
   6:     0x7ff61e2a36bb - std::sys_common::backtrace::_print
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\sys_common\backtrace.rs:47
   7:     0x7ff61e2a36bb - std::sys_common::backtrace::print
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\sys_common\backtrace.rs:34
   8:     0x7ff61e2a5eb9 - std::panicking::default_hook::closure$1
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:267
   9:     0x7ff61e2a5b3a - std::panicking::default_hook
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:286
  10:     0x7ff61e2a6741 - std::panicking::rust_panic_with_hook
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:688
  11:     0x7ff61e2a64cd - std::panicking::begin_panic_handler::closure$0
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:579
  12:     0x7ff61e2a439f - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\sys_common\backtrace.rs:137
  13:     0x7ff61e2a6190 - std::panicking::begin_panic_handler
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:575
  14:     0x7ff61e2c6985 - core::panicking::panic_fmt
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\core\src\panicking.rs:65
  15:     0x7ff61e2c6c23 - core::result::unwrap_failed
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\core\src\result.rs:1791
  16:     0x7ff61e21f9f4 - <T as glib::object::ObjectExt>::property::hd380932258c6cfc7
  17:     0x7ff61e23a8d2 - <O as gtk::auto::widget::WidgetExt>::connect_configure_event::configure_event_trampoline::h6d2a81325c4e9ee1
  18:     0x7ffbfd840c0f - gtk_print_run_page_setup_dialog_async
  19:     0x7ffc568c71b3 - g_closure_invoke
  20:     0x7ffc568db48e - g_signal_stop_emission_by_name
  21:     0x7ffc568d7c3b - g_signal_emit_valist
  22:     0x7ffc568d7318 - g_signal_emit
  23:     0x7ffbfd805a2c - gtk_widget_path_append_for_widget
  24:     0x7ffbfd7f0386 - gtk_widget_event
  25:     0x7ffbfd53a470 - gtk_drawing_area_new
  26:     0x7ffbfd53a249 - gtk_drawing_area_new
  27:     0x7ffc568c7977 - g_signal_type_cclosure_new
  28:     0x7ffc568c71b3 - g_closure_invoke
  29:     0x7ffc568db283 - g_signal_stop_emission_by_name
  30:     0x7ffc568d7b95 - g_signal_emit_valist
  31:     0x7ffc568d7318 - g_signal_emit
  32:     0x7ffbfd7ee67c - gtk_widget_realize
  33:     0x7ffbfd7ee3f4 - gtk_widget_map
  34:     0x7ffbfd4eb8b2 - gtk_container_get_path_for_child
  35:     0x7ffbfd47be71 - gtk_box_get_center_widget
  36:     0x7ffbfd4e6534 - gtk_container_forall
  37:     0x7ffbfd4e89fc - gtk_container_get_path_for_child
  38:     0x7ffc568c7977 - g_signal_type_cclosure_new
  39:     0x7ffc568c71b3 - g_closure_invoke
  40:     0x7ffc568db283 - g_signal_stop_emission_by_name
  41:     0x7ffc568d7b95 - g_signal_emit_valist
  42:     0x7ffc568d7318 - g_signal_emit
  43:     0x7ffbfd7ee414 - gtk_widget_map
  44:     0x7ffbfd817d36 - gtk_window_set_interactive_debugging
  45:     0x7ffbfd46bba1 - gtk_application_window_get_help_overlay
  46:     0x7ffc568c7977 - g_signal_type_cclosure_new
  47:     0x7ffc568c71b3 - g_closure_invoke
  48:     0x7ffc568db283 - g_signal_stop_emission_by_name
  49:     0x7ffc568d7b95 - g_signal_emit_valist
  50:     0x7ffc568d7318 - g_signal_emit
  51:     0x7ffbfd7ee414 - gtk_widget_map
  52:     0x7ffbfd817b36 - gtk_window_set_interactive_debugging
  53:     0x7ffc568c7977 - g_signal_type_cclosure_new
  54:     0x7ffc568c71b3 - g_closure_invoke
  55:     0x7ffc568db283 - g_signal_stop_emission_by_name
  56:     0x7ffc568d7b95 - g_signal_emit_valist
  57:     0x7ffc568d7318 - g_signal_emit
  58:     0x7ffbfd7ede36 - gtk_widget_show
  59:     0x7ffbfd4e88c1 - gtk_container_get_path_for_child
  60:     0x7ffbfd7ee18f - gtk_widget_show_all
  61:     0x7ff61e226830 - glide::VideoPlayer::start::hce07537b4228dfc3
  62:     0x7ff61e21a7ff - <O as gio::auto::application::ApplicationExt>::connect_activate::activate_trampoline::hf51f5e3f29471816
  63:     0x7ffc568c71b3 - g_closure_invoke
  64:     0x7ffc568db48e - g_signal_stop_emission_by_name
  65:     0x7ffc568d7b95 - g_signal_emit_valist
  66:     0x7ffc568d7318 - g_signal_emit
  67:     0x7ff61e23ad98 - <O as gio::application::ApplicationExtManual>::connect_open::open_trampoline::h5fbab9cd703f6e6f
  68:     0x7ffc568c71b3 - g_closure_invoke
  69:     0x7ffc568db48e - g_signal_stop_emission_by_name
  70:     0x7ffc568d7b95 - g_signal_emit_valist
  71:     0x7ffc568d7318 - g_signal_emit
  72:     0x7ffc423c06fb - g_application_open
  73:     0x7ffc423c1043 - g_application_quit
  74:     0x7ffbfd467590 - gtk_application_get_menu_by_id
  75:     0x7ffc423c157f - g_application_run
  76:     0x7ff61e235412 - <O as gio::application::ApplicationExtManual>::run_with_args::h2b49f9062a12163a
  77:     0x7ff61e22c6c7 - glide::VideoPlayer::leave_fullscreen::h26148a341d8c778a
  78:     0x7ff61e236e76 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0741fdf45da76bf9
  79:     0x7ff61e21808a - std::rt::lang_start::{{closure}}::hd20a9f1efe7defb0
  80:     0x7ff61e2999ee - core::ops::function::impls::impl$2::call_once
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\core\src\ops\function.rs:286
  81:     0x7ff61e2999ee - std::panicking::try::do_call
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:483
  82:     0x7ff61e2999ee - std::panicking::try
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:447
  83:     0x7ff61e2999ee - std::panic::catch_unwind
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panic.rs:137
  84:     0x7ff61e2999ee - std::rt::lang_start_internal::closure$2
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\rt.rs:148
  85:     0x7ff61e2999ee - std::panicking::try::do_call
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:483
  86:     0x7ff61e2999ee - std::panicking::try
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panicking.rs:447
  87:     0x7ff61e2999ee - std::panic::catch_unwind
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\panic.rs:137
  88:     0x7ff61e2999ee - std::rt::lang_start_internal
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library\std\src\rt.rs:148
  89:     0x7ff61e22de3c - main
  90:     0x7ff61e2c1b55 - invoke_main
                               at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:64
  91:     0x7ff61e2c1b55 - __scrt_common_main_seh
                               at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253
  92:     0x7ffc65187614 - BaseThreadInitThunk
  93:     0x7ffc659426a1 - RtlUserThreadStart

Thanks for the great work!

fanc999 avatar Jan 12 '23 02:01 fanc999

Oh, I was running (all built with Visual Studio 2015 or 2017):

  • gtk+-3.24.36
  • gdk-pixbuf-2.42.10
  • cairo-1.17.6
  • pango-1.50.12
  • harfbuzz-6.0.0
  • gstreamer 1.20.4 (with base, good, bad and ugly plugins)
  • glib-2.74.4

fanc999 avatar Jan 12 '23 02:01 fanc999

That looks like an issue in the gtk-rs bindings?

philn avatar Jan 12 '23 08:01 philn

Can you check again? git master was ported to GTK4 and Adwaita. Using GStreamer 1.22 would be good too. Ideally I suppose we could somehow make a windows installer bundling all the deps, but I have no idea (or interest, sorry) how to do that.

philn avatar Sep 12 '23 16:09 philn

Hi, I was just testing compiling on Windows. I was getting some error which I fixed by downloading pkg-config binary and putting it into path, but then I got stuck on not having gio-2.0:

  The system library `gio-2.0` required by crate `gio-sys` was not found.
  The file `gio-2.0.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `gio-2.0.pc`.

Apparently installing GLib should fix that, but I didn't manage to figure out where to download that from.

sdasda7777 avatar Jun 14 '24 15:06 sdasda7777

Have you tried this? https://www.gtk.org/docs/installations/windows/

philn avatar Jun 14 '24 15:06 philn

Also, https://gtk-rs.org/gtk4-rs/stable/latest/book/installation_windows.html

philn avatar Jun 14 '24 15:06 philn

Thanks for the replies! I did find the first page, but it's too complicated for me :/ Does it not have an installer?

sdasda7777 avatar Jun 14 '24 15:06 sdasda7777

I really have no idea about this windows stuff :( Maybe some of the tooling/packaging done by GPS can be reused though, see https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio/

philn avatar Jun 14 '24 16:06 philn